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
impl CaseManagementAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
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}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}- examples/v2_case-management_ArchiveCase.rs
- examples/v2_case-management_UnassignCase.rs
- examples/v2_case-management_UnarchiveCase.rs
- examples/v2_case-management_CreateProject.rs
- examples/v2_case-management_DeleteCaseComment.rs
- examples/v2_case-management_CommentCase.rs
- examples/v2_case-management_UpdateStatus.rs
- examples/v2_case-management_UpdatePriority.rs
- examples/v2_case-management_UpdateCaseTitle.rs
- examples/v2_case-management_AssignCase.rs
- examples/v2_case-management_UpdateCaseDescription.rs
- examples/v2_case-management_DeleteCaseCustomAttribute.rs
- examples/v2_case-management_UpdateAttributes.rs
- examples/v2_case-management_UpdateCaseCustomAttribute.rs
- examples/v2_case-management_CreateCase.rs
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn archive_case(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<CaseResponse, Error<ArchiveCaseError>>
pub async fn archive_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<ArchiveCaseError>>
Archive case
Examples found in repository?
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}Sourcepub async fn archive_case_with_http_info(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<ResponseContent<CaseResponse>, Error<ArchiveCaseError>>
pub async fn archive_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<ArchiveCaseError>>
Archive case
Sourcepub async fn assign_case(
&self,
case_id: String,
body: CaseAssignRequest,
) -> Result<CaseResponse, Error<AssignCaseError>>
pub async fn assign_case( &self, case_id: String, body: CaseAssignRequest, ) -> Result<CaseResponse, Error<AssignCaseError>>
Assign case to a user
Examples found in repository?
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}Sourcepub async fn assign_case_with_http_info(
&self,
case_id: String,
body: CaseAssignRequest,
) -> Result<ResponseContent<CaseResponse>, Error<AssignCaseError>>
pub async fn assign_case_with_http_info( &self, case_id: String, body: CaseAssignRequest, ) -> Result<ResponseContent<CaseResponse>, Error<AssignCaseError>>
Assign case to a user
Sourcepub async fn comment_case(
&self,
case_id: String,
body: CaseCommentRequest,
) -> Result<TimelineResponse, Error<CommentCaseError>>
pub async fn comment_case( &self, case_id: String, body: CaseCommentRequest, ) -> Result<TimelineResponse, Error<CommentCaseError>>
Comment case
Examples found in repository?
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}Sourcepub async fn comment_case_with_http_info(
&self,
case_id: String,
body: CaseCommentRequest,
) -> Result<ResponseContent<TimelineResponse>, Error<CommentCaseError>>
pub async fn comment_case_with_http_info( &self, case_id: String, body: CaseCommentRequest, ) -> Result<ResponseContent<TimelineResponse>, Error<CommentCaseError>>
Comment case
Sourcepub async fn create_case(
&self,
body: CaseCreateRequest,
) -> Result<CaseResponse, Error<CreateCaseError>>
pub async fn create_case( &self, body: CaseCreateRequest, ) -> Result<CaseResponse, Error<CreateCaseError>>
Create a Case
Examples found in repository?
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}Sourcepub async fn create_case_with_http_info(
&self,
body: CaseCreateRequest,
) -> Result<ResponseContent<CaseResponse>, Error<CreateCaseError>>
pub async fn create_case_with_http_info( &self, body: CaseCreateRequest, ) -> Result<ResponseContent<CaseResponse>, Error<CreateCaseError>>
Create a Case
Sourcepub async fn create_project(
&self,
body: ProjectCreateRequest,
) -> Result<ProjectResponse, Error<CreateProjectError>>
pub async fn create_project( &self, body: ProjectCreateRequest, ) -> Result<ProjectResponse, Error<CreateProjectError>>
Create a project.
Examples found in repository?
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}Sourcepub async fn create_project_with_http_info(
&self,
body: ProjectCreateRequest,
) -> Result<ResponseContent<ProjectResponse>, Error<CreateProjectError>>
pub async fn create_project_with_http_info( &self, body: ProjectCreateRequest, ) -> Result<ResponseContent<ProjectResponse>, Error<CreateProjectError>>
Create a project.
Sourcepub async fn delete_case_comment(
&self,
case_id: String,
cell_id: String,
) -> Result<(), Error<DeleteCaseCommentError>>
pub async fn delete_case_comment( &self, case_id: String, cell_id: String, ) -> Result<(), Error<DeleteCaseCommentError>>
Delete case comment
Examples found in repository?
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}Sourcepub async fn delete_case_comment_with_http_info(
&self,
case_id: String,
cell_id: String,
) -> Result<ResponseContent<()>, Error<DeleteCaseCommentError>>
pub async fn delete_case_comment_with_http_info( &self, case_id: String, cell_id: String, ) -> Result<ResponseContent<()>, Error<DeleteCaseCommentError>>
Delete case comment
Sourcepub async fn delete_case_custom_attribute(
&self,
case_id: String,
custom_attribute_key: String,
) -> Result<CaseResponse, Error<DeleteCaseCustomAttributeError>>
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?
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}Sourcepub async fn delete_case_custom_attribute_with_http_info(
&self,
case_id: String,
custom_attribute_key: String,
) -> Result<ResponseContent<CaseResponse>, Error<DeleteCaseCustomAttributeError>>
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
Sourcepub async fn delete_project(
&self,
project_id: String,
) -> Result<(), Error<DeleteProjectError>>
pub async fn delete_project( &self, project_id: String, ) -> Result<(), Error<DeleteProjectError>>
Remove a project using the project’s id.
Sourcepub async fn delete_project_with_http_info(
&self,
project_id: String,
) -> Result<ResponseContent<()>, Error<DeleteProjectError>>
pub async fn delete_project_with_http_info( &self, project_id: String, ) -> Result<ResponseContent<()>, Error<DeleteProjectError>>
Remove a project using the project’s id.
Sourcepub async fn get_case(
&self,
case_id: String,
) -> Result<CaseResponse, Error<GetCaseError>>
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?
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}Sourcepub async fn get_case_with_http_info(
&self,
case_id: String,
) -> Result<ResponseContent<CaseResponse>, Error<GetCaseError>>
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
Sourcepub async fn get_project(
&self,
project_id: String,
) -> Result<ProjectResponse, Error<GetProjectError>>
pub async fn get_project( &self, project_id: String, ) -> Result<ProjectResponse, Error<GetProjectError>>
Get the details of a project by project_id.
Sourcepub async fn get_project_with_http_info(
&self,
project_id: String,
) -> Result<ResponseContent<ProjectResponse>, Error<GetProjectError>>
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.
Sourcepub async fn get_projects(
&self,
) -> Result<ProjectsResponse, Error<GetProjectsError>>
pub async fn get_projects( &self, ) -> Result<ProjectsResponse, Error<GetProjectsError>>
Get all projects.
Sourcepub async fn get_projects_with_http_info(
&self,
) -> Result<ResponseContent<ProjectsResponse>, Error<GetProjectsError>>
pub async fn get_projects_with_http_info( &self, ) -> Result<ResponseContent<ProjectsResponse>, Error<GetProjectsError>>
Get all projects.
Sourcepub async fn search_cases(
&self,
params: SearchCasesOptionalParams,
) -> Result<CasesResponse, Error<SearchCasesError>>
pub async fn search_cases( &self, params: SearchCasesOptionalParams, ) -> Result<CasesResponse, Error<SearchCasesError>>
Search cases.
Sourcepub fn search_cases_with_pagination(
&self,
params: SearchCasesOptionalParams,
) -> impl Stream<Item = Result<Case, Error<SearchCasesError>>> + '_
pub fn search_cases_with_pagination( &self, params: SearchCasesOptionalParams, ) -> impl Stream<Item = Result<Case, Error<SearchCasesError>>> + '_
Examples found in repository?
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}Sourcepub async fn search_cases_with_http_info(
&self,
params: SearchCasesOptionalParams,
) -> Result<ResponseContent<CasesResponse>, Error<SearchCasesError>>
pub async fn search_cases_with_http_info( &self, params: SearchCasesOptionalParams, ) -> Result<ResponseContent<CasesResponse>, Error<SearchCasesError>>
Search cases.
Sourcepub async fn unarchive_case(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<CaseResponse, Error<UnarchiveCaseError>>
pub async fn unarchive_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<UnarchiveCaseError>>
Unarchive case
Examples found in repository?
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}Sourcepub async fn unarchive_case_with_http_info(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UnarchiveCaseError>>
pub async fn unarchive_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UnarchiveCaseError>>
Unarchive case
Sourcepub async fn unassign_case(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<CaseResponse, Error<UnassignCaseError>>
pub async fn unassign_case( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<CaseResponse, Error<UnassignCaseError>>
Unassign case
Examples found in repository?
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}Sourcepub async fn unassign_case_with_http_info(
&self,
case_id: String,
body: CaseEmptyRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UnassignCaseError>>
pub async fn unassign_case_with_http_info( &self, case_id: String, body: CaseEmptyRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UnassignCaseError>>
Unassign case
Sourcepub async fn update_attributes(
&self,
case_id: String,
body: CaseUpdateAttributesRequest,
) -> Result<CaseResponse, Error<UpdateAttributesError>>
pub async fn update_attributes( &self, case_id: String, body: CaseUpdateAttributesRequest, ) -> Result<CaseResponse, Error<UpdateAttributesError>>
Update case attributes
Examples found in repository?
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}Sourcepub async fn update_attributes_with_http_info(
&self,
case_id: String,
body: CaseUpdateAttributesRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdateAttributesError>>
pub async fn update_attributes_with_http_info( &self, case_id: String, body: CaseUpdateAttributesRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateAttributesError>>
Update case attributes
Sourcepub async fn update_case_custom_attribute(
&self,
case_id: String,
custom_attribute_key: String,
body: CaseUpdateCustomAttributeRequest,
) -> Result<CaseResponse, Error<UpdateCaseCustomAttributeError>>
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?
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}Sourcepub async fn update_case_custom_attribute_with_http_info(
&self,
case_id: String,
custom_attribute_key: String,
body: CaseUpdateCustomAttributeRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseCustomAttributeError>>
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
Sourcepub async fn update_case_description(
&self,
case_id: String,
body: CaseUpdateDescriptionRequest,
) -> Result<CaseResponse, Error<UpdateCaseDescriptionError>>
pub async fn update_case_description( &self, case_id: String, body: CaseUpdateDescriptionRequest, ) -> Result<CaseResponse, Error<UpdateCaseDescriptionError>>
Update case description
Examples found in repository?
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}Sourcepub async fn update_case_description_with_http_info(
&self,
case_id: String,
body: CaseUpdateDescriptionRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseDescriptionError>>
pub async fn update_case_description_with_http_info( &self, case_id: String, body: CaseUpdateDescriptionRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseDescriptionError>>
Update case description
Sourcepub async fn update_case_title(
&self,
case_id: String,
body: CaseUpdateTitleRequest,
) -> Result<CaseResponse, Error<UpdateCaseTitleError>>
pub async fn update_case_title( &self, case_id: String, body: CaseUpdateTitleRequest, ) -> Result<CaseResponse, Error<UpdateCaseTitleError>>
Update case title
Examples found in repository?
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}Sourcepub async fn update_case_title_with_http_info(
&self,
case_id: String,
body: CaseUpdateTitleRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseTitleError>>
pub async fn update_case_title_with_http_info( &self, case_id: String, body: CaseUpdateTitleRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdateCaseTitleError>>
Update case title
Sourcepub async fn update_priority(
&self,
case_id: String,
body: CaseUpdatePriorityRequest,
) -> Result<CaseResponse, Error<UpdatePriorityError>>
pub async fn update_priority( &self, case_id: String, body: CaseUpdatePriorityRequest, ) -> Result<CaseResponse, Error<UpdatePriorityError>>
Update case priority
Examples found in repository?
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}Sourcepub async fn update_priority_with_http_info(
&self,
case_id: String,
body: CaseUpdatePriorityRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdatePriorityError>>
pub async fn update_priority_with_http_info( &self, case_id: String, body: CaseUpdatePriorityRequest, ) -> Result<ResponseContent<CaseResponse>, Error<UpdatePriorityError>>
Update case priority
Sourcepub async fn update_status(
&self,
case_id: String,
body: CaseUpdateStatusRequest,
) -> Result<CaseResponse, Error<UpdateStatusError>>
pub async fn update_status( &self, case_id: String, body: CaseUpdateStatusRequest, ) -> Result<CaseResponse, Error<UpdateStatusError>>
Update case status
Examples found in repository?
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}Sourcepub async fn update_status_with_http_info(
&self,
case_id: String,
body: CaseUpdateStatusRequest,
) -> Result<ResponseContent<CaseResponse>, Error<UpdateStatusError>>
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
impl Clone for CaseManagementAPI
Source§fn clone(&self) -> CaseManagementAPI
fn clone(&self) -> CaseManagementAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more