asana/model/
goal_relationship_compact.rs1use serde::{Serialize, Deserialize};
2use super::AsanaResource;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct GoalRelationshipCompact {
5 #[serde(flatten)]
7 pub asana_resource: AsanaResource,
8 #[serde(skip_serializing_if = "Option::is_none")]
10 pub contribution_weight: Option<f64>,
11 #[serde(skip_serializing_if = "Option::is_none")]
13 pub resource_subtype: Option<String>,
14 #[serde(skip_serializing_if = "Option::is_none")]
15 pub supporting_resource: Option<serde_json::Value>,
16}
17impl std::fmt::Display for GoalRelationshipCompact {
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
19 write!(f, "{}", serde_json::to_string(self).unwrap())
20 }
21}
22impl std::ops::Deref for GoalRelationshipCompact {
23 type Target = AsanaResource;
24 fn deref(&self) -> &Self::Target {
25 &self.asana_resource
26 }
27}
28impl std::ops::DerefMut for GoalRelationshipCompact {
29 fn deref_mut(&mut self) -> &mut Self::Target {
30 &mut self.asana_resource
31 }
32}