#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
ClusterLimitExceededException(crate::types::error::ClusterLimitExceededException),
ConflictException(crate::types::error::ConflictException),
Ec2RequestFailedException(crate::types::error::Ec2RequestFailedException),
InvalidAddressException(crate::types::error::InvalidAddressException),
InvalidInputCombinationException(crate::types::error::InvalidInputCombinationException),
InvalidJobStateException(crate::types::error::InvalidJobStateException),
InvalidNextTokenException(crate::types::error::InvalidNextTokenException),
InvalidResourceException(crate::types::error::InvalidResourceException),
KmsRequestFailedException(crate::types::error::KmsRequestFailedException),
ReturnShippingLabelAlreadyExistsException(crate::types::error::ReturnShippingLabelAlreadyExistsException),
UnsupportedAddressException(crate::types::error::UnsupportedAddressException),
#[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::ClusterLimitExceededException(inner) => inner.fmt(f),
Error::ConflictException(inner) => inner.fmt(f),
Error::Ec2RequestFailedException(inner) => inner.fmt(f),
Error::InvalidAddressException(inner) => inner.fmt(f),
Error::InvalidInputCombinationException(inner) => inner.fmt(f),
Error::InvalidJobStateException(inner) => inner.fmt(f),
Error::InvalidNextTokenException(inner) => inner.fmt(f),
Error::InvalidResourceException(inner) => inner.fmt(f),
Error::KmsRequestFailedException(inner) => inner.fmt(f),
Error::ReturnShippingLabelAlreadyExistsException(inner) => inner.fmt(f),
Error::UnsupportedAddressException(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::ClusterLimitExceededException(inner) => inner.meta(),
Self::ConflictException(inner) => inner.meta(),
Self::Ec2RequestFailedException(inner) => inner.meta(),
Self::InvalidAddressException(inner) => inner.meta(),
Self::InvalidInputCombinationException(inner) => inner.meta(),
Self::InvalidJobStateException(inner) => inner.meta(),
Self::InvalidNextTokenException(inner) => inner.meta(),
Self::InvalidResourceException(inner) => inner.meta(),
Self::KmsRequestFailedException(inner) => inner.meta(),
Self::ReturnShippingLabelAlreadyExistsException(inner) => inner.meta(),
Self::UnsupportedAddressException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_cluster::CancelClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_cluster::CancelClusterError, 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::cancel_cluster::CancelClusterError> for Error {
fn from(err: crate::operation::cancel_cluster::CancelClusterError) -> Self {
match err {
crate::operation::cancel_cluster::CancelClusterError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::cancel_cluster::CancelClusterError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::cancel_cluster::CancelClusterError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::cancel_cluster::CancelClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::cancel_job::CancelJobError, 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::cancel_job::CancelJobError> for Error {
fn from(err: crate::operation::cancel_job::CancelJobError) -> Self {
match err {
crate::operation::cancel_job::CancelJobError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::cancel_job::CancelJobError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::cancel_job::CancelJobError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::cancel_job::CancelJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_address::CreateAddressError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_address::CreateAddressError, 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_address::CreateAddressError> for Error {
fn from(err: crate::operation::create_address::CreateAddressError) -> Self {
match err {
crate::operation::create_address::CreateAddressError::InvalidAddressException(inner) => Error::InvalidAddressException(inner),
crate::operation::create_address::CreateAddressError::UnsupportedAddressException(inner) => Error::UnsupportedAddressException(inner),
crate::operation::create_address::CreateAddressError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_cluster::CreateClusterError, 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_cluster::CreateClusterError> for Error {
fn from(err: crate::operation::create_cluster::CreateClusterError) -> Self {
match err {
crate::operation::create_cluster::CreateClusterError::Ec2RequestFailedException(inner) => Error::Ec2RequestFailedException(inner),
crate::operation::create_cluster::CreateClusterError::InvalidInputCombinationException(inner) => {
Error::InvalidInputCombinationException(inner)
}
crate::operation::create_cluster::CreateClusterError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::create_cluster::CreateClusterError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::create_cluster::CreateClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job::CreateJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_job::CreateJobError, 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_job::CreateJobError> for Error {
fn from(err: crate::operation::create_job::CreateJobError) -> Self {
match err {
crate::operation::create_job::CreateJobError::ClusterLimitExceededException(inner) => Error::ClusterLimitExceededException(inner),
crate::operation::create_job::CreateJobError::Ec2RequestFailedException(inner) => Error::Ec2RequestFailedException(inner),
crate::operation::create_job::CreateJobError::InvalidInputCombinationException(inner) => Error::InvalidInputCombinationException(inner),
crate::operation::create_job::CreateJobError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::create_job::CreateJobError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::create_job::CreateJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_long_term_pricing::CreateLongTermPricingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_long_term_pricing::CreateLongTermPricingError, 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_long_term_pricing::CreateLongTermPricingError> for Error {
fn from(err: crate::operation::create_long_term_pricing::CreateLongTermPricingError) -> Self {
match err {
crate::operation::create_long_term_pricing::CreateLongTermPricingError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::create_long_term_pricing::CreateLongTermPricingError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_return_shipping_label::CreateReturnShippingLabelError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_return_shipping_label::CreateReturnShippingLabelError, 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_return_shipping_label::CreateReturnShippingLabelError> for Error {
fn from(err: crate::operation::create_return_shipping_label::CreateReturnShippingLabelError) -> Self {
match err {
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::InvalidInputCombinationException(inner) => {
Error::InvalidInputCombinationException(inner)
}
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::InvalidJobStateException(inner) => {
Error::InvalidJobStateException(inner)
}
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::ReturnShippingLabelAlreadyExistsException(inner) => {
Error::ReturnShippingLabelAlreadyExistsException(inner)
}
crate::operation::create_return_shipping_label::CreateReturnShippingLabelError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_address::DescribeAddressError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_address::DescribeAddressError, 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_address::DescribeAddressError> for Error {
fn from(err: crate::operation::describe_address::DescribeAddressError) -> Self {
match err {
crate::operation::describe_address::DescribeAddressError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::describe_address::DescribeAddressError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_addresses::DescribeAddressesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_addresses::DescribeAddressesError, 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_addresses::DescribeAddressesError> for Error {
fn from(err: crate::operation::describe_addresses::DescribeAddressesError) -> Self {
match err {
crate::operation::describe_addresses::DescribeAddressesError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::describe_addresses::DescribeAddressesError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::describe_addresses::DescribeAddressesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cluster::DescribeClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_cluster::DescribeClusterError, 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_cluster::DescribeClusterError> for Error {
fn from(err: crate::operation::describe_cluster::DescribeClusterError) -> Self {
match err {
crate::operation::describe_cluster::DescribeClusterError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::describe_cluster::DescribeClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job::DescribeJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_job::DescribeJobError, 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_job::DescribeJobError> for Error {
fn from(err: crate::operation::describe_job::DescribeJobError) -> Self {
match err {
crate::operation::describe_job::DescribeJobError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::describe_job::DescribeJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError,
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_return_shipping_label::DescribeReturnShippingLabelError> for Error {
fn from(err: crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError) -> Self {
match err {
crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError::InvalidJobStateException(inner) => {
Error::InvalidJobStateException(inner)
}
crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::describe_return_shipping_label::DescribeReturnShippingLabelError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_manifest::GetJobManifestError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_manifest::GetJobManifestError, 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_job_manifest::GetJobManifestError> for Error {
fn from(err: crate::operation::get_job_manifest::GetJobManifestError) -> Self {
match err {
crate::operation::get_job_manifest::GetJobManifestError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::get_job_manifest::GetJobManifestError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::get_job_manifest::GetJobManifestError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_unlock_code::GetJobUnlockCodeError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_job_unlock_code::GetJobUnlockCodeError, 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_job_unlock_code::GetJobUnlockCodeError> for Error {
fn from(err: crate::operation::get_job_unlock_code::GetJobUnlockCodeError) -> Self {
match err {
crate::operation::get_job_unlock_code::GetJobUnlockCodeError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::get_job_unlock_code::GetJobUnlockCodeError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::get_job_unlock_code::GetJobUnlockCodeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_snowball_usage::GetSnowballUsageError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_snowball_usage::GetSnowballUsageError, 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_snowball_usage::GetSnowballUsageError> for Error {
fn from(err: crate::operation::get_snowball_usage::GetSnowballUsageError) -> Self {
match err {
crate::operation::get_snowball_usage::GetSnowballUsageError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_software_updates::GetSoftwareUpdatesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_software_updates::GetSoftwareUpdatesError, 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_software_updates::GetSoftwareUpdatesError> for Error {
fn from(err: crate::operation::get_software_updates::GetSoftwareUpdatesError) -> Self {
match err {
crate::operation::get_software_updates::GetSoftwareUpdatesError::InvalidJobStateException(inner) => {
Error::InvalidJobStateException(inner)
}
crate::operation::get_software_updates::GetSoftwareUpdatesError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::get_software_updates::GetSoftwareUpdatesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cluster_jobs::ListClusterJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_cluster_jobs::ListClusterJobsError, 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_cluster_jobs::ListClusterJobsError> for Error {
fn from(err: crate::operation::list_cluster_jobs::ListClusterJobsError) -> Self {
match err {
crate::operation::list_cluster_jobs::ListClusterJobsError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_cluster_jobs::ListClusterJobsError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::list_cluster_jobs::ListClusterJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_clusters::ListClustersError, 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_clusters::ListClustersError> for Error {
fn from(err: crate::operation::list_clusters::ListClustersError) -> Self {
match err {
crate::operation::list_clusters::ListClustersError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_clusters::ListClustersError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_compatible_images::ListCompatibleImagesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_compatible_images::ListCompatibleImagesError, 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_compatible_images::ListCompatibleImagesError> for Error {
fn from(err: crate::operation::list_compatible_images::ListCompatibleImagesError) -> Self {
match err {
crate::operation::list_compatible_images::ListCompatibleImagesError::Ec2RequestFailedException(inner) => {
Error::Ec2RequestFailedException(inner)
}
crate::operation::list_compatible_images::ListCompatibleImagesError::InvalidNextTokenException(inner) => {
Error::InvalidNextTokenException(inner)
}
crate::operation::list_compatible_images::ListCompatibleImagesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_jobs::ListJobsError, 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_jobs::ListJobsError> for Error {
fn from(err: crate::operation::list_jobs::ListJobsError) -> Self {
match err {
crate::operation::list_jobs::ListJobsError::InvalidNextTokenException(inner) => Error::InvalidNextTokenException(inner),
crate::operation::list_jobs::ListJobsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_long_term_pricing::ListLongTermPricingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_long_term_pricing::ListLongTermPricingError, 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_long_term_pricing::ListLongTermPricingError> for Error {
fn from(err: crate::operation::list_long_term_pricing::ListLongTermPricingError) -> Self {
match err {
crate::operation::list_long_term_pricing::ListLongTermPricingError::InvalidNextTokenException(inner) => {
Error::InvalidNextTokenException(inner)
}
crate::operation::list_long_term_pricing::ListLongTermPricingError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::list_long_term_pricing::ListLongTermPricingError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pickup_locations::ListPickupLocationsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_pickup_locations::ListPickupLocationsError, 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_pickup_locations::ListPickupLocationsError> for Error {
fn from(err: crate::operation::list_pickup_locations::ListPickupLocationsError) -> Self {
match err {
crate::operation::list_pickup_locations::ListPickupLocationsError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::list_pickup_locations::ListPickupLocationsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_versions::ListServiceVersionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_service_versions::ListServiceVersionsError, 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_service_versions::ListServiceVersionsError> for Error {
fn from(err: crate::operation::list_service_versions::ListServiceVersionsError) -> Self {
match err {
crate::operation::list_service_versions::ListServiceVersionsError::InvalidNextTokenException(inner) => {
Error::InvalidNextTokenException(inner)
}
crate::operation::list_service_versions::ListServiceVersionsError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::list_service_versions::ListServiceVersionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_cluster::UpdateClusterError, 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_cluster::UpdateClusterError> for Error {
fn from(err: crate::operation::update_cluster::UpdateClusterError) -> Self {
match err {
crate::operation::update_cluster::UpdateClusterError::Ec2RequestFailedException(inner) => Error::Ec2RequestFailedException(inner),
crate::operation::update_cluster::UpdateClusterError::InvalidInputCombinationException(inner) => {
Error::InvalidInputCombinationException(inner)
}
crate::operation::update_cluster::UpdateClusterError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::update_cluster::UpdateClusterError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::update_cluster::UpdateClusterError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::update_cluster::UpdateClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job::UpdateJobError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job::UpdateJobError, 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_job::UpdateJobError> for Error {
fn from(err: crate::operation::update_job::UpdateJobError) -> Self {
match err {
crate::operation::update_job::UpdateJobError::ClusterLimitExceededException(inner) => Error::ClusterLimitExceededException(inner),
crate::operation::update_job::UpdateJobError::Ec2RequestFailedException(inner) => Error::Ec2RequestFailedException(inner),
crate::operation::update_job::UpdateJobError::InvalidInputCombinationException(inner) => Error::InvalidInputCombinationException(inner),
crate::operation::update_job::UpdateJobError::InvalidJobStateException(inner) => Error::InvalidJobStateException(inner),
crate::operation::update_job::UpdateJobError::InvalidResourceException(inner) => Error::InvalidResourceException(inner),
crate::operation::update_job::UpdateJobError::KmsRequestFailedException(inner) => Error::KmsRequestFailedException(inner),
crate::operation::update_job::UpdateJobError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_shipment_state::UpdateJobShipmentStateError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_job_shipment_state::UpdateJobShipmentStateError, 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_job_shipment_state::UpdateJobShipmentStateError> for Error {
fn from(err: crate::operation::update_job_shipment_state::UpdateJobShipmentStateError) -> Self {
match err {
crate::operation::update_job_shipment_state::UpdateJobShipmentStateError::InvalidJobStateException(inner) => {
Error::InvalidJobStateException(inner)
}
crate::operation::update_job_shipment_state::UpdateJobShipmentStateError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::update_job_shipment_state::UpdateJobShipmentStateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_long_term_pricing::UpdateLongTermPricingError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_long_term_pricing::UpdateLongTermPricingError, 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_long_term_pricing::UpdateLongTermPricingError> for Error {
fn from(err: crate::operation::update_long_term_pricing::UpdateLongTermPricingError) -> Self {
match err {
crate::operation::update_long_term_pricing::UpdateLongTermPricingError::InvalidResourceException(inner) => {
Error::InvalidResourceException(inner)
}
crate::operation::update_long_term_pricing::UpdateLongTermPricingError::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::ClusterLimitExceededException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::Ec2RequestFailedException(inner) => inner.source(),
Error::InvalidAddressException(inner) => inner.source(),
Error::InvalidInputCombinationException(inner) => inner.source(),
Error::InvalidJobStateException(inner) => inner.source(),
Error::InvalidNextTokenException(inner) => inner.source(),
Error::InvalidResourceException(inner) => inner.source(),
Error::KmsRequestFailedException(inner) => inner.source(),
Error::ReturnShippingLabelAlreadyExistsException(inner) => inner.source(),
Error::UnsupportedAddressException(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::ClusterLimitExceededException(e) => e.request_id(),
Self::ConflictException(e) => e.request_id(),
Self::Ec2RequestFailedException(e) => e.request_id(),
Self::InvalidAddressException(e) => e.request_id(),
Self::InvalidInputCombinationException(e) => e.request_id(),
Self::InvalidJobStateException(e) => e.request_id(),
Self::InvalidNextTokenException(e) => e.request_id(),
Self::InvalidResourceException(e) => e.request_id(),
Self::KmsRequestFailedException(e) => e.request_id(),
Self::ReturnShippingLabelAlreadyExistsException(e) => e.request_id(),
Self::UnsupportedAddressException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}