#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] pub message: ::std::string::String,
pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
}
impl InternalServerException {
pub fn message(&self) -> &str {
&self.message
}
}
impl ::std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
::std::write!(f, "InternalServerException")?;
{
::std::write!(f, ": {}", &self.message)?;
}
Ok(())
}
}
impl ::std::error::Error for InternalServerException {}
impl ::aws_types::request_id::RequestId for crate::types::error::InternalServerException {
fn request_id(&self) -> Option<&str> {
use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
self.meta().request_id()
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InternalServerException {
fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
&self.meta
}
}
impl InternalServerException {
pub fn builder() -> crate::types::error::builders::InternalServerExceptionBuilder {
crate::types::error::builders::InternalServerExceptionBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InternalServerExceptionBuilder {
pub(crate) message: ::std::option::Option<::std::string::String>,
meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
}
impl InternalServerExceptionBuilder {
#[allow(missing_docs)] pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
#[allow(missing_docs)] pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
self.meta = Some(meta);
self
}
pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
self.meta = meta;
self
}
pub fn build(self) -> ::std::result::Result<crate::types::error::InternalServerException, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::error::InternalServerException {
message: self.message.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"message",
"message was not specified but it is required when building InternalServerException",
)
})?,
meta: self.meta.unwrap_or_default(),
})
}
}