Skip to main content

asana/model/
team_request.rs

1use serde::{Serialize, Deserialize};
2use super::TeamBase;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct TeamRequest {
5    #[serde(flatten)]
6    pub team_base: TeamBase,
7    ///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    ///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    ///The organization/workspace the team belongs to. This must be the same organization you are in and cannot be changed once set.
29    #[serde(skip_serializing_if = "Option::is_none")]
30    pub organization: Option<String>,
31    ///Controls who can remove team members
32    #[serde(skip_serializing_if = "Option::is_none")]
33    pub team_member_removal_access_level: Option<String>,
34    ///The visibility of the team to users in the same organization
35    #[serde(skip_serializing_if = "Option::is_none")]
36    pub visibility: Option<String>,
37}
38impl std::fmt::Display for TeamRequest {
39    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
40        write!(f, "{}", serde_json::to_string(self).unwrap())
41    }
42}
43impl std::ops::Deref for TeamRequest {
44    type Target = TeamBase;
45    fn deref(&self) -> &Self::Target {
46        &self.team_base
47    }
48}
49impl std::ops::DerefMut for TeamRequest {
50    fn deref_mut(&mut self) -> &mut Self::Target {
51        &mut self.team_base
52    }
53}