#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
    AccountActionRequiredException(crate::types::error::AccountActionRequiredException),
    BadRequestException(crate::types::error::BadRequestException),
    InternalFailureException(crate::types::error::InternalFailureException),
    LimitExceededException(crate::types::error::LimitExceededException),
    NotFoundException(crate::types::error::NotFoundException),
    ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
    TooManyRequestsException(crate::types::error::TooManyRequestsException),
    UnauthorizedException(crate::types::error::UnauthorizedException),
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
    variable wildcard pattern and check `.code()`:
     \
       `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
     \
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
    Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Error::AccountActionRequiredException(inner) => inner.fmt(f),
            Error::BadRequestException(inner) => inner.fmt(f),
            Error::InternalFailureException(inner) => inner.fmt(f),
            Error::LimitExceededException(inner) => inner.fmt(f),
            Error::NotFoundException(inner) => inner.fmt(f),
            Error::ServiceUnavailableException(inner) => inner.fmt(f),
            Error::TooManyRequestsException(inner) => inner.fmt(f),
            Error::UnauthorizedException(inner) => inner.fmt(f),
            Error::Unhandled(_) => {
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
                    write!(f, "unhandled error ({code})")
                } else {
                    f.write_str("unhandled error")
                }
            }
        }
    }
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
            source: value.into(),
            meta: ::std::default::Default::default(),
        })
    }
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
        match self {
            Self::AccountActionRequiredException(inner) => inner.meta(),
            Self::BadRequestException(inner) => inner.meta(),
            Self::InternalFailureException(inner) => inner.meta(),
            Self::LimitExceededException(inner) => inner.meta(),
            Self::NotFoundException(inner) => inner.meta(),
            Self::ServiceUnavailableException(inner) => inner.meta(),
            Self::TooManyRequestsException(inner) => inner.meta(),
            Self::UnauthorizedException(inner) => inner.meta(),
            Self::Unhandled(inner) => &inner.meta,
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_project::CreateProjectError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_project::CreateProjectError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::create_project::CreateProjectError> for Error {
    fn from(err: crate::operation::create_project::CreateProjectError) -> Self {
        match err {
            crate::operation::create_project::CreateProjectError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::create_project::CreateProjectError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::create_project::CreateProjectError::LimitExceededException(inner) => Error::LimitExceededException(inner),
            crate::operation::create_project::CreateProjectError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::create_project::CreateProjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::create_project::CreateProjectError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::create_project::CreateProjectError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::create_project::CreateProjectError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_project::DeleteProjectError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_project::DeleteProjectError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::delete_project::DeleteProjectError> for Error {
    fn from(err: crate::operation::delete_project::DeleteProjectError) -> Self {
        match err {
            crate::operation::delete_project::DeleteProjectError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::delete_project::DeleteProjectError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::delete_project::DeleteProjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::delete_project::DeleteProjectError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::delete_project::DeleteProjectError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::delete_project::DeleteProjectError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_bundle::DescribeBundleError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_bundle::DescribeBundleError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::describe_bundle::DescribeBundleError> for Error {
    fn from(err: crate::operation::describe_bundle::DescribeBundleError) -> Self {
        match err {
            crate::operation::describe_bundle::DescribeBundleError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::describe_bundle::DescribeBundleError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::describe_bundle::DescribeBundleError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::describe_bundle::DescribeBundleError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::describe_bundle::DescribeBundleError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::describe_bundle::DescribeBundleError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::describe_bundle::DescribeBundleError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_project::DescribeProjectError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_project::DescribeProjectError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::describe_project::DescribeProjectError> for Error {
    fn from(err: crate::operation::describe_project::DescribeProjectError) -> Self {
        match err {
            crate::operation::describe_project::DescribeProjectError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::describe_project::DescribeProjectError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::describe_project::DescribeProjectError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::describe_project::DescribeProjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::describe_project::DescribeProjectError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::describe_project::DescribeProjectError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::describe_project::DescribeProjectError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_bundle::ExportBundleError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_bundle::ExportBundleError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::export_bundle::ExportBundleError> for Error {
    fn from(err: crate::operation::export_bundle::ExportBundleError) -> Self {
        match err {
            crate::operation::export_bundle::ExportBundleError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::export_bundle::ExportBundleError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::export_bundle::ExportBundleError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::export_bundle::ExportBundleError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::export_bundle::ExportBundleError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::export_bundle::ExportBundleError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::export_bundle::ExportBundleError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_project::ExportProjectError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::export_project::ExportProjectError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::export_project::ExportProjectError> for Error {
    fn from(err: crate::operation::export_project::ExportProjectError) -> Self {
        match err {
            crate::operation::export_project::ExportProjectError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::export_project::ExportProjectError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::export_project::ExportProjectError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::export_project::ExportProjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::export_project::ExportProjectError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::export_project::ExportProjectError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::export_project::ExportProjectError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_bundles::ListBundlesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_bundles::ListBundlesError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::list_bundles::ListBundlesError> for Error {
    fn from(err: crate::operation::list_bundles::ListBundlesError) -> Self {
        match err {
            crate::operation::list_bundles::ListBundlesError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_bundles::ListBundlesError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::list_bundles::ListBundlesError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::list_bundles::ListBundlesError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::list_bundles::ListBundlesError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::list_bundles::ListBundlesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_projects::ListProjectsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_projects::ListProjectsError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::list_projects::ListProjectsError> for Error {
    fn from(err: crate::operation::list_projects::ListProjectsError) -> Self {
        match err {
            crate::operation::list_projects::ListProjectsError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_projects::ListProjectsError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::list_projects::ListProjectsError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::list_projects::ListProjectsError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::list_projects::ListProjectsError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::list_projects::ListProjectsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_project::UpdateProjectError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_project::UpdateProjectError, R>) -> Self {
        match err {
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
                source: err.into(),
            }),
        }
    }
}
impl From<crate::operation::update_project::UpdateProjectError> for Error {
    fn from(err: crate::operation::update_project::UpdateProjectError) -> Self {
        match err {
            crate::operation::update_project::UpdateProjectError::AccountActionRequiredException(inner) => {
                Error::AccountActionRequiredException(inner)
            }
            crate::operation::update_project::UpdateProjectError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::update_project::UpdateProjectError::InternalFailureException(inner) => Error::InternalFailureException(inner),
            crate::operation::update_project::UpdateProjectError::LimitExceededException(inner) => Error::LimitExceededException(inner),
            crate::operation::update_project::UpdateProjectError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::update_project::UpdateProjectError::ServiceUnavailableException(inner) => Error::ServiceUnavailableException(inner),
            crate::operation::update_project::UpdateProjectError::TooManyRequestsException(inner) => Error::TooManyRequestsException(inner),
            crate::operation::update_project::UpdateProjectError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::update_project::UpdateProjectError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl ::std::error::Error for Error {
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
        match self {
            Error::AccountActionRequiredException(inner) => inner.source(),
            Error::BadRequestException(inner) => inner.source(),
            Error::InternalFailureException(inner) => inner.source(),
            Error::LimitExceededException(inner) => inner.source(),
            Error::NotFoundException(inner) => inner.source(),
            Error::ServiceUnavailableException(inner) => inner.source(),
            Error::TooManyRequestsException(inner) => inner.source(),
            Error::UnauthorizedException(inner) => inner.source(),
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
        }
    }
}
impl ::aws_types::request_id::RequestId for Error {
    fn request_id(&self) -> Option<&str> {
        match self {
            Self::AccountActionRequiredException(e) => e.request_id(),
            Self::BadRequestException(e) => e.request_id(),
            Self::InternalFailureException(e) => e.request_id(),
            Self::LimitExceededException(e) => e.request_id(),
            Self::NotFoundException(e) => e.request_id(),
            Self::ServiceUnavailableException(e) => e.request_id(),
            Self::TooManyRequestsException(e) => e.request_id(),
            Self::UnauthorizedException(e) => e.request_id(),
            Self::Unhandled(e) => e.meta.request_id(),
        }
    }
}