// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// All possible error types for this service.
#[non_exhaustive]
#[derive(::std::fmt::Debug)]
pub enum Error {
/// <p>An internal server error occurred. Retry your request.</p>
InternalServerException(crate::types::error::InternalServerException),
/// <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
/// <p>The number of one or more Amazon EVS resources exceeds the maximum allowed. For a list of Amazon EVS quotas, see <a href="https://docs.aws.amazon.com/evs/latest/userguide/service-quotas-evs.html">Amazon EVS endpoints and quotas</a> in the <i>Amazon EVS User Guide</i>. Delete some resources or request an increase in your service quota. To request an increase, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">Amazon Web Services Service Quotas</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
/// <note>
/// <p><code>TagPolicyException</code> is deprecated. See <a href="https://docs.aws.amazon.com/evs/latest/APIReference/API_ValidationException.html"> <code>ValidationException</code> </a> instead.</p>
/// </note>
/// <p>The request doesn't comply with IAM tag policy. Correct your request and then retry it.</p>
TagPolicyException(crate::types::error::TagPolicyException),
/// <p>The operation could not be performed because the service is throttling requests. This exception is thrown when the service endpoint receives too many concurrent requests.</p>
ThrottlingException(crate::types::error::ThrottlingException),
/// <note>
/// <p><code>TooManyTagsException</code> is deprecated. See <a href="https://docs.aws.amazon.com/evs/latest/APIReference/API_ServiceQuotaExceededException.html"> <code>ServiceQuotaExceededException</code> </a> instead.</p>
/// </note>
/// <p>A service resource associated with the request has more than 200 tags.</p>
TooManyTagsException(crate::types::error::TooManyTagsException),
/// <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>
ValidationException(crate::types::error::ValidationException),
/// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
#[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
variable wildcard pattern and check `.code()`:
\
`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
\
See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
Unhandled(crate::error::sealed_unhandled::Unhandled),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Error::InternalServerException(inner) => inner.fmt(f),
Error::ResourceNotFoundException(inner) => inner.fmt(f),
Error::ServiceQuotaExceededException(inner) => inner.fmt(f),
Error::TagPolicyException(inner) => inner.fmt(f),
Error::ThrottlingException(inner) => inner.fmt(f),
Error::TooManyTagsException(inner) => inner.fmt(f),
Error::ValidationException(inner) => inner.fmt(f),
Error::Unhandled(_) => {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
write!(f, "unhandled error ({code})")
} else {
f.write_str("unhandled error")
}
}
}
}
}
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
source: value.into(),
meta: ::std::default::Default::default(),
})
}
}
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
match self {
Self::InternalServerException(inner) => inner.meta(),
Self::ResourceNotFoundException(inner) => inner.meta(),
Self::ServiceQuotaExceededException(inner) => inner.meta(),
Self::TagPolicyException(inner) => inner.meta(),
Self::ThrottlingException(inner) => inner.meta(),
Self::TooManyTagsException(inner) => inner.meta(),
Self::ValidationException(inner) => inner.meta(),
Self::Unhandled(inner) => &inner.meta,
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::associate_eip_to_vlan::AssociateEipToVlanError> for Error {
fn from(err: crate::operation::associate_eip_to_vlan::AssociateEipToVlanError) -> Self {
match err {
crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::associate_eip_to_vlan::AssociateEipToVlanError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entitlement::CreateEntitlementError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_entitlement::CreateEntitlementError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_entitlement::CreateEntitlementError> for Error {
fn from(err: crate::operation::create_entitlement::CreateEntitlementError) -> Self {
match err {
crate::operation::create_entitlement::CreateEntitlementError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::create_entitlement::CreateEntitlementError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_entitlement::CreateEntitlementError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_entitlement::CreateEntitlementError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment::CreateEnvironmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_environment::CreateEnvironmentError> for Error {
fn from(err: crate::operation::create_environment::CreateEnvironmentError) -> Self {
match err {
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_runtime_api::client::result::SdkError<crate::operation::create_environment_connector::CreateEnvironmentConnectorError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_connector::CreateEnvironmentConnectorError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_environment_connector::CreateEnvironmentConnectorError> for Error {
fn from(err: crate::operation::create_environment_connector::CreateEnvironmentConnectorError) -> Self {
match err {
crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::create_environment_connector::CreateEnvironmentConnectorError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::create_environment_connector::CreateEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_host::CreateEnvironmentHostError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::create_environment_host::CreateEnvironmentHostError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::create_environment_host::CreateEnvironmentHostError> for Error {
fn from(err: crate::operation::create_environment_host::CreateEnvironmentHostError) -> Self {
match err {
crate::operation::create_environment_host::CreateEnvironmentHostError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::create_environment_host::CreateEnvironmentHostError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::create_environment_host::CreateEnvironmentHostError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entitlement::DeleteEntitlementError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_entitlement::DeleteEntitlementError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_entitlement::DeleteEntitlementError> for Error {
fn from(err: crate::operation::delete_entitlement::DeleteEntitlementError) -> Self {
match err {
crate::operation::delete_entitlement::DeleteEntitlementError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::delete_entitlement::DeleteEntitlementError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::delete_entitlement::DeleteEntitlementError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_entitlement::DeleteEntitlementError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment::DeleteEnvironmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_environment::DeleteEnvironmentError> for Error {
fn from(err: crate::operation::delete_environment::DeleteEnvironmentError) -> Self {
match err {
crate::operation::delete_environment::DeleteEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(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_runtime_api::client::result::SdkError<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError> for Error {
fn from(err: crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError) -> Self {
match err {
crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::delete_environment_connector::DeleteEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_host::DeleteEnvironmentHostError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::delete_environment_host::DeleteEnvironmentHostError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::delete_environment_host::DeleteEnvironmentHostError> for Error {
fn from(err: crate::operation::delete_environment_host::DeleteEnvironmentHostError) -> Self {
match err {
crate::operation::delete_environment_host::DeleteEnvironmentHostError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::delete_environment_host::DeleteEnvironmentHostError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::delete_environment_host::DeleteEnvironmentHostError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError> for Error {
fn from(err: crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError) -> Self {
match err {
crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::disassociate_eip_from_vlan::DisassociateEipFromVlanError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_environment::GetEnvironmentError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_environment::GetEnvironmentError> for Error {
fn from(err: crate::operation::get_environment::GetEnvironmentError) -> Self {
match err {
crate::operation::get_environment::GetEnvironmentError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(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_runtime_api::client::result::SdkError<crate::operation::get_versions::GetVersionsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::get_versions::GetVersionsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::get_versions::GetVersionsError> for Error {
fn from(err: crate::operation::get_versions::GetVersionsError) -> Self {
match err {
crate::operation::get_versions::GetVersionsError::InternalServerException(inner) => Error::InternalServerException(inner),
crate::operation::get_versions::GetVersionsError::ThrottlingException(inner) => Error::ThrottlingException(inner),
crate::operation::get_versions::GetVersionsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_environment_connectors::ListEnvironmentConnectorsError> for Error {
fn from(err: crate::operation::list_environment_connectors::ListEnvironmentConnectorsError) -> Self {
match err {
crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::list_environment_connectors::ListEnvironmentConnectorsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_hosts::ListEnvironmentHostsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_hosts::ListEnvironmentHostsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_environment_hosts::ListEnvironmentHostsError> for Error {
fn from(err: crate::operation::list_environment_hosts::ListEnvironmentHostsError) -> Self {
match err {
crate::operation::list_environment_hosts::ListEnvironmentHostsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_environment_hosts::ListEnvironmentHostsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_environment_hosts::ListEnvironmentHostsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environments::ListEnvironmentsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_environments::ListEnvironmentsError> for Error {
fn from(err: crate::operation::list_environments::ListEnvironmentsError) -> Self {
match err {
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_runtime_api::client::result::SdkError<crate::operation::list_environment_vlans::ListEnvironmentVlansError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_environment_vlans::ListEnvironmentVlansError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_environment_vlans::ListEnvironmentVlansError> for Error {
fn from(err: crate::operation::list_environment_vlans::ListEnvironmentVlansError) -> Self {
match err {
crate::operation::list_environment_vlans::ListEnvironmentVlansError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_environment_vlans::ListEnvironmentVlansError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_environment_vlans::ListEnvironmentVlansError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_tags_for_resource::ListTagsForResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_tags_for_resource::ListTagsForResourceError> for Error {
fn from(err: crate::operation::list_tags_for_resource::ListTagsForResourceError) -> Self {
match err {
crate::operation::list_tags_for_resource::ListTagsForResourceError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_tags_for_resource::ListTagsForResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vm_entitlements::ListVmEntitlementsError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::list_vm_entitlements::ListVmEntitlementsError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::list_vm_entitlements::ListVmEntitlementsError> for Error {
fn from(err: crate::operation::list_vm_entitlements::ListVmEntitlementsError) -> Self {
match err {
crate::operation::list_vm_entitlements::ListVmEntitlementsError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::list_vm_entitlements::ListVmEntitlementsError::ValidationException(inner) => Error::ValidationException(inner),
crate::operation::list_vm_entitlements::ListVmEntitlementsError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::tag_resource::TagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::tag_resource::TagResourceError> for Error {
fn from(err: crate::operation::tag_resource::TagResourceError) -> Self {
match err {
crate::operation::tag_resource::TagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::tag_resource::TagResourceError::ServiceQuotaExceededException(inner) => Error::ServiceQuotaExceededException(inner),
crate::operation::tag_resource::TagResourceError::TagPolicyException(inner) => Error::TagPolicyException(inner),
crate::operation::tag_resource::TagResourceError::TooManyTagsException(inner) => Error::TooManyTagsException(inner),
crate::operation::tag_resource::TagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>> for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::untag_resource::UntagResourceError, R>) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::untag_resource::UntagResourceError> for Error {
fn from(err: crate::operation::untag_resource::UntagResourceError) -> Self {
match err {
crate::operation::untag_resource::UntagResourceError::ResourceNotFoundException(inner) => Error::ResourceNotFoundException(inner),
crate::operation::untag_resource::UntagResourceError::TagPolicyException(inner) => Error::TagPolicyException(inner),
crate::operation::untag_resource::UntagResourceError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError, R>>
for Error
where
R: Send + Sync + std::fmt::Debug + 'static,
{
fn from(
err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError, R>,
) -> Self {
match err {
::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
_ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
source: err.into(),
}),
}
}
}
impl From<crate::operation::update_environment_connector::UpdateEnvironmentConnectorError> for Error {
fn from(err: crate::operation::update_environment_connector::UpdateEnvironmentConnectorError) -> Self {
match err {
crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ResourceNotFoundException(inner) => {
Error::ResourceNotFoundException(inner)
}
crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ThrottlingException(inner) => {
Error::ThrottlingException(inner)
}
crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::ValidationException(inner) => {
Error::ValidationException(inner)
}
crate::operation::update_environment_connector::UpdateEnvironmentConnectorError::Unhandled(inner) => Error::Unhandled(inner),
}
}
}
impl ::std::error::Error for Error {
fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
match self {
Error::InternalServerException(inner) => inner.source(),
Error::ResourceNotFoundException(inner) => inner.source(),
Error::ServiceQuotaExceededException(inner) => inner.source(),
Error::TagPolicyException(inner) => inner.source(),
Error::ThrottlingException(inner) => inner.source(),
Error::TooManyTagsException(inner) => inner.source(),
Error::ValidationException(inner) => inner.source(),
Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
}
}
}
impl ::aws_types::request_id::RequestId for Error {
fn request_id(&self) -> Option<&str> {
match self {
Self::InternalServerException(e) => e.request_id(),
Self::ResourceNotFoundException(e) => e.request_id(),
Self::ServiceQuotaExceededException(e) => e.request_id(),
Self::TagPolicyException(e) => e.request_id(),
Self::ThrottlingException(e) => e.request_id(),
Self::TooManyTagsException(e) => e.request_id(),
Self::ValidationException(e) => e.request_id(),
Self::Unhandled(e) => e.meta.request_id(),
}
}
}