#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
    BadRequestException(crate::types::error::BadRequestException),
    ConflictException(crate::types::error::ConflictException),
    ForbiddenException(crate::types::error::ForbiddenException),
    InternalServerErrorException(crate::types::error::InternalServerErrorException),
    NotFoundException(crate::types::error::NotFoundException),
    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::BadRequestException(inner) => inner.fmt(f),
            Error::ConflictException(inner) => inner.fmt(f),
            Error::ForbiddenException(inner) => inner.fmt(f),
            Error::InternalServerErrorException(inner) => inner.fmt(f),
            Error::NotFoundException(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::BadRequestException(inner) => inner.meta(),
            Self::ConflictException(inner) => inner.meta(),
            Self::ForbiddenException(inner) => inner.meta(),
            Self::InternalServerErrorException(inner) => inner.meta(),
            Self::NotFoundException(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_broker::CreateBrokerError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_broker::CreateBrokerError, 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_broker::CreateBrokerError> for Error {
    fn from(err: crate::operation::create_broker::CreateBrokerError) -> Self {
        match err {
            crate::operation::create_broker::CreateBrokerError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::create_broker::CreateBrokerError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::create_broker::CreateBrokerError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::create_broker::CreateBrokerError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::create_broker::CreateBrokerError::UnauthorizedException(inner) => Error::UnauthorizedException(inner),
            crate::operation::create_broker::CreateBrokerError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_configuration::CreateConfigurationError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_configuration::CreateConfigurationError, 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_configuration::CreateConfigurationError> for Error {
    fn from(err: crate::operation::create_configuration::CreateConfigurationError) -> Self {
        match err {
            crate::operation::create_configuration::CreateConfigurationError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::create_configuration::CreateConfigurationError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::create_configuration::CreateConfigurationError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::create_configuration::CreateConfigurationError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::create_configuration::CreateConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_tags::CreateTagsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_tags::CreateTagsError, 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_tags::CreateTagsError> for Error {
    fn from(err: crate::operation::create_tags::CreateTagsError) -> Self {
        match err {
            crate::operation::create_tags::CreateTagsError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::create_tags::CreateTagsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::create_tags::CreateTagsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::create_tags::CreateTagsError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::create_tags::CreateTagsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user::CreateUserError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_user::CreateUserError, 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_user::CreateUserError> for Error {
    fn from(err: crate::operation::create_user::CreateUserError) -> Self {
        match err {
            crate::operation::create_user::CreateUserError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::create_user::CreateUserError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::create_user::CreateUserError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::create_user::CreateUserError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::create_user::CreateUserError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::create_user::CreateUserError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_broker::DeleteBrokerError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_broker::DeleteBrokerError, 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_broker::DeleteBrokerError> for Error {
    fn from(err: crate::operation::delete_broker::DeleteBrokerError) -> Self {
        match err {
            crate::operation::delete_broker::DeleteBrokerError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::delete_broker::DeleteBrokerError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::delete_broker::DeleteBrokerError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::delete_broker::DeleteBrokerError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::delete_broker::DeleteBrokerError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_tags::DeleteTagsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_tags::DeleteTagsError, 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_tags::DeleteTagsError> for Error {
    fn from(err: crate::operation::delete_tags::DeleteTagsError) -> Self {
        match err {
            crate::operation::delete_tags::DeleteTagsError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::delete_tags::DeleteTagsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::delete_tags::DeleteTagsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::delete_tags::DeleteTagsError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::delete_tags::DeleteTagsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_user::DeleteUserError, 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_user::DeleteUserError> for Error {
    fn from(err: crate::operation::delete_user::DeleteUserError) -> Self {
        match err {
            crate::operation::delete_user::DeleteUserError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::delete_user::DeleteUserError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::delete_user::DeleteUserError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::delete_user::DeleteUserError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::delete_user::DeleteUserError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_broker::DescribeBrokerError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_broker::DescribeBrokerError, 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_broker::DescribeBrokerError> for Error {
    fn from(err: crate::operation::describe_broker::DescribeBrokerError) -> Self {
        match err {
            crate::operation::describe_broker::DescribeBrokerError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::describe_broker::DescribeBrokerError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::describe_broker::DescribeBrokerError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::describe_broker::DescribeBrokerError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::describe_broker::DescribeBrokerError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError, R>>
    for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError, 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_broker_engine_types::DescribeBrokerEngineTypesError> for Error {
    fn from(err: crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError) -> Self {
        match err {
            crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError::BadRequestException(inner) => {
                Error::BadRequestException(inner)
            }
            crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError::ForbiddenException(inner) => {
                Error::ForbiddenException(inner)
            }
            crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::describe_broker_engine_types::DescribeBrokerEngineTypesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R>
    From<
        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError, R>,
    > for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError,
            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_broker_instance_options::DescribeBrokerInstanceOptionsError> for Error {
    fn from(err: crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError) -> Self {
        match err {
            crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError::BadRequestException(inner) => {
                Error::BadRequestException(inner)
            }
            crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError::ForbiddenException(inner) => {
                Error::ForbiddenException(inner)
            }
            crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::describe_broker_instance_options::DescribeBrokerInstanceOptionsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_configuration::DescribeConfigurationError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_configuration::DescribeConfigurationError, 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_configuration::DescribeConfigurationError> for Error {
    fn from(err: crate::operation::describe_configuration::DescribeConfigurationError) -> Self {
        match err {
            crate::operation::describe_configuration::DescribeConfigurationError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::describe_configuration::DescribeConfigurationError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::describe_configuration::DescribeConfigurationError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::describe_configuration::DescribeConfigurationError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::describe_configuration::DescribeConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R>
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError, R>>
    for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError,
            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_configuration_revision::DescribeConfigurationRevisionError> for Error {
    fn from(err: crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError) -> Self {
        match err {
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError::BadRequestException(inner) => {
                Error::BadRequestException(inner)
            }
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError::ForbiddenException(inner) => {
                Error::ForbiddenException(inner)
            }
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::operation::describe_configuration_revision::DescribeConfigurationRevisionError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_user::DescribeUserError, 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_user::DescribeUserError> for Error {
    fn from(err: crate::operation::describe_user::DescribeUserError) -> Self {
        match err {
            crate::operation::describe_user::DescribeUserError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::describe_user::DescribeUserError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::describe_user::DescribeUserError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::describe_user::DescribeUserError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::describe_user::DescribeUserError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_brokers::ListBrokersError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_brokers::ListBrokersError, 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_brokers::ListBrokersError> for Error {
    fn from(err: crate::operation::list_brokers::ListBrokersError) -> Self {
        match err {
            crate::operation::list_brokers::ListBrokersError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_brokers::ListBrokersError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::list_brokers::ListBrokersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::list_brokers::ListBrokersError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configuration_revisions::ListConfigurationRevisionsError, R>>
    for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configuration_revisions::ListConfigurationRevisionsError, 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_configuration_revisions::ListConfigurationRevisionsError> for Error {
    fn from(err: crate::operation::list_configuration_revisions::ListConfigurationRevisionsError) -> Self {
        match err {
            crate::operation::list_configuration_revisions::ListConfigurationRevisionsError::BadRequestException(inner) => {
                Error::BadRequestException(inner)
            }
            crate::operation::list_configuration_revisions::ListConfigurationRevisionsError::ForbiddenException(inner) => {
                Error::ForbiddenException(inner)
            }
            crate::operation::list_configuration_revisions::ListConfigurationRevisionsError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::list_configuration_revisions::ListConfigurationRevisionsError::NotFoundException(inner) => {
                Error::NotFoundException(inner)
            }
            crate::operation::list_configuration_revisions::ListConfigurationRevisionsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configurations::ListConfigurationsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_configurations::ListConfigurationsError, 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_configurations::ListConfigurationsError> for Error {
    fn from(err: crate::operation::list_configurations::ListConfigurationsError) -> Self {
        match err {
            crate::operation::list_configurations::ListConfigurationsError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_configurations::ListConfigurationsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::list_configurations::ListConfigurationsError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::list_configurations::ListConfigurationsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags::ListTagsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags::ListTagsError, 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_tags::ListTagsError> for Error {
    fn from(err: crate::operation::list_tags::ListTagsError) -> Self {
        match err {
            crate::operation::list_tags::ListTagsError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_tags::ListTagsError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::list_tags::ListTagsError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::list_tags::ListTagsError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::list_tags::ListTagsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_users::ListUsersError, 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_users::ListUsersError> for Error {
    fn from(err: crate::operation::list_users::ListUsersError) -> Self {
        match err {
            crate::operation::list_users::ListUsersError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::list_users::ListUsersError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::list_users::ListUsersError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::list_users::ListUsersError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::list_users::ListUsersError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::promote::PromoteError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::promote::PromoteError, 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::promote::PromoteError> for Error {
    fn from(err: crate::operation::promote::PromoteError) -> Self {
        match err {
            crate::operation::promote::PromoteError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::promote::PromoteError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::promote::PromoteError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::promote::PromoteError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::promote::PromoteError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reboot_broker::RebootBrokerError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reboot_broker::RebootBrokerError, 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::reboot_broker::RebootBrokerError> for Error {
    fn from(err: crate::operation::reboot_broker::RebootBrokerError) -> Self {
        match err {
            crate::operation::reboot_broker::RebootBrokerError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::reboot_broker::RebootBrokerError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::reboot_broker::RebootBrokerError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::reboot_broker::RebootBrokerError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::reboot_broker::RebootBrokerError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_broker::UpdateBrokerError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_broker::UpdateBrokerError, 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_broker::UpdateBrokerError> for Error {
    fn from(err: crate::operation::update_broker::UpdateBrokerError) -> Self {
        match err {
            crate::operation::update_broker::UpdateBrokerError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::update_broker::UpdateBrokerError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::update_broker::UpdateBrokerError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::update_broker::UpdateBrokerError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::update_broker::UpdateBrokerError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::update_broker::UpdateBrokerError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_configuration::UpdateConfigurationError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_configuration::UpdateConfigurationError, 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_configuration::UpdateConfigurationError> for Error {
    fn from(err: crate::operation::update_configuration::UpdateConfigurationError) -> Self {
        match err {
            crate::operation::update_configuration::UpdateConfigurationError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::update_configuration::UpdateConfigurationError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::update_configuration::UpdateConfigurationError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::update_configuration::UpdateConfigurationError::InternalServerErrorException(inner) => {
                Error::InternalServerErrorException(inner)
            }
            crate::operation::update_configuration::UpdateConfigurationError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::update_configuration::UpdateConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_user::UpdateUserError, 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_user::UpdateUserError> for Error {
    fn from(err: crate::operation::update_user::UpdateUserError) -> Self {
        match err {
            crate::operation::update_user::UpdateUserError::BadRequestException(inner) => Error::BadRequestException(inner),
            crate::operation::update_user::UpdateUserError::ConflictException(inner) => Error::ConflictException(inner),
            crate::operation::update_user::UpdateUserError::ForbiddenException(inner) => Error::ForbiddenException(inner),
            crate::operation::update_user::UpdateUserError::InternalServerErrorException(inner) => Error::InternalServerErrorException(inner),
            crate::operation::update_user::UpdateUserError::NotFoundException(inner) => Error::NotFoundException(inner),
            crate::operation::update_user::UpdateUserError::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::BadRequestException(inner) => inner.source(),
            Error::ConflictException(inner) => inner.source(),
            Error::ForbiddenException(inner) => inner.source(),
            Error::InternalServerErrorException(inner) => inner.source(),
            Error::NotFoundException(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::BadRequestException(e) => e.request_id(),
            Self::ConflictException(e) => e.request_id(),
            Self::ForbiddenException(e) => e.request_id(),
            Self::InternalServerErrorException(e) => e.request_id(),
            Self::NotFoundException(e) => e.request_id(),
            Self::UnauthorizedException(e) => e.request_id(),
            Self::Unhandled(e) => e.meta.request_id(),
        }
    }
}