Skip to content

Commit 2de4b9c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 357d8b8 of spec repo
1 parent 192bab1 commit 2de4b9c

94 files changed

Lines changed: 11728 additions & 1784 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 1526 additions & 220 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Create an LLM Observability prompt returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptData;
5+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptDataAttributes;
6+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptRequest;
7+
use datadog_api_client::datadogV2::model::LLMObsPromptTemplate;
8+
use datadog_api_client::datadogV2::model::LLMObsPromptType;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
let body = LLMObsCreatePromptRequest::new(LLMObsCreatePromptData::new(
13+
LLMObsCreatePromptDataAttributes::new(
14+
"Example-LLM-Observability".to_string(),
15+
LLMObsPromptTemplate::LLMObsPromptTextTemplate("Hello".to_string()),
16+
)
17+
.env_ids(vec![])
18+
.labels(vec![]),
19+
LLMObsPromptType::PROMPT_TEMPLATES,
20+
));
21+
let mut configuration = datadog::Configuration::new();
22+
configuration.set_unstable_operation_enabled("v2.CreateLLMObsPrompt", true);
23+
let api = LLMObservabilityAPI::with_config(configuration);
24+
let resp = api.create_llm_obs_prompt(body).await;
25+
if let Ok(value) = resp {
26+
println!("{:#?}", value);
27+
} else {
28+
println!("{:#?}", resp.unwrap_err());
29+
}
30+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Create a new LLM Observability prompt version returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptVersionData;
5+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptVersionDataAttributes;
6+
use datadog_api_client::datadogV2::model::LLMObsCreatePromptVersionRequest;
7+
use datadog_api_client::datadogV2::model::LLMObsPromptTemplate;
8+
use datadog_api_client::datadogV2::model::LLMObsPromptVersionType;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
// there is a valid "prompt" in the system
13+
let prompt_data_attributes_prompt_id =
14+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
15+
let body = LLMObsCreatePromptVersionRequest::new(LLMObsCreatePromptVersionData::new(
16+
LLMObsCreatePromptVersionDataAttributes::new(
17+
LLMObsPromptTemplate::LLMObsPromptTextTemplate("Hello v3".to_string()),
18+
)
19+
.env_ids(vec![])
20+
.labels(vec![]),
21+
LLMObsPromptVersionType::PROMPT_TEMPLATE_VERSIONS,
22+
));
23+
let mut configuration = datadog::Configuration::new();
24+
configuration.set_unstable_operation_enabled("v2.CreateLLMObsPromptVersion", true);
25+
let api = LLMObservabilityAPI::with_config(configuration);
26+
let resp = api
27+
.create_llm_obs_prompt_version(prompt_data_attributes_prompt_id.clone(), body)
28+
.await;
29+
if let Ok(value) = resp {
30+
println!("{:#?}", value);
31+
} else {
32+
println!("{:#?}", resp.unwrap_err());
33+
}
34+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Delete an LLM Observability prompt returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
// there is a valid "prompt" in the system
8+
let prompt_data_attributes_prompt_id =
9+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
10+
let mut configuration = datadog::Configuration::new();
11+
configuration.set_unstable_operation_enabled("v2.DeleteLLMObsPrompt", true);
12+
let api = LLMObservabilityAPI::with_config(configuration);
13+
let resp = api
14+
.delete_llm_obs_prompt(prompt_data_attributes_prompt_id.clone())
15+
.await;
16+
if let Ok(value) = resp {
17+
println!("{:#?}", value);
18+
} else {
19+
println!("{:#?}", resp.unwrap_err());
20+
}
21+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get an LLM Observability prompt returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::GetLLMObsPromptOptionalParams;
4+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
// there is a valid "prompt" in the system
9+
let prompt_data_attributes_prompt_id =
10+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
11+
let mut configuration = datadog::Configuration::new();
12+
configuration.set_unstable_operation_enabled("v2.GetLLMObsPrompt", true);
13+
let api = LLMObservabilityAPI::with_config(configuration);
14+
let resp = api
15+
.get_llm_obs_prompt(
16+
prompt_data_attributes_prompt_id.clone(),
17+
GetLLMObsPromptOptionalParams::default(),
18+
)
19+
.await;
20+
if let Ok(value) = resp {
21+
println!("{:#?}", value);
22+
} else {
23+
println!("{:#?}", resp.unwrap_err());
24+
}
25+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Get a specific LLM Observability prompt version returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
// there is a valid "prompt" in the system
8+
let prompt_data_attributes_prompt_id =
9+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
10+
11+
// there is a valid "prompt_version" in the system
12+
let prompt_version_data_attributes_version: i64 =
13+
std::env::var("PROMPT_VERSION_DATA_ATTRIBUTES_VERSION")
14+
.unwrap()
15+
.parse()
16+
.unwrap();
17+
let mut configuration = datadog::Configuration::new();
18+
configuration.set_unstable_operation_enabled("v2.GetLLMObsPromptVersion", true);
19+
let api = LLMObservabilityAPI::with_config(configuration);
20+
let resp = api
21+
.get_llm_obs_prompt_version(
22+
prompt_data_attributes_prompt_id.clone(),
23+
prompt_version_data_attributes_version.clone(),
24+
)
25+
.await;
26+
if let Ok(value) = resp {
27+
println!("{:#?}", value);
28+
} else {
29+
println!("{:#?}", resp.unwrap_err());
30+
}
31+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// List versions of an LLM Observability prompt returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
// there is a valid "prompt" in the system
8+
let prompt_data_attributes_prompt_id =
9+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
10+
let mut configuration = datadog::Configuration::new();
11+
configuration.set_unstable_operation_enabled("v2.ListLLMObsPromptVersions", true);
12+
let api = LLMObservabilityAPI::with_config(configuration);
13+
let resp = api
14+
.list_llm_obs_prompt_versions(prompt_data_attributes_prompt_id.clone())
15+
.await;
16+
if let Ok(value) = resp {
17+
println!("{:#?}", value);
18+
} else {
19+
println!("{:#?}", resp.unwrap_err());
20+
}
21+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// List LLM Observability prompts returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::api_llm_observability::ListLLMObsPromptsOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
// there is a valid "prompt" in the system
9+
let prompt_data_attributes_prompt_id =
10+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
11+
let mut configuration = datadog::Configuration::new();
12+
configuration.set_unstable_operation_enabled("v2.ListLLMObsPrompts", true);
13+
let api = LLMObservabilityAPI::with_config(configuration);
14+
let resp = api
15+
.list_llm_obs_prompts(
16+
ListLLMObsPromptsOptionalParams::default()
17+
.filter_prompt_id(prompt_data_attributes_prompt_id.clone()),
18+
)
19+
.await;
20+
if let Ok(value) = resp {
21+
println!("{:#?}", value);
22+
} else {
23+
println!("{:#?}", resp.unwrap_err());
24+
}
25+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Update an LLM Observability prompt returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::model::LLMObsPromptType;
5+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptData;
6+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptDataAttributes;
7+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptRequest;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
// there is a valid "prompt" in the system
12+
let prompt_data_attributes_prompt_id =
13+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
14+
let body = LLMObsUpdatePromptRequest::new(LLMObsUpdatePromptData::new(
15+
LLMObsUpdatePromptDataAttributes::new().title("New title".to_string()),
16+
LLMObsPromptType::PROMPT_TEMPLATES,
17+
));
18+
let mut configuration = datadog::Configuration::new();
19+
configuration.set_unstable_operation_enabled("v2.UpdateLLMObsPrompt", true);
20+
let api = LLMObservabilityAPI::with_config(configuration);
21+
let resp = api
22+
.update_llm_obs_prompt(prompt_data_attributes_prompt_id.clone(), body)
23+
.await;
24+
if let Ok(value) = resp {
25+
println!("{:#?}", value);
26+
} else {
27+
println!("{:#?}", resp.unwrap_err());
28+
}
29+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Update a specific LLM Observability prompt version returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::model::LLMObsPromptVersionType;
5+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptVersionData;
6+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptVersionDataAttributes;
7+
use datadog_api_client::datadogV2::model::LLMObsUpdatePromptVersionRequest;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
// there is a valid "prompt" in the system
12+
let prompt_data_attributes_prompt_id =
13+
std::env::var("PROMPT_DATA_ATTRIBUTES_PROMPT_ID").unwrap();
14+
15+
// there is a valid "prompt_version" in the system
16+
let prompt_version_data_attributes_version: i64 =
17+
std::env::var("PROMPT_VERSION_DATA_ATTRIBUTES_VERSION")
18+
.unwrap()
19+
.parse()
20+
.unwrap();
21+
let body = LLMObsUpdatePromptVersionRequest::new(LLMObsUpdatePromptVersionData::new(
22+
LLMObsUpdatePromptVersionDataAttributes::new()
23+
.env_ids(vec![])
24+
.labels(vec![]),
25+
LLMObsPromptVersionType::PROMPT_TEMPLATE_VERSIONS,
26+
));
27+
let mut configuration = datadog::Configuration::new();
28+
configuration.set_unstable_operation_enabled("v2.UpdateLLMObsPromptVersion", true);
29+
let api = LLMObservabilityAPI::with_config(configuration);
30+
let resp = api
31+
.update_llm_obs_prompt_version(
32+
prompt_data_attributes_prompt_id.clone(),
33+
prompt_version_data_attributes_version.clone(),
34+
body,
35+
)
36+
.await;
37+
if let Ok(value) = resp {
38+
println!("{:#?}", value);
39+
} else {
40+
println!("{:#?}", resp.unwrap_err());
41+
}
42+
}

0 commit comments

Comments
 (0)