asana/model/
section_response.rs

1use serde::{Serialize, Deserialize};
2use super::{ProjectCompact, SectionBase};
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct SectionResponse {
5    #[serde(flatten)]
6    pub section_base: SectionBase,
7    ///The time at which this resource was created.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub created_at: Option<chrono::DateTime<chrono::Utc>>,
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub project: Option<ProjectCompact>,
12    ///*Deprecated - please use project instead*
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub projects: Option<Vec<ProjectCompact>>,
15}
16impl std::fmt::Display for SectionResponse {
17    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
18        write!(f, "{}", serde_json::to_string(self).unwrap())
19    }
20}
21impl std::ops::Deref for SectionResponse {
22    type Target = SectionBase;
23    fn deref(&self) -> &Self::Target {
24        &self.section_base
25    }
26}
27impl std::ops::DerefMut for SectionResponse {
28    fn deref_mut(&mut self) -> &mut Self::Target {
29        &mut self.section_base
30    }
31}