#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateEntityOutput {
pub entity_id: ::std::string::String,
pub arn: ::std::string::String,
pub creation_date_time: ::aws_smithy_types::DateTime,
pub state: crate::types::State,
_request_id: Option<String>,
}
impl CreateEntityOutput {
pub fn entity_id(&self) -> &str {
use std::ops::Deref;
self.entity_id.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn creation_date_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_date_time
}
pub fn state(&self) -> &crate::types::State {
&self.state
}
}
impl ::aws_types::request_id::RequestId for CreateEntityOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateEntityOutput {
pub fn builder() -> crate::operation::create_entity::builders::CreateEntityOutputBuilder {
crate::operation::create_entity::builders::CreateEntityOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateEntityOutputBuilder {
pub(crate) entity_id: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) state: ::std::option::Option<crate::types::State>,
_request_id: Option<String>,
}
impl CreateEntityOutputBuilder {
pub fn entity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.entity_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_entity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.entity_id = input;
self
}
pub fn get_entity_id(&self) -> &::std::option::Option<::std::string::String> {
&self.entity_id
}
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_date_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_date_time = input;
self
}
pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_date_time
}
pub fn state(mut self, input: crate::types::State) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
pub fn set_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
self.state = input;
self
}
pub fn get_state(&self) -> &::std::option::Option<crate::types::State> {
&self.state
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_entity::CreateEntityOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_entity::CreateEntityOutput {
entity_id: self.entity_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"entity_id",
"entity_id was not specified but it is required when building CreateEntityOutput",
)
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building CreateEntityOutput",
)
})?,
creation_date_time: self.creation_date_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_date_time",
"creation_date_time was not specified but it is required when building CreateEntityOutput",
)
})?,
state: self.state.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"state",
"state was not specified but it is required when building CreateEntityOutput",
)
})?,
_request_id: self._request_id,
})
}
}