#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum Error {
AccessDeniedException(crate::types::error::AccessDeniedException),
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),
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::AccessDeniedException(inner) => inner.fmt(f),
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(inner) => inner.fmt(f),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError,
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_batch_job_execution::CancelBatchJobExecutionError> for Error {
fn from(
err: crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError,
) -> Self {
match err {
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::cancel_batch_job_execution::CancelBatchJobExecutionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_application::CreateApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_application::CreateApplicationError,
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_application::CreateApplicationError> for Error {
fn from(err: crate::operation::create_application::CreateApplicationError) -> Self {
match err {
crate::operation::create_application::CreateApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_application::CreateApplicationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_application::CreateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_application::CreateApplicationError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_application::CreateApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_application::CreateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_application::CreateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError,
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_data_set_import_task::CreateDataSetImportTaskError> for Error {
fn from(
err: crate::operation::create_data_set_import_task::CreateDataSetImportTaskError,
) -> Self {
match err {
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_data_set_import_task::CreateDataSetImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_deployment::CreateDeploymentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_deployment::CreateDeploymentError,
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_deployment::CreateDeploymentError> for Error {
fn from(err: crate::operation::create_deployment::CreateDeploymentError) -> Self {
match err {
crate::operation::create_deployment::CreateDeploymentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_deployment::CreateDeploymentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_deployment::CreateDeploymentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_deployment::CreateDeploymentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_deployment::CreateDeploymentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_deployment::CreateDeploymentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_deployment::CreateDeploymentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_deployment::CreateDeploymentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::create_environment::CreateEnvironmentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_environment::CreateEnvironmentError,
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_environment::CreateEnvironmentError> for Error {
fn from(err: crate::operation::create_environment::CreateEnvironmentError) -> Self {
match err {
crate::operation::create_environment::CreateEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::create_environment::CreateEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::create_environment::CreateEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::create_environment::CreateEnvironmentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::create_environment::CreateEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_environment::CreateEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_environment::CreateEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::delete_application::DeleteApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_application::DeleteApplicationError,
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_application::DeleteApplicationError> for Error {
fn from(err: crate::operation::delete_application::DeleteApplicationError) -> Self {
match err {
crate::operation::delete_application::DeleteApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_application::DeleteApplicationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_application::DeleteApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_application::DeleteApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_application::DeleteApplicationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_application::DeleteApplicationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
fn from(err: aws_smithy_http::result::SdkError<crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError, 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_application_from_environment::DeleteApplicationFromEnvironmentError> for Error {
fn from(err: crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError) -> Self {
match err {
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_application_from_environment::DeleteApplicationFromEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::delete_environment::DeleteEnvironmentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_environment::DeleteEnvironmentError,
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_environment::DeleteEnvironmentError> for Error {
fn from(err: crate::operation::delete_environment::DeleteEnvironmentError) -> Self {
match err {
crate::operation::delete_environment::DeleteEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_environment::DeleteEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_environment::DeleteEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_environment::DeleteEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_environment::DeleteEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_environment::DeleteEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_application::GetApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_application::GetApplicationError,
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_application::GetApplicationError> for Error {
fn from(err: crate::operation::get_application::GetApplicationError) -> Self {
match err {
crate::operation::get_application::GetApplicationError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::get_application::GetApplicationError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::get_application::GetApplicationError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_application::GetApplicationError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_application::GetApplicationError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_application::GetApplicationError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_application_version::GetApplicationVersionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_application_version::GetApplicationVersionError,
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_application_version::GetApplicationVersionError> for Error {
fn from(err: crate::operation::get_application_version::GetApplicationVersionError) -> Self {
match err {
crate::operation::get_application_version::GetApplicationVersionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_application_version::GetApplicationVersionError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_application_version::GetApplicationVersionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_application_version::GetApplicationVersionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_application_version::GetApplicationVersionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_application_version::GetApplicationVersionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_batch_job_execution::GetBatchJobExecutionError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_batch_job_execution::GetBatchJobExecutionError,
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_batch_job_execution::GetBatchJobExecutionError> for Error {
fn from(err: crate::operation::get_batch_job_execution::GetBatchJobExecutionError) -> Self {
match err {
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_batch_job_execution::GetBatchJobExecutionError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_data_set_details::GetDataSetDetailsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_data_set_details::GetDataSetDetailsError,
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_data_set_details::GetDataSetDetailsError> for Error {
fn from(err: crate::operation::get_data_set_details::GetDataSetDetailsError) -> Self {
match err {
crate::operation::get_data_set_details::GetDataSetDetailsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_data_set_details::GetDataSetDetailsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_data_set_details::GetDataSetDetailsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_data_set_details::GetDataSetDetailsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_data_set_details::GetDataSetDetailsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_data_set_details::GetDataSetDetailsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_data_set_import_task::GetDataSetImportTaskError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_data_set_import_task::GetDataSetImportTaskError,
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_data_set_import_task::GetDataSetImportTaskError> for Error {
fn from(err: crate::operation::get_data_set_import_task::GetDataSetImportTaskError) -> Self {
match err {
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_data_set_import_task::GetDataSetImportTaskError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::get_deployment::GetDeploymentError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_deployment::GetDeploymentError,
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_deployment::GetDeploymentError> for Error {
fn from(err: crate::operation::get_deployment::GetDeploymentError) -> Self {
match err {
crate::operation::get_deployment::GetDeploymentError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::get_deployment::GetDeploymentError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::get_deployment::GetDeploymentError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_deployment::GetDeploymentError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_deployment::GetDeploymentError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_deployment::GetDeploymentError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_environment::GetEnvironmentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_environment::GetEnvironmentError,
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_environment::GetEnvironmentError> for Error {
fn from(err: crate::operation::get_environment::GetEnvironmentError) -> Self {
match err {
crate::operation::get_environment::GetEnvironmentError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::get_environment::GetEnvironmentError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::get_environment::GetEnvironmentError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_environment::GetEnvironmentError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_environment::GetEnvironmentError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_environment::GetEnvironmentError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_applications::ListApplicationsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_applications::ListApplicationsError,
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_applications::ListApplicationsError> for Error {
fn from(err: crate::operation::list_applications::ListApplicationsError) -> Self {
match err {
crate::operation::list_applications::ListApplicationsError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::list_applications::ListApplicationsError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::list_applications::ListApplicationsError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::list_applications::ListApplicationsError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::list_applications::ListApplicationsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_application_versions::ListApplicationVersionsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_application_versions::ListApplicationVersionsError,
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_application_versions::ListApplicationVersionsError> for Error {
fn from(
err: crate::operation::list_application_versions::ListApplicationVersionsError,
) -> Self {
match err {
crate::operation::list_application_versions::ListApplicationVersionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_application_versions::ListApplicationVersionsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_application_versions::ListApplicationVersionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_application_versions::ListApplicationVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_application_versions::ListApplicationVersionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_application_versions::ListApplicationVersionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError,
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_batch_job_definitions::ListBatchJobDefinitionsError> for Error {
fn from(
err: crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError,
) -> Self {
match err {
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_batch_job_definitions::ListBatchJobDefinitionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError,
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_batch_job_executions::ListBatchJobExecutionsError> for Error {
fn from(err: crate::operation::list_batch_job_executions::ListBatchJobExecutionsError) -> Self {
match err {
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_batch_job_executions::ListBatchJobExecutionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError,
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_data_set_import_history::ListDataSetImportHistoryError> for Error {
fn from(
err: crate::operation::list_data_set_import_history::ListDataSetImportHistoryError,
) -> Self {
match err {
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_data_set_import_history::ListDataSetImportHistoryError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::list_data_sets::ListDataSetsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_data_sets::ListDataSetsError,
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_data_sets::ListDataSetsError> for Error {
fn from(err: crate::operation::list_data_sets::ListDataSetsError) -> Self {
match err {
crate::operation::list_data_sets::ListDataSetsError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::list_data_sets::ListDataSetsError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_data_sets::ListDataSetsError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::list_data_sets::ListDataSetsError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_data_sets::ListDataSetsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_data_sets::ListDataSetsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_deployments::ListDeploymentsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_deployments::ListDeploymentsError,
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_deployments::ListDeploymentsError> for Error {
fn from(err: crate::operation::list_deployments::ListDeploymentsError) -> Self {
match err {
crate::operation::list_deployments::ListDeploymentsError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::list_deployments::ListDeploymentsError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::list_deployments::ListDeploymentsError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::list_deployments::ListDeploymentsError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::list_deployments::ListDeploymentsError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::list_deployments::ListDeploymentsError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_engine_versions::ListEngineVersionsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_engine_versions::ListEngineVersionsError,
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_engine_versions::ListEngineVersionsError> for Error {
fn from(err: crate::operation::list_engine_versions::ListEngineVersionsError) -> Self {
match err {
crate::operation::list_engine_versions::ListEngineVersionsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_engine_versions::ListEngineVersionsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_engine_versions::ListEngineVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_engine_versions::ListEngineVersionsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_engine_versions::ListEngineVersionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_environments::ListEnvironmentsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_environments::ListEnvironmentsError,
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_environments::ListEnvironmentsError> for Error {
fn from(err: crate::operation::list_environments::ListEnvironmentsError) -> Self {
match err {
crate::operation::list_environments::ListEnvironmentsError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::list_environments::ListEnvironmentsError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::list_environments::ListEnvironmentsError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::list_environments::ListEnvironmentsError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::list_environments::ListEnvironmentsError::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::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::start_application::StartApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::start_application::StartApplicationError,
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_application::StartApplicationError> for Error {
fn from(err: crate::operation::start_application::StartApplicationError) -> Self {
match err {
crate::operation::start_application::StartApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_application::StartApplicationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::start_application::StartApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_application::StartApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_application::StartApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_application::StartApplicationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_application::StartApplicationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<crate::operation::start_batch_job::StartBatchJobError, R>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::start_batch_job::StartBatchJobError,
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_batch_job::StartBatchJobError> for Error {
fn from(err: crate::operation::start_batch_job::StartBatchJobError) -> Self {
match err {
crate::operation::start_batch_job::StartBatchJobError::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::start_batch_job::StartBatchJobError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::start_batch_job::StartBatchJobError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::start_batch_job::StartBatchJobError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::start_batch_job::StartBatchJobError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::start_batch_job::StartBatchJobError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::start_batch_job::StartBatchJobError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::stop_application::StopApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::stop_application::StopApplicationError,
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::stop_application::StopApplicationError> for Error {
fn from(err: crate::operation::stop_application::StopApplicationError) -> Self {
match err {
crate::operation::stop_application::StopApplicationError::AccessDeniedException(
inner,
) => Error::AccessDeniedException(inner),
crate::operation::stop_application::StopApplicationError::ConflictException(inner) => {
Error::ConflictException(inner)
}
crate::operation::stop_application::StopApplicationError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::stop_application::StopApplicationError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::stop_application::StopApplicationError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::stop_application::StopApplicationError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::stop_application::StopApplicationError::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::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(
inner,
) => Error::ServiceQuotaExceededException(inner),
crate::operation::tag_resource::TagResourceError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::tag_resource::TagResourceError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_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::AccessDeniedException(inner) => {
Error::AccessDeniedException(inner)
}
crate::operation::untag_resource::UntagResourceError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::untag_resource::UntagResourceError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::update_application::UpdateApplicationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_application::UpdateApplicationError,
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::update_application::UpdateApplicationError> for Error {
fn from(err: crate::operation::update_application::UpdateApplicationError) -> Self {
match err {
crate::operation::update_application::UpdateApplicationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_application::UpdateApplicationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_application::UpdateApplicationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_application::UpdateApplicationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_application::UpdateApplicationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_application::UpdateApplicationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_application::UpdateApplicationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::update_environment::UpdateEnvironmentError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_environment::UpdateEnvironmentError,
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::update_environment::UpdateEnvironmentError> for Error {
fn from(err: crate::operation::update_environment::UpdateEnvironmentError) -> Self {
match err {
crate::operation::update_environment::UpdateEnvironmentError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_environment::UpdateEnvironmentError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_environment::UpdateEnvironmentError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_environment::UpdateEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_environment::UpdateEnvironmentError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::update_environment::UpdateEnvironmentError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_environment::UpdateEnvironmentError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_environment::UpdateEnvironmentError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn std::error::Error + 'static)> {
match self {
Error::AccessDeniedException(inner) => inner.source(),
Error::ConflictException(inner) => inner.source(),
Error::InternalServerException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::ThrottlingException(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::AccessDeniedException(e) => e.request_id(),
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.request_id(),
}
}
}