CaseManagementAPI

Struct CaseManagementAPI 

Source
pub struct CaseManagementAPI { /* private fields */ }
Expand description

View and manage cases and projects within Case Management. See the Case Management page for more information.

Implementations§

Source§

impl CaseManagementAPI

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v2_case-management_GetProjects.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.get_projects().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
More examples
Hide additional examples
examples/v2_case-management_GetProject.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.get_project("project_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_case-management_DeleteProject.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.delete_project("project_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_case-management_SearchCases.rs (line 9)
7async fn main() {
8    let configuration = datadog::Configuration::new();
9    let api = CaseManagementAPI::with_config(configuration);
10    let resp = api.search_cases(SearchCasesOptionalParams::default()).await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
examples/v2_case-management_GetCase.rs (line 10)
6async fn main() {
7    // there is a valid "case" in the system
8    let case_id = std::env::var("CASE_ID").unwrap();
9    let configuration = datadog::Configuration::new();
10    let api = CaseManagementAPI::with_config(configuration);
11    let resp = api.get_case(case_id.clone()).await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}
examples/v2_case-management_SearchCases_3433960044.rs (line 11)
9async fn main() {
10    let configuration = datadog::Configuration::new();
11    let api = CaseManagementAPI::with_config(configuration);
12    let response = api.search_cases_with_pagination(SearchCasesOptionalParams::default());
13    pin_mut!(response);
14    while let Some(resp) = response.next().await {
15        if let Ok(value) = resp {
16            println!("{:#?}", value);
17        } else {
18            println!("{:#?}", resp.unwrap_err());
19        }
20    }
21}
Source

pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self

Source

pub async fn archive_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<ArchiveCaseError>>

Archive case

Examples found in repository?
examples/v2_case-management_ArchiveCase.rs (line 15)
9async fn main() {
10    // there is a valid "case" in the system
11    let case_id = std::env::var("CASE_ID").unwrap();
12    let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13    let configuration = datadog::Configuration::new();
14    let api = CaseManagementAPI::with_config(configuration);
15    let resp = api.archive_case(case_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn archive_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<ArchiveCaseError>>

Archive case

Source

pub async fn assign_case( &self, case_id: String, body: CaseAssignRequest, ) -> Result<CaseResponse, Error<AssignCaseError>>

Assign case to a user

Examples found in repository?
examples/v2_case-management_AssignCase.rs (line 22)
10async fn main() {
11    // there is a valid "case" in the system
12    let case_id = std::env::var("CASE_ID").unwrap();
13
14    // there is a valid "user" in the system
15    let user_data_id = std::env::var("USER_DATA_ID").unwrap();
16    let body = CaseAssignRequest::new(CaseAssign::new(
17        CaseAssignAttributes::new(user_data_id.clone()),
18        CaseResourceType::CASE,
19    ));
20    let configuration = datadog::Configuration::new();
21    let api = CaseManagementAPI::with_config(configuration);
22    let resp = api.assign_case(case_id.clone(), body).await;
23    if let Ok(value) = resp {
24        println!("{:#?}", value);
25    } else {
26        println!("{:#?}", resp.unwrap_err());
27    }
28}
Source

pub async fn assign_case_with_http_info( &self, case_id: String, body: CaseAssignRequest, ) -> Result<ResponseContent<CaseResponse>, Error<AssignCaseError>>

Assign case to a user

Source

pub async fn comment_case( &self, case_id: String, body: CaseCommentRequest, ) -> Result<TimelineResponse, Error<CommentCaseError>>

Comment case

Examples found in repository?
examples/v2_case-management_CommentCase.rs (line 19)
10async fn main() {
11    // there is a valid "case" in the system
12    let case_id = std::env::var("CASE_ID").unwrap();
13    let body = CaseCommentRequest::new(CaseComment::new(
14        CaseCommentAttributes::new("Hello World !".to_string()),
15        CaseResourceType::CASE,
16    ));
17    let configuration = datadog::Configuration::new();
18    let api = CaseManagementAPI::with_config(configuration);
19    let resp = api.comment_case(case_id.clone(), body).await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub async fn comment_case_with_http_info( &self, case_id: String, body: CaseCommentRequest, ) -> Result<ResponseContent<TimelineResponse>, Error<CommentCaseError>>

Comment case

Source

pub async fn create_case( &self, body: CaseCreateRequest, ) -> Result<CaseResponse, Error<CreateCaseError>>

Create a Case

Examples found in repository?
examples/v2_case-management_CreateCase.rs (line 42)
18async fn main() {
19    // there is a valid "user" in the system
20    let user_data_id = std::env::var("USER_DATA_ID").unwrap();
21    let body = CaseCreateRequest::new(
22        CaseCreate::new(
23            CaseCreateAttributes::new(
24                "Security breach investigation in 0cfbc5cbc676ee71".to_string(),
25                "00000000-0000-0000-0000-000000000001".to_string(),
26            )
27            .priority(CasePriority::NOT_DEFINED),
28            CaseResourceType::CASE,
29        )
30        .relationships(
31            CaseCreateRelationships::new(ProjectRelationship::new(ProjectRelationshipData::new(
32                "d4bbe1af-f36e-42f1-87c1-493ca35c320e".to_string(),
33                ProjectResourceType::PROJECT,
34            )))
35            .assignee(Some(NullableUserRelationship::new(Some(
36                NullableUserRelationshipData::new(user_data_id.clone(), UserResourceType::USER),
37            )))),
38        ),
39    );
40    let configuration = datadog::Configuration::new();
41    let api = CaseManagementAPI::with_config(configuration);
42    let resp = api.create_case(body).await;
43    if let Ok(value) = resp {
44        println!("{:#?}", value);
45    } else {
46        println!("{:#?}", resp.unwrap_err());
47    }
48}
Source

pub async fn create_case_with_http_info( &self, body: CaseCreateRequest, ) -> Result<ResponseContent<CaseResponse>, Error<CreateCaseError>>

Create a Case

Source

pub async fn create_project( &self, body: ProjectCreateRequest, ) -> Result<ProjectResponse, Error<CreateProjectError>>

Create a project.

Examples found in repository?
examples/v2_case-management_CreateProject.rs (line 17)
10async fn main() {
11    let body = ProjectCreateRequest::new(ProjectCreate::new(
12        ProjectCreateAttributes::new("SEC".to_string(), "Security Investigation".to_string()),
13        ProjectResourceType::PROJECT,
14    ));
15    let configuration = datadog::Configuration::new();
16    let api = CaseManagementAPI::with_config(configuration);
17    let resp = api.create_project(body).await;
18    if let Ok(value) = resp {
19        println!("{:#?}", value);
20    } else {
21        println!("{:#?}", resp.unwrap_err());
22    }
23}
Source

pub async fn create_project_with_http_info( &self, body: ProjectCreateRequest, ) -> Result<ResponseContent<ProjectResponse>, Error<CreateProjectError>>

Create a project.

Source

pub async fn delete_case_comment( &self, case_id: String, cell_id: String, ) -> Result<(), Error<DeleteCaseCommentError>>

Delete case comment

Examples found in repository?
examples/v2_case-management_DeleteCaseComment.rs (line 15)
6async fn main() {
7    // there is a valid "case" in the system
8    let case_id = std::env::var("CASE_ID").unwrap();
9
10    // there is a valid "comment" in the system
11    let comment_id = std::env::var("COMMENT_ID").unwrap();
12    let configuration = datadog::Configuration::new();
13    let api = CaseManagementAPI::with_config(configuration);
14    let resp = api
15        .delete_case_comment(case_id.clone(), comment_id.clone())
16        .await;
17    if let Ok(value) = resp {
18        println!("{:#?}", value);
19    } else {
20        println!("{:#?}", resp.unwrap_err());
21    }
22}
Source

pub async fn delete_case_comment_with_http_info( &self, case_id: String, cell_id: String, ) -> Result<ResponseContent<()>, Error<DeleteCaseCommentError>>

Delete case comment

Source

pub async fn delete_case_custom_attribute( &self, case_id: String, custom_attribute_key: String, ) -> Result<CaseResponse, Error<DeleteCaseCustomAttributeError>>

Delete custom attribute from case

Examples found in repository?
examples/v2_case-management_DeleteCaseCustomAttribute.rs (lines 15-18)
6async fn main() {
7    // there is a valid "case" with a custom "case_type" in the system
8    let case_with_type_id = std::env::var("CASE_WITH_TYPE_ID").unwrap();
9
10    // there is a valid "custom_attribute" in the system
11    let custom_attribute_attributes_key = std::env::var("CUSTOM_ATTRIBUTE_ATTRIBUTES_KEY").unwrap();
12    let configuration = datadog::Configuration::new();
13    let api = CaseManagementAPI::with_config(configuration);
14    let resp = api
15        .delete_case_custom_attribute(
16            case_with_type_id.clone(),
17            custom_attribute_attributes_key.clone(),
18        )
19        .await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub async fn delete_case_custom_attribute_with_http_info( &self, case_id: String, custom_attribute_key: String, ) -> Result<ResponseContent<CaseResponse>, Error<DeleteCaseCustomAttributeError>>

Delete custom attribute from case

Source

pub async fn delete_project( &self, project_id: String, ) -> Result<(), Error<DeleteProjectError>>

Remove a project using the project’s id.

Examples found in repository?
examples/v2_case-management_DeleteProject.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.delete_project("project_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn delete_project_with_http_info( &self, project_id: String, ) -> Result<ResponseContent<()>, Error<DeleteProjectError>>

Remove a project using the project’s id.

Source

pub async fn get_case( &self, case_id: String, ) -> Result<CaseResponse, Error<GetCaseError>>

Get the details of case by case_id

Examples found in repository?
examples/v2_case-management_GetCase.rs (line 11)
6async fn main() {
7    // there is a valid "case" in the system
8    let case_id = std::env::var("CASE_ID").unwrap();
9    let configuration = datadog::Configuration::new();
10    let api = CaseManagementAPI::with_config(configuration);
11    let resp = api.get_case(case_id.clone()).await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}
Source

pub async fn get_case_with_http_info( &self, case_id: String, ) -> Result<ResponseContent<CaseResponse>, Error<GetCaseError>>

Get the details of case by case_id

Source

pub async fn get_project( &self, project_id: String, ) -> Result<ProjectResponse, Error<GetProjectError>>

Get the details of a project by project_id.

Examples found in repository?
examples/v2_case-management_GetProject.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.get_project("project_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn get_project_with_http_info( &self, project_id: String, ) -> Result<ResponseContent<ProjectResponse>, Error<GetProjectError>>

Get the details of a project by project_id.

Source

pub async fn get_projects( &self, ) -> Result<ProjectsResponse, Error<GetProjectsError>>

Get all projects.

Examples found in repository?
examples/v2_case-management_GetProjects.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = CaseManagementAPI::with_config(configuration);
9    let resp = api.get_projects().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn get_projects_with_http_info( &self, ) -> Result<ResponseContent<ProjectsResponse>, Error<GetProjectsError>>

Get all projects.

Source

pub async fn search_cases( &self, params: SearchCasesOptionalParams, ) -> Result<CasesResponse, Error<SearchCasesError>>

Search cases.

Examples found in repository?
examples/v2_case-management_SearchCases.rs (line 10)
7async fn main() {
8    let configuration = datadog::Configuration::new();
9    let api = CaseManagementAPI::with_config(configuration);
10    let resp = api.search_cases(SearchCasesOptionalParams::default()).await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
Source

pub fn search_cases_with_pagination( &self, params: SearchCasesOptionalParams, ) -> impl Stream<Item = Result<Case, Error<SearchCasesError>>> + '_

Examples found in repository?
examples/v2_case-management_SearchCases_3433960044.rs (line 12)
9async fn main() {
10    let configuration = datadog::Configuration::new();
11    let api = CaseManagementAPI::with_config(configuration);
12    let response = api.search_cases_with_pagination(SearchCasesOptionalParams::default());
13    pin_mut!(response);
14    while let Some(resp) = response.next().await {
15        if let Ok(value) = resp {
16            println!("{:#?}", value);
17        } else {
18            println!("{:#?}", resp.unwrap_err());
19        }
20    }
21}
Source

pub async fn search_cases_with_http_info( &self, params: SearchCasesOptionalParams, ) -> Result<ResponseContent<CasesResponse>, Error<SearchCasesError>>

Search cases.

Source

pub async fn unarchive_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<UnarchiveCaseError>>

Unarchive case

Examples found in repository?
examples/v2_case-management_UnarchiveCase.rs (line 15)
9async fn main() {
10    // there is a valid "case" in the system
11    let case_id = std::env::var("CASE_ID").unwrap();
12    let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13    let configuration = datadog::Configuration::new();
14    let api = CaseManagementAPI::with_config(configuration);
15    let resp = api.unarchive_case(case_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn unarchive_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UnarchiveCaseError>>

Unarchive case

Source

pub async fn unassign_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<UnassignCaseError>>

Unassign case

Examples found in repository?
examples/v2_case-management_UnassignCase.rs (line 15)
9async fn main() {
10    // there is a valid "case" in the system
11    let case_id = std::env::var("CASE_ID").unwrap();
12    let body = CaseEmptyRequest::new(CaseEmpty::new(CaseResourceType::CASE));
13    let configuration = datadog::Configuration::new();
14    let api = CaseManagementAPI::with_config(configuration);
15    let resp = api.unassign_case(case_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn unassign_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UnassignCaseError>>

Unassign case

Source

pub async fn update_attributes( &self, case_id: String, body: CaseUpdateAttributesRequest, ) -> Result<CaseResponse, Error<UpdateAttributesError>>

Update case attributes

Examples found in repository?
examples/v2_case-management_UpdateAttributes.rs (line 27)
11async fn main() {
12    // there is a valid "case" in the system
13    let case_id = std::env::var("CASE_ID").unwrap();
14    let body = CaseUpdateAttributesRequest::new(CaseUpdateAttributes::new(
15        CaseUpdateAttributesAttributes::new(BTreeMap::from([
16            ("env".to_string(), vec!["test".to_string()]),
17            (
18                "service".to_string(),
19                vec!["web-store".to_string(), "web-api".to_string()],
20            ),
21            ("team".to_string(), vec!["engineer".to_string()]),
22        ])),
23        CaseResourceType::CASE,
24    ));
25    let configuration = datadog::Configuration::new();
26    let api = CaseManagementAPI::with_config(configuration);
27    let resp = api.update_attributes(case_id.clone(), body).await;
28    if let Ok(value) = resp {
29        println!("{:#?}", value);
30    } else {
31        println!("{:#?}", resp.unwrap_err());
32    }
33}
Source

pub async fn update_attributes_with_http_info( &self, case_id: String, body: CaseUpdateAttributesRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateAttributesError>>

Update case attributes

Source

pub async fn update_case_custom_attribute( &self, case_id: String, custom_attribute_key: String, body: CaseUpdateCustomAttributeRequest, ) -> Result<CaseResponse, Error<UpdateCaseCustomAttributeError>>

Update case custom attribute

Examples found in repository?
examples/v2_case-management_UpdateCaseCustomAttribute.rs (lines 32-36)
12async fn main() {
13    // there is a valid "case" with a custom "case_type" in the system
14    let case_with_type_id = std::env::var("CASE_WITH_TYPE_ID").unwrap();
15
16    // there is a valid "custom_attribute" in the system
17    let custom_attribute_attributes_key = std::env::var("CUSTOM_ATTRIBUTE_ATTRIBUTES_KEY").unwrap();
18    let body = CaseUpdateCustomAttributeRequest::new(CaseUpdateCustomAttribute::new(
19        CustomAttributeValue::new(
20            true,
21            CustomAttributeType::TEXT,
22            CustomAttributeValuesUnion::CustomAttributeMultiStringValue(vec![
23                "Abba".to_string(),
24                "The Cure".to_string(),
25            ]),
26        ),
27        CaseResourceType::CASE,
28    ));
29    let configuration = datadog::Configuration::new();
30    let api = CaseManagementAPI::with_config(configuration);
31    let resp = api
32        .update_case_custom_attribute(
33            case_with_type_id.clone(),
34            custom_attribute_attributes_key.clone(),
35            body,
36        )
37        .await;
38    if let Ok(value) = resp {
39        println!("{:#?}", value);
40    } else {
41        println!("{:#?}", resp.unwrap_err());
42    }
43}
Source

pub async fn update_case_custom_attribute_with_http_info( &self, case_id: String, custom_attribute_key: String, body: CaseUpdateCustomAttributeRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseCustomAttributeError>>

Update case custom attribute

Source

pub async fn update_case_description( &self, case_id: String, body: CaseUpdateDescriptionRequest, ) -> Result<CaseResponse, Error<UpdateCaseDescriptionError>>

Update case description

Examples found in repository?
examples/v2_case-management_UpdateCaseDescription.rs (line 21)
10async fn main() {
11    // there is a valid "case" in the system
12    let case_id = std::env::var("CASE_ID").unwrap();
13    let body = CaseUpdateDescriptionRequest::new(CaseUpdateDescription::new(
14        CaseUpdateDescriptionAttributes::new(
15            "Seeing some weird memory increase... Updating the description".to_string(),
16        ),
17        CaseResourceType::CASE,
18    ));
19    let configuration = datadog::Configuration::new();
20    let api = CaseManagementAPI::with_config(configuration);
21    let resp = api.update_case_description(case_id.clone(), body).await;
22    if let Ok(value) = resp {
23        println!("{:#?}", value);
24    } else {
25        println!("{:#?}", resp.unwrap_err());
26    }
27}
Source

pub async fn update_case_description_with_http_info( &self, case_id: String, body: CaseUpdateDescriptionRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseDescriptionError>>

Update case description

Source

pub async fn update_case_title( &self, case_id: String, body: CaseUpdateTitleRequest, ) -> Result<CaseResponse, Error<UpdateCaseTitleError>>

Update case title

Examples found in repository?
examples/v2_case-management_UpdateCaseTitle.rs (line 19)
10async fn main() {
11    // there is a valid "case" in the system
12    let case_id = std::env::var("CASE_ID").unwrap();
13    let body = CaseUpdateTitleRequest::new(CaseUpdateTitle::new(
14        CaseUpdateTitleAttributes::new("[UPDATED] Memory leak investigation on API".to_string()),
15        CaseResourceType::CASE,
16    ));
17    let configuration = datadog::Configuration::new();
18    let api = CaseManagementAPI::with_config(configuration);
19    let resp = api.update_case_title(case_id.clone(), body).await;
20    if let Ok(value) = resp {
21        println!("{:#?}", value);
22    } else {
23        println!("{:#?}", resp.unwrap_err());
24    }
25}
Source

pub async fn update_case_title_with_http_info( &self, case_id: String, body: CaseUpdateTitleRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseTitleError>>

Update case title

Source

pub async fn update_priority( &self, case_id: String, body: CaseUpdatePriorityRequest, ) -> Result<CaseResponse, Error<UpdatePriorityError>>

Update case priority

Examples found in repository?
examples/v2_case-management_UpdatePriority.rs (line 20)
11async fn main() {
12    // there is a valid "case" in the system
13    let case_id = std::env::var("CASE_ID").unwrap();
14    let body = CaseUpdatePriorityRequest::new(CaseUpdatePriority::new(
15        CaseUpdatePriorityAttributes::new(CasePriority::P3),
16        CaseResourceType::CASE,
17    ));
18    let configuration = datadog::Configuration::new();
19    let api = CaseManagementAPI::with_config(configuration);
20    let resp = api.update_priority(case_id.clone(), body).await;
21    if let Ok(value) = resp {
22        println!("{:#?}", value);
23    } else {
24        println!("{:#?}", resp.unwrap_err());
25    }
26}
Source

pub async fn update_priority_with_http_info( &self, case_id: String, body: CaseUpdatePriorityRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdatePriorityError>>

Update case priority

Source

pub async fn update_status( &self, case_id: String, body: CaseUpdateStatusRequest, ) -> Result<CaseResponse, Error<UpdateStatusError>>

Update case status

Examples found in repository?
examples/v2_case-management_UpdateStatus.rs (line 20)
11async fn main() {
12    // there is a valid "case" in the system
13    let case_id = std::env::var("CASE_ID").unwrap();
14    let body = CaseUpdateStatusRequest::new(CaseUpdateStatus::new(
15        CaseUpdateStatusAttributes::new(CaseStatus::IN_PROGRESS),
16        CaseResourceType::CASE,
17    ));
18    let configuration = datadog::Configuration::new();
19    let api = CaseManagementAPI::with_config(configuration);
20    let resp = api.update_status(case_id.clone(), body).await;
21    if let Ok(value) = resp {
22        println!("{:#?}", value);
23    } else {
24        println!("{:#?}", resp.unwrap_err());
25    }
26}
Source

pub async fn update_status_with_http_info( &self, case_id: String, body: CaseUpdateStatusRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateStatusError>>

Update case status

Trait Implementations§

Source§

impl Clone for CaseManagementAPI

Source§

fn clone(&self) -> CaseManagementAPI

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CaseManagementAPI

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CaseManagementAPI

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,