#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateVpcAttachmentError {
pub kind: UpdateVpcAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateVpcAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateVpcAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateVpcAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateVpcAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateVpcAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateVpcAttachmentError {
fn code(&self) -> Option<&str> {
UpdateVpcAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateVpcAttachmentError {
pub fn new(kind: UpdateVpcAttachmentErrorKind, 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: UpdateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
UpdateVpcAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVpcAttachmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVpcAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVpcAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVpcAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVpcAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateVpcAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateVpcAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateVpcAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
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 ValidationException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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: crate::model::ValidationExceptionField) -> Self {
let mut v = self.fields.unwrap_or_default();
v.push(input);
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, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
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 ThrottlingException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
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()
}
pub fn context(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.context.as_ref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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
}
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, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
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 InternalServerException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
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 ConflictException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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::fmt::Debug)]
pub struct UpdateSiteError {
pub kind: UpdateSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSiteError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSiteErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSiteErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateNetworkResourceMetadataError {
pub kind: UpdateNetworkResourceMetadataErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateNetworkResourceMetadataError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateNetworkResourceMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateNetworkResourceMetadataErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateLinkError {
pub kind: UpdateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateLinkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateLinkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateLinkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub limit_code: std::option::Option<std::string::String>,
#[doc(hidden)]
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 ServiceQuotaExceededException {
pub fn message(&self) -> std::option::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 {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, 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()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGlobalNetworkError {
pub kind: UpdateGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateGlobalNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDeviceError {
pub kind: UpdateDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDeviceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDeviceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDeviceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCoreNetworkError {
pub kind: UpdateCoreNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCoreNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCoreNetworkErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCoreNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCoreNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateCoreNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCoreNetworkError {
fn code(&self) -> Option<&str> {
UpdateCoreNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCoreNetworkError {
pub fn new(kind: UpdateCoreNetworkErrorKind, 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: UpdateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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,
UpdateCoreNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateCoreNetworkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCoreNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCoreNetworkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCoreNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCoreNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateCoreNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCoreNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::ConflictException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::ValidationException(_inner) => Some(_inner),
UpdateCoreNetworkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConnectionError {
pub kind: UpdateConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConnectionErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartRouteAnalysisError {
pub kind: StartRouteAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartRouteAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartRouteAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartRouteAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartOrganizationServiceAccessUpdateError {
pub kind: StartOrganizationServiceAccessUpdateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartOrganizationServiceAccessUpdateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartOrganizationServiceAccessUpdateErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartOrganizationServiceAccessUpdateErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for StartOrganizationServiceAccessUpdateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartOrganizationServiceAccessUpdateErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
StartOrganizationServiceAccessUpdateErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
StartOrganizationServiceAccessUpdateErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
StartOrganizationServiceAccessUpdateErrorKind::ServiceQuotaExceededException(
_inner,
) => _inner.fmt(f),
StartOrganizationServiceAccessUpdateErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
StartOrganizationServiceAccessUpdateErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
StartOrganizationServiceAccessUpdateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartOrganizationServiceAccessUpdateError {
fn code(&self) -> Option<&str> {
StartOrganizationServiceAccessUpdateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartOrganizationServiceAccessUpdateError {
pub fn new(
kind: StartOrganizationServiceAccessUpdateErrorKind,
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: StartOrganizationServiceAccessUpdateErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartOrganizationServiceAccessUpdateErrorKind::Unhandled(
crate::error::Unhandled::new(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,
StartOrganizationServiceAccessUpdateErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartOrganizationServiceAccessUpdateErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartOrganizationServiceAccessUpdateErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartOrganizationServiceAccessUpdateErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartOrganizationServiceAccessUpdateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartOrganizationServiceAccessUpdateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartOrganizationServiceAccessUpdateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartOrganizationServiceAccessUpdateErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
StartOrganizationServiceAccessUpdateErrorKind::ConflictException(_inner) => {
Some(_inner)
}
StartOrganizationServiceAccessUpdateErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
StartOrganizationServiceAccessUpdateErrorKind::ServiceQuotaExceededException(
_inner,
) => Some(_inner),
StartOrganizationServiceAccessUpdateErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
StartOrganizationServiceAccessUpdateErrorKind::ValidationException(_inner) => {
Some(_inner)
}
StartOrganizationServiceAccessUpdateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RestoreCoreNetworkPolicyVersionError {
pub kind: RestoreCoreNetworkPolicyVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RestoreCoreNetworkPolicyVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RestoreCoreNetworkPolicyVersionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RestoreCoreNetworkPolicyVersionErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for RestoreCoreNetworkPolicyVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RestoreCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
RestoreCoreNetworkPolicyVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
RestoreCoreNetworkPolicyVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
RestoreCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
RestoreCoreNetworkPolicyVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RestoreCoreNetworkPolicyVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
RestoreCoreNetworkPolicyVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RestoreCoreNetworkPolicyVersionError {
fn code(&self) -> Option<&str> {
RestoreCoreNetworkPolicyVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RestoreCoreNetworkPolicyVersionError {
pub fn new(
kind: RestoreCoreNetworkPolicyVersionErrorKind,
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: RestoreCoreNetworkPolicyVersionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RestoreCoreNetworkPolicyVersionErrorKind::Unhandled(
crate::error::Unhandled::new(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,
RestoreCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RestoreCoreNetworkPolicyVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RestoreCoreNetworkPolicyVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RestoreCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RestoreCoreNetworkPolicyVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RestoreCoreNetworkPolicyVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RestoreCoreNetworkPolicyVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RestoreCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
RestoreCoreNetworkPolicyVersionErrorKind::ConflictException(_inner) => Some(_inner),
RestoreCoreNetworkPolicyVersionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
RestoreCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
RestoreCoreNetworkPolicyVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
RestoreCoreNetworkPolicyVersionErrorKind::ValidationException(_inner) => Some(_inner),
RestoreCoreNetworkPolicyVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RejectAttachmentError {
pub kind: RejectAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RejectAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RejectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RejectAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for RejectAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RejectAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
RejectAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RejectAttachmentError {
fn code(&self) -> Option<&str> {
RejectAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RejectAttachmentError {
pub fn new(kind: RejectAttachmentErrorKind, 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: RejectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RejectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
RejectAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, RejectAttachmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RejectAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RejectAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RejectAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RejectAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RejectAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RejectAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
RejectAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
RejectAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
RejectAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RejectAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
RejectAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
RejectAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterTransitGatewayError {
pub kind: RegisterTransitGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterTransitGatewayError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterTransitGatewayErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterTransitGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutResourcePolicyError {
pub kind: PutResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutResourcePolicyErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for PutResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutResourcePolicyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutResourcePolicyError {
fn code(&self) -> Option<&str> {
PutResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutResourcePolicyError {
pub fn new(kind: PutResourcePolicyErrorKind, 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: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(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,
PutResourcePolicyErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutResourcePolicyErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutResourcePolicyErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ConflictException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::InternalServerException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ValidationException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutCoreNetworkPolicyError {
pub kind: PutCoreNetworkPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutCoreNetworkPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutCoreNetworkPolicyErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
CoreNetworkPolicyException(crate::error::CoreNetworkPolicyException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutCoreNetworkPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutCoreNetworkPolicyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::CoreNetworkPolicyException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutCoreNetworkPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutCoreNetworkPolicyError {
fn code(&self) -> Option<&str> {
PutCoreNetworkPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutCoreNetworkPolicyError {
pub fn new(kind: PutCoreNetworkPolicyErrorKind, 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: PutCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
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,
PutCoreNetworkPolicyErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::ConflictException(_)
)
}
pub fn is_core_network_policy_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::CoreNetworkPolicyException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutCoreNetworkPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutCoreNetworkPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutCoreNetworkPolicyErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::ConflictException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::CoreNetworkPolicyException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::InternalServerException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::ValidationException(_inner) => Some(_inner),
PutCoreNetworkPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CoreNetworkPolicyException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub errors: std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
}
impl CoreNetworkPolicyException {
pub fn errors(&self) -> std::option::Option<&[crate::model::CoreNetworkPolicyError]> {
self.errors.as_deref()
}
}
impl CoreNetworkPolicyException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CoreNetworkPolicyException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CoreNetworkPolicyException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for CoreNetworkPolicyException {}
pub mod core_network_policy_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) errors: std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
}
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 errors(mut self, input: crate::model::CoreNetworkPolicyError) -> Self {
let mut v = self.errors.unwrap_or_default();
v.push(input);
self.errors = Some(v);
self
}
pub fn set_errors(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::CoreNetworkPolicyError>>,
) -> Self {
self.errors = input;
self
}
pub fn build(self) -> crate::error::CoreNetworkPolicyException {
crate::error::CoreNetworkPolicyException {
message: self.message,
errors: self.errors,
}
}
}
}
impl CoreNetworkPolicyException {
pub fn builder() -> crate::error::core_network_policy_exception::Builder {
crate::error::core_network_policy_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPeeringsError {
pub kind: ListPeeringsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPeeringsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPeeringsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPeeringsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPeeringsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPeeringsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListPeeringsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListPeeringsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListPeeringsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListPeeringsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPeeringsError {
fn code(&self) -> Option<&str> {
ListPeeringsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPeeringsError {
pub fn new(kind: ListPeeringsErrorKind, 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: ListPeeringsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPeeringsErrorKind::Unhandled(crate::error::Unhandled::new(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, ListPeeringsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPeeringsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListPeeringsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListPeeringsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListPeeringsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPeeringsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListPeeringsErrorKind::InternalServerException(_inner) => Some(_inner),
ListPeeringsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListPeeringsErrorKind::ValidationException(_inner) => Some(_inner),
ListPeeringsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListOrganizationServiceAccessStatusError {
pub kind: ListOrganizationServiceAccessStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListOrganizationServiceAccessStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListOrganizationServiceAccessStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListOrganizationServiceAccessStatusErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListOrganizationServiceAccessStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListOrganizationServiceAccessStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListOrganizationServiceAccessStatusError {
fn code(&self) -> Option<&str> {
ListOrganizationServiceAccessStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListOrganizationServiceAccessStatusError {
pub fn new(
kind: ListOrganizationServiceAccessStatusErrorKind,
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: ListOrganizationServiceAccessStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListOrganizationServiceAccessStatusErrorKind::Unhandled(
crate::error::Unhandled::new(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()
}
}
impl std::error::Error for ListOrganizationServiceAccessStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListOrganizationServiceAccessStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCoreNetworksError {
pub kind: ListCoreNetworksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCoreNetworksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCoreNetworksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCoreNetworksErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCoreNetworksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCoreNetworksErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListCoreNetworksErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListCoreNetworksErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListCoreNetworksErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListCoreNetworksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCoreNetworksError {
fn code(&self) -> Option<&str> {
ListCoreNetworksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCoreNetworksError {
pub fn new(kind: ListCoreNetworksErrorKind, 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: ListCoreNetworksErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCoreNetworksErrorKind::Unhandled(crate::error::Unhandled::new(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,
ListCoreNetworksErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworksErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworksErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworksErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListCoreNetworksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCoreNetworksErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCoreNetworksErrorKind::InternalServerException(_inner) => Some(_inner),
ListCoreNetworksErrorKind::ThrottlingException(_inner) => Some(_inner),
ListCoreNetworksErrorKind::ValidationException(_inner) => Some(_inner),
ListCoreNetworksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCoreNetworkPolicyVersionsError {
pub kind: ListCoreNetworkPolicyVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCoreNetworkPolicyVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCoreNetworkPolicyVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCoreNetworkPolicyVersionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCoreNetworkPolicyVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCoreNetworkPolicyVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListCoreNetworkPolicyVersionsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListCoreNetworkPolicyVersionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListCoreNetworkPolicyVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListCoreNetworkPolicyVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListCoreNetworkPolicyVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCoreNetworkPolicyVersionsError {
fn code(&self) -> Option<&str> {
ListCoreNetworkPolicyVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCoreNetworkPolicyVersionsError {
pub fn new(
kind: ListCoreNetworkPolicyVersionsErrorKind,
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: ListCoreNetworkPolicyVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCoreNetworkPolicyVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
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,
ListCoreNetworkPolicyVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworkPolicyVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworkPolicyVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworkPolicyVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreNetworkPolicyVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListCoreNetworkPolicyVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCoreNetworkPolicyVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCoreNetworkPolicyVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListCoreNetworkPolicyVersionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListCoreNetworkPolicyVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListCoreNetworkPolicyVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListCoreNetworkPolicyVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListConnectPeersError {
pub kind: ListConnectPeersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListConnectPeersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListConnectPeersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListConnectPeersErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListConnectPeersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListConnectPeersErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListConnectPeersErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListConnectPeersErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListConnectPeersErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListConnectPeersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListConnectPeersError {
fn code(&self) -> Option<&str> {
ListConnectPeersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListConnectPeersError {
pub fn new(kind: ListConnectPeersErrorKind, 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: ListConnectPeersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListConnectPeersErrorKind::Unhandled(crate::error::Unhandled::new(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,
ListConnectPeersErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListConnectPeersErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListConnectPeersErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListConnectPeersErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListConnectPeersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListConnectPeersErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListConnectPeersErrorKind::InternalServerException(_inner) => Some(_inner),
ListConnectPeersErrorKind::ThrottlingException(_inner) => Some(_inner),
ListConnectPeersErrorKind::ValidationException(_inner) => Some(_inner),
ListConnectPeersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAttachmentsError {
pub kind: ListAttachmentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAttachmentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAttachmentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAttachmentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAttachmentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListAttachmentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListAttachmentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListAttachmentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListAttachmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAttachmentsError {
fn code(&self) -> Option<&str> {
ListAttachmentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAttachmentsError {
pub fn new(kind: ListAttachmentsErrorKind, 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: ListAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAttachmentsErrorKind::Unhandled(crate::error::Unhandled::new(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,
ListAttachmentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListAttachmentsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListAttachmentsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListAttachmentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListAttachmentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAttachmentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListAttachmentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListAttachmentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListAttachmentsErrorKind::ValidationException(_inner) => Some(_inner),
ListAttachmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetVpcAttachmentError {
pub kind: GetVpcAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetVpcAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetVpcAttachmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetVpcAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetVpcAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetVpcAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetVpcAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetVpcAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetVpcAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetVpcAttachmentError {
fn code(&self) -> Option<&str> {
GetVpcAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetVpcAttachmentError {
pub fn new(kind: GetVpcAttachmentErrorKind, 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: GetVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetVpcAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetVpcAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetVpcAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetVpcAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetVpcAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetVpcAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetVpcAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetVpcAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
GetVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetVpcAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetVpcAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
GetVpcAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayRouteTableAttachmentError {
pub kind: GetTransitGatewayRouteTableAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTransitGatewayRouteTableAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTransitGatewayRouteTableAttachmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTransitGatewayRouteTableAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
GetTransitGatewayRouteTableAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTransitGatewayRouteTableAttachmentError {
fn code(&self) -> Option<&str> {
GetTransitGatewayRouteTableAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTransitGatewayRouteTableAttachmentError {
pub fn new(
kind: GetTransitGatewayRouteTableAttachmentErrorKind,
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: GetTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(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,
GetTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTransitGatewayRouteTableAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_inner) => {
Some(_inner)
}
GetTransitGatewayRouteTableAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayRegistrationsError {
pub kind: GetTransitGatewayRegistrationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTransitGatewayRegistrationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTransitGatewayRegistrationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayRegistrationsErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayPeeringError {
pub kind: GetTransitGatewayPeeringErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTransitGatewayPeeringError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTransitGatewayPeeringErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTransitGatewayPeeringError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTransitGatewayPeeringErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTransitGatewayPeeringErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTransitGatewayPeeringErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTransitGatewayPeeringErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTransitGatewayPeeringErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTransitGatewayPeeringErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTransitGatewayPeeringError {
fn code(&self) -> Option<&str> {
GetTransitGatewayPeeringError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTransitGatewayPeeringError {
pub fn new(kind: GetTransitGatewayPeeringErrorKind, 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: GetTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetTransitGatewayPeeringErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayPeeringErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayPeeringErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayPeeringErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTransitGatewayPeeringErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTransitGatewayPeeringError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTransitGatewayPeeringErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTransitGatewayPeeringErrorKind::InternalServerException(_inner) => Some(_inner),
GetTransitGatewayPeeringErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTransitGatewayPeeringErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTransitGatewayPeeringErrorKind::ValidationException(_inner) => Some(_inner),
GetTransitGatewayPeeringErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTransitGatewayConnectPeerAssociationsError {
pub kind: GetTransitGatewayConnectPeerAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for GetTransitGatewayConnectPeerAssociationsError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTransitGatewayConnectPeerAssociationsErrorKind::Unhandled(
crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSiteToSiteVpnAttachmentError {
pub kind: GetSiteToSiteVpnAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSiteToSiteVpnAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSiteToSiteVpnAttachmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSiteToSiteVpnAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSiteToSiteVpnAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSiteToSiteVpnAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSiteToSiteVpnAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSiteToSiteVpnAttachmentError {
fn code(&self) -> Option<&str> {
GetSiteToSiteVpnAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSiteToSiteVpnAttachmentError {
pub fn new(kind: GetSiteToSiteVpnAttachmentErrorKind, 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: GetSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetSiteToSiteVpnAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetSiteToSiteVpnAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetSiteToSiteVpnAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSiteToSiteVpnAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
GetSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSiteToSiteVpnAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
GetSiteToSiteVpnAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSitesError {
pub kind: GetSitesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSitesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSitesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSitesErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRouteAnalysisError {
pub kind: GetRouteAnalysisErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRouteAnalysisError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRouteAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRouteAnalysisErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetResourcePolicyError {
pub kind: GetResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetResourcePolicyErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetResourcePolicyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetResourcePolicyError {
fn code(&self) -> Option<&str> {
GetResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetResourcePolicyError {
pub fn new(kind: GetResourcePolicyErrorKind, 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: GetResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetResourcePolicyErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetResourcePolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetResourcePolicyErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::InternalServerException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::ValidationException(_inner) => Some(_inner),
GetResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkTelemetryError {
pub kind: GetNetworkTelemetryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNetworkTelemetryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNetworkTelemetryErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkTelemetryErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkRoutesError {
pub kind: GetNetworkRoutesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNetworkRoutesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNetworkRoutesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkRoutesErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourcesError {
pub kind: GetNetworkResourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNetworkResourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNetworkResourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourcesErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourceRelationshipsError {
pub kind: GetNetworkResourceRelationshipsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNetworkResourceRelationshipsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNetworkResourceRelationshipsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourceRelationshipsErrorKind::Unhandled(
crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetNetworkResourceCountsError {
pub kind: GetNetworkResourceCountsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetNetworkResourceCountsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetNetworkResourceCountsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetNetworkResourceCountsErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLinksError {
pub kind: GetLinksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLinksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLinksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLinksErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLinkAssociationsError {
pub kind: GetLinkAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLinkAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLinkAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLinkAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDevicesError {
pub kind: GetDevicesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDevicesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDevicesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDevicesErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCustomerGatewayAssociationsError {
pub kind: GetCustomerGatewayAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCustomerGatewayAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCustomerGatewayAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCustomerGatewayAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCoreNetworkPolicyError {
pub kind: GetCoreNetworkPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCoreNetworkPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCoreNetworkPolicyErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCoreNetworkPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCoreNetworkPolicyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCoreNetworkPolicyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCoreNetworkPolicyErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCoreNetworkPolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCoreNetworkPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCoreNetworkPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCoreNetworkPolicyError {
fn code(&self) -> Option<&str> {
GetCoreNetworkPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCoreNetworkPolicyError {
pub fn new(kind: GetCoreNetworkPolicyErrorKind, 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: GetCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCoreNetworkPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetCoreNetworkPolicyErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkPolicyErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkPolicyErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkPolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCoreNetworkPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCoreNetworkPolicyErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCoreNetworkPolicyErrorKind::InternalServerException(_inner) => Some(_inner),
GetCoreNetworkPolicyErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCoreNetworkPolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCoreNetworkPolicyErrorKind::ValidationException(_inner) => Some(_inner),
GetCoreNetworkPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCoreNetworkChangeSetError {
pub kind: GetCoreNetworkChangeSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCoreNetworkChangeSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCoreNetworkChangeSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCoreNetworkChangeSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCoreNetworkChangeSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCoreNetworkChangeSetError {
fn code(&self) -> Option<&str> {
GetCoreNetworkChangeSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCoreNetworkChangeSetError {
pub fn new(kind: GetCoreNetworkChangeSetErrorKind, 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: GetCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetCoreNetworkChangeSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCoreNetworkChangeSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCoreNetworkChangeSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCoreNetworkChangeSetErrorKind::InternalServerException(_inner) => Some(_inner),
GetCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCoreNetworkChangeSetErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCoreNetworkChangeSetErrorKind::ValidationException(_inner) => Some(_inner),
GetCoreNetworkChangeSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCoreNetworkChangeEventsError {
pub kind: GetCoreNetworkChangeEventsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCoreNetworkChangeEventsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCoreNetworkChangeEventsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCoreNetworkChangeEventsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCoreNetworkChangeEventsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCoreNetworkChangeEventsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeEventsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeEventsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeEventsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeEventsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCoreNetworkChangeEventsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCoreNetworkChangeEventsError {
fn code(&self) -> Option<&str> {
GetCoreNetworkChangeEventsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCoreNetworkChangeEventsError {
pub fn new(kind: GetCoreNetworkChangeEventsErrorKind, 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: GetCoreNetworkChangeEventsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCoreNetworkChangeEventsErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetCoreNetworkChangeEventsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeEventsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeEventsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeEventsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkChangeEventsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCoreNetworkChangeEventsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCoreNetworkChangeEventsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCoreNetworkChangeEventsErrorKind::InternalServerException(_inner) => Some(_inner),
GetCoreNetworkChangeEventsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCoreNetworkChangeEventsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCoreNetworkChangeEventsErrorKind::ValidationException(_inner) => Some(_inner),
GetCoreNetworkChangeEventsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCoreNetworkError {
pub kind: GetCoreNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCoreNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCoreNetworkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCoreNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCoreNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCoreNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCoreNetworkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCoreNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCoreNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCoreNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCoreNetworkError {
fn code(&self) -> Option<&str> {
GetCoreNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCoreNetworkError {
pub fn new(kind: GetCoreNetworkErrorKind, 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: GetCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetCoreNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreNetworkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetCoreNetworkErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetCoreNetworkErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetCoreNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCoreNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCoreNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
GetCoreNetworkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCoreNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCoreNetworkErrorKind::ValidationException(_inner) => Some(_inner),
GetCoreNetworkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectPeerAssociationsError {
pub kind: GetConnectPeerAssociationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectPeerAssociationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectPeerAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectPeerAssociationsErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectPeerAssociationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectPeerAssociationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectPeerAssociationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectPeerAssociationsError {
fn code(&self) -> Option<&str> {
GetConnectPeerAssociationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConnectPeerAssociationsError {
pub fn new(kind: GetConnectPeerAssociationsErrorKind, 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: GetConnectPeerAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectPeerAssociationsErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetConnectPeerAssociationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerAssociationsErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerAssociationsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerAssociationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerAssociationsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerAssociationsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetConnectPeerAssociationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectPeerAssociationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::ConflictException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectPeerAssociationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectPeerError {
pub kind: GetConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectPeerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectPeerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetConnectPeerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectPeerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetConnectPeerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetConnectPeerErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectPeerError {
fn code(&self) -> Option<&str> {
GetConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConnectPeerError {
pub fn new(kind: GetConnectPeerErrorKind, 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: GetConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(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,
GetConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetConnectPeerErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetConnectPeerErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectPeerErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetConnectPeerErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectPeerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetConnectPeerErrorKind::ThrottlingException(_inner) => Some(_inner),
GetConnectPeerErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectPeerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectionsError {
pub kind: GetConnectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectionsErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectAttachmentError {
pub kind: GetConnectAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectAttachmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetConnectAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetConnectAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetConnectAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectAttachmentError {
fn code(&self) -> Option<&str> {
GetConnectAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConnectAttachmentError {
pub fn new(kind: GetConnectAttachmentErrorKind, 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: GetConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
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,
GetConnectAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetConnectAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetConnectAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetConnectAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetConnectAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExecuteCoreNetworkChangeSetError {
pub kind: ExecuteCoreNetworkChangeSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExecuteCoreNetworkChangeSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExecuteCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExecuteCoreNetworkChangeSetErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for ExecuteCoreNetworkChangeSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExecuteCoreNetworkChangeSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ExecuteCoreNetworkChangeSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
ExecuteCoreNetworkChangeSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ExecuteCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ExecuteCoreNetworkChangeSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ExecuteCoreNetworkChangeSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
ExecuteCoreNetworkChangeSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExecuteCoreNetworkChangeSetError {
fn code(&self) -> Option<&str> {
ExecuteCoreNetworkChangeSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExecuteCoreNetworkChangeSetError {
pub fn new(kind: ExecuteCoreNetworkChangeSetErrorKind, 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: ExecuteCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExecuteCoreNetworkChangeSetErrorKind::Unhandled(crate::error::Unhandled::new(
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,
ExecuteCoreNetworkChangeSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteCoreNetworkChangeSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteCoreNetworkChangeSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteCoreNetworkChangeSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ExecuteCoreNetworkChangeSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ExecuteCoreNetworkChangeSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecuteCoreNetworkChangeSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::ConflictException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::InternalServerException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::ThrottlingException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::ValidationException(_inner) => Some(_inner),
ExecuteCoreNetworkChangeSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateTransitGatewayConnectPeerError {
pub kind: DisassociateTransitGatewayConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateTransitGatewayConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateTransitGatewayConnectPeerErrorKind::Unhandled(
crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateLinkError {
pub kind: DisassociateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateLinkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateLinkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateLinkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateCustomerGatewayError {
pub kind: DisassociateCustomerGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateCustomerGatewayError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateCustomerGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateCustomerGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateConnectPeerError {
pub kind: DisassociateConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateConnectPeerErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateConnectPeerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::ConflictException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateConnectPeerError {
fn code(&self) -> Option<&str> {
DisassociateConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateConnectPeerError {
pub fn new(kind: DisassociateConnectPeerErrorKind, 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: DisassociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(
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,
DisassociateConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectPeerErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateConnectPeerErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::ConflictException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::InternalServerException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateConnectPeerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeGlobalNetworksError {
pub kind: DescribeGlobalNetworksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeGlobalNetworksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeGlobalNetworksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeGlobalNetworksErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterTransitGatewayError {
pub kind: DeregisterTransitGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterTransitGatewayError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterTransitGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterTransitGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSiteError {
pub kind: DeleteSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSiteError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSiteErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSiteErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteResourcePolicyError {
pub kind: DeleteResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteResourcePolicyErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteResourcePolicyErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteResourcePolicyError {
fn code(&self) -> Option<&str> {
DeleteResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteResourcePolicyError {
pub fn new(kind: DeleteResourcePolicyErrorKind, 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: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
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,
DeleteResourcePolicyErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteResourcePolicyErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ConflictException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ValidationException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePeeringError {
pub kind: DeletePeeringErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePeeringError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePeeringErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePeeringErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePeeringError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePeeringErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeletePeeringErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePeeringError {
fn code(&self) -> Option<&str> {
DeletePeeringError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePeeringError {
pub fn new(kind: DeletePeeringErrorKind, 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: DeletePeeringErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePeeringErrorKind::Unhandled(crate::error::Unhandled::new(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, DeletePeeringErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeletePeeringErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePeeringErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePeeringErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeletePeeringErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeletePeeringErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeletePeeringError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePeeringErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeletePeeringErrorKind::ConflictException(_inner) => Some(_inner),
DeletePeeringErrorKind::InternalServerException(_inner) => Some(_inner),
DeletePeeringErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePeeringErrorKind::ThrottlingException(_inner) => Some(_inner),
DeletePeeringErrorKind::ValidationException(_inner) => Some(_inner),
DeletePeeringErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLinkError {
pub kind: DeleteLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLinkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLinkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLinkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGlobalNetworkError {
pub kind: DeleteGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteGlobalNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDeviceError {
pub kind: DeleteDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDeviceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDeviceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDeviceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCoreNetworkPolicyVersionError {
pub kind: DeleteCoreNetworkPolicyVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCoreNetworkPolicyVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCoreNetworkPolicyVersionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCoreNetworkPolicyVersionErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCoreNetworkPolicyVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteCoreNetworkPolicyVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteCoreNetworkPolicyVersionErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCoreNetworkPolicyVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteCoreNetworkPolicyVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteCoreNetworkPolicyVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCoreNetworkPolicyVersionError {
fn code(&self) -> Option<&str> {
DeleteCoreNetworkPolicyVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCoreNetworkPolicyVersionError {
pub fn new(
kind: DeleteCoreNetworkPolicyVersionErrorKind,
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: DeleteCoreNetworkPolicyVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCoreNetworkPolicyVersionErrorKind::Unhandled(crate::error::Unhandled::new(
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,
DeleteCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkPolicyVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkPolicyVersionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkPolicyVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkPolicyVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteCoreNetworkPolicyVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCoreNetworkPolicyVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteCoreNetworkPolicyVersionErrorKind::ConflictException(_inner) => Some(_inner),
DeleteCoreNetworkPolicyVersionErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteCoreNetworkPolicyVersionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteCoreNetworkPolicyVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteCoreNetworkPolicyVersionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteCoreNetworkPolicyVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCoreNetworkError {
pub kind: DeleteCoreNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCoreNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCoreNetworkErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCoreNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCoreNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteCoreNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCoreNetworkError {
fn code(&self) -> Option<&str> {
DeleteCoreNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCoreNetworkError {
pub fn new(kind: DeleteCoreNetworkErrorKind, 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: DeleteCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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,
DeleteCoreNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteCoreNetworkErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteCoreNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCoreNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::ConflictException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::ValidationException(_inner) => Some(_inner),
DeleteCoreNetworkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectPeerError {
pub kind: DeleteConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectPeerErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectPeerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectPeerError {
fn code(&self) -> Option<&str> {
DeleteConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteConnectPeerError {
pub fn new(kind: DeleteConnectPeerErrorKind, 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: DeleteConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(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,
DeleteConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteConnectPeerErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectPeerErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::ConflictException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::ValidationException(_inner) => Some(_inner),
DeleteConnectPeerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectionError {
pub kind: DeleteConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectionErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAttachmentError {
pub kind: DeleteAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAttachmentError {
fn code(&self) -> Option<&str> {
DeleteAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAttachmentError {
pub fn new(kind: DeleteAttachmentErrorKind, 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: DeleteAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
DeleteAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteAttachmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateVpcAttachmentError {
pub kind: CreateVpcAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateVpcAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateVpcAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateVpcAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateVpcAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateVpcAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateVpcAttachmentError {
fn code(&self) -> Option<&str> {
CreateVpcAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateVpcAttachmentError {
pub fn new(kind: CreateVpcAttachmentErrorKind, 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: CreateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateVpcAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
CreateVpcAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateVpcAttachmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateVpcAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateVpcAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateVpcAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateVpcAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateVpcAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateVpcAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateVpcAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayRouteTableAttachmentError {
pub kind: CreateTransitGatewayRouteTableAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for CreateTransitGatewayRouteTableAttachmentError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTransitGatewayRouteTableAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTransitGatewayRouteTableAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
CreateTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTransitGatewayRouteTableAttachmentError {
fn code(&self) -> Option<&str> {
CreateTransitGatewayRouteTableAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTransitGatewayRouteTableAttachmentError {
pub fn new(
kind: CreateTransitGatewayRouteTableAttachmentErrorKind,
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: CreateTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTransitGatewayRouteTableAttachmentErrorKind::Unhandled(
crate::error::Unhandled::new(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,
CreateTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayRouteTableAttachmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateTransitGatewayRouteTableAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTransitGatewayRouteTableAttachmentErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ConflictException(_inner) => {
Some(_inner)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
CreateTransitGatewayRouteTableAttachmentErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::ValidationException(_inner) => {
Some(_inner)
}
CreateTransitGatewayRouteTableAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTransitGatewayPeeringError {
pub kind: CreateTransitGatewayPeeringErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTransitGatewayPeeringError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTransitGatewayPeeringErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTransitGatewayPeeringError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTransitGatewayPeeringErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateTransitGatewayPeeringErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateTransitGatewayPeeringErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateTransitGatewayPeeringErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateTransitGatewayPeeringErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateTransitGatewayPeeringErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateTransitGatewayPeeringErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTransitGatewayPeeringError {
fn code(&self) -> Option<&str> {
CreateTransitGatewayPeeringError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateTransitGatewayPeeringError {
pub fn new(kind: CreateTransitGatewayPeeringErrorKind, 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: CreateTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTransitGatewayPeeringErrorKind::Unhandled(crate::error::Unhandled::new(
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,
CreateTransitGatewayPeeringErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayPeeringErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayPeeringErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayPeeringErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayPeeringErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateTransitGatewayPeeringErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateTransitGatewayPeeringError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTransitGatewayPeeringErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::ConflictException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::InternalServerException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::ValidationException(_inner) => Some(_inner),
CreateTransitGatewayPeeringErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSiteToSiteVpnAttachmentError {
pub kind: CreateSiteToSiteVpnAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSiteToSiteVpnAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSiteToSiteVpnAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSiteToSiteVpnAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateSiteToSiteVpnAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateSiteToSiteVpnAttachmentErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
CreateSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateSiteToSiteVpnAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateSiteToSiteVpnAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSiteToSiteVpnAttachmentError {
fn code(&self) -> Option<&str> {
CreateSiteToSiteVpnAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSiteToSiteVpnAttachmentError {
pub fn new(
kind: CreateSiteToSiteVpnAttachmentErrorKind,
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: CreateSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSiteToSiteVpnAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
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,
CreateSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteToSiteVpnAttachmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteToSiteVpnAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateSiteToSiteVpnAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateSiteToSiteVpnAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSiteToSiteVpnAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateSiteToSiteVpnAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateSiteToSiteVpnAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateSiteToSiteVpnAttachmentErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreateSiteToSiteVpnAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateSiteToSiteVpnAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateSiteToSiteVpnAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSiteError {
pub kind: CreateSiteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSiteError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSiteErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSiteErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLinkError {
pub kind: CreateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLinkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLinkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLinkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGlobalNetworkError {
pub kind: CreateGlobalNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateGlobalNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGlobalNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDeviceError {
pub kind: CreateDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDeviceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDeviceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDeviceErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCoreNetworkError {
pub kind: CreateCoreNetworkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCoreNetworkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCoreNetworkErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
CoreNetworkPolicyException(crate::error::CoreNetworkPolicyException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCoreNetworkError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCoreNetworkErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::CoreNetworkPolicyException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateCoreNetworkErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCoreNetworkError {
fn code(&self) -> Option<&str> {
CreateCoreNetworkError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCoreNetworkError {
pub fn new(kind: CreateCoreNetworkErrorKind, 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: CreateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCoreNetworkErrorKind::Unhandled(crate::error::Unhandled::new(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,
CreateCoreNetworkErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateCoreNetworkErrorKind::ConflictException(_))
}
pub fn is_core_network_policy_exception(&self) -> bool {
matches!(
&self.kind,
CreateCoreNetworkErrorKind::CoreNetworkPolicyException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateCoreNetworkErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCoreNetworkErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateCoreNetworkErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateCoreNetworkErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateCoreNetworkError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCoreNetworkErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::ConflictException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::CoreNetworkPolicyException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::InternalServerException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::ValidationException(_inner) => Some(_inner),
CreateCoreNetworkErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectPeerError {
pub kind: CreateConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectPeerErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectPeerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectPeerError {
fn code(&self) -> Option<&str> {
CreateConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectPeerError {
pub fn new(kind: CreateConnectPeerErrorKind, 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: CreateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(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,
CreateConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateConnectPeerErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectPeerErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::ConflictException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::InternalServerException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::ValidationException(_inner) => Some(_inner),
CreateConnectPeerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectionError {
pub kind: CreateConnectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConnectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConnectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectionErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateConnectAttachmentError {
pub kind: CreateConnectAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateConnectAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateConnectAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for CreateConnectAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateConnectAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateConnectAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateConnectAttachmentError {
fn code(&self) -> Option<&str> {
CreateConnectAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateConnectAttachmentError {
pub fn new(kind: CreateConnectAttachmentErrorKind, 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: CreateConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateConnectAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(
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,
CreateConnectAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectAttachmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateConnectAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateConnectAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateConnectAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateConnectAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateTransitGatewayConnectPeerError {
pub kind: AssociateTransitGatewayConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateTransitGatewayConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateTransitGatewayConnectPeerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateTransitGatewayConnectPeerErrorKind::Unhandled(
crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateLinkError {
pub kind: AssociateLinkErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateLinkError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateLinkErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateLinkErrorKind::Unhandled(crate::error::Unhandled::new(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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateCustomerGatewayError {
pub kind: AssociateCustomerGatewayErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateCustomerGatewayError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateCustomerGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[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(crate::error::Unhandled),
}
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(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateCustomerGatewayErrorKind::Unhandled(crate::error::Unhandled::new(
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateConnectPeerError {
pub kind: AssociateConnectPeerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateConnectPeerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateConnectPeerErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateConnectPeerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateConnectPeerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateConnectPeerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateConnectPeerError {
fn code(&self) -> Option<&str> {
AssociateConnectPeerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateConnectPeerError {
pub fn new(kind: AssociateConnectPeerErrorKind, 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: AssociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateConnectPeerErrorKind::Unhandled(crate::error::Unhandled::new(
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,
AssociateConnectPeerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateConnectPeerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateConnectPeerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateConnectPeerErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::ConflictException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::ValidationException(_inner) => Some(_inner),
AssociateConnectPeerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AcceptAttachmentError {
pub kind: AcceptAttachmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AcceptAttachmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AcceptAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AcceptAttachmentErrorKind {
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(crate::error::Unhandled),
}
impl std::fmt::Display for AcceptAttachmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AcceptAttachmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
AcceptAttachmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AcceptAttachmentError {
fn code(&self) -> Option<&str> {
AcceptAttachmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AcceptAttachmentError {
pub fn new(kind: AcceptAttachmentErrorKind, 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: AcceptAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AcceptAttachmentErrorKind::Unhandled(crate::error::Unhandled::new(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,
AcceptAttachmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, AcceptAttachmentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AcceptAttachmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AcceptAttachmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AcceptAttachmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AcceptAttachmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AcceptAttachmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AcceptAttachmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::ConflictException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::InternalServerException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::ThrottlingException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::ValidationException(_inner) => Some(_inner),
AcceptAttachmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}