Skip to main content

asana/model/
portfolio_add_item_request.rs

1use serde::{Serialize, Deserialize};
2#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3pub struct PortfolioAddItemRequest {
4    ///An id of an item in this portfolio. The new item will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.
5    #[serde(skip_serializing_if = "Option::is_none")]
6    pub insert_after: Option<String>,
7    ///An id of an item in this portfolio. The new item will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub insert_before: Option<String>,
10    ///The item to add to the portfolio.
11    pub item: String,
12}
13impl std::fmt::Display for PortfolioAddItemRequest {
14    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
15        write!(f, "{}", serde_json::to_string(self).unwrap())
16    }
17}