#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Space {
pub space_id: ::std::string::String,
pub name: ::std::string::String,
pub space_arn: ::std::string::String,
pub domain_arn: ::std::option::Option<::std::string::String>,
pub region: ::std::string::String,
pub owner_account_id: ::std::string::String,
pub data_access_role_arn: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub agent_core_evaluation_role_arn: ::std::option::Option<::std::string::String>,
pub status: crate::types::SpaceStatus,
pub status_reason: ::std::option::Option<::std::string::String>,
pub encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
}
impl Space {
pub fn space_id(&self) -> &str {
use std::ops::Deref;
self.space_id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn space_arn(&self) -> &str {
use std::ops::Deref;
self.space_arn.deref()
}
pub fn domain_arn(&self) -> ::std::option::Option<&str> {
self.domain_arn.as_deref()
}
pub fn region(&self) -> &str {
use std::ops::Deref;
self.region.deref()
}
pub fn owner_account_id(&self) -> &str {
use std::ops::Deref;
self.owner_account_id.deref()
}
pub fn data_access_role_arn(&self) -> &str {
use std::ops::Deref;
self.data_access_role_arn.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn agent_core_evaluation_role_arn(&self) -> ::std::option::Option<&str> {
self.agent_core_evaluation_role_arn.as_deref()
}
pub fn status(&self) -> &crate::types::SpaceStatus {
&self.status
}
pub fn status_reason(&self) -> ::std::option::Option<&str> {
self.status_reason.as_deref()
}
pub fn encryption_configuration(&self) -> ::std::option::Option<&crate::types::EncryptionConfiguration> {
self.encryption_configuration.as_ref()
}
}
impl Space {
pub fn builder() -> crate::types::builders::SpaceBuilder {
crate::types::builders::SpaceBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SpaceBuilder {
pub(crate) space_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) space_arn: ::std::option::Option<::std::string::String>,
pub(crate) domain_arn: ::std::option::Option<::std::string::String>,
pub(crate) region: ::std::option::Option<::std::string::String>,
pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
pub(crate) data_access_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) agent_core_evaluation_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::SpaceStatus>,
pub(crate) status_reason: ::std::option::Option<::std::string::String>,
pub(crate) encryption_configuration: ::std::option::Option<crate::types::EncryptionConfiguration>,
}
impl SpaceBuilder {
pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.space_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.space_id = input;
self
}
pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
&self.space_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn space_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.space_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_space_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.space_arn = input;
self
}
pub fn get_space_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.space_arn
}
pub fn domain_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_arn = input;
self
}
pub fn get_domain_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_arn
}
pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.region = ::std::option::Option::Some(input.into());
self
}
pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.region = input;
self
}
pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
&self.region
}
pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_account_id = input;
self
}
pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_account_id
}
pub fn data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_access_role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_access_role_arn = input;
self
}
pub fn get_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.data_access_role_arn
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn agent_core_evaluation_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.agent_core_evaluation_role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_agent_core_evaluation_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.agent_core_evaluation_role_arn = input;
self
}
pub fn get_agent_core_evaluation_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.agent_core_evaluation_role_arn
}
pub fn status(mut self, input: crate::types::SpaceStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::SpaceStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::SpaceStatus> {
&self.status
}
pub fn status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_reason = input;
self
}
pub fn get_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.status_reason
}
pub fn encryption_configuration(mut self, input: crate::types::EncryptionConfiguration) -> Self {
self.encryption_configuration = ::std::option::Option::Some(input);
self
}
pub fn set_encryption_configuration(mut self, input: ::std::option::Option<crate::types::EncryptionConfiguration>) -> Self {
self.encryption_configuration = input;
self
}
pub fn get_encryption_configuration(&self) -> &::std::option::Option<crate::types::EncryptionConfiguration> {
&self.encryption_configuration
}
pub fn build(self) -> ::std::result::Result<crate::types::Space, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Space {
space_id: self.space_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"space_id",
"space_id was not specified but it is required when building Space",
)
})?,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building Space",
)
})?,
space_arn: self.space_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"space_arn",
"space_arn was not specified but it is required when building Space",
)
})?,
domain_arn: self.domain_arn,
region: self.region.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"region",
"region was not specified but it is required when building Space",
)
})?,
owner_account_id: self.owner_account_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"owner_account_id",
"owner_account_id was not specified but it is required when building Space",
)
})?,
data_access_role_arn: self.data_access_role_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"data_access_role_arn",
"data_access_role_arn was not specified but it is required when building Space",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building Space",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building Space",
)
})?,
agent_core_evaluation_role_arn: self.agent_core_evaluation_role_arn,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building Space",
)
})?,
status_reason: self.status_reason,
encryption_configuration: self.encryption_configuration,
})
}
}