#[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(crate::error::Unhandled),
}
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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::CreateConfigurationSetError> for Error {
fn from(err: crate::error::CreateConfigurationSetError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::CreateConfigurationSetEventDestinationError> for Error {
fn from(err: crate::error::CreateConfigurationSetEventDestinationError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DeleteConfigurationSetError> for Error {
fn from(err: crate::error::DeleteConfigurationSetError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::DeleteConfigurationSetEventDestinationError> for Error {
fn from(err: crate::error::DeleteConfigurationSetEventDestinationError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::GetConfigurationSetEventDestinationsError> for Error {
fn from(err: crate::error::GetConfigurationSetEventDestinationsError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::ListConfigurationSetsError> for Error {
fn from(err: crate::error::ListConfigurationSetsError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::SendVoiceMessageError> for Error {
fn from(err: crate::error::SendVoiceMessageError) -> Self {
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(crate::error::Unhandled::new(inner.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(context) => {
Self::from(context.into_err())
}
_ => Error::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
}
impl From<crate::error::UpdateConfigurationSetEventDestinationError> for Error {
fn from(err: crate::error::UpdateConfigurationSetEventDestinationError) -> Self {
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(crate::error::Unhandled::new(inner.into())),
}
}
}
impl std::error::Error for Error {}