#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSpaceInput {
pub domain_id: ::std::option::Option<::std::string::String>,
pub space_name: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub space_settings: ::std::option::Option<crate::types::SpaceSettings>,
pub ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
pub space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
pub space_display_name: ::std::option::Option<::std::string::String>,
}
impl CreateSpaceInput {
pub fn domain_id(&self) -> ::std::option::Option<&str> {
self.domain_id.as_deref()
}
pub fn space_name(&self) -> ::std::option::Option<&str> {
self.space_name.as_deref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn space_settings(&self) -> ::std::option::Option<&crate::types::SpaceSettings> {
self.space_settings.as_ref()
}
pub fn ownership_settings(&self) -> ::std::option::Option<&crate::types::OwnershipSettings> {
self.ownership_settings.as_ref()
}
pub fn space_sharing_settings(&self) -> ::std::option::Option<&crate::types::SpaceSharingSettings> {
self.space_sharing_settings.as_ref()
}
pub fn space_display_name(&self) -> ::std::option::Option<&str> {
self.space_display_name.as_deref()
}
}
impl CreateSpaceInput {
pub fn builder() -> crate::operation::create_space::builders::CreateSpaceInputBuilder {
crate::operation::create_space::builders::CreateSpaceInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSpaceInputBuilder {
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) space_name: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) space_settings: ::std::option::Option<crate::types::SpaceSettings>,
pub(crate) ownership_settings: ::std::option::Option<crate::types::OwnershipSettings>,
pub(crate) space_sharing_settings: ::std::option::Option<crate::types::SpaceSharingSettings>,
pub(crate) space_display_name: ::std::option::Option<::std::string::String>,
}
impl CreateSpaceInputBuilder {
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn space_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.space_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_space_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.space_name = input;
self
}
pub fn get_space_name(&self) -> &::std::option::Option<::std::string::String> {
&self.space_name
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn space_settings(mut self, input: crate::types::SpaceSettings) -> Self {
self.space_settings = ::std::option::Option::Some(input);
self
}
pub fn set_space_settings(mut self, input: ::std::option::Option<crate::types::SpaceSettings>) -> Self {
self.space_settings = input;
self
}
pub fn get_space_settings(&self) -> &::std::option::Option<crate::types::SpaceSettings> {
&self.space_settings
}
pub fn ownership_settings(mut self, input: crate::types::OwnershipSettings) -> Self {
self.ownership_settings = ::std::option::Option::Some(input);
self
}
pub fn set_ownership_settings(mut self, input: ::std::option::Option<crate::types::OwnershipSettings>) -> Self {
self.ownership_settings = input;
self
}
pub fn get_ownership_settings(&self) -> &::std::option::Option<crate::types::OwnershipSettings> {
&self.ownership_settings
}
pub fn space_sharing_settings(mut self, input: crate::types::SpaceSharingSettings) -> Self {
self.space_sharing_settings = ::std::option::Option::Some(input);
self
}
pub fn set_space_sharing_settings(mut self, input: ::std::option::Option<crate::types::SpaceSharingSettings>) -> Self {
self.space_sharing_settings = input;
self
}
pub fn get_space_sharing_settings(&self) -> &::std::option::Option<crate::types::SpaceSharingSettings> {
&self.space_sharing_settings
}
pub fn space_display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.space_display_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_space_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.space_display_name = input;
self
}
pub fn get_space_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.space_display_name
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_space::CreateSpaceInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_space::CreateSpaceInput {
domain_id: self.domain_id,
space_name: self.space_name,
tags: self.tags,
space_settings: self.space_settings,
ownership_settings: self.ownership_settings,
space_sharing_settings: self.space_sharing_settings,
space_display_name: self.space_display_name,
})
}
}