Skip to main content

asana/model/
task_count_response.rs

1use serde::{Serialize, Deserialize};
2///A response object returned from the task count endpoint.
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct TaskCountResponse {
5    ///The number of completed milestones in a project.
6    pub num_completed_milestones: i64,
7    ///The number of completed tasks in a project.
8    pub num_completed_tasks: i64,
9    ///The number of incomplete milestones in a project.
10    pub num_incomplete_milestones: i64,
11    ///The number of incomplete tasks in a project.
12    pub num_incomplete_tasks: i64,
13    ///The number of milestones in a project.
14    pub num_milestones: i64,
15    ///The number of tasks in a project.
16    pub num_tasks: i64,
17}
18impl std::fmt::Display for TaskCountResponse {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
20        write!(f, "{}", serde_json::to_string(self).unwrap())
21    }
22}