#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
    InvalidPolicyRevisionIdException(crate::types::error::InvalidPolicyRevisionIdException),
    InvalidRequestException(crate::types::error::InvalidRequestException),
    LockoutPreventionException(crate::types::error::LockoutPreventionException),
    MalformedPolicyDocumentException(crate::types::error::MalformedPolicyDocumentException),
    PolicyCountLimitExceededException(crate::types::error::PolicyCountLimitExceededException),
    PolicySizeLimitExceededException(crate::types::error::PolicySizeLimitExceededException),
    ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
    RuleLimitExceededException(crate::types::error::RuleLimitExceededException),
    ThrottledException(crate::types::error::ThrottledException),
    TooManyTagsException(crate::types::error::TooManyTagsException),
    #[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::InvalidPolicyRevisionIdException(inner) => inner.fmt(f),
            Error::InvalidRequestException(inner) => inner.fmt(f),
            Error::LockoutPreventionException(inner) => inner.fmt(f),
            Error::MalformedPolicyDocumentException(inner) => inner.fmt(f),
            Error::PolicyCountLimitExceededException(inner) => inner.fmt(f),
            Error::PolicySizeLimitExceededException(inner) => inner.fmt(f),
            Error::ResourceNotFoundException(inner) => inner.fmt(f),
            Error::RuleLimitExceededException(inner) => inner.fmt(f),
            Error::ThrottledException(inner) => inner.fmt(f),
            Error::TooManyTagsException(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::InvalidPolicyRevisionIdException(inner) => inner.meta(),
            Self::InvalidRequestException(inner) => inner.meta(),
            Self::LockoutPreventionException(inner) => inner.meta(),
            Self::MalformedPolicyDocumentException(inner) => inner.meta(),
            Self::PolicyCountLimitExceededException(inner) => inner.meta(),
            Self::PolicySizeLimitExceededException(inner) => inner.meta(),
            Self::ResourceNotFoundException(inner) => inner.meta(),
            Self::RuleLimitExceededException(inner) => inner.meta(),
            Self::ThrottledException(inner) => inner.meta(),
            Self::TooManyTagsException(inner) => inner.meta(),
            Self::Unhandled(inner) => &inner.meta,
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_traces::BatchGetTracesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::batch_get_traces::BatchGetTracesError, 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::batch_get_traces::BatchGetTracesError> for Error {
    fn from(err: crate::operation::batch_get_traces::BatchGetTracesError) -> Self {
        match err {
            crate::operation::batch_get_traces::BatchGetTracesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::batch_get_traces::BatchGetTracesError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::batch_get_traces::BatchGetTracesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_group::CreateGroupError, 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_group::CreateGroupError> for Error {
    fn from(err: crate::operation::create_group::CreateGroupError) -> Self {
        match err {
            crate::operation::create_group::CreateGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::create_group::CreateGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::create_group::CreateGroupError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sampling_rule::CreateSamplingRuleError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_sampling_rule::CreateSamplingRuleError, 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_sampling_rule::CreateSamplingRuleError> for Error {
    fn from(err: crate::operation::create_sampling_rule::CreateSamplingRuleError) -> Self {
        match err {
            crate::operation::create_sampling_rule::CreateSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::create_sampling_rule::CreateSamplingRuleError::RuleLimitExceededException(inner) => {
                Error::RuleLimitExceededException(inner)
            }
            crate::operation::create_sampling_rule::CreateSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::create_sampling_rule::CreateSamplingRuleError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_group::DeleteGroupError, 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_group::DeleteGroupError> for Error {
    fn from(err: crate::operation::delete_group::DeleteGroupError) -> Self {
        match err {
            crate::operation::delete_group::DeleteGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::delete_group::DeleteGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::delete_group::DeleteGroupError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_resource_policy::DeleteResourcePolicyError, 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_resource_policy::DeleteResourcePolicyError> for Error {
    fn from(err: crate::operation::delete_resource_policy::DeleteResourcePolicyError) -> Self {
        match err {
            crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidPolicyRevisionIdException(inner) => {
                Error::InvalidPolicyRevisionIdException(inner)
            }
            crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::delete_resource_policy::DeleteResourcePolicyError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::delete_resource_policy::DeleteResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_sampling_rule::DeleteSamplingRuleError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_sampling_rule::DeleteSamplingRuleError, 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_sampling_rule::DeleteSamplingRuleError> for Error {
    fn from(err: crate::operation::delete_sampling_rule::DeleteSamplingRuleError) -> Self {
        match err {
            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::delete_sampling_rule::DeleteSamplingRuleError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_encryption_config::GetEncryptionConfigError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_encryption_config::GetEncryptionConfigError, 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::get_encryption_config::GetEncryptionConfigError> for Error {
    fn from(err: crate::operation::get_encryption_config::GetEncryptionConfigError) -> Self {
        match err {
            crate::operation::get_encryption_config::GetEncryptionConfigError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::get_encryption_config::GetEncryptionConfigError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_encryption_config::GetEncryptionConfigError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_group::GetGroupError, 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::get_group::GetGroupError> for Error {
    fn from(err: crate::operation::get_group::GetGroupError) -> Self {
        match err {
            crate::operation::get_group::GetGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_group::GetGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_group::GetGroupError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_groups::GetGroupsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_groups::GetGroupsError, 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::get_groups::GetGroupsError> for Error {
    fn from(err: crate::operation::get_groups::GetGroupsError) -> Self {
        match err {
            crate::operation::get_groups::GetGroupsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_groups::GetGroupsError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_groups::GetGroupsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight::GetInsightError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight::GetInsightError, 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::get_insight::GetInsightError> for Error {
    fn from(err: crate::operation::get_insight::GetInsightError) -> Self {
        match err {
            crate::operation::get_insight::GetInsightError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_insight::GetInsightError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_insight::GetInsightError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_events::GetInsightEventsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_events::GetInsightEventsError, 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::get_insight_events::GetInsightEventsError> for Error {
    fn from(err: crate::operation::get_insight_events::GetInsightEventsError) -> Self {
        match err {
            crate::operation::get_insight_events::GetInsightEventsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_insight_events::GetInsightEventsError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_insight_events::GetInsightEventsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_impact_graph::GetInsightImpactGraphError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_impact_graph::GetInsightImpactGraphError, 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::get_insight_impact_graph::GetInsightImpactGraphError> for Error {
    fn from(err: crate::operation::get_insight_impact_graph::GetInsightImpactGraphError) -> Self {
        match err {
            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_insight_impact_graph::GetInsightImpactGraphError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_summaries::GetInsightSummariesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_insight_summaries::GetInsightSummariesError, 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::get_insight_summaries::GetInsightSummariesError> for Error {
    fn from(err: crate::operation::get_insight_summaries::GetInsightSummariesError) -> Self {
        match err {
            crate::operation::get_insight_summaries::GetInsightSummariesError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::get_insight_summaries::GetInsightSummariesError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_insight_summaries::GetInsightSummariesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_rules::GetSamplingRulesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_rules::GetSamplingRulesError, 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::get_sampling_rules::GetSamplingRulesError> for Error {
    fn from(err: crate::operation::get_sampling_rules::GetSamplingRulesError) -> Self {
        match err {
            crate::operation::get_sampling_rules::GetSamplingRulesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_sampling_rules::GetSamplingRulesError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_sampling_rules::GetSamplingRulesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R>
    From<
        ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError, R>,
    > for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError,
            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::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError> for Error {
    fn from(err: crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError) -> Self {
        match err {
            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::ThrottledException(inner) => {
                Error::ThrottledException(inner)
            }
            crate::operation::get_sampling_statistic_summaries::GetSamplingStatisticSummariesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_targets::GetSamplingTargetsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_sampling_targets::GetSamplingTargetsError, 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::get_sampling_targets::GetSamplingTargetsError> for Error {
    fn from(err: crate::operation::get_sampling_targets::GetSamplingTargetsError) -> Self {
        match err {
            crate::operation::get_sampling_targets::GetSamplingTargetsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_sampling_targets::GetSamplingTargetsError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_sampling_targets::GetSamplingTargetsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_graph::GetServiceGraphError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_service_graph::GetServiceGraphError, 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::get_service_graph::GetServiceGraphError> for Error {
    fn from(err: crate::operation::get_service_graph::GetServiceGraphError) -> Self {
        match err {
            crate::operation::get_service_graph::GetServiceGraphError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_service_graph::GetServiceGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_service_graph::GetServiceGraphError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R>
    From<
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError,
            R,
        >,
    > for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(
        err: ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError,
            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::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError> for Error {
    fn from(err: crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError) -> Self {
        match err {
            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::ThrottledException(inner) => {
                Error::ThrottledException(inner)
            }
            crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_graph::GetTraceGraphError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_graph::GetTraceGraphError, 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::get_trace_graph::GetTraceGraphError> for Error {
    fn from(err: crate::operation::get_trace_graph::GetTraceGraphError) -> Self {
        match err {
            crate::operation::get_trace_graph::GetTraceGraphError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_trace_graph::GetTraceGraphError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_trace_graph::GetTraceGraphError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_summaries::GetTraceSummariesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trace_summaries::GetTraceSummariesError, 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::get_trace_summaries::GetTraceSummariesError> for Error {
    fn from(err: crate::operation::get_trace_summaries::GetTraceSummariesError) -> Self {
        match err {
            crate::operation::get_trace_summaries::GetTraceSummariesError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::get_trace_summaries::GetTraceSummariesError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::get_trace_summaries::GetTraceSummariesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_resource_policies::ListResourcePoliciesError, 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_resource_policies::ListResourcePoliciesError> for Error {
    fn from(err: crate::operation::list_resource_policies::ListResourcePoliciesError) -> Self {
        match err {
            crate::operation::list_resource_policies::ListResourcePoliciesError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::list_resource_policies::ListResourcePoliciesError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::list_resource_policies::ListResourcePoliciesError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, 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_for_resource::ListTagsForResourceError, 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_for_resource::ListTagsForResourceError> for Error {
    fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
        match err {
            crate::operation::list_tags_for_resource::ListTagsForResourceError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
                Error::ResourceNotFoundException(inner)
            }
            crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_encryption_config::PutEncryptionConfigError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_encryption_config::PutEncryptionConfigError, 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::put_encryption_config::PutEncryptionConfigError> for Error {
    fn from(err: crate::operation::put_encryption_config::PutEncryptionConfigError) -> Self {
        match err {
            crate::operation::put_encryption_config::PutEncryptionConfigError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::put_encryption_config::PutEncryptionConfigError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::put_encryption_config::PutEncryptionConfigError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_resource_policy::PutResourcePolicyError, 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::put_resource_policy::PutResourcePolicyError> for Error {
    fn from(err: crate::operation::put_resource_policy::PutResourcePolicyError) -> Self {
        match err {
            crate::operation::put_resource_policy::PutResourcePolicyError::InvalidPolicyRevisionIdException(inner) => {
                Error::InvalidPolicyRevisionIdException(inner)
            }
            crate::operation::put_resource_policy::PutResourcePolicyError::LockoutPreventionException(inner) => {
                Error::LockoutPreventionException(inner)
            }
            crate::operation::put_resource_policy::PutResourcePolicyError::MalformedPolicyDocumentException(inner) => {
                Error::MalformedPolicyDocumentException(inner)
            }
            crate::operation::put_resource_policy::PutResourcePolicyError::PolicyCountLimitExceededException(inner) => {
                Error::PolicyCountLimitExceededException(inner)
            }
            crate::operation::put_resource_policy::PutResourcePolicyError::PolicySizeLimitExceededException(inner) => {
                Error::PolicySizeLimitExceededException(inner)
            }
            crate::operation::put_resource_policy::PutResourcePolicyError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::put_resource_policy::PutResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_telemetry_records::PutTelemetryRecordsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_telemetry_records::PutTelemetryRecordsError, 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::put_telemetry_records::PutTelemetryRecordsError> for Error {
    fn from(err: crate::operation::put_telemetry_records::PutTelemetryRecordsError) -> Self {
        match err {
            crate::operation::put_telemetry_records::PutTelemetryRecordsError::InvalidRequestException(inner) => {
                Error::InvalidRequestException(inner)
            }
            crate::operation::put_telemetry_records::PutTelemetryRecordsError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::put_telemetry_records::PutTelemetryRecordsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_trace_segments::PutTraceSegmentsError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_trace_segments::PutTraceSegmentsError, 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::put_trace_segments::PutTraceSegmentsError> for Error {
    fn from(err: crate::operation::put_trace_segments::PutTraceSegmentsError) -> Self {
        match err {
            crate::operation::put_trace_segments::PutTraceSegmentsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::put_trace_segments::PutTraceSegmentsError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::put_trace_segments::PutTraceSegmentsError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, 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::tag_resource::TagResourceError> for Error {
    fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
        match err {
            crate::operation::tag_resource::TagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
            crate::operation::tag_resource::TagResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
            crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, 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::untag_resource::UntagResourceError> for Error {
    fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
        match err {
            crate::operation::untag_resource::UntagResourceError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
            crate::operation::untag_resource::UntagResourceError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_group::UpdateGroupError, 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_group::UpdateGroupError> for Error {
    fn from(err: crate::operation::update_group::UpdateGroupError) -> Self {
        match err {
            crate::operation::update_group::UpdateGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::update_group::UpdateGroupError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::update_group::UpdateGroupError::Unhandled(inner) => Error::Unhandled(inner),
        }
    }
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_sampling_rule::UpdateSamplingRuleError, R>> for Error
where
    R: Send + Sync + std::fmt::Debug + 'static,
{
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_sampling_rule::UpdateSamplingRuleError, 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_sampling_rule::UpdateSamplingRuleError> for Error {
    fn from(err: crate::operation::update_sampling_rule::UpdateSamplingRuleError) -> Self {
        match err {
            crate::operation::update_sampling_rule::UpdateSamplingRuleError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
            crate::operation::update_sampling_rule::UpdateSamplingRuleError::ThrottledException(inner) => Error::ThrottledException(inner),
            crate::operation::update_sampling_rule::UpdateSamplingRuleError::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::InvalidPolicyRevisionIdException(inner) => inner.source(),
            Error::InvalidRequestException(inner) => inner.source(),
            Error::LockoutPreventionException(inner) => inner.source(),
            Error::MalformedPolicyDocumentException(inner) => inner.source(),
            Error::PolicyCountLimitExceededException(inner) => inner.source(),
            Error::PolicySizeLimitExceededException(inner) => inner.source(),
            Error::ResourceNotFoundException(inner) => inner.source(),
            Error::RuleLimitExceededException(inner) => inner.source(),
            Error::ThrottledException(inner) => inner.source(),
            Error::TooManyTagsException(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::InvalidPolicyRevisionIdException(e) => e.request_id(),
            Self::InvalidRequestException(e) => e.request_id(),
            Self::LockoutPreventionException(e) => e.request_id(),
            Self::MalformedPolicyDocumentException(e) => e.request_id(),
            Self::PolicyCountLimitExceededException(e) => e.request_id(),
            Self::PolicySizeLimitExceededException(e) => e.request_id(),
            Self::ResourceNotFoundException(e) => e.request_id(),
            Self::RuleLimitExceededException(e) => e.request_id(),
            Self::ThrottledException(e) => e.request_id(),
            Self::TooManyTagsException(e) => e.request_id(),
            Self::Unhandled(e) => e.meta.request_id(),
        }
    }
}