aws-sdk-pipes 0.2.0

AWS SDK for Amazon EventBridge Pipes
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// All possible error types for this service.
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
    /// <p>An action you attempted resulted in an exception.</p>
    ConflictException(crate::error::ConflictException),
    /// <p>This exception occurs due to unexpected causes.</p>
    InternalException(crate::error::InternalException),
    /// <p>An entity that you specified does not exist.</p>
    NotFoundException(crate::error::NotFoundException),
    /// <p>A quota has been exceeded.</p>
    ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
    /// <p>An action was throttled.</p>
    ThrottlingException(crate::error::ThrottlingException),
    /// <p>Indicates that an error has occurred while performing a validate operation.</p>
    ValidationException(crate::error::ValidationException),
    ///
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
    ///
    /// When logging an error from the SDK, it is recommended that you either wrap the error in
    /// [`DisplayErrorContext`](crate::types::DisplayErrorContext), use another
    /// error reporter library that visits the error's cause/source chain, or call
    /// [`Error::source`](std::error::Error::source) for more details about the underlying cause.
    ///
    Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Error::ConflictException(inner) => inner.fmt(f),
            Error::InternalException(inner) => inner.fmt(f),
            Error::NotFoundException(inner) => inner.fmt(f),
            Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
            Error::ThrottlingException(inner) => inner.fmt(f),
            Error::ValidationException(inner) => inner.fmt(f),
            Error::Unhandled(inner) => inner.fmt(f),
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreatePipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::CreatePipeError, 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::CreatePipeError> for Error {
    fn from(err: crate::error::CreatePipeError) -> Self {
        match err.kind {
            crate::error::CreatePipeErrorKind::ConflictException(inner) => {
                Error::ConflictException(inner)
            }
            crate::error::CreatePipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::CreatePipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::CreatePipeErrorKind::ServiceQuotaExceededException(inner) => {
                Error::ServiceQuotaExceededException(inner)
            }
            crate::error::CreatePipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::CreatePipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::CreatePipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeletePipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::DeletePipeError, 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::DeletePipeError> for Error {
    fn from(err: crate::error::DeletePipeError) -> Self {
        match err.kind {
            crate::error::DeletePipeErrorKind::ConflictException(inner) => {
                Error::ConflictException(inner)
            }
            crate::error::DeletePipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::DeletePipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::DeletePipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::DeletePipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::DeletePipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribePipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribePipeError, 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::DescribePipeError> for Error {
    fn from(err: crate::error::DescribePipeError) -> Self {
        match err.kind {
            crate::error::DescribePipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::DescribePipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::DescribePipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::DescribePipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::DescribePipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListPipesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::ListPipesError, 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::ListPipesError> for Error {
    fn from(err: crate::error::ListPipesError) -> Self {
        match err.kind {
            crate::error::ListPipesErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::ListPipesErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::ListPipesErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::ListPipesErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, 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::ListTagsForResourceError> for Error {
    fn from(err: crate::error::ListTagsForResourceError) -> Self {
        match err.kind {
            crate::error::ListTagsForResourceErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::ListTagsForResourceErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::ListTagsForResourceErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::ListTagsForResourceErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StartPipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::StartPipeError, 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::StartPipeError> for Error {
    fn from(err: crate::error::StartPipeError) -> Self {
        match err.kind {
            crate::error::StartPipeErrorKind::ConflictException(inner) => {
                Error::ConflictException(inner)
            }
            crate::error::StartPipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::StartPipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::StartPipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::StartPipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::StartPipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::StopPipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::StopPipeError, 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::StopPipeError> for Error {
    fn from(err: crate::error::StopPipeError) -> Self {
        match err.kind {
            crate::error::StopPipeErrorKind::ConflictException(inner) => {
                Error::ConflictException(inner)
            }
            crate::error::StopPipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::StopPipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::StopPipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::StopPipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::StopPipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::TagResourceError, 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::TagResourceError> for Error {
    fn from(err: crate::error::TagResourceError) -> Self {
        match err.kind {
            crate::error::TagResourceErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::TagResourceErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::TagResourceErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::TagResourceErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagResourceError, 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::UntagResourceError> for Error {
    fn from(err: crate::error::UntagResourceError) -> Self {
        match err.kind {
            crate::error::UntagResourceErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::UntagResourceErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::UntagResourceErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::UntagResourceErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdatePipeError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdatePipeError, 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::UpdatePipeError> for Error {
    fn from(err: crate::error::UpdatePipeError) -> Self {
        match err.kind {
            crate::error::UpdatePipeErrorKind::ConflictException(inner) => {
                Error::ConflictException(inner)
            }
            crate::error::UpdatePipeErrorKind::InternalException(inner) => {
                Error::InternalException(inner)
            }
            crate::error::UpdatePipeErrorKind::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::error::UpdatePipeErrorKind::ThrottlingException(inner) => {
                Error::ThrottlingException(inner)
            }
            crate::error::UpdatePipeErrorKind::ValidationException(inner) => {
                Error::ValidationException(inner)
            }
            crate::error::UpdatePipeErrorKind::Unhandled(inner) => {
                Error::Unhandled(crate::error::Unhandled::new(inner.into()))
            }
        }
    }
}
impl std::error::Error for Error {}