#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
TooManyTagsException(crate::types::error::TooManyTagsException),
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::ResourceNotFoundException(inner) => inner.fmt(f),
Error::TooManyTagsException(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::ResourceNotFoundException(inner) => inner.meta(),
Self::TooManyTagsException(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_profile::CreateProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_profile::CreateProfileError, 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_profile::CreateProfileError> for Error {
fn from(err: crate::operation::create_profile::CreateProfileError) -> Self {
match err {
crate::operation::create_profile::CreateProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_profile::CreateProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_profile::CreateProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_trust_anchor::CreateTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_trust_anchor::CreateTrustAnchorError, 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_trust_anchor::CreateTrustAnchorError> for Error {
fn from(err: crate::operation::create_trust_anchor::CreateTrustAnchorError) -> Self {
match err {
crate::operation::create_trust_anchor::CreateTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_trust_anchor::CreateTrustAnchorError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_trust_anchor::CreateTrustAnchorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_attribute_mapping::DeleteAttributeMappingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_attribute_mapping::DeleteAttributeMappingError, 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_attribute_mapping::DeleteAttributeMappingError> for Error {
fn from(err: crate::operation::delete_attribute_mapping::DeleteAttributeMappingError) -> Self {
match err {
crate::operation::delete_attribute_mapping::DeleteAttributeMappingError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::delete_attribute_mapping::DeleteAttributeMappingError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_attribute_mapping::DeleteAttributeMappingError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_attribute_mapping::DeleteAttributeMappingError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_crl::DeleteCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_crl::DeleteCrlError, 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_crl::DeleteCrlError> for Error {
fn from(err: crate::operation::delete_crl::DeleteCrlError) -> Self {
match err {
crate::operation::delete_crl::DeleteCrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_crl::DeleteCrlError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_crl::DeleteCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile::DeleteProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_profile::DeleteProfileError, 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_profile::DeleteProfileError> for Error {
fn from(err: crate::operation::delete_profile::DeleteProfileError) -> Self {
match err {
crate::operation::delete_profile::DeleteProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_profile::DeleteProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_profile::DeleteProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_trust_anchor::DeleteTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_trust_anchor::DeleteTrustAnchorError, 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_trust_anchor::DeleteTrustAnchorError> for Error {
fn from(err: crate::operation::delete_trust_anchor::DeleteTrustAnchorError) -> Self {
match err {
crate::operation::delete_trust_anchor::DeleteTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_trust_anchor::DeleteTrustAnchorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_trust_anchor::DeleteTrustAnchorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_crl::DisableCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_crl::DisableCrlError, 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::disable_crl::DisableCrlError> for Error {
fn from(err: crate::operation::disable_crl::DisableCrlError) -> Self {
match err {
crate::operation::disable_crl::DisableCrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::disable_crl::DisableCrlError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::disable_crl::DisableCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_profile::DisableProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_profile::DisableProfileError, 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::disable_profile::DisableProfileError> for Error {
fn from(err: crate::operation::disable_profile::DisableProfileError) -> Self {
match err {
crate::operation::disable_profile::DisableProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::disable_profile::DisableProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::disable_profile::DisableProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_trust_anchor::DisableTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disable_trust_anchor::DisableTrustAnchorError, 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::disable_trust_anchor::DisableTrustAnchorError> for Error {
fn from(err: crate::operation::disable_trust_anchor::DisableTrustAnchorError) -> Self {
match err {
crate::operation::disable_trust_anchor::DisableTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::disable_trust_anchor::DisableTrustAnchorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::disable_trust_anchor::DisableTrustAnchorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_crl::EnableCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_crl::EnableCrlError, 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::enable_crl::EnableCrlError> for Error {
fn from(err: crate::operation::enable_crl::EnableCrlError) -> Self {
match err {
crate::operation::enable_crl::EnableCrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::enable_crl::EnableCrlError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::enable_crl::EnableCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_profile::EnableProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_profile::EnableProfileError, 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::enable_profile::EnableProfileError> for Error {
fn from(err: crate::operation::enable_profile::EnableProfileError) -> Self {
match err {
crate::operation::enable_profile::EnableProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::enable_profile::EnableProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::enable_profile::EnableProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_trust_anchor::EnableTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::enable_trust_anchor::EnableTrustAnchorError, 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::enable_trust_anchor::EnableTrustAnchorError> for Error {
fn from(err: crate::operation::enable_trust_anchor::EnableTrustAnchorError) -> Self {
match err {
crate::operation::enable_trust_anchor::EnableTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::enable_trust_anchor::EnableTrustAnchorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::enable_trust_anchor::EnableTrustAnchorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_crl::GetCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_crl::GetCrlError, 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_crl::GetCrlError> for Error {
fn from(err: crate::operation::get_crl::GetCrlError) -> Self {
match err {
crate::operation::get_crl::GetCrlError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_crl::GetCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile::GetProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_profile::GetProfileError, 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_profile::GetProfileError> for Error {
fn from(err: crate::operation::get_profile::GetProfileError) -> Self {
match err {
crate::operation::get_profile::GetProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_profile::GetProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_profile::GetProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_subject::GetSubjectError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_subject::GetSubjectError, 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_subject::GetSubjectError> for Error {
fn from(err: crate::operation::get_subject::GetSubjectError) -> Self {
match err {
crate::operation::get_subject::GetSubjectError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_subject::GetSubjectError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_subject::GetSubjectError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trust_anchor::GetTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_trust_anchor::GetTrustAnchorError, 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_trust_anchor::GetTrustAnchorError> for Error {
fn from(err: crate::operation::get_trust_anchor::GetTrustAnchorError) -> Self {
match err {
crate::operation::get_trust_anchor::GetTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_trust_anchor::GetTrustAnchorError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_trust_anchor::GetTrustAnchorError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_trust_anchor::GetTrustAnchorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_crl::ImportCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::import_crl::ImportCrlError, 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::import_crl::ImportCrlError> for Error {
fn from(err: crate::operation::import_crl::ImportCrlError) -> Self {
match err {
crate::operation::import_crl::ImportCrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::import_crl::ImportCrlError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::import_crl::ImportCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_crls::ListCrlsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_crls::ListCrlsError, 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_crls::ListCrlsError> for Error {
fn from(err: crate::operation::list_crls::ListCrlsError) -> Self {
match err {
crate::operation::list_crls::ListCrlsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_crls::ListCrlsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_crls::ListCrlsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profiles::ListProfilesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_profiles::ListProfilesError, 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_profiles::ListProfilesError> for Error {
fn from(err: crate::operation::list_profiles::ListProfilesError) -> Self {
match err {
crate::operation::list_profiles::ListProfilesError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_profiles::ListProfilesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_profiles::ListProfilesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subjects::ListSubjectsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_subjects::ListSubjectsError, 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_subjects::ListSubjectsError> for Error {
fn from(err: crate::operation::list_subjects::ListSubjectsError) -> Self {
match err {
crate::operation::list_subjects::ListSubjectsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_subjects::ListSubjectsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_subjects::ListSubjectsError::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::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(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::list_trust_anchors::ListTrustAnchorsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_trust_anchors::ListTrustAnchorsError, 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_trust_anchors::ListTrustAnchorsError> for Error {
fn from(err: crate::operation::list_trust_anchors::ListTrustAnchorsError) -> Self {
match err {
crate::operation::list_trust_anchors::ListTrustAnchorsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_trust_anchors::ListTrustAnchorsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_trust_anchors::ListTrustAnchorsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_attribute_mapping::PutAttributeMappingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_attribute_mapping::PutAttributeMappingError, 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_attribute_mapping::PutAttributeMappingError> for Error {
fn from(err: crate::operation::put_attribute_mapping::PutAttributeMappingError) -> Self {
match err {
crate::operation::put_attribute_mapping::PutAttributeMappingError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_attribute_mapping::PutAttributeMappingError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_attribute_mapping::PutAttributeMappingError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_attribute_mapping::PutAttributeMappingError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_notification_settings::PutNotificationSettingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_notification_settings::PutNotificationSettingsError, 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_notification_settings::PutNotificationSettingsError> for Error {
fn from(err: crate::operation::put_notification_settings::PutNotificationSettingsError) -> Self {
match err {
crate::operation::put_notification_settings::PutNotificationSettingsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::put_notification_settings::PutNotificationSettingsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_notification_settings::PutNotificationSettingsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_notification_settings::PutNotificationSettingsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reset_notification_settings::ResetNotificationSettingsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::reset_notification_settings::ResetNotificationSettingsError, 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::reset_notification_settings::ResetNotificationSettingsError> for Error {
fn from(err: crate::operation::reset_notification_settings::ResetNotificationSettingsError) -> Self {
match err {
crate::operation::reset_notification_settings::ResetNotificationSettingsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::reset_notification_settings::ResetNotificationSettingsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::reset_notification_settings::ResetNotificationSettingsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::reset_notification_settings::ResetNotificationSettingsError::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::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(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::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(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_crl::UpdateCrlError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_crl::UpdateCrlError, 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_crl::UpdateCrlError> for Error {
fn from(err: crate::operation::update_crl::UpdateCrlError) -> Self {
match err {
crate::operation::update_crl::UpdateCrlError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_crl::UpdateCrlError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_crl::UpdateCrlError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_crl::UpdateCrlError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile::UpdateProfileError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_profile::UpdateProfileError, 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_profile::UpdateProfileError> for Error {
fn from(err: crate::operation::update_profile::UpdateProfileError) -> Self {
match err {
crate::operation::update_profile::UpdateProfileError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_profile::UpdateProfileError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_profile::UpdateProfileError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_profile::UpdateProfileError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_trust_anchor::UpdateTrustAnchorError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_trust_anchor::UpdateTrustAnchorError, 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_trust_anchor::UpdateTrustAnchorError> for Error {
fn from(err: crate::operation::update_trust_anchor::UpdateTrustAnchorError) -> Self {
match err {
crate::operation::update_trust_anchor::UpdateTrustAnchorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_trust_anchor::UpdateTrustAnchorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_trust_anchor::UpdateTrustAnchorError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_trust_anchor::UpdateTrustAnchorError::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::ResourceNotFoundException(inner) => inner.source(),
Error::TooManyTagsException(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::ResourceNotFoundException(e) => e.request_id(),
Self::TooManyTagsException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}