Skip to main content

asana/model/
status_update_compact.rs

1use serde::{Serialize, Deserialize};
2use super::AsanaResource;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct StatusUpdateCompact {
5    ///A generic Asana Resource, containing a globally unique identifier.
6    #[serde(flatten)]
7    pub asana_resource: AsanaResource,
8    /**The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
9The `resource_subtype`s for `status` objects represent the type of their parent.*/
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub resource_subtype: Option<String>,
12    ///The title of the status update.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub title: Option<String>,
15}
16impl std::fmt::Display for StatusUpdateCompact {
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 StatusUpdateCompact {
22    type Target = AsanaResource;
23    fn deref(&self) -> &Self::Target {
24        &self.asana_resource
25    }
26}
27impl std::ops::DerefMut for StatusUpdateCompact {
28    fn deref_mut(&mut self) -> &mut Self::Target {
29        &mut self.asana_resource
30    }
31}