use serde::{Serialize, Deserialize};
use super::AsanaResource;
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct GoalCompact {
#[serde(flatten)]
pub asana_resource: AsanaResource,
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<serde_json::Value>,
}
impl std::fmt::Display for GoalCompact {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}
impl std::ops::Deref for GoalCompact {
type Target = AsanaResource;
fn deref(&self) -> &Self::Target {
&self.asana_resource
}
}
impl std::ops::DerefMut for GoalCompact {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.asana_resource
}
}