#[derive(
Debug,
Clone,
conjure_object::serde::Serialize,
conjure_object::serde::Deserialize,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct Workspace {
#[serde(rename = "id")]
id: super::super::super::super::api::ids::WorkspaceId,
#[serde(rename = "rid")]
rid: super::super::super::super::api::rids::WorkspaceRid,
#[serde(rename = "org")]
org: super::super::super::super::authentication::api::OrgRid,
#[builder(default, into)]
#[serde(rename = "displayName", skip_serializing_if = "Option::is_none", default)]
display_name: Option<String>,
#[builder(
default,
custom(
type = impl
Into<Option<super::WorkspaceSymbol>>,
convert = |v|v.into().map(Box::new)
)
)]
#[serde(rename = "symbol", skip_serializing_if = "Option::is_none", default)]
symbol: Option<Box<super::WorkspaceSymbol>>,
#[builder(custom(type = super::WorkspaceSettings, convert = Box::new))]
#[serde(rename = "settings")]
settings: Box<super::WorkspaceSettings>,
}
impl Workspace {
#[inline]
pub fn id(&self) -> &super::super::super::super::api::ids::WorkspaceId {
&self.id
}
#[inline]
pub fn rid(&self) -> &super::super::super::super::api::rids::WorkspaceRid {
&self.rid
}
#[inline]
pub fn org(&self) -> &super::super::super::super::authentication::api::OrgRid {
&self.org
}
#[inline]
pub fn display_name(&self) -> Option<&str> {
self.display_name.as_ref().map(|o| &**o)
}
#[inline]
pub fn symbol(&self) -> Option<&super::WorkspaceSymbol> {
self.symbol.as_ref().map(|o| &**o)
}
#[inline]
pub fn settings(&self) -> &super::WorkspaceSettings {
&*self.settings
}
}