#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
InternalServerException(crate::types::error::InternalServerException),
RequestThrottledException(crate::types::error::RequestThrottledException),
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
ValidationException(crate::types::error::ValidationException),
Unhandled(::aws_smithy_types::error::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::InternalServerException(inner) => inner.fmt(f),
Error::RequestThrottledException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(inner) => inner.fmt(f),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::cancel_job_run::CancelJobRunError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::cancel_job_run::CancelJobRunError> for Error {
fn from(err: crate::operation::cancel_job_run::CancelJobRunError) -> Self {
match err {
crate::operation::cancel_job_run::CancelJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::cancel_job_run::CancelJobRunError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::cancel_job_run::CancelJobRunError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::create_job_template::CreateJobTemplateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::create_job_template::CreateJobTemplateError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::create_job_template::CreateJobTemplateError> for Error {
fn from(err: crate::operation::create_job_template::CreateJobTemplateError) -> Self {
match err {
crate::operation::create_job_template::CreateJobTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_job_template::CreateJobTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_job_template::CreateJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_job_template::CreateJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::create_managed_endpoint::CreateManagedEndpointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::create_managed_endpoint::CreateManagedEndpointError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::create_managed_endpoint::CreateManagedEndpointError> for Error {
fn from(err: crate::operation::create_managed_endpoint::CreateManagedEndpointError) -> Self {
match err {
crate::operation::create_managed_endpoint::CreateManagedEndpointError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::create_managed_endpoint::CreateManagedEndpointError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_managed_endpoint::CreateManagedEndpointError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_managed_endpoint::CreateManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::create_virtual_cluster::CreateVirtualClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::create_virtual_cluster::CreateVirtualClusterError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::create_virtual_cluster::CreateVirtualClusterError> for Error {
fn from(err: crate::operation::create_virtual_cluster::CreateVirtualClusterError) -> Self {
match err {
crate::operation::create_virtual_cluster::CreateVirtualClusterError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::create_virtual_cluster::CreateVirtualClusterError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_virtual_cluster::CreateVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_virtual_cluster::CreateVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::delete_job_template::DeleteJobTemplateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::delete_job_template::DeleteJobTemplateError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::delete_job_template::DeleteJobTemplateError> for Error {
fn from(err: crate::operation::delete_job_template::DeleteJobTemplateError) -> Self {
match err {
crate::operation::delete_job_template::DeleteJobTemplateError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_job_template::DeleteJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_job_template::DeleteJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::delete_managed_endpoint::DeleteManagedEndpointError> for Error {
fn from(err: crate::operation::delete_managed_endpoint::DeleteManagedEndpointError) -> Self {
match err {
crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_managed_endpoint::DeleteManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::delete_virtual_cluster::DeleteVirtualClusterError> for Error {
fn from(err: crate::operation::delete_virtual_cluster::DeleteVirtualClusterError) -> Self {
match err {
crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_virtual_cluster::DeleteVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::describe_job_run::DescribeJobRunError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::describe_job_run::DescribeJobRunError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::describe_job_run::DescribeJobRunError> for Error {
fn from(err: crate::operation::describe_job_run::DescribeJobRunError) -> Self {
match err {
crate::operation::describe_job_run::DescribeJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::describe_job_run::DescribeJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::describe_job_run::DescribeJobRunError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_job_run::DescribeJobRunError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::describe_job_template::DescribeJobTemplateError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::describe_job_template::DescribeJobTemplateError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::describe_job_template::DescribeJobTemplateError> for Error {
fn from(err: crate::operation::describe_job_template::DescribeJobTemplateError) -> Self {
match err {
crate::operation::describe_job_template::DescribeJobTemplateError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::describe_job_template::DescribeJobTemplateError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_job_template::DescribeJobTemplateError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_job_template::DescribeJobTemplateError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::describe_managed_endpoint::DescribeManagedEndpointError> for Error {
fn from(err: crate::operation::describe_managed_endpoint::DescribeManagedEndpointError) -> Self {
match err {
crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::describe_managed_endpoint::DescribeManagedEndpointError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::describe_virtual_cluster::DescribeVirtualClusterError> for Error {
fn from(err: crate::operation::describe_virtual_cluster::DescribeVirtualClusterError) -> Self {
match err {
crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::describe_virtual_cluster::DescribeVirtualClusterError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
::aws_smithy_http::result::SdkError<crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_http::result::SdkError<
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError,
R,
>,
) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError> for Error {
fn from(err: crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError) -> Self {
match err {
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::RequestThrottledException(
inner,
) => Error::RequestThrottledException(inner),
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_managed_endpoint_session_credentials::GetManagedEndpointSessionCredentialsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_job_runs::ListJobRunsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_job_runs::ListJobRunsError> for Error {
fn from(err: crate::operation::list_job_runs::ListJobRunsError) -> Self {
match err {
crate::operation::list_job_runs::ListJobRunsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_job_runs::ListJobRunsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_job_runs::ListJobRunsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_job_templates::ListJobTemplatesError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_job_templates::ListJobTemplatesError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_job_templates::ListJobTemplatesError> for Error {
fn from(err: crate::operation::list_job_templates::ListJobTemplatesError) -> Self {
match err {
crate::operation::list_job_templates::ListJobTemplatesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_job_templates::ListJobTemplatesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_job_templates::ListJobTemplatesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_managed_endpoints::ListManagedEndpointsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_managed_endpoints::ListManagedEndpointsError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_managed_endpoints::ListManagedEndpointsError> for Error {
fn from(err: crate::operation::list_managed_endpoints::ListManagedEndpointsError) -> Self {
match err {
crate::operation::list_managed_endpoints::ListManagedEndpointsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_managed_endpoints::ListManagedEndpointsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_managed_endpoints::ListManagedEndpointsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::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_http::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::list_virtual_clusters::ListVirtualClustersError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::list_virtual_clusters::ListVirtualClustersError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::list_virtual_clusters::ListVirtualClustersError> for Error {
fn from(err: crate::operation::list_virtual_clusters::ListVirtualClustersError) -> Self {
match err {
crate::operation::list_virtual_clusters::ListVirtualClustersError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_virtual_clusters::ListVirtualClustersError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_virtual_clusters::ListVirtualClustersError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::start_job_run::StartJobRunError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
impl From<crate::operation::start_job_run::StartJobRunError> for Error {
fn from(err: crate::operation::start_job_run::StartJobRunError) -> Self {
match err {
crate::operation::start_job_run::StartJobRunError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_job_run::StartJobRunError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_job_run::StartJobRunError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_job_run::StartJobRunError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_http::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_http::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_http::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(
::aws_smithy_types::error::Unhandled::builder()
.meta(::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone())
.source(err)
.build(),
),
}
}
}
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::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::InternalServerException(inner) => inner.source(),
Error::RequestThrottledException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ValidationException(inner) => inner.source(),
Error::Unhandled(inner) => inner.source(),
}
}
}
impl ::aws_http::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::InternalServerException(e) => e.request_id(),
Self::RequestThrottledException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}