#[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),
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::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::associate_gateway_to_server::AssociateGatewayToServerError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError,
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::associate_gateway_to_server::AssociateGatewayToServerError> for Error {
fn from(
err: crate::operation::associate_gateway_to_server::AssociateGatewayToServerError,
) -> Self {
match err {
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::associate_gateway_to_server::AssociateGatewayToServerError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::create_gateway::CreateGatewayError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::create_gateway::CreateGatewayError,
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_gateway::CreateGatewayError> for Error {
fn from(err: crate::operation::create_gateway::CreateGatewayError) -> Self {
match err {
crate::operation::create_gateway::CreateGatewayError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::create_gateway::CreateGatewayError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_gateway::CreateGatewayError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_gateway::CreateGatewayError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::delete_gateway::DeleteGatewayError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_gateway::DeleteGatewayError,
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_gateway::DeleteGatewayError> for Error {
fn from(err: crate::operation::delete_gateway::DeleteGatewayError) -> Self {
match err {
crate::operation::delete_gateway::DeleteGatewayError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::delete_gateway::DeleteGatewayError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::delete_gateway::DeleteGatewayError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_gateway::DeleteGatewayError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_gateway::DeleteGatewayError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::delete_hypervisor::DeleteHypervisorError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::delete_hypervisor::DeleteHypervisorError,
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_hypervisor::DeleteHypervisorError> for Error {
fn from(err: crate::operation::delete_hypervisor::DeleteHypervisorError) -> Self {
match err {
crate::operation::delete_hypervisor::DeleteHypervisorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_hypervisor::DeleteHypervisorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError,
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::disassociate_gateway_from_server::DisassociateGatewayFromServerError>
for Error
{
fn from(
err: crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError,
) -> Self {
match err {
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::disassociate_gateway_from_server::DisassociateGatewayFromServerError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError,
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_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError>
for Error
{
fn from(
err: crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError,
) -> Self {
match err {
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_bandwidth_rate_limit_schedule::GetBandwidthRateLimitScheduleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::get_gateway::GetGatewayError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<crate::operation::get_gateway::GetGatewayError, 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_gateway::GetGatewayError> for Error {
fn from(err: crate::operation::get_gateway::GetGatewayError) -> Self {
match err {
crate::operation::get_gateway::GetGatewayError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::get_gateway::GetGatewayError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::get_gateway::GetGatewayError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_gateway::GetGatewayError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_gateway::GetGatewayError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::get_hypervisor::GetHypervisorError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_hypervisor::GetHypervisorError,
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_hypervisor::GetHypervisorError> for Error {
fn from(err: crate::operation::get_hypervisor::GetHypervisorError) -> Self {
match err {
crate::operation::get_hypervisor::GetHypervisorError::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::get_hypervisor::GetHypervisorError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::get_hypervisor::GetHypervisorError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::get_hypervisor::GetHypervisorError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::get_hypervisor::GetHypervisorError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError,
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_hypervisor_property_mappings::GetHypervisorPropertyMappingsError>
for Error
{
fn from(
err: crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError,
) -> Self {
match err {
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_hypervisor_property_mappings::GetHypervisorPropertyMappingsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::get_virtual_machine::GetVirtualMachineError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::get_virtual_machine::GetVirtualMachineError,
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_virtual_machine::GetVirtualMachineError> for Error {
fn from(err: crate::operation::get_virtual_machine::GetVirtualMachineError) -> Self {
match err {
crate::operation::get_virtual_machine::GetVirtualMachineError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::get_virtual_machine::GetVirtualMachineError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_virtual_machine::GetVirtualMachineError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_virtual_machine::GetVirtualMachineError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::get_virtual_machine::GetVirtualMachineError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError,
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::import_hypervisor_configuration::ImportHypervisorConfigurationError>
for Error
{
fn from(
err: crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError,
) -> Self {
match err {
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::import_hypervisor_configuration::ImportHypervisorConfigurationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<aws_smithy_http::result::SdkError<crate::operation::list_gateways::ListGatewaysError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_gateways::ListGatewaysError,
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_gateways::ListGatewaysError> for Error {
fn from(err: crate::operation::list_gateways::ListGatewaysError) -> Self {
match err {
crate::operation::list_gateways::ListGatewaysError::InternalServerException(inner) => {
Error::InternalServerException(inner)
}
crate::operation::list_gateways::ListGatewaysError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::list_gateways::ListGatewaysError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_gateways::ListGatewaysError::Unhandled(inner) => {
Error::Unhandled(inner)
}
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::list_hypervisors::ListHypervisorsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_hypervisors::ListHypervisorsError,
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_hypervisors::ListHypervisorsError> for Error {
fn from(err: crate::operation::list_hypervisors::ListHypervisorsError) -> Self {
match err {
crate::operation::list_hypervisors::ListHypervisorsError::InternalServerException(
inner,
) => Error::InternalServerException(inner),
crate::operation::list_hypervisors::ListHypervisorsError::ThrottlingException(
inner,
) => Error::ThrottlingException(inner),
crate::operation::list_hypervisors::ListHypervisorsError::ValidationException(
inner,
) => Error::ValidationException(inner),
crate::operation::list_hypervisors::ListHypervisorsError::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::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::list_tags_for_resource::ListTagsForResourceError::InternalServerException(inner) => Error::InternalServerException(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::list_virtual_machines::ListVirtualMachinesError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::list_virtual_machines::ListVirtualMachinesError,
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_machines::ListVirtualMachinesError> for Error {
fn from(err: crate::operation::list_virtual_machines::ListVirtualMachinesError) -> Self {
match err {
crate::operation::list_virtual_machines::ListVirtualMachinesError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::list_virtual_machines::ListVirtualMachinesError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::list_virtual_machines::ListVirtualMachinesError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_virtual_machines::ListVirtualMachinesError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError,
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::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError>
for Error
{
fn from(
err: crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError,
) -> Self {
match err {
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_bandwidth_rate_limit_schedule::PutBandwidthRateLimitScheduleError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError,
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::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError>
for Error
{
fn from(
err: crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError,
) -> Self {
match err {
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_hypervisor_property_mappings::PutHypervisorPropertyMappingsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError,
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::put_maintenance_start_time::PutMaintenanceStartTimeError> for Error {
fn from(
err: crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError,
) -> Self {
match err {
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::put_maintenance_start_time::PutMaintenanceStartTimeError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<aws_smithy_http::result::SdkError<crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError, R>> for Error where R: Send + Sync + std::fmt::Debug + 'static {
fn from(err: aws_smithy_http::result::SdkError<crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError, 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_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError> for Error {
fn from(err: crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError) -> Self {
match err {
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::start_virtual_machines_metadata_sync::StartVirtualMachinesMetadataSyncError::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::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::tag_resource::TagResourceError::InternalServerException(inner) => {
Error::InternalServerException(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::test_hypervisor_configuration::TestHypervisorConfigurationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError,
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::test_hypervisor_configuration::TestHypervisorConfigurationError>
for Error
{
fn from(
err: crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError,
) -> Self {
match err {
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::test_hypervisor_configuration::TestHypervisorConfigurationError::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::ResourceNotFoundException(
inner,
) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::InternalServerException(
inner,
) => Error::InternalServerException(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_gateway_information::UpdateGatewayInformationError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_gateway_information::UpdateGatewayInformationError,
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_gateway_information::UpdateGatewayInformationError> for Error {
fn from(
err: crate::operation::update_gateway_information::UpdateGatewayInformationError,
) -> Self {
match err {
crate::operation::update_gateway_information::UpdateGatewayInformationError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_gateway_information::UpdateGatewayInformationError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_gateway_information::UpdateGatewayInformationError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_gateway_information::UpdateGatewayInformationError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_gateway_information::UpdateGatewayInformationError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_gateway_information::UpdateGatewayInformationError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError,
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_gateway_software_now::UpdateGatewaySoftwareNowError> for Error {
fn from(
err: crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError,
) -> Self {
match err {
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_gateway_software_now::UpdateGatewaySoftwareNowError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R>
From<
aws_smithy_http::result::SdkError<
crate::operation::update_hypervisor::UpdateHypervisorError,
R,
>,
> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: aws_smithy_http::result::SdkError<
crate::operation::update_hypervisor::UpdateHypervisorError,
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_hypervisor::UpdateHypervisorError> for Error {
fn from(err: crate::operation::update_hypervisor::UpdateHypervisorError) -> Self {
match err {
crate::operation::update_hypervisor::UpdateHypervisorError::AccessDeniedException(inner) => Error::AccessDeniedException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::ConflictException(inner) => Error::ConflictException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::update_hypervisor::UpdateHypervisorError::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::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::ThrottlingException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.request_id(),
}
}
}