Skip to main content

asana/model/
team_response.rs

1use serde::{Serialize, Deserialize};
2use super::TeamBase;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct TeamResponse {
5    #[serde(flatten)]
6    pub team_base: TeamBase,
7    ///[Opt In](/docs/inputoutput-options). The description of the team.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub description: Option<String>,
10    ///Controls who can edit team name and description
11    #[serde(skip_serializing_if = "Option::is_none")]
12    pub edit_team_name_or_description_access_level: Option<String>,
13    ///Controls who can edit team visibility and trash teams
14    #[serde(skip_serializing_if = "Option::is_none")]
15    pub edit_team_visibility_or_trash_team_access_level: Option<String>,
16    ///Controls who can accept or deny guest invites for a given team
17    #[serde(skip_serializing_if = "Option::is_none")]
18    pub guest_invite_management_access_level: Option<String>,
19    ///[Opt In](/docs/inputoutput-options). The description of the team with formatting as HTML.
20    #[serde(skip_serializing_if = "Option::is_none")]
21    pub html_description: Option<String>,
22    ///Controls who can accept or deny join team requests for a Membership by Request team
23    #[serde(skip_serializing_if = "Option::is_none")]
24    pub join_request_management_access_level: Option<String>,
25    ///Controls who can accept or deny member invites for a given team
26    #[serde(skip_serializing_if = "Option::is_none")]
27    pub member_invite_management_access_level: Option<String>,
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub organization: Option<serde_json::Value>,
30    ///A url that points directly to the object within Asana.
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub permalink_url: Option<String>,
33    ///Controls who can remove team members
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub team_member_removal_access_level: Option<String>,
36    ///The visibility of the team to users in the same organization
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub visibility: Option<String>,
39}
40impl std::fmt::Display for TeamResponse {
41    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
42        write!(f, "{}", serde_json::to_string(self).unwrap())
43    }
44}
45impl std::ops::Deref for TeamResponse {
46    type Target = TeamBase;
47    fn deref(&self) -> &Self::Target {
48        &self.team_base
49    }
50}
51impl std::ops::DerefMut for TeamResponse {
52    fn deref_mut(&mut self) -> &mut Self::Target {
53        &mut self.team_base
54    }
55}