Skip to main content

asana/model/
date_variable_request.rs

1use serde::{Serialize, Deserialize};
2#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3pub struct DateVariableRequest {
4    ///Globally unique identifier of the date field in the project template. A value of `1` refers to the project start date, while `2` refers to the project due date.
5    pub gid: String,
6    ///The date with which the date variable should be replaced when instantiating a project. This takes a date with `YYYY-MM-DD` format.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub value: Option<chrono::DateTime<chrono::Utc>>,
9}
10impl std::fmt::Display for DateVariableRequest {
11    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
12        write!(f, "{}", serde_json::to_string(self).unwrap())
13    }
14}