Skip to main content

asana/model/
task_add_project_request.rs

1use serde::{Serialize, Deserialize};
2#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3pub struct TaskAddProjectRequest {
4    ///A task in the project to insert the task after, or `null` to insert at the beginning of the list.
5    #[serde(skip_serializing_if = "Option::is_none")]
6    pub insert_after: Option<String>,
7    ///A task in the project to insert the task before, or `null` to insert at the end of the list.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub insert_before: Option<String>,
10    ///The project to add the task to.
11    pub project: String,
12    ///A section in the project to insert the task into. The task will be inserted at the bottom of the section.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub section: Option<String>,
15}
16impl std::fmt::Display for TaskAddProjectRequest {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
18        write!(f, "{}", serde_json::to_string(self).unwrap())
19    }
20}