#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::error::AccessDeniedException),
AccessDeniedForDependencyException(crate::error::AccessDeniedForDependencyException),
InternalErrorException(crate::error::InternalErrorException),
InvalidOperationException(crate::error::InvalidOperationException),
InvalidPaginationTokenException(crate::error::InvalidPaginationTokenException),
InvalidParameterException(crate::error::InvalidParameterException),
InvalidResourceException(crate::error::InvalidResourceException),
LimitsExceededException(crate::error::LimitsExceededException),
LockedSubscriptionException(crate::error::LockedSubscriptionException),
NoAssociatedRoleException(crate::error::NoAssociatedRoleException),
OptimisticLockException(crate::error::OptimisticLockException),
ResourceAlreadyExistsException(crate::error::ResourceAlreadyExistsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::AccessDeniedException(inner) => inner.fmt(f),
Error::AccessDeniedForDependencyException(inner) => inner.fmt(f),
Error::InternalErrorException(inner) => inner.fmt(f),
Error::InvalidOperationException(inner) => inner.fmt(f),
Error::InvalidPaginationTokenException(inner) => inner.fmt(f),
Error::InvalidParameterException(inner) => inner.fmt(f),
Error::InvalidResourceException(inner) => inner.fmt(f),
Error::LimitsExceededException(inner) => inner.fmt(f),
Error::LockedSubscriptionException(inner) => inner.fmt(f),
Error::NoAssociatedRoleException(inner) => inner.fmt(f),
Error::OptimisticLockException(inner) => inner.fmt(f),
Error::ResourceAlreadyExistsException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AssociateDRTLogBucketError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AssociateDRTLogBucketError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::AssociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(inner) => Error::AccessDeniedForDependencyException(inner),
crate::error::AssociateDRTLogBucketErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::AssociateDRTLogBucketErrorKind::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::error::AssociateDRTLogBucketErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::AssociateDRTLogBucketErrorKind::LimitsExceededException(inner) => Error::LimitsExceededException(inner),
crate::error::AssociateDRTLogBucketErrorKind::NoAssociatedRoleException(inner) => Error::NoAssociatedRoleException(inner),
crate::error::AssociateDRTLogBucketErrorKind::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
crate::error::AssociateDRTLogBucketErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::AssociateDRTLogBucketErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AssociateDRTRoleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AssociateDRTRoleError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::AssociateDRTRoleErrorKind::AccessDeniedForDependencyException(
inner,
) => Error::AccessDeniedForDependencyException(inner),
crate::error::AssociateDRTRoleErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::AssociateDRTRoleErrorKind::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::error::AssociateDRTRoleErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::AssociateDRTRoleErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::AssociateDRTRoleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AssociateDRTRoleErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::AssociateHealthCheckError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::AssociateHealthCheckError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::AssociateHealthCheckErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::AssociateHealthCheckErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::AssociateHealthCheckErrorKind::LimitsExceededException(inner) => {
Error::LimitsExceededException(inner)
}
crate::error::AssociateHealthCheckErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::AssociateHealthCheckErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::AssociateHealthCheckErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::error::AssociateProactiveEngagementDetailsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::AssociateProactiveEngagementDetailsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::AssociateProactiveEngagementDetailsErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::AssociateProactiveEngagementDetailsErrorKind::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::error::AssociateProactiveEngagementDetailsErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::AssociateProactiveEngagementDetailsErrorKind::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
crate::error::AssociateProactiveEngagementDetailsErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::AssociateProactiveEngagementDetailsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateProtectionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateProtectionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateProtectionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::CreateProtectionErrorKind::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::error::CreateProtectionErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::CreateProtectionErrorKind::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::error::CreateProtectionErrorKind::LimitsExceededException(inner) => {
Error::LimitsExceededException(inner)
}
crate::error::CreateProtectionErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::CreateProtectionErrorKind::ResourceAlreadyExistsException(inner) => {
Error::ResourceAlreadyExistsException(inner)
}
crate::error::CreateProtectionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateProtectionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateProtectionGroupError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateProtectionGroupError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateProtectionGroupErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::CreateProtectionGroupErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::CreateProtectionGroupErrorKind::LimitsExceededException(inner) => {
Error::LimitsExceededException(inner)
}
crate::error::CreateProtectionGroupErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::CreateProtectionGroupErrorKind::ResourceAlreadyExistsException(
inner,
) => Error::ResourceAlreadyExistsException(inner),
crate::error::CreateProtectionGroupErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::CreateProtectionGroupErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::CreateSubscriptionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::CreateSubscriptionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::CreateSubscriptionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::CreateSubscriptionErrorKind::ResourceAlreadyExistsException(
inner,
) => Error::ResourceAlreadyExistsException(inner),
crate::error::CreateSubscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteProtectionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteProtectionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteProtectionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DeleteProtectionErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::DeleteProtectionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteProtectionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteProtectionGroupError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteProtectionGroupError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteProtectionGroupErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DeleteProtectionGroupErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::DeleteProtectionGroupErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteProtectionGroupErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DeleteSubscriptionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DeleteSubscriptionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DeleteSubscriptionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DeleteSubscriptionErrorKind::LockedSubscriptionException(inner) => {
Error::LockedSubscriptionException(inner)
}
crate::error::DeleteSubscriptionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DeleteSubscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeAttackError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::DescribeAttackError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeAttackErrorKind::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::error::DescribeAttackErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeAttackErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeAttackStatisticsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeAttackStatisticsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeAttackStatisticsErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeAttackStatisticsErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeDRTAccessError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeDRTAccessError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeDRTAccessErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeDRTAccessErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeDRTAccessErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::DescribeEmergencyContactSettingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::DescribeEmergencyContactSettingsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::DescribeEmergencyContactSettingsErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::DescribeEmergencyContactSettingsErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::DescribeEmergencyContactSettingsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeProtectionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeProtectionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeProtectionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeProtectionErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::DescribeProtectionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeProtectionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeProtectionGroupError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeProtectionGroupError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeProtectionGroupErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeProtectionGroupErrorKind::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::error::DescribeProtectionGroupErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DescribeSubscriptionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DescribeSubscriptionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DescribeSubscriptionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DescribeSubscriptionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DescribeSubscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DisableProactiveEngagementError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DisableProactiveEngagementError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DisableProactiveEngagementErrorKind::InternalErrorException(
inner,
) => Error::InternalErrorException(inner),
crate::error::DisableProactiveEngagementErrorKind::InvalidOperationException(
inner,
) => Error::InvalidOperationException(inner),
crate::error::DisableProactiveEngagementErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::DisableProactiveEngagementErrorKind::OptimisticLockException(
inner,
) => Error::OptimisticLockException(inner),
crate::error::DisableProactiveEngagementErrorKind::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::error::DisableProactiveEngagementErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DisassociateDRTLogBucketError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DisassociateDRTLogBucketError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::DisassociateDRTLogBucketErrorKind::AccessDeniedForDependencyException(inner) => Error::AccessDeniedForDependencyException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::NoAssociatedRoleException(inner) => Error::NoAssociatedRoleException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::DisassociateDRTLogBucketErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DisassociateDRTRoleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DisassociateDRTRoleError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DisassociateDRTRoleErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DisassociateDRTRoleErrorKind::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::error::DisassociateDRTRoleErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::DisassociateDRTRoleErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::DisassociateDRTRoleErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::DisassociateHealthCheckError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::DisassociateHealthCheckError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::DisassociateHealthCheckErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::DisassociateHealthCheckErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::DisassociateHealthCheckErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::DisassociateHealthCheckErrorKind::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::error::DisassociateHealthCheckErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::EnableProactiveEngagementError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::EnableProactiveEngagementError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::EnableProactiveEngagementErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::EnableProactiveEngagementErrorKind::InvalidOperationException(
inner,
) => Error::InvalidOperationException(inner),
crate::error::EnableProactiveEngagementErrorKind::InvalidParameterException(
inner,
) => Error::InvalidParameterException(inner),
crate::error::EnableProactiveEngagementErrorKind::OptimisticLockException(
inner,
) => Error::OptimisticLockException(inner),
crate::error::EnableProactiveEngagementErrorKind::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::error::EnableProactiveEngagementErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::GetSubscriptionStateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::GetSubscriptionStateError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::GetSubscriptionStateErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::GetSubscriptionStateErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListAttacksError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListAttacksError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListAttacksErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::ListAttacksErrorKind::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::error::ListAttacksErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::ListAttacksErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListProtectionGroupsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListProtectionGroupsError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListProtectionGroupsErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::ListProtectionGroupsErrorKind::InvalidPaginationTokenException(
inner,
) => Error::InvalidPaginationTokenException(inner),
crate::error::ListProtectionGroupsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListProtectionGroupsErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListProtectionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::ListProtectionsError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListProtectionsErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::ListProtectionsErrorKind::InvalidPaginationTokenException(inner) => {
Error::InvalidPaginationTokenException(inner)
}
crate::error::ListProtectionsErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListProtectionsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::ListResourcesInProtectionGroupError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::ListResourcesInProtectionGroupError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::ListResourcesInProtectionGroupErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::ListResourcesInProtectionGroupErrorKind::InvalidPaginationTokenException(inner) => Error::InvalidPaginationTokenException(inner),
crate::error::ListResourcesInProtectionGroupErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::ListResourcesInProtectionGroupErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::ListTagsForResourceError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::ListTagsForResourceErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::ListTagsForResourceErrorKind::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::error::ListTagsForResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::ListTagsForResourceErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::TagResourceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::TagResourceErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::TagResourceErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::TagResourceErrorKind::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::error::TagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::TagResourceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: aws_smithy_http::result::SdkError<crate::error::UntagResourceError, R>) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UntagResourceErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::UntagResourceErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UntagResourceErrorKind::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::error::UntagResourceErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UntagResourceErrorKind::Unhandled(inner) => Error::Unhandled(inner),
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::error::UpdateEmergencyContactSettingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::error::UpdateEmergencyContactSettingsError,
R,
>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, ..} => match err.kind {
crate::error::UpdateEmergencyContactSettingsErrorKind::InternalErrorException(inner) => Error::InternalErrorException(inner),
crate::error::UpdateEmergencyContactSettingsErrorKind::InvalidParameterException(inner) => Error::InvalidParameterException(inner),
crate::error::UpdateEmergencyContactSettingsErrorKind::OptimisticLockException(inner) => Error::OptimisticLockException(inner),
crate::error::UpdateEmergencyContactSettingsErrorKind::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::error::UpdateEmergencyContactSettingsErrorKind::Unhandled(inner) => Error::Unhandled(inner),
}
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateProtectionGroupError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateProtectionGroupError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateProtectionGroupErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::UpdateProtectionGroupErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UpdateProtectionGroupErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::UpdateProtectionGroupErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateProtectionGroupErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::error::UpdateSubscriptionError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::error::UpdateSubscriptionError, R>,
) -> Self {
match err {
aws_smithy_http::result::SdkError::ServiceError { err, .. } => match err.kind {
crate::error::UpdateSubscriptionErrorKind::InternalErrorException(inner) => {
Error::InternalErrorException(inner)
}
crate::error::UpdateSubscriptionErrorKind::InvalidParameterException(inner) => {
Error::InvalidParameterException(inner)
}
crate::error::UpdateSubscriptionErrorKind::LockedSubscriptionException(inner) => {
Error::LockedSubscriptionException(inner)
}
crate::error::UpdateSubscriptionErrorKind::OptimisticLockException(inner) => {
Error::OptimisticLockException(inner)
}
crate::error::UpdateSubscriptionErrorKind::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::error::UpdateSubscriptionErrorKind::Unhandled(inner) => {
Error::Unhandled(inner)
}
},
_ => Error::Unhandled(err.into()),
}
}
}
impl std::error::Error for Error {}