#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
InsufficientCapacityException(crate::types::error::InsufficientCapacityException),
InternalServerError(crate::types::error::InternalServerError),
InvalidOperationException(crate::types::error::InvalidOperationException),
InvalidRequestException(crate::types::error::InvalidRequestException),
InvalidResourcePolicyException(crate::types::error::InvalidResourcePolicyException),
InvalidTokenException(crate::types::error::InvalidTokenException),
LimitExceededException(crate::types::error::LimitExceededException),
LogDestinationPermissionException(crate::types::error::LogDestinationPermissionException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ResourceOwnerCheckException(crate::types::error::ResourceOwnerCheckException),
ThrottlingException(crate::types::error::ThrottlingException),
UnsupportedOperationException(crate::types::error::UnsupportedOperationException),
#[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::InsufficientCapacityException(inner) => inner.fmt(f),
Error::InternalServerError(inner) => inner.fmt(f),
Error::InvalidOperationException(inner) => inner.fmt(f),
Error::InvalidRequestException(inner) => inner.fmt(f),
Error::InvalidResourcePolicyException(inner) => inner.fmt(f),
Error::InvalidTokenException(inner) => inner.fmt(f),
Error::LimitExceededException(inner) => inner.fmt(f),
Error::LogDestinationPermissionException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ResourceOwnerCheckException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::UnsupportedOperationException(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::InsufficientCapacityException(inner) => inner.meta(),
Self::InternalServerError(inner) => inner.meta(),
Self::InvalidOperationException(inner) => inner.meta(),
Self::InvalidRequestException(inner) => inner.meta(),
Self::InvalidResourcePolicyException(inner) => inner.meta(),
Self::InvalidTokenException(inner) => inner.meta(),
Self::LimitExceededException(inner) => inner.meta(),
Self::LogDestinationPermissionException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ResourceOwnerCheckException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::UnsupportedOperationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_firewall_policy::AssociateFirewallPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_firewall_policy::AssociateFirewallPolicyError, 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::associate_firewall_policy::AssociateFirewallPolicyError> for Error {
fn from(err: crate::operation::associate_firewall_policy::AssociateFirewallPolicyError) -> Self {
match err {
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::associate_firewall_policy::AssociateFirewallPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_subnets::AssociateSubnetsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_subnets::AssociateSubnetsError, 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::associate_subnets::AssociateSubnetsError> for Error {
fn from(err: crate::operation::associate_subnets::AssociateSubnetsError) -> Self {
match err {
crate::operation::associate_subnets::AssociateSubnetsError::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::operation::associate_subnets::AssociateSubnetsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::associate_subnets::AssociateSubnetsError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::operation::associate_subnets::AssociateSubnetsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::associate_subnets::AssociateSubnetsError::InvalidTokenException(inner) => Error::InvalidTokenException(inner),
crate::operation::associate_subnets::AssociateSubnetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::associate_subnets::AssociateSubnetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::associate_subnets::AssociateSubnetsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_firewall::CreateFirewallError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_firewall::CreateFirewallError, 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_firewall::CreateFirewallError> for Error {
fn from(err: crate::operation::create_firewall::CreateFirewallError) -> Self {
match err {
crate::operation::create_firewall::CreateFirewallError::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::operation::create_firewall::CreateFirewallError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::create_firewall::CreateFirewallError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::operation::create_firewall::CreateFirewallError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::create_firewall::CreateFirewallError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_firewall::CreateFirewallError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_firewall::CreateFirewallError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_firewall_policy::CreateFirewallPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_firewall_policy::CreateFirewallPolicyError, 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_firewall_policy::CreateFirewallPolicyError> for Error {
fn from(err: crate::operation::create_firewall_policy::CreateFirewallPolicyError) -> Self {
match err {
crate::operation::create_firewall_policy::CreateFirewallPolicyError::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::operation::create_firewall_policy::CreateFirewallPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::create_firewall_policy::CreateFirewallPolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::create_firewall_policy::CreateFirewallPolicyError::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::operation::create_firewall_policy::CreateFirewallPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_firewall_policy::CreateFirewallPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_rule_group::CreateRuleGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_rule_group::CreateRuleGroupError, 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_rule_group::CreateRuleGroupError> for Error {
fn from(err: crate::operation::create_rule_group::CreateRuleGroupError) -> Self {
match err {
crate::operation::create_rule_group::CreateRuleGroupError::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::operation::create_rule_group::CreateRuleGroupError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::create_rule_group::CreateRuleGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::create_rule_group::CreateRuleGroupError::LimitExceededException(inner) => Error::LimitExceededException(inner),
crate::operation::create_rule_group::CreateRuleGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_rule_group::CreateRuleGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError,
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_tls_inspection_configuration::CreateTLSInspectionConfigurationError> for Error {
fn from(err: crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError) -> Self {
match err {
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::InsufficientCapacityException(inner) => {
Error::InsufficientCapacityException(inner)
}
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::LimitExceededException(inner) => {
Error::LimitExceededException(inner)
}
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_tls_inspection_configuration::CreateTLSInspectionConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_firewall::DeleteFirewallError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_firewall::DeleteFirewallError, 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_firewall::DeleteFirewallError> for Error {
fn from(err: crate::operation::delete_firewall::DeleteFirewallError) -> Self {
match err {
crate::operation::delete_firewall::DeleteFirewallError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::delete_firewall::DeleteFirewallError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::operation::delete_firewall::DeleteFirewallError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::delete_firewall::DeleteFirewallError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_firewall::DeleteFirewallError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_firewall::DeleteFirewallError::UnsupportedOperationException(inner) => {
Error::UnsupportedOperationException(inner)
}
crate::operation::delete_firewall::DeleteFirewallError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_firewall_policy::DeleteFirewallPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_firewall_policy::DeleteFirewallPolicyError, 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_firewall_policy::DeleteFirewallPolicyError> for Error {
fn from(err: crate::operation::delete_firewall_policy::DeleteFirewallPolicyError) -> Self {
match err {
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::UnsupportedOperationException(inner) => {
Error::UnsupportedOperationException(inner)
}
crate::operation::delete_firewall_policy::DeleteFirewallPolicyError::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::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::delete_resource_policy::DeleteResourcePolicyError::InvalidResourcePolicyException(inner) => {
Error::InvalidResourcePolicyException(inner)
}
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_resource_policy::DeleteResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(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_rule_group::DeleteRuleGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_rule_group::DeleteRuleGroupError, 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_rule_group::DeleteRuleGroupError> for Error {
fn from(err: crate::operation::delete_rule_group::DeleteRuleGroupError) -> Self {
match err {
crate::operation::delete_rule_group::DeleteRuleGroupError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::delete_rule_group::DeleteRuleGroupError::InvalidOperationException(inner) => Error::InvalidOperationException(inner),
crate::operation::delete_rule_group::DeleteRuleGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::delete_rule_group::DeleteRuleGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_rule_group::DeleteRuleGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_rule_group::DeleteRuleGroupError::UnsupportedOperationException(inner) => {
Error::UnsupportedOperationException(inner)
}
crate::operation::delete_rule_group::DeleteRuleGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError,
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_tls_inspection_configuration::DeleteTLSInspectionConfigurationError> for Error {
fn from(err: crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError) -> Self {
match err {
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_tls_inspection_configuration::DeleteTLSInspectionConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_firewall::DescribeFirewallError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_firewall::DescribeFirewallError, 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_firewall::DescribeFirewallError> for Error {
fn from(err: crate::operation::describe_firewall::DescribeFirewallError) -> Self {
match err {
crate::operation::describe_firewall::DescribeFirewallError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_firewall::DescribeFirewallError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::describe_firewall::DescribeFirewallError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_firewall::DescribeFirewallError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_firewall::DescribeFirewallError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_firewall_policy::DescribeFirewallPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_firewall_policy::DescribeFirewallPolicyError, 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_firewall_policy::DescribeFirewallPolicyError> for Error {
fn from(err: crate::operation::describe_firewall_policy::DescribeFirewallPolicyError) -> Self {
match err {
crate::operation::describe_firewall_policy::DescribeFirewallPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_firewall_policy::DescribeFirewallPolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::describe_firewall_policy::DescribeFirewallPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_firewall_policy::DescribeFirewallPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_firewall_policy::DescribeFirewallPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError,
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_logging_configuration::DescribeLoggingConfigurationError> for Error {
fn from(err: crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError) -> Self {
match err {
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_logging_configuration::DescribeLoggingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_resource_policy::DescribeResourcePolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_resource_policy::DescribeResourcePolicyError, 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_resource_policy::DescribeResourcePolicyError> for Error {
fn from(err: crate::operation::describe_resource_policy::DescribeResourcePolicyError) -> Self {
match err {
crate::operation::describe_resource_policy::DescribeResourcePolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_resource_policy::DescribeResourcePolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::describe_resource_policy::DescribeResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_resource_policy::DescribeResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_resource_policy::DescribeResourcePolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule_group::DescribeRuleGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule_group::DescribeRuleGroupError, 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_rule_group::DescribeRuleGroupError> for Error {
fn from(err: crate::operation::describe_rule_group::DescribeRuleGroupError) -> Self {
match err {
crate::operation::describe_rule_group::DescribeRuleGroupError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::describe_rule_group::DescribeRuleGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::describe_rule_group::DescribeRuleGroupError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_rule_group::DescribeRuleGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::describe_rule_group::DescribeRuleGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError, 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_rule_group_metadata::DescribeRuleGroupMetadataError> for Error {
fn from(err: crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError) -> Self {
match err {
crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_rule_group_metadata::DescribeRuleGroupMetadataError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError,
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_tls_inspection_configuration::DescribeTLSInspectionConfigurationError> for Error {
fn from(err: crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError) -> Self {
match err {
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::describe_tls_inspection_configuration::DescribeTLSInspectionConfigurationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_subnets::DisassociateSubnetsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_subnets::DisassociateSubnetsError, 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::disassociate_subnets::DisassociateSubnetsError> for Error {
fn from(err: crate::operation::disassociate_subnets::DisassociateSubnetsError) -> Self {
match err {
crate::operation::disassociate_subnets::DisassociateSubnetsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::disassociate_subnets::DisassociateSubnetsError::InvalidOperationException(inner) => {
Error::InvalidOperationException(inner)
}
crate::operation::disassociate_subnets::DisassociateSubnetsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::disassociate_subnets::DisassociateSubnetsError::InvalidTokenException(inner) => Error::InvalidTokenException(inner),
crate::operation::disassociate_subnets::DisassociateSubnetsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::disassociate_subnets::DisassociateSubnetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::disassociate_subnets::DisassociateSubnetsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_firewall_policies::ListFirewallPoliciesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_firewall_policies::ListFirewallPoliciesError, 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_firewall_policies::ListFirewallPoliciesError> for Error {
fn from(err: crate::operation::list_firewall_policies::ListFirewallPoliciesError) -> Self {
match err {
crate::operation::list_firewall_policies::ListFirewallPoliciesError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::list_firewall_policies::ListFirewallPoliciesError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::list_firewall_policies::ListFirewallPoliciesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_firewall_policies::ListFirewallPoliciesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_firewalls::ListFirewallsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_firewalls::ListFirewallsError, 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_firewalls::ListFirewallsError> for Error {
fn from(err: crate::operation::list_firewalls::ListFirewallsError) -> Self {
match err {
crate::operation::list_firewalls::ListFirewallsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::list_firewalls::ListFirewallsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::list_firewalls::ListFirewallsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_firewalls::ListFirewallsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rule_groups::ListRuleGroupsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_rule_groups::ListRuleGroupsError, 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_rule_groups::ListRuleGroupsError> for Error {
fn from(err: crate::operation::list_rule_groups::ListRuleGroupsError) -> Self {
match err {
crate::operation::list_rule_groups::ListRuleGroupsError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::list_rule_groups::ListRuleGroupsError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::list_rule_groups::ListRuleGroupsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_rule_groups::ListRuleGroupsError::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::InternalServerError(inner) => Error::InternalServerError(inner),
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::ThrottlingException(inner) => Error::ThrottlingException(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::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError,
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_tls_inspection_configurations::ListTLSInspectionConfigurationsError> for Error {
fn from(err: crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError) -> Self {
match err {
crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_tls_inspection_configurations::ListTLSInspectionConfigurationsError::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::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::InvalidResourcePolicyException(inner) => {
Error::InvalidResourcePolicyException(inner)
}
crate::operation::put_resource_policy::PutResourcePolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_resource_policy::PutResourcePolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_resource_policy::PutResourcePolicyError::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::InternalServerError(inner) => Error::InternalServerError(inner),
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::ThrottlingException(inner) => Error::ThrottlingException(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::InternalServerError(inner) => Error::InternalServerError(inner),
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::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError,
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_firewall_delete_protection::UpdateFirewallDeleteProtectionError> for Error {
fn from(err: crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError) -> Self {
match err {
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::ResourceOwnerCheckException(inner) => {
Error::ResourceOwnerCheckException(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_firewall_delete_protection::UpdateFirewallDeleteProtectionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_firewall_description::UpdateFirewallDescriptionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_firewall_description::UpdateFirewallDescriptionError, 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_firewall_description::UpdateFirewallDescriptionError> for Error {
fn from(err: crate::operation::update_firewall_description::UpdateFirewallDescriptionError) -> Self {
match err {
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_firewall_description::UpdateFirewallDescriptionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError,
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_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError> for Error {
fn from(err: crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError) -> Self {
match err {
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::InvalidRequestException(
inner,
) => Error::InvalidRequestException(inner),
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::ResourceOwnerCheckException(
inner,
) => Error::ResourceOwnerCheckException(inner),
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_firewall_encryption_configuration::UpdateFirewallEncryptionConfigurationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_firewall_policy::UpdateFirewallPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_firewall_policy::UpdateFirewallPolicyError, 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_firewall_policy::UpdateFirewallPolicyError> for Error {
fn from(err: crate::operation::update_firewall_policy::UpdateFirewallPolicyError) -> Self {
match err {
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::InvalidTokenException(inner) => Error::InvalidTokenException(inner),
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_firewall_policy::UpdateFirewallPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError,
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_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError> for Error {
fn from(err: crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError) -> Self {
match err {
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::ResourceOwnerCheckException(
inner,
) => Error::ResourceOwnerCheckException(inner),
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_firewall_policy_change_protection::UpdateFirewallPolicyChangeProtectionError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_logging_configuration::UpdateLoggingConfigurationError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_logging_configuration::UpdateLoggingConfigurationError, 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_logging_configuration::UpdateLoggingConfigurationError> for Error {
fn from(err: crate::operation::update_logging_configuration::UpdateLoggingConfigurationError) -> Self {
match err {
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::LogDestinationPermissionException(inner) => {
Error::LogDestinationPermissionException(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_logging_configuration::UpdateLoggingConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_rule_group::UpdateRuleGroupError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_rule_group::UpdateRuleGroupError, 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_rule_group::UpdateRuleGroupError> for Error {
fn from(err: crate::operation::update_rule_group::UpdateRuleGroupError) -> Self {
match err {
crate::operation::update_rule_group::UpdateRuleGroupError::InternalServerError(inner) => Error::InternalServerError(inner),
crate::operation::update_rule_group::UpdateRuleGroupError::InvalidRequestException(inner) => Error::InvalidRequestException(inner),
crate::operation::update_rule_group::UpdateRuleGroupError::InvalidTokenException(inner) => Error::InvalidTokenException(inner),
crate::operation::update_rule_group::UpdateRuleGroupError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_rule_group::UpdateRuleGroupError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_rule_group::UpdateRuleGroupError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError,
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_subnet_change_protection::UpdateSubnetChangeProtectionError> for Error {
fn from(err: crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError) -> Self {
match err {
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::ResourceOwnerCheckException(inner) => {
Error::ResourceOwnerCheckException(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_subnet_change_protection::UpdateSubnetChangeProtectionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError,
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_tls_inspection_configuration::UpdateTLSInspectionConfigurationError> for Error {
fn from(err: crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError) -> Self {
match err {
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::InternalServerError(inner) => {
Error::InternalServerError(inner)
}
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::InvalidRequestException(inner) => {
Error::InvalidRequestException(inner)
}
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::InvalidTokenException(inner) => {
Error::InvalidTokenException(inner)
}
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_tls_inspection_configuration::UpdateTLSInspectionConfigurationError::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::InsufficientCapacityException(inner) => inner.source(),
Error::InternalServerError(inner) => inner.source(),
Error::InvalidOperationException(inner) => inner.source(),
Error::InvalidRequestException(inner) => inner.source(),
Error::InvalidResourcePolicyException(inner) => inner.source(),
Error::InvalidTokenException(inner) => inner.source(),
Error::LimitExceededException(inner) => inner.source(),
Error::LogDestinationPermissionException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ResourceOwnerCheckException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::UnsupportedOperationException(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::InsufficientCapacityException(e) => e.request_id(),
Self::InternalServerError(e) => e.request_id(),
Self::InvalidOperationException(e) => e.request_id(),
Self::InvalidRequestException(e) => e.request_id(),
Self::InvalidResourcePolicyException(e) => e.request_id(),
Self::InvalidTokenException(e) => e.request_id(),
Self::LimitExceededException(e) => e.request_id(),
Self::LogDestinationPermissionException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ResourceOwnerCheckException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::UnsupportedOperationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}