#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateCustomerGatewayError {
pub kind: AssociateCustomerGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateCustomerGatewayErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for AssociateCustomerGatewayError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateCustomerGatewayErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
AssociateCustomerGatewayErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateCustomerGatewayErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateCustomerGatewayError {
fn code(&self) -> Option<&str> {
AssociateCustomerGatewayError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateCustomerGatewayError {
pub fn new(kind: AssociateCustomerGatewayErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AssociateCustomerGatewayErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateCustomerGatewayErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateCustomerGatewayErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateCustomerGatewayError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateCustomerGatewayErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::ConflictException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
AssociateCustomerGatewayErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::ValidationException(_inner) => Some(_inner),
AssociateCustomerGatewayErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateLinkError {
pub kind: AssociateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateLinkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for AssociateLinkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateLinkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateLinkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateLinkError {
fn code(&self) -> Option<&str> {
AssociateLinkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateLinkError {
pub fn new(kind: AssociateLinkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AssociateLinkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateLinkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, AssociateLinkErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, AssociateLinkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateLinkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateLinkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateLinkErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, AssociateLinkErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, AssociateLinkErrorKind::ValidationException(_))
}
}
impl std::error::Error for AssociateLinkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateLinkErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateLinkErrorKind::ConflictException(_inner) => Some(_inner),
AssociateLinkErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateLinkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateLinkErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
AssociateLinkErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateLinkErrorKind::ValidationException(_inner) => Some(_inner),
AssociateLinkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateTransitGatewayConnectPeerError {
pub kind: AssociateTransitGatewayConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateTransitGatewayConnectPeerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for AssociateTransitGatewayConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateTransitGatewayConnectPeerErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
AssociateTransitGatewayConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateTransitGatewayConnectPeerError {
fn code(&self) -> Option<&str> {
AssociateTransitGatewayConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateTransitGatewayConnectPeerError {
pub fn new(
kind: AssociateTransitGatewayConnectPeerErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AssociateTransitGatewayConnectPeerErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateTransitGatewayConnectPeerErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTransitGatewayConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateTransitGatewayConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::ConflictException(_inner) => Some(_inner),
AssociateTransitGatewayConnectPeerErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::ValidationException(_inner) => {
Some(_inner)
}
AssociateTransitGatewayConnectPeerErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectionError {
pub kind: CreateConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectionError {
fn code(&self) -> Option<&str> {
CreateConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectionError {
pub fn new(kind: CreateConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateConnectionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateConnectionErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConnectionErrorKind::ConflictException(_inner) => Some(_inner),
CreateConnectionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateConnectionErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateConnectionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateConnectionErrorKind::ValidationException(_inner) => Some(_inner),
CreateConnectionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDeviceError {
pub kind: CreateDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDeviceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDeviceError {
fn code(&self) -> Option<&str> {
CreateDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDeviceError {
pub fn new(kind: CreateDeviceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateDeviceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDeviceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateDeviceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateDeviceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeviceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateDeviceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateDeviceErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDeviceErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDeviceErrorKind::ConflictException(_inner) => Some(_inner),
CreateDeviceErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDeviceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDeviceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateDeviceErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDeviceErrorKind::ValidationException(_inner) => Some(_inner),
CreateDeviceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGlobalNetworkError {
pub kind: CreateGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGlobalNetworkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateGlobalNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGlobalNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateGlobalNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGlobalNetworkError {
fn code(&self) -> Option<&str> {
CreateGlobalNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateGlobalNetworkError {
pub fn new(kind: CreateGlobalNetworkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateGlobalNetworkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGlobalNetworkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateGlobalNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGlobalNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::ConflictException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::ValidationException(_inner) => Some(_inner),
CreateGlobalNetworkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLinkError {
pub kind: CreateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLinkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateLinkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLinkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateLinkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLinkError {
fn code(&self) -> Option<&str> {
CreateLinkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLinkError {
pub fn new(kind: CreateLinkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateLinkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLinkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateLinkErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateLinkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateLinkErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLinkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateLinkErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateLinkErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateLinkErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateLinkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLinkErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateLinkErrorKind::ConflictException(_inner) => Some(_inner),
CreateLinkErrorKind::InternalServerException(_inner) => Some(_inner),
CreateLinkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateLinkErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateLinkErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateLinkErrorKind::ValidationException(_inner) => Some(_inner),
CreateLinkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSiteError {
pub kind: CreateSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSiteErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateSiteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSiteErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateSiteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSiteError {
fn code(&self) -> Option<&str> {
CreateSiteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSiteError {
pub fn new(kind: CreateSiteErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateSiteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSiteErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateSiteErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateSiteErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateSiteErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateSiteErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateSiteErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateSiteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSiteErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateSiteErrorKind::ConflictException(_inner) => Some(_inner),
CreateSiteErrorKind::InternalServerException(_inner) => Some(_inner),
CreateSiteErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateSiteErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateSiteErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateSiteErrorKind::ValidationException(_inner) => Some(_inner),
CreateSiteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectionError {
pub kind: DeleteConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectionError {
fn code(&self) -> Option<&str> {
DeleteConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConnectionError {
pub fn new(kind: DeleteConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteConnectionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteConnectionErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConnectionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteConnectionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteConnectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteConnectionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteConnectionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDeviceError {
pub kind: DeleteDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDeviceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDeviceError {
fn code(&self) -> Option<&str> {
DeleteDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDeviceError {
pub fn new(kind: DeleteDeviceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteDeviceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDeviceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteDeviceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteDeviceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteDeviceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteDeviceErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDeviceErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDeviceErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDeviceErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDeviceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDeviceErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDeviceErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDeviceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGlobalNetworkError {
pub kind: DeleteGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteGlobalNetworkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteGlobalNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteGlobalNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteGlobalNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteGlobalNetworkError {
fn code(&self) -> Option<&str> {
DeleteGlobalNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteGlobalNetworkError {
pub fn new(kind: DeleteGlobalNetworkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteGlobalNetworkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteGlobalNetworkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteGlobalNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteGlobalNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::ConflictException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::ValidationException(_inner) => Some(_inner),
DeleteGlobalNetworkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLinkError {
pub kind: DeleteLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLinkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteLinkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLinkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteLinkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLinkError {
fn code(&self) -> Option<&str> {
DeleteLinkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLinkError {
pub fn new(kind: DeleteLinkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteLinkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLinkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteLinkErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteLinkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteLinkErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLinkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteLinkErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteLinkErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteLinkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLinkErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteLinkErrorKind::ConflictException(_inner) => Some(_inner),
DeleteLinkErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteLinkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteLinkErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteLinkErrorKind::ValidationException(_inner) => Some(_inner),
DeleteLinkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSiteError {
pub kind: DeleteSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSiteErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeleteSiteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSiteErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteSiteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSiteError {
fn code(&self) -> Option<&str> {
DeleteSiteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSiteError {
pub fn new(kind: DeleteSiteErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteSiteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSiteErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteSiteErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteSiteErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteSiteErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSiteErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteSiteErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteSiteErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteSiteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSiteErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteSiteErrorKind::ConflictException(_inner) => Some(_inner),
DeleteSiteErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteSiteErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteSiteErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteSiteErrorKind::ValidationException(_inner) => Some(_inner),
DeleteSiteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterTransitGatewayError {
pub kind: DeregisterTransitGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterTransitGatewayErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DeregisterTransitGatewayError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterTransitGatewayErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeregisterTransitGatewayErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterTransitGatewayError {
fn code(&self) -> Option<&str> {
DeregisterTransitGatewayError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterTransitGatewayError {
pub fn new(kind: DeregisterTransitGatewayErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeregisterTransitGatewayErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterTransitGatewayErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterTransitGatewayErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeregisterTransitGatewayError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterTransitGatewayErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::ConflictException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::InternalServerException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::ThrottlingException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::ValidationException(_inner) => Some(_inner),
DeregisterTransitGatewayErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeGlobalNetworksError {
pub kind: DescribeGlobalNetworksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeGlobalNetworksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DescribeGlobalNetworksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeGlobalNetworksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeGlobalNetworksErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeGlobalNetworksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeGlobalNetworksErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeGlobalNetworksErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeGlobalNetworksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeGlobalNetworksError {
fn code(&self) -> Option<&str> {
DescribeGlobalNetworksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeGlobalNetworksError {
pub fn new(kind: DescribeGlobalNetworksErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeGlobalNetworksErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeGlobalNetworksErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalNetworksErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalNetworksErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalNetworksErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalNetworksErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalNetworksErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeGlobalNetworksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeGlobalNetworksErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeGlobalNetworksErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeGlobalNetworksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeGlobalNetworksErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeGlobalNetworksErrorKind::ValidationException(_inner) => Some(_inner),
DescribeGlobalNetworksErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateCustomerGatewayError {
pub kind: DisassociateCustomerGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateCustomerGatewayErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisassociateCustomerGatewayError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateCustomerGatewayErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateCustomerGatewayErrorKind::ConflictException(_inner) => _inner.fmt(f),
DisassociateCustomerGatewayErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DisassociateCustomerGatewayErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateCustomerGatewayErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateCustomerGatewayErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateCustomerGatewayErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateCustomerGatewayError {
fn code(&self) -> Option<&str> {
DisassociateCustomerGatewayError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateCustomerGatewayError {
pub fn new(kind: DisassociateCustomerGatewayErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DisassociateCustomerGatewayErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateCustomerGatewayErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateCustomerGatewayErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateCustomerGatewayError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateCustomerGatewayErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::ConflictException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::InternalServerException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateCustomerGatewayErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateLinkError {
pub kind: DisassociateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateLinkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisassociateLinkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateLinkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::ConflictException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateLinkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateLinkError {
fn code(&self) -> Option<&str> {
DisassociateLinkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateLinkError {
pub fn new(kind: DisassociateLinkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DisassociateLinkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateLinkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateLinkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DisassociateLinkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateLinkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateLinkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateLinkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateLinkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateLinkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateLinkErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateLinkErrorKind::ConflictException(_inner) => Some(_inner),
DisassociateLinkErrorKind::InternalServerException(_inner) => Some(_inner),
DisassociateLinkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateLinkErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateLinkErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateLinkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateTransitGatewayConnectPeerError {
pub kind: DisassociateTransitGatewayConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateTransitGatewayConnectPeerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for DisassociateTransitGatewayConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateTransitGatewayConnectPeerError {
fn code(&self) -> Option<&str> {
DisassociateTransitGatewayConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateTransitGatewayConnectPeerError {
pub fn new(
kind: DisassociateTransitGatewayConnectPeerErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTransitGatewayConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateTransitGatewayConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateTransitGatewayConnectPeerErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::ConflictException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(_inner) => {
Some(_inner.as_ref())
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectionsError {
pub kind: GetConnectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetConnectionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetConnectionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetConnectionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetConnectionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectionsError {
fn code(&self) -> Option<&str> {
GetConnectionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConnectionsError {
pub fn new(kind: GetConnectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetConnectionsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectionsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetConnectionsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetConnectionsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetConnectionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetConnectionsErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetConnectionsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetConnectionsErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectionsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCustomerGatewayAssociationsError {
pub kind: GetCustomerGatewayAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCustomerGatewayAssociationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetCustomerGatewayAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCustomerGatewayAssociationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCustomerGatewayAssociationsErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetCustomerGatewayAssociationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetCustomerGatewayAssociationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetCustomerGatewayAssociationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCustomerGatewayAssociationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCustomerGatewayAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCustomerGatewayAssociationsError {
fn code(&self) -> Option<&str> {
GetCustomerGatewayAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCustomerGatewayAssociationsError {
pub fn new(
kind: GetCustomerGatewayAssociationsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetCustomerGatewayAssociationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCustomerGatewayAssociationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCustomerGatewayAssociationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCustomerGatewayAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCustomerGatewayAssociationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCustomerGatewayAssociationsErrorKind::ConflictException(_inner) => Some(_inner),
GetCustomerGatewayAssociationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetCustomerGatewayAssociationsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetCustomerGatewayAssociationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCustomerGatewayAssociationsErrorKind::ValidationException(_inner) => Some(_inner),
GetCustomerGatewayAssociationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDevicesError {
pub kind: GetDevicesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDevicesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetDevicesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDevicesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDevicesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDevicesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDevicesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDevicesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDevicesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDevicesError {
fn code(&self) -> Option<&str> {
GetDevicesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDevicesError {
pub fn new(kind: GetDevicesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetDevicesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDevicesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetDevicesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetDevicesErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetDevicesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetDevicesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetDevicesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDevicesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDevicesErrorKind::InternalServerException(_inner) => Some(_inner),
GetDevicesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDevicesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDevicesErrorKind::ValidationException(_inner) => Some(_inner),
GetDevicesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLinkAssociationsError {
pub kind: GetLinkAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLinkAssociationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetLinkAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLinkAssociationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLinkAssociationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetLinkAssociationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetLinkAssociationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLinkAssociationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetLinkAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLinkAssociationsError {
fn code(&self) -> Option<&str> {
GetLinkAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLinkAssociationsError {
pub fn new(kind: GetLinkAssociationsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetLinkAssociationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLinkAssociationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetLinkAssociationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetLinkAssociationsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetLinkAssociationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetLinkAssociationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetLinkAssociationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetLinkAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLinkAssociationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLinkAssociationsErrorKind::InternalServerException(_inner) => Some(_inner),
GetLinkAssociationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetLinkAssociationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLinkAssociationsErrorKind::ValidationException(_inner) => Some(_inner),
GetLinkAssociationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLinksError {
pub kind: GetLinksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLinksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetLinksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLinksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLinksErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetLinksErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetLinksErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLinksErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetLinksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLinksError {
fn code(&self) -> Option<&str> {
GetLinksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLinksError {
pub fn new(kind: GetLinksErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetLinksErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLinksErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetLinksErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetLinksErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetLinksErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetLinksErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetLinksErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetLinksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLinksErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLinksErrorKind::InternalServerException(_inner) => Some(_inner),
GetLinksErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetLinksErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLinksErrorKind::ValidationException(_inner) => Some(_inner),
GetLinksErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourceCountsError {
pub kind: GetNetworkResourceCountsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNetworkResourceCountsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetNetworkResourceCountsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNetworkResourceCountsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetNetworkResourceCountsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNetworkResourceCountsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetNetworkResourceCountsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetNetworkResourceCountsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNetworkResourceCountsError {
fn code(&self) -> Option<&str> {
GetNetworkResourceCountsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNetworkResourceCountsError {
pub fn new(kind: GetNetworkResourceCountsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetNetworkResourceCountsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourceCountsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceCountsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceCountsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceCountsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceCountsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetNetworkResourceCountsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNetworkResourceCountsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetNetworkResourceCountsErrorKind::InternalServerException(_inner) => Some(_inner),
GetNetworkResourceCountsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetNetworkResourceCountsErrorKind::ValidationException(_inner) => Some(_inner),
GetNetworkResourceCountsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourceRelationshipsError {
pub kind: GetNetworkResourceRelationshipsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNetworkResourceRelationshipsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetNetworkResourceRelationshipsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNetworkResourceRelationshipsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetNetworkResourceRelationshipsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetNetworkResourceRelationshipsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetNetworkResourceRelationshipsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetNetworkResourceRelationshipsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetNetworkResourceRelationshipsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNetworkResourceRelationshipsError {
fn code(&self) -> Option<&str> {
GetNetworkResourceRelationshipsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNetworkResourceRelationshipsError {
pub fn new(
kind: GetNetworkResourceRelationshipsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetNetworkResourceRelationshipsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourceRelationshipsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceRelationshipsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceRelationshipsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceRelationshipsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceRelationshipsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourceRelationshipsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetNetworkResourceRelationshipsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNetworkResourceRelationshipsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetNetworkResourceRelationshipsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetNetworkResourceRelationshipsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetNetworkResourceRelationshipsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetNetworkResourceRelationshipsErrorKind::ValidationException(_inner) => Some(_inner),
GetNetworkResourceRelationshipsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourcesError {
pub kind: GetNetworkResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNetworkResourcesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetNetworkResourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNetworkResourcesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetNetworkResourcesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNetworkResourcesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetNetworkResourcesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetNetworkResourcesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetNetworkResourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNetworkResourcesError {
fn code(&self) -> Option<&str> {
GetNetworkResourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNetworkResourcesError {
pub fn new(kind: GetNetworkResourcesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetNetworkResourcesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourcesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourcesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourcesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourcesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourcesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkResourcesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetNetworkResourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNetworkResourcesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetNetworkResourcesErrorKind::InternalServerException(_inner) => Some(_inner),
GetNetworkResourcesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetNetworkResourcesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetNetworkResourcesErrorKind::ValidationException(_inner) => Some(_inner),
GetNetworkResourcesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkRoutesError {
pub kind: GetNetworkRoutesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNetworkRoutesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetNetworkRoutesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNetworkRoutesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetNetworkRoutesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNetworkRoutesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetNetworkRoutesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetNetworkRoutesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetNetworkRoutesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNetworkRoutesError {
fn code(&self) -> Option<&str> {
GetNetworkRoutesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNetworkRoutesError {
pub fn new(kind: GetNetworkRoutesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetNetworkRoutesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkRoutesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkRoutesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkRoutesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkRoutesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkRoutesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkRoutesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetNetworkRoutesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNetworkRoutesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetNetworkRoutesErrorKind::InternalServerException(_inner) => Some(_inner),
GetNetworkRoutesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetNetworkRoutesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetNetworkRoutesErrorKind::ValidationException(_inner) => Some(_inner),
GetNetworkRoutesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkTelemetryError {
pub kind: GetNetworkTelemetryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetNetworkTelemetryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetNetworkTelemetryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetNetworkTelemetryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetNetworkTelemetryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetNetworkTelemetryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetNetworkTelemetryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetNetworkTelemetryErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetNetworkTelemetryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetNetworkTelemetryError {
fn code(&self) -> Option<&str> {
GetNetworkTelemetryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetNetworkTelemetryError {
pub fn new(kind: GetNetworkTelemetryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetNetworkTelemetryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkTelemetryErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkTelemetryErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkTelemetryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkTelemetryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkTelemetryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetNetworkTelemetryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetNetworkTelemetryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetNetworkTelemetryErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetNetworkTelemetryErrorKind::InternalServerException(_inner) => Some(_inner),
GetNetworkTelemetryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetNetworkTelemetryErrorKind::ThrottlingException(_inner) => Some(_inner),
GetNetworkTelemetryErrorKind::ValidationException(_inner) => Some(_inner),
GetNetworkTelemetryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRouteAnalysisError {
pub kind: GetRouteAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRouteAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetRouteAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRouteAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRouteAnalysisErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRouteAnalysisErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRouteAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRouteAnalysisErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRouteAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRouteAnalysisError {
fn code(&self) -> Option<&str> {
GetRouteAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRouteAnalysisError {
pub fn new(kind: GetRouteAnalysisErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetRouteAnalysisErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRouteAnalysisErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetRouteAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRouteAnalysisErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRouteAnalysisErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRouteAnalysisErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRouteAnalysisErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRouteAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRouteAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRouteAnalysisErrorKind::InternalServerException(_inner) => Some(_inner),
GetRouteAnalysisErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRouteAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRouteAnalysisErrorKind::ValidationException(_inner) => Some(_inner),
GetRouteAnalysisErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSitesError {
pub kind: GetSitesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSitesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetSitesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSitesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSitesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSitesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSitesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSitesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSitesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSitesError {
fn code(&self) -> Option<&str> {
GetSitesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSitesError {
pub fn new(kind: GetSitesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetSitesErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSitesErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetSitesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetSitesErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetSitesErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetSitesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetSitesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetSitesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSitesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSitesErrorKind::InternalServerException(_inner) => Some(_inner),
GetSitesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSitesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSitesErrorKind::ValidationException(_inner) => Some(_inner),
GetSitesErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayConnectPeerAssociationsError {
pub kind: GetTransitGatewayConnectPeerAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTransitGatewayConnectPeerAssociationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetTransitGatewayConnectPeerAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTransitGatewayConnectPeerAssociationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
GetTransitGatewayConnectPeerAssociationsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTransitGatewayConnectPeerAssociationsError {
fn code(&self) -> Option<&str> {
GetTransitGatewayConnectPeerAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTransitGatewayConnectPeerAssociationsError {
pub fn new(
kind: GetTransitGatewayConnectPeerAssociationsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayConnectPeerAssociationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTransitGatewayConnectPeerAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTransitGatewayConnectPeerAssociationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ConflictException(_inner) => {
Some(_inner)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
GetTransitGatewayConnectPeerAssociationsErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::ValidationException(_inner) => {
Some(_inner)
}
GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(_inner) => {
Some(_inner.as_ref())
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayRegistrationsError {
pub kind: GetTransitGatewayRegistrationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTransitGatewayRegistrationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetTransitGatewayRegistrationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTransitGatewayRegistrationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTransitGatewayRegistrationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRegistrationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRegistrationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTransitGatewayRegistrationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTransitGatewayRegistrationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTransitGatewayRegistrationsError {
fn code(&self) -> Option<&str> {
GetTransitGatewayRegistrationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTransitGatewayRegistrationsError {
pub fn new(
kind: GetTransitGatewayRegistrationsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetTransitGatewayRegistrationsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayRegistrationsErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRegistrationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRegistrationsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRegistrationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRegistrationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRegistrationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTransitGatewayRegistrationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTransitGatewayRegistrationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTransitGatewayRegistrationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetTransitGatewayRegistrationsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetTransitGatewayRegistrationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTransitGatewayRegistrationsErrorKind::ValidationException(_inner) => Some(_inner),
GetTransitGatewayRegistrationsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterTransitGatewayError {
pub kind: RegisterTransitGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterTransitGatewayErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for RegisterTransitGatewayError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterTransitGatewayErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::ConflictException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::InternalServerException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::ValidationException(_inner) => _inner.fmt(f),
RegisterTransitGatewayErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterTransitGatewayError {
fn code(&self) -> Option<&str> {
RegisterTransitGatewayError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterTransitGatewayError {
pub fn new(kind: RegisterTransitGatewayErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: RegisterTransitGatewayErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterTransitGatewayErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RegisterTransitGatewayErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RegisterTransitGatewayError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterTransitGatewayErrorKind::AccessDeniedException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::ConflictException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::InternalServerException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::ThrottlingException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::ValidationException(_inner) => Some(_inner),
RegisterTransitGatewayErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartRouteAnalysisError {
pub kind: StartRouteAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartRouteAnalysisErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for StartRouteAnalysisError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartRouteAnalysisErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartRouteAnalysisErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartRouteAnalysisError {
fn code(&self) -> Option<&str> {
StartRouteAnalysisError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartRouteAnalysisError {
pub fn new(kind: StartRouteAnalysisErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: StartRouteAnalysisErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartRouteAnalysisErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartRouteAnalysisErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartRouteAnalysisError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartRouteAnalysisErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::ConflictException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::InternalServerException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::ThrottlingException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::ValidationException(_inner) => Some(_inner),
StartRouteAnalysisErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::ConflictException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::ConflictException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConnectionError {
pub kind: UpdateConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConnectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateConnectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConnectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateConnectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConnectionError {
fn code(&self) -> Option<&str> {
UpdateConnectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConnectionError {
pub fn new(kind: UpdateConnectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateConnectionErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConnectionErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateConnectionErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateConnectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConnectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateConnectionErrorKind::ConflictException(_inner) => Some(_inner),
UpdateConnectionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateConnectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateConnectionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateConnectionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateConnectionErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDeviceError {
pub kind: UpdateDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDeviceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDeviceError {
fn code(&self) -> Option<&str> {
UpdateDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDeviceError {
pub fn new(kind: UpdateDeviceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateDeviceErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDeviceErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateDeviceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateDeviceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateDeviceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateDeviceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDeviceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDeviceErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDeviceErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDeviceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDeviceErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDeviceErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDeviceErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGlobalNetworkError {
pub kind: UpdateGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateGlobalNetworkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateGlobalNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateGlobalNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateGlobalNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateGlobalNetworkError {
fn code(&self) -> Option<&str> {
UpdateGlobalNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateGlobalNetworkError {
pub fn new(kind: UpdateGlobalNetworkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateGlobalNetworkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateGlobalNetworkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGlobalNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateGlobalNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateGlobalNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::ConflictException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::ValidationException(_inner) => Some(_inner),
UpdateGlobalNetworkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLinkError {
pub kind: UpdateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateLinkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateLinkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateLinkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateLinkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateLinkError {
fn code(&self) -> Option<&str> {
UpdateLinkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateLinkError {
pub fn new(kind: UpdateLinkErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateLinkErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLinkErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateLinkErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateLinkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdateLinkErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLinkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateLinkErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateLinkErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateLinkErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateLinkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateLinkErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateLinkErrorKind::ConflictException(_inner) => Some(_inner),
UpdateLinkErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateLinkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateLinkErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
UpdateLinkErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateLinkErrorKind::ValidationException(_inner) => Some(_inner),
UpdateLinkErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNetworkResourceMetadataError {
pub kind: UpdateNetworkResourceMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateNetworkResourceMetadataErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateNetworkResourceMetadataError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateNetworkResourceMetadataErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateNetworkResourceMetadataErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateNetworkResourceMetadataErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
UpdateNetworkResourceMetadataErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateNetworkResourceMetadataErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateNetworkResourceMetadataErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateNetworkResourceMetadataErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateNetworkResourceMetadataError {
fn code(&self) -> Option<&str> {
UpdateNetworkResourceMetadataError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateNetworkResourceMetadataError {
pub fn new(
kind: UpdateNetworkResourceMetadataErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateNetworkResourceMetadataErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNetworkResourceMetadataErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateNetworkResourceMetadataErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateNetworkResourceMetadataError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateNetworkResourceMetadataErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateNetworkResourceMetadataErrorKind::ConflictException(_inner) => Some(_inner),
UpdateNetworkResourceMetadataErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateNetworkResourceMetadataErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateNetworkResourceMetadataErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateNetworkResourceMetadataErrorKind::ValidationException(_inner) => Some(_inner),
UpdateNetworkResourceMetadataErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSiteError {
pub kind: UpdateSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSiteErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateSiteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSiteErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateSiteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSiteError {
fn code(&self) -> Option<&str> {
UpdateSiteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSiteError {
pub fn new(kind: UpdateSiteErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateSiteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSiteErrorKind::Unhandled(err.into()),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateSiteErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateSiteErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdateSiteErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSiteErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateSiteErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateSiteErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateSiteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSiteErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateSiteErrorKind::ConflictException(_inner) => Some(_inner),
UpdateSiteErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateSiteErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateSiteErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateSiteErrorKind::ValidationException(_inner) => Some(_inner),
UpdateSiteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub fields: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn fields(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.fields.as_deref()
}
}
impl std::fmt::Debug for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValidationException");
formatter.field("message", &self.message);
formatter.field("reason", &self.reason);
formatter.field("fields", &self.fields);
formatter.finish()
}
}
impl ValidationException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) fields:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn fields(mut self, input: impl Into<crate::model::ValidationExceptionField>) -> Self {
let mut v = self.fields.unwrap_or_default();
v.push(input.into());
self.fields = Some(v);
self
}
pub fn set_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.fields = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
fields: self.fields,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ThrottlingException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub retry_after_seconds: std::option::Option<i32>,
}
impl ThrottlingException {
pub fn retry_after_seconds(&self) -> std::option::Option<i32> {
self.retry_after_seconds
}
}
impl std::fmt::Debug for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ThrottlingException");
formatter.field("message", &self.message);
formatter.field("retry_after_seconds", &self.retry_after_seconds);
formatter.finish()
}
}
impl ThrottlingException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
retry_after_seconds: self.retry_after_seconds,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub context:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl ResourceNotFoundException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
#[allow(missing_docs)] pub fn context(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.context.as_ref()
}
}
impl std::fmt::Debug for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ResourceNotFoundException");
formatter.field("message", &self.message);
formatter.field("resource_id", &self.resource_id);
formatter.field("resource_type", &self.resource_type);
formatter.field("context", &self.context);
formatter.finish()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) context: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn context(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.context.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.context = Some(hash_map);
self
}
#[allow(missing_docs)] pub fn set_context(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.context = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
context: self.context,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalServerException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub retry_after_seconds: std::option::Option<i32>,
}
impl InternalServerException {
pub fn retry_after_seconds(&self) -> std::option::Option<i32> {
self.retry_after_seconds
}
}
impl std::fmt::Debug for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalServerException");
formatter.field("message", &self.message);
formatter.field("retry_after_seconds", &self.retry_after_seconds);
formatter.finish()
}
}
impl InternalServerException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
retry_after_seconds: self.retry_after_seconds,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ConflictException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl std::fmt::Debug for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ConflictException");
formatter.field("message", &self.message);
formatter.field("resource_id", &self.resource_id);
formatter.field("resource_type", &self.resource_type);
formatter.finish()
}
}
impl ConflictException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AccessDeniedException {
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
}
impl std::fmt::Debug for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("AccessDeniedException");
formatter.field("message", &self.message);
formatter.finish()
}
}
impl AccessDeniedException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ServiceQuotaExceededException {
pub message: std::option::Option<std::string::String>,
pub resource_id: std::option::Option<std::string::String>,
pub resource_type: std::option::Option<std::string::String>,
pub limit_code: std::option::Option<std::string::String>,
pub service_code: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn limit_code(&self) -> std::option::Option<&str> {
self.limit_code.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
}
impl std::fmt::Debug for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ServiceQuotaExceededException");
formatter.field("message", &self.message);
formatter.field("resource_id", &self.resource_id);
formatter.field("resource_type", &self.resource_type);
formatter.field("limit_code", &self.limit_code);
formatter.field("service_code", &self.service_code);
formatter.finish()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_7) = &self.message {
write!(f, ": {}", inner_7)?;
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) limit_code: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn limit_code(mut self, input: impl Into<std::string::String>) -> Self {
self.limit_code = Some(input.into());
self
}
pub fn set_limit_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.limit_code = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
limit_code: self.limit_code,
service_code: self.service_code,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}