#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(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::CreateClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::CreateClusterError, 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::CreateClusterError> for Error {
fn from(err: crate::error::CreateClusterError) -> Self {
match err.kind {
crate::error::CreateClusterErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CreateClusterErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::CreateClusterErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateClusterErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateClusterErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CreateClusterErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CreateClusterErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateClusterSnapshotError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateClusterSnapshotError, 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::CreateClusterSnapshotError> for Error {
fn from(err: crate::error::CreateClusterSnapshotError) -> Self {
match err.kind {
crate::error::CreateClusterSnapshotErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::CreateClusterSnapshotErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DeleteClusterError, 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::DeleteClusterError> for Error {
fn from(err: crate::error::DeleteClusterError) -> Self {
match err.kind {
crate::error::DeleteClusterErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::DeleteClusterErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::DeleteClusterErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteClusterErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteClusterErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DeleteClusterErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteClusterErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteClusterSnapshotError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteClusterSnapshotError, 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::DeleteClusterSnapshotError> for Error {
fn from(err: crate::error::DeleteClusterSnapshotError) -> Self {
match err.kind {
crate::error::DeleteClusterSnapshotErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::DeleteClusterSnapshotErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::GetClusterError, 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::GetClusterError> for Error {
fn from(err: crate::error::GetClusterError) -> Self {
match err.kind {
crate::error::GetClusterErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetClusterErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetClusterErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetClusterErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetClusterErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetClusterErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetClusterSnapshotError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetClusterSnapshotError, 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::GetClusterSnapshotError> for Error {
fn from(err: crate::error::GetClusterSnapshotError) -> Self {
match err.kind {
crate::error::GetClusterSnapshotErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::GetClusterSnapshotErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::GetClusterSnapshotErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::GetClusterSnapshotErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::GetClusterSnapshotErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::GetClusterSnapshotErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListClustersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListClustersError, 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::ListClustersError> for Error {
fn from(err: crate::error::ListClustersError) -> Self {
match err.kind {
crate::error::ListClustersErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListClustersErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListClustersErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListClustersErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListClustersErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListClusterSnapshotsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListClusterSnapshotsError, 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::ListClusterSnapshotsError> for Error {
fn from(err: crate::error::ListClusterSnapshotsError) -> Self {
match err.kind {
crate::error::ListClusterSnapshotsErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::ListClusterSnapshotsErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListClusterSnapshotsErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::ListClusterSnapshotsErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::ListClusterSnapshotsErrorKind::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::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::ListTagsForResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(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::RestoreClusterFromSnapshotError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::RestoreClusterFromSnapshotError, 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::RestoreClusterFromSnapshotError> for Error {
fn from(err: crate::error::RestoreClusterFromSnapshotError) -> Self {
match err.kind {
crate::error::RestoreClusterFromSnapshotErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::ServiceQuotaExceededException(
inner,
) => Error::ServiceQuotaExceededException(inner),
crate::error::RestoreClusterFromSnapshotErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::RestoreClusterFromSnapshotErrorKind::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::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::TagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::TagResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(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::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UntagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UntagResourceErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(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::UpdateClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UpdateClusterError, 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::UpdateClusterError> for Error {
fn from(err: crate::error::UpdateClusterError) -> Self {
match err.kind {
crate::error::UpdateClusterErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::UpdateClusterErrorKind::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::error::UpdateClusterErrorKind::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::error::UpdateClusterErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateClusterErrorKind::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::error::UpdateClusterErrorKind::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::error::UpdateClusterErrorKind::Unhandled(inner) => {
Error::Unhandled(crate::error::Unhandled::new(inner.into()))
}
}
}
}
impl std::error::Error for Error {}