-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit a3b4c237 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jan 15, 2025
1 parent
4249e96
commit 209ee7b
Showing
14 changed files
with
4,738 additions
and
3,552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Create a custom framework returns "OK" response | ||
use datadog_api_client::datadog; | ||
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI; | ||
use datadog_api_client::datadogV2::model::CreateCustomFrameworkRequest; | ||
use datadog_api_client::datadogV2::model::FrameworkControl; | ||
use datadog_api_client::datadogV2::model::FrameworkRequirement; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let body = CreateCustomFrameworkRequest::new( | ||
"".to_string(), | ||
"".to_string(), | ||
vec![FrameworkRequirement::new( | ||
vec![FrameworkControl::new("".to_string(), vec!["".to_string()])], | ||
"".to_string(), | ||
)], | ||
"".to_string(), | ||
); | ||
let mut configuration = datadog::Configuration::new(); | ||
configuration.set_unstable_operation_enabled("v2.CreateCustomFramework", true); | ||
let api = SecurityMonitoringAPI::with_config(configuration); | ||
let resp = api.create_custom_framework(body).await; | ||
if let Ok(value) = resp { | ||
println!("{:#?}", value); | ||
} else { | ||
println!("{:#?}", resp.unwrap_err()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Update a custom framework returns "OK" response | ||
use datadog_api_client::datadog; | ||
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI; | ||
use datadog_api_client::datadogV2::model::FrameworkControl; | ||
use datadog_api_client::datadogV2::model::FrameworkRequirement; | ||
use datadog_api_client::datadogV2::model::UpdateCustomFrameworkRequest; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let body = UpdateCustomFrameworkRequest::new( | ||
"".to_string(), | ||
"".to_string(), | ||
vec![FrameworkRequirement::new( | ||
vec![FrameworkControl::new("".to_string(), vec!["".to_string()])], | ||
"".to_string(), | ||
)], | ||
"".to_string(), | ||
); | ||
let mut configuration = datadog::Configuration::new(); | ||
configuration.set_unstable_operation_enabled("v2.UpdateCustomFramework", true); | ||
let api = SecurityMonitoringAPI::with_config(configuration); | ||
let resp = api | ||
.update_custom_framework("handle".to_string(), "version".to_string(), body) | ||
.await; | ||
if let Ok(value) = resp { | ||
println!("{:#?}", value); | ||
} else { | ||
println!("{:#?}", resp.unwrap_err()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.