Skip to main content

asana/model/
task_set_parent_request.rs

1use serde::{Serialize, Deserialize};
2#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3pub struct TaskSetParentRequest {
4    ///A subtask of the parent 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 subtask of the parent 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 new parent of the task, or `null` for no parent.
11    pub parent: String,
12}
13impl std::fmt::Display for TaskSetParentRequest {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15        write!(f, "{}", serde_json::to_string(self).unwrap())
16    }
17}