#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
InvalidCampaignStateException(crate::types::error::InvalidCampaignStateException),
InvalidStateException(crate::types::error::InvalidStateException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
ThrottlingException(crate::types::error::ThrottlingException),
ValidationException(crate::types::error::ValidationException),
#[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::AccessDeniedException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(inner) => inner.fmt(f),
Error::InvalidCampaignStateException(inner) => inner.fmt(f),
Error::InvalidStateException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::ValidationException(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::AccessDeniedException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::InternalServerException(inner) => inner.meta(),
Self::InvalidCampaignStateException(inner) => inner.meta(),
Self::InvalidStateException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_campaign::CreateCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_campaign::CreateCampaignError, 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_campaign::CreateCampaignError> for Error {
fn from(err: crate::operation::create_campaign::CreateCampaignError) -> Self {
match err {
crate::operation::create_campaign::CreateCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_campaign::CreateCampaignError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_campaign::CreateCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_campaign::CreateCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_campaign::CreateCampaignError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_campaign::CreateCampaignError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_campaign::CreateCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_campaign::CreateCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_campaign::DeleteCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_campaign::DeleteCampaignError, 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_campaign::DeleteCampaignError> for Error {
fn from(err: crate::operation::delete_campaign::DeleteCampaignError) -> Self {
match err {
crate::operation::delete_campaign::DeleteCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_campaign::DeleteCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_campaign::DeleteCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_campaign::DeleteCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_campaign::DeleteCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError,
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_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError> for Error {
fn from(err: crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError) -> Self {
match err {
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_campaign_channel_subtype_config::DeleteCampaignChannelSubtypeConfigError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError,
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_campaign_communication_limits::DeleteCampaignCommunicationLimitsError> for Error {
fn from(err: crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError) -> Self {
match err {
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_campaign_communication_limits::DeleteCampaignCommunicationLimitsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError,
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_campaign_communication_time::DeleteCampaignCommunicationTimeError> for Error {
fn from(err: crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError) -> Self {
match err {
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_campaign_communication_time::DeleteCampaignCommunicationTimeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError,
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_connect_instance_config::DeleteConnectInstanceConfigError> for Error {
fn from(err: crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError) -> Self {
match err {
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_connect_instance_config::DeleteConnectInstanceConfigError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError,
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_connect_instance_integration::DeleteConnectInstanceIntegrationError> for Error {
fn from(err: crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError) -> Self {
match err {
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_connect_instance_integration::DeleteConnectInstanceIntegrationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError,
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_instance_onboarding_job::DeleteInstanceOnboardingJobError> for Error {
fn from(err: crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError) -> Self {
match err {
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::InvalidStateException(inner) => {
Error::InvalidStateException(inner)
}
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_instance_onboarding_job::DeleteInstanceOnboardingJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_campaign::DescribeCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_campaign::DescribeCampaignError, 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_campaign::DescribeCampaignError> for Error {
fn from(err: crate::operation::describe_campaign::DescribeCampaignError) -> Self {
match err {
crate::operation::describe_campaign::DescribeCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::describe_campaign::DescribeCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::describe_campaign::DescribeCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_campaign::DescribeCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_campaign::DescribeCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_campaign_state::GetCampaignStateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_campaign_state::GetCampaignStateError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_campaign_state::GetCampaignStateError> for Error {
fn from(err: crate::operation::get_campaign_state::GetCampaignStateError) -> Self {
match err {
crate::operation::get_campaign_state::GetCampaignStateError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_campaign_state::GetCampaignStateError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_campaign_state::GetCampaignStateError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_campaign_state::GetCampaignStateError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_campaign_state::GetCampaignStateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_campaign_state::GetCampaignStateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_campaign_state_batch::GetCampaignStateBatchError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_campaign_state_batch::GetCampaignStateBatchError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_campaign_state_batch::GetCampaignStateBatchError> for Error {
fn from(err: crate::operation::get_campaign_state_batch::GetCampaignStateBatchError) -> Self {
match err {
crate::operation::get_campaign_state_batch::GetCampaignStateBatchError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_campaign_state_batch::GetCampaignStateBatchError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_campaign_state_batch::GetCampaignStateBatchError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_campaign_state_batch::GetCampaignStateBatchError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_campaign_state_batch::GetCampaignStateBatchError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_connect_instance_config::GetConnectInstanceConfigError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_connect_instance_config::GetConnectInstanceConfigError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_connect_instance_config::GetConnectInstanceConfigError> for Error {
fn from(err: crate::operation::get_connect_instance_config::GetConnectInstanceConfigError) -> Self {
match err {
crate::operation::get_connect_instance_config::GetConnectInstanceConfigError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_connect_instance_config::GetConnectInstanceConfigError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_connect_instance_config::GetConnectInstanceConfigError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_connect_instance_config::GetConnectInstanceConfigError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_connect_instance_config::GetConnectInstanceConfigError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError,
R,
>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError> for Error {
fn from(err: crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError) -> Self {
match err {
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_instance_onboarding_job_status::GetInstanceOnboardingJobStatusError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_campaigns::ListCampaignsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_campaigns::ListCampaignsError, 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_campaigns::ListCampaignsError> for Error {
fn from(err: crate::operation::list_campaigns::ListCampaignsError) -> Self {
match err {
crate::operation::list_campaigns::ListCampaignsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_campaigns::ListCampaignsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_campaigns::ListCampaignsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_campaigns::ListCampaignsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError,
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_connect_instance_integrations::ListConnectInstanceIntegrationsError> for Error {
fn from(err: crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError) -> Self {
match err {
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_connect_instance_integrations::ListConnectInstanceIntegrationsError::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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => {
Error::InternalServerException(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::ValidationException(inner) => Error::ValidationException(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::pause_campaign::PauseCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::pause_campaign::PauseCampaignError, 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::pause_campaign::PauseCampaignError> for Error {
fn from(err: crate::operation::pause_campaign::PauseCampaignError) -> Self {
match err {
crate::operation::pause_campaign::PauseCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::pause_campaign::PauseCampaignError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::pause_campaign::PauseCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::pause_campaign::PauseCampaignError::InvalidCampaignStateException(inner) => Error::InvalidCampaignStateException(inner),
crate::operation::pause_campaign::PauseCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::pause_campaign::PauseCampaignError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::pause_campaign::PauseCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::pause_campaign::PauseCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError,
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_connect_instance_integration::PutConnectInstanceIntegrationError> for Error {
fn from(err: crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError) -> Self {
match err {
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_connect_instance_integration::PutConnectInstanceIntegrationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError, 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_outbound_request_batch::PutOutboundRequestBatchError> for Error {
fn from(err: crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError) -> Self {
match err {
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_outbound_request_batch::PutOutboundRequestBatchError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError,
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_profile_outbound_request_batch::PutProfileOutboundRequestBatchError> for Error {
fn from(err: crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError) -> Self {
match err {
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_profile_outbound_request_batch::PutProfileOutboundRequestBatchError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resume_campaign::ResumeCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::resume_campaign::ResumeCampaignError, 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::resume_campaign::ResumeCampaignError> for Error {
fn from(err: crate::operation::resume_campaign::ResumeCampaignError) -> Self {
match err {
crate::operation::resume_campaign::ResumeCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::resume_campaign::ResumeCampaignError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::resume_campaign::ResumeCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::resume_campaign::ResumeCampaignError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::resume_campaign::ResumeCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::resume_campaign::ResumeCampaignError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::resume_campaign::ResumeCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::resume_campaign::ResumeCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_campaign::StartCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_campaign::StartCampaignError, 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::start_campaign::StartCampaignError> for Error {
fn from(err: crate::operation::start_campaign::StartCampaignError) -> Self {
match err {
crate::operation::start_campaign::StartCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_campaign::StartCampaignError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::start_campaign::StartCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_campaign::StartCampaignError::InvalidCampaignStateException(inner) => Error::InvalidCampaignStateException(inner),
crate::operation::start_campaign::StartCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_campaign::StartCampaignError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_campaign::StartCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_campaign::StartCampaignError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError, 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::start_instance_onboarding_job::StartInstanceOnboardingJobError> for Error {
fn from(err: crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError) -> Self {
match err {
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::start_instance_onboarding_job::StartInstanceOnboardingJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_campaign::StopCampaignError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::stop_campaign::StopCampaignError, 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::stop_campaign::StopCampaignError> for Error {
fn from(err: crate::operation::stop_campaign::StopCampaignError) -> Self {
match err {
crate::operation::stop_campaign::StopCampaignError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::stop_campaign::StopCampaignError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::stop_campaign::StopCampaignError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::stop_campaign::StopCampaignError::InvalidCampaignStateException(inner) => Error::InvalidCampaignStateException(inner),
crate::operation::stop_campaign::StopCampaignError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::stop_campaign::StopCampaignError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::stop_campaign::StopCampaignError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::stop_campaign::StopCampaignError::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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => Error::InternalServerException(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::ValidationException(inner) => Error::ValidationException(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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(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::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError,
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_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError> for Error {
fn from(err: crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError) -> Self {
match err {
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_campaign_channel_subtype_config::UpdateCampaignChannelSubtypeConfigError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError,
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_campaign_communication_limits::UpdateCampaignCommunicationLimitsError> for Error {
fn from(err: crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError) -> Self {
match err {
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_campaign_communication_limits::UpdateCampaignCommunicationLimitsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError,
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_campaign_communication_time::UpdateCampaignCommunicationTimeError> for Error {
fn from(err: crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError) -> Self {
match err {
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_campaign_communication_time::UpdateCampaignCommunicationTimeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError,
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_campaign_flow_association::UpdateCampaignFlowAssociationError> for Error {
fn from(err: crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError) -> Self {
match err {
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_campaign_flow_association::UpdateCampaignFlowAssociationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_name::UpdateCampaignNameError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_name::UpdateCampaignNameError, 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_campaign_name::UpdateCampaignNameError> for Error {
fn from(err: crate::operation::update_campaign_name::UpdateCampaignNameError) -> Self {
match err {
crate::operation::update_campaign_name::UpdateCampaignNameError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_campaign_name::UpdateCampaignNameError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_campaign_name::UpdateCampaignNameError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_campaign_name::UpdateCampaignNameError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_name::UpdateCampaignNameError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_campaign_name::UpdateCampaignNameError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_schedule::UpdateCampaignScheduleError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_schedule::UpdateCampaignScheduleError, 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_campaign_schedule::UpdateCampaignScheduleError> for Error {
fn from(err: crate::operation::update_campaign_schedule::UpdateCampaignScheduleError) -> Self {
match err {
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_campaign_schedule::UpdateCampaignScheduleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_source::UpdateCampaignSourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_campaign_source::UpdateCampaignSourceError, 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_campaign_source::UpdateCampaignSourceError> for Error {
fn from(err: crate::operation::update_campaign_source::UpdateCampaignSourceError) -> Self {
match err {
crate::operation::update_campaign_source::UpdateCampaignSourceError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_campaign_source::UpdateCampaignSourceError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_campaign_source::UpdateCampaignSourceError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::update_campaign_source::UpdateCampaignSourceError::InvalidCampaignStateException(inner) => {
Error::InvalidCampaignStateException(inner)
}
crate::operation::update_campaign_source::UpdateCampaignSourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_campaign_source::UpdateCampaignSourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_campaign_source::UpdateCampaignSourceError::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::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::InternalServerException(inner) => inner.source(),
Error::InvalidCampaignStateException(inner) => inner.source(),
Error::InvalidStateException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::ValidationException(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::AccessDeniedException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::InternalServerException(e) => e.request_id(),
Self::InvalidCampaignStateException(e) => e.request_id(),
Self::InvalidStateException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}