#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AlreadyExistsException(crate::error::AlreadyExistsException),
BadRequestException(crate::error::BadRequestException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
LimitExceededException(crate::error::LimitExceededException),
NotFoundException(crate::error::NotFoundException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AlreadyExistsException(inner) => inner.fmt(f),
Error::BadRequestException(inner) => inner.fmt(f),
Error::InternalServiceErrorException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::NotFoundException(inner) => inner.fmt(f),
Error::TooManyRequestsException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateConfigurationSetError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateConfigurationSetError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateConfigurationSetErrorKind::AlreadyExistsException(inner) => {
Error::AlreadyExistsException(inner)
}
crate::error::CreateConfigurationSetErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::CreateConfigurationSetErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::CreateConfigurationSetErrorKind::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::error::CreateConfigurationSetErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::CreateConfigurationSetErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::CreateConfigurationSetEventDestinationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::CreateConfigurationSetEventDestinationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::CreateConfigurationSetEventDestinationErrorKind::AlreadyExistsException(inner) => Error::AlreadyExistsException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::NotFoundException(inner) => Error::NotFoundException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::error::CreateConfigurationSetEventDestinationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteConfigurationSetError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteConfigurationSetError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteConfigurationSetErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::DeleteConfigurationSetErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::DeleteConfigurationSetErrorKind::NotFoundException(inner) => {
Error::NotFoundException(inner)
}
crate::error::DeleteConfigurationSetErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::DeleteConfigurationSetErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::DeleteConfigurationSetEventDestinationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DeleteConfigurationSetEventDestinationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::DeleteConfigurationSetEventDestinationErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::DeleteConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::DeleteConfigurationSetEventDestinationErrorKind::NotFoundException(inner) => Error::NotFoundException(inner),
crate::error::DeleteConfigurationSetEventDestinationErrorKind::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::error::DeleteConfigurationSetEventDestinationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::GetConfigurationSetEventDestinationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::GetConfigurationSetEventDestinationsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::GetConfigurationSetEventDestinationsErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::GetConfigurationSetEventDestinationsErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::GetConfigurationSetEventDestinationsErrorKind::NotFoundException(inner) => Error::NotFoundException(inner),
crate::error::GetConfigurationSetEventDestinationsErrorKind::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::error::GetConfigurationSetEventDestinationsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListConfigurationSetsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListConfigurationSetsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListConfigurationSetsErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::ListConfigurationSetsErrorKind::InternalServiceErrorException(
inner,
) => Error::InternalServiceErrorException(inner),
crate::error::ListConfigurationSetsErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::ListConfigurationSetsErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::SendVoiceMessageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::SendVoiceMessageError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::SendVoiceMessageErrorKind::BadRequestException(inner) => {
Error::BadRequestException(inner)
}
crate::error::SendVoiceMessageErrorKind::InternalServiceErrorException(inner) => {
Error::InternalServiceErrorException(inner)
}
crate::error::SendVoiceMessageErrorKind::TooManyRequestsException(inner) => {
Error::TooManyRequestsException(inner)
}
crate::error::SendVoiceMessageErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::UpdateConfigurationSetEventDestinationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::UpdateConfigurationSetEventDestinationError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::UpdateConfigurationSetEventDestinationErrorKind::BadRequestException(inner) => Error::BadRequestException(inner),
crate::error::UpdateConfigurationSetEventDestinationErrorKind::InternalServiceErrorException(inner) => Error::InternalServiceErrorException(inner),
crate::error::UpdateConfigurationSetEventDestinationErrorKind::NotFoundException(inner) => Error::NotFoundException(inner),
crate::error::UpdateConfigurationSetEventDestinationErrorKind::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
crate::error::UpdateConfigurationSetEventDestinationErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl std::error::Error for Error {}