asana/model/goal_add_supporting_relationship_request.rs
1use serde::{Serialize, Deserialize};
2#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3pub struct GoalAddSupportingRelationshipRequest {
4 ///The weight that the supporting resource's progress will contribute to the supported goal's progress. This can only be 0 or 1.
5 pub contribution_weight: f64,
6 ///An id of a subgoal of this parent goal. The new subgoal will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.
7 #[serde(skip_serializing_if = "Option::is_none")]
8 pub insert_after: Option<String>,
9 ///An id of a subgoal of this parent goal. The new subgoal will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.
10 #[serde(skip_serializing_if = "Option::is_none")]
11 pub insert_before: Option<String>,
12 ///The gid of the supporting resource to add to the parent goal. Must be the gid of a goal, project, task, or portfolio.
13 pub supporting_resource: String,
14}
15impl std::fmt::Display for GoalAddSupportingRelationshipRequest {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17 write!(f, "{}", serde_json::to_string(self).unwrap())
18 }
19}