asana/model/
workspace_response.rs

1use serde::{Serialize, Deserialize};
2use super::WorkspaceBase;
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct WorkspaceResponse {
5    #[serde(flatten)]
6    pub workspace_base: WorkspaceBase,
7    ///The email domains that are associated with this workspace.
8    #[serde(skip_serializing_if = "Option::is_none")]
9    pub email_domains: Option<Vec<String>>,
10    ///Whether the workspace is an *organization*.
11    #[serde(skip_serializing_if = "Option::is_none")]
12    pub is_organization: Option<bool>,
13}
14impl std::fmt::Display for WorkspaceResponse {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
16        write!(f, "{}", serde_json::to_string(self).unwrap())
17    }
18}
19impl std::ops::Deref for WorkspaceResponse {
20    type Target = WorkspaceBase;
21    fn deref(&self) -> &Self::Target {
22        &self.workspace_base
23    }
24}
25impl std::ops::DerefMut for WorkspaceResponse {
26    fn deref_mut(&mut self) -> &mut Self::Target {
27        &mut self.workspace_base
28    }
29}