@@ -10,6 +10,22 @@ use reqwest::header::{HeaderMap, HeaderValue};
1010use serde:: { Deserialize , Serialize } ;
1111use std:: io:: Write ;
1212
13+ /// GetInterfacesOptionalParams is a struct for passing parameters to the method [`NetworkDeviceMonitoringAPI::get_interfaces`]
14+ #[ non_exhaustive]
15+ #[ derive( Clone , Default , Debug ) ]
16+ pub struct GetInterfacesOptionalParams {
17+ /// Whether to get the IP addresses of the interfaces.
18+ pub get_ip_addresses : Option < bool > ,
19+ }
20+
21+ impl GetInterfacesOptionalParams {
22+ /// Whether to get the IP addresses of the interfaces.
23+ pub fn get_ip_addresses ( mut self , value : bool ) -> Self {
24+ self . get_ip_addresses = Some ( value) ;
25+ self
26+ }
27+ }
28+
1329/// ListDevicesOptionalParams is a struct for passing parameters to the method [`NetworkDeviceMonitoringAPI::list_devices`]
1430#[ non_exhaustive]
1531#[ derive( Clone , Default , Debug ) ]
@@ -260,9 +276,10 @@ impl NetworkDeviceMonitoringAPI {
260276 pub async fn get_interfaces (
261277 & self ,
262278 device_id : String ,
279+ params : GetInterfacesOptionalParams ,
263280 ) -> Result < crate :: datadogV2:: model:: GetInterfacesResponse , datadog:: Error < GetInterfacesError > >
264281 {
265- match self . get_interfaces_with_http_info ( device_id) . await {
282+ match self . get_interfaces_with_http_info ( device_id, params ) . await {
266283 Ok ( response_content) => {
267284 if let Some ( e) = response_content. entity {
268285 Ok ( e)
@@ -280,13 +297,17 @@ impl NetworkDeviceMonitoringAPI {
280297 pub async fn get_interfaces_with_http_info (
281298 & self ,
282299 device_id : String ,
300+ params : GetInterfacesOptionalParams ,
283301 ) -> Result <
284302 datadog:: ResponseContent < crate :: datadogV2:: model:: GetInterfacesResponse > ,
285303 datadog:: Error < GetInterfacesError > ,
286304 > {
287305 let local_configuration = & self . config ;
288306 let operation_id = "v2.get_interfaces" ;
289307
308+ // unbox and build optional parameters
309+ let get_ip_addresses = params. get_ip_addresses ;
310+
290311 let local_client = & self . client ;
291312
292313 let local_uri_str = format ! (
@@ -297,6 +318,10 @@ impl NetworkDeviceMonitoringAPI {
297318 local_client. request ( reqwest:: Method :: GET , local_uri_str. as_str ( ) ) ;
298319
299320 local_req_builder = local_req_builder. query ( & [ ( "device_id" , & device_id. to_string ( ) ) ] ) ;
321+ if let Some ( ref local_query_param) = get_ip_addresses {
322+ local_req_builder =
323+ local_req_builder. query ( & [ ( "get_ip_addresses" , & local_query_param. to_string ( ) ) ] ) ;
324+ } ;
300325
301326 // build headers
302327 let mut headers = HeaderMap :: new ( ) ;
0 commit comments