#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ConflictException(crate::types::error::ConflictException),
InternalServerException(crate::types::error::InternalServerException),
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::ConflictException(inner) => inner.fmt(f),
Error::InternalServerException(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::ConflictException(inner) => inner.meta(),
Self::InternalServerException(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_access_point::CreateAccessPointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_access_point::CreateAccessPointError, 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_access_point::CreateAccessPointError> for Error {
fn from(err: crate::operation::create_access_point::CreateAccessPointError) -> Self {
match err {
crate::operation::create_access_point::CreateAccessPointError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_access_point::CreateAccessPointError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_access_point::CreateAccessPointError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_access_point::CreateAccessPointError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_access_point::CreateAccessPointError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_access_point::CreateAccessPointError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_access_point::CreateAccessPointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_file_system::CreateFileSystemError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_file_system::CreateFileSystemError, 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_file_system::CreateFileSystemError> for Error {
fn from(err: crate::operation::create_file_system::CreateFileSystemError) -> Self {
match err {
crate::operation::create_file_system::CreateFileSystemError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_file_system::CreateFileSystemError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_file_system::CreateFileSystemError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_file_system::CreateFileSystemError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_file_system::CreateFileSystemError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_file_system::CreateFileSystemError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_file_system::CreateFileSystemError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_mount_target::CreateMountTargetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_mount_target::CreateMountTargetError, 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_mount_target::CreateMountTargetError> for Error {
fn from(err: crate::operation::create_mount_target::CreateMountTargetError) -> Self {
match err {
crate::operation::create_mount_target::CreateMountTargetError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_mount_target::CreateMountTargetError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_mount_target::CreateMountTargetError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_mount_target::CreateMountTargetError::ServiceQuotaExceededException(inner) => {
Error::ServiceQuotaExceededException(inner)
}
crate::operation::create_mount_target::CreateMountTargetError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_mount_target::CreateMountTargetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_mount_target::CreateMountTargetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_point::DeleteAccessPointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_access_point::DeleteAccessPointError, 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_access_point::DeleteAccessPointError> for Error {
fn from(err: crate::operation::delete_access_point::DeleteAccessPointError) -> Self {
match err {
crate::operation::delete_access_point::DeleteAccessPointError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_access_point::DeleteAccessPointError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_access_point::DeleteAccessPointError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_access_point::DeleteAccessPointError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_access_point::DeleteAccessPointError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_access_point::DeleteAccessPointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_file_system::DeleteFileSystemError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_file_system::DeleteFileSystemError, 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_file_system::DeleteFileSystemError> for Error {
fn from(err: crate::operation::delete_file_system::DeleteFileSystemError) -> Self {
match err {
crate::operation::delete_file_system::DeleteFileSystemError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_file_system::DeleteFileSystemError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_file_system::DeleteFileSystemError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_file_system::DeleteFileSystemError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_file_system::DeleteFileSystemError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_file_system::DeleteFileSystemError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError, 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_file_system_policy::DeleteFileSystemPolicyError> for Error {
fn from(err: crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError) -> Self {
match err {
crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_file_system_policy::DeleteFileSystemPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_mount_target::DeleteMountTargetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_mount_target::DeleteMountTargetError, 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_mount_target::DeleteMountTargetError> for Error {
fn from(err: crate::operation::delete_mount_target::DeleteMountTargetError) -> Self {
match err {
crate::operation::delete_mount_target::DeleteMountTargetError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_mount_target::DeleteMountTargetError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_mount_target::DeleteMountTargetError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_mount_target::DeleteMountTargetError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_mount_target::DeleteMountTargetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_mount_target::DeleteMountTargetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_point::GetAccessPointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_access_point::GetAccessPointError, 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_access_point::GetAccessPointError> for Error {
fn from(err: crate::operation::get_access_point::GetAccessPointError) -> Self {
match err {
crate::operation::get_access_point::GetAccessPointError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_access_point::GetAccessPointError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_access_point::GetAccessPointError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_access_point::GetAccessPointError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_access_point::GetAccessPointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_file_system::GetFileSystemError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_file_system::GetFileSystemError, 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_file_system::GetFileSystemError> for Error {
fn from(err: crate::operation::get_file_system::GetFileSystemError) -> Self {
match err {
crate::operation::get_file_system::GetFileSystemError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_file_system::GetFileSystemError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_file_system::GetFileSystemError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_file_system::GetFileSystemError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_file_system::GetFileSystemError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_file_system_policy::GetFileSystemPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_file_system_policy::GetFileSystemPolicyError, 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_file_system_policy::GetFileSystemPolicyError> for Error {
fn from(err: crate::operation::get_file_system_policy::GetFileSystemPolicyError) -> Self {
match err {
crate::operation::get_file_system_policy::GetFileSystemPolicyError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_file_system_policy::GetFileSystemPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_file_system_policy::GetFileSystemPolicyError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_file_system_policy::GetFileSystemPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_file_system_policy::GetFileSystemPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_mount_target::GetMountTargetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_mount_target::GetMountTargetError, 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_mount_target::GetMountTargetError> for Error {
fn from(err: crate::operation::get_mount_target::GetMountTargetError) -> Self {
match err {
crate::operation::get_mount_target::GetMountTargetError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_mount_target::GetMountTargetError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_mount_target::GetMountTargetError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_mount_target::GetMountTargetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_mount_target::GetMountTargetError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError,
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_synchronization_configuration::GetSynchronizationConfigurationError> for Error {
fn from(err: crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError) -> Self {
match err {
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_synchronization_configuration::GetSynchronizationConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_points::ListAccessPointsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_access_points::ListAccessPointsError, 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_access_points::ListAccessPointsError> for Error {
fn from(err: crate::operation::list_access_points::ListAccessPointsError) -> Self {
match err {
crate::operation::list_access_points::ListAccessPointsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_access_points::ListAccessPointsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_access_points::ListAccessPointsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_access_points::ListAccessPointsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_access_points::ListAccessPointsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_file_systems::ListFileSystemsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_file_systems::ListFileSystemsError, 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_file_systems::ListFileSystemsError> for Error {
fn from(err: crate::operation::list_file_systems::ListFileSystemsError) -> Self {
match err {
crate::operation::list_file_systems::ListFileSystemsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_file_systems::ListFileSystemsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_file_systems::ListFileSystemsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_file_systems::ListFileSystemsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_mount_targets::ListMountTargetsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_mount_targets::ListMountTargetsError, 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_mount_targets::ListMountTargetsError> for Error {
fn from(err: crate::operation::list_mount_targets::ListMountTargetsError) -> Self {
match err {
crate::operation::list_mount_targets::ListMountTargetsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_mount_targets::ListMountTargetsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_mount_targets::ListMountTargetsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_mount_targets::ListMountTargetsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_mount_targets::ListMountTargetsError::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::InternalServerException(inner) => {
Error::InternalServerException(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::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_file_system_policy::PutFileSystemPolicyError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::put_file_system_policy::PutFileSystemPolicyError, 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_file_system_policy::PutFileSystemPolicyError> for Error {
fn from(err: crate::operation::put_file_system_policy::PutFileSystemPolicyError) -> Self {
match err {
crate::operation::put_file_system_policy::PutFileSystemPolicyError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::put_file_system_policy::PutFileSystemPolicyError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_file_system_policy::PutFileSystemPolicyError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_file_system_policy::PutFileSystemPolicyError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_file_system_policy::PutFileSystemPolicyError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError,
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_synchronization_configuration::PutSynchronizationConfigurationError> for Error {
fn from(err: crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError) -> Self {
match err {
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationError::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::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::InternalServerException(inner) => Error::InternalServerException(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::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_mount_target::UpdateMountTargetError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_mount_target::UpdateMountTargetError, 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_mount_target::UpdateMountTargetError> for Error {
fn from(err: crate::operation::update_mount_target::UpdateMountTargetError) -> Self {
match err {
crate::operation::update_mount_target::UpdateMountTargetError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_mount_target::UpdateMountTargetError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_mount_target::UpdateMountTargetError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_mount_target::UpdateMountTargetError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_mount_target::UpdateMountTargetError::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::ConflictException(inner) => inner.source(),
Error::InternalServerException(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::ConflictException(e) => e.request_id(),
Self::InternalServerException(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(),
}
}
}