#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateChatOutput {
pub execution_id: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl CreateChatOutput {
pub fn execution_id(&self) -> &str {
use std::ops::Deref;
self.execution_id.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
}
impl ::aws_types::request_id::RequestId for CreateChatOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateChatOutput {
pub fn builder() -> crate::operation::create_chat::builders::CreateChatOutputBuilder {
crate::operation::create_chat::builders::CreateChatOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateChatOutputBuilder {
pub(crate) execution_id: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateChatOutputBuilder {
pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_id = input;
self
}
pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_id
}
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(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_chat::CreateChatOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_chat::CreateChatOutput {
execution_id: self.execution_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"execution_id",
"execution_id was not specified but it is required when building CreateChatOutput",
)
})?,
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 CreateChatOutput",
)
})?,
_request_id: self._request_id,
})
}
}