#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct WithdrawByoipCidrError {
pub kind: WithdrawByoipCidrErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for WithdrawByoipCidrError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: WithdrawByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum WithdrawByoipCidrErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ByoipCidrNotFoundException(crate::error::ByoipCidrNotFoundException),
IncorrectCidrStateException(crate::error::IncorrectCidrStateException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for WithdrawByoipCidrError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
WithdrawByoipCidrErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
WithdrawByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => _inner.fmt(f),
WithdrawByoipCidrErrorKind::IncorrectCidrStateException(_inner) => _inner.fmt(f),
WithdrawByoipCidrErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
WithdrawByoipCidrErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
WithdrawByoipCidrErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for WithdrawByoipCidrError {
fn code(&self) -> Option<&str> {
WithdrawByoipCidrError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl WithdrawByoipCidrError {
pub fn new(kind: WithdrawByoipCidrErrorKind, 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: WithdrawByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: WithdrawByoipCidrErrorKind::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,
WithdrawByoipCidrErrorKind::AccessDeniedException(_)
)
}
pub fn is_byoip_cidr_not_found_exception(&self) -> bool {
matches!(
&self.kind,
WithdrawByoipCidrErrorKind::ByoipCidrNotFoundException(_)
)
}
pub fn is_incorrect_cidr_state_exception(&self) -> bool {
matches!(
&self.kind,
WithdrawByoipCidrErrorKind::IncorrectCidrStateException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
WithdrawByoipCidrErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
WithdrawByoipCidrErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for WithdrawByoipCidrError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
WithdrawByoipCidrErrorKind::AccessDeniedException(_inner) => Some(_inner),
WithdrawByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => Some(_inner),
WithdrawByoipCidrErrorKind::IncorrectCidrStateException(_inner) => Some(_inner),
WithdrawByoipCidrErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
WithdrawByoipCidrErrorKind::InvalidArgumentException(_inner) => Some(_inner),
WithdrawByoipCidrErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidArgumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidArgumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidArgumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidArgumentException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidArgumentException {}
pub mod invalid_argument_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::InvalidArgumentException {
crate::error::InvalidArgumentException {
message: self.message,
}
}
}
}
impl InvalidArgumentException {
pub fn builder() -> crate::error::invalid_argument_exception::Builder {
crate::error::invalid_argument_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServiceErrorException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServiceErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceErrorException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServiceErrorException {}
pub mod internal_service_error_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::InternalServiceErrorException {
crate::error::InternalServiceErrorException {
message: self.message,
}
}
}
}
impl InternalServiceErrorException {
pub fn builder() -> crate::error::internal_service_error_exception::Builder {
crate::error::internal_service_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct IncorrectCidrStateException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl IncorrectCidrStateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for IncorrectCidrStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "IncorrectCidrStateException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for IncorrectCidrStateException {}
pub mod incorrect_cidr_state_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::IncorrectCidrStateException {
crate::error::IncorrectCidrStateException {
message: self.message,
}
}
}
}
impl IncorrectCidrStateException {
pub fn builder() -> crate::error::incorrect_cidr_state_exception::Builder {
crate::error::incorrect_cidr_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ByoipCidrNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ByoipCidrNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ByoipCidrNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ByoipCidrNotFoundException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ByoipCidrNotFoundException {}
pub mod byoip_cidr_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>,
}
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::ByoipCidrNotFoundException {
crate::error::ByoipCidrNotFoundException {
message: self.message,
}
}
}
}
impl ByoipCidrNotFoundException {
pub fn builder() -> crate::error::byoip_cidr_not_found_exception::Builder {
crate::error::byoip_cidr_not_found_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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
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 UpdateListenerError {
pub kind: UpdateListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateListenerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateListenerErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidPortRangeException(crate::error::InvalidPortRangeException),
LimitExceededException(crate::error::LimitExceededException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateListenerErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UpdateListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateListenerErrorKind::InvalidPortRangeException(_inner) => _inner.fmt(f),
UpdateListenerErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateListenerErrorKind::ListenerNotFoundException(_inner) => _inner.fmt(f),
UpdateListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateListenerError {
fn code(&self) -> Option<&str> {
UpdateListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateListenerError {
pub fn new(kind: UpdateListenerErrorKind, 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: UpdateListenerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateListenerErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_port_range_exception(&self) -> bool {
matches!(
&self.kind,
UpdateListenerErrorKind::InvalidPortRangeException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateListenerErrorKind::LimitExceededException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for UpdateListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateListenerErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UpdateListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateListenerErrorKind::InvalidPortRangeException(_inner) => Some(_inner),
UpdateListenerErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateListenerErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
UpdateListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListenerNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ListenerNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ListenerNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ListenerNotFoundException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ListenerNotFoundException {}
pub mod listener_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>,
}
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::ListenerNotFoundException {
crate::error::ListenerNotFoundException {
message: self.message,
}
}
}
}
impl ListenerNotFoundException {
pub fn builder() -> crate::error::listener_not_found_exception::Builder {
crate::error::listener_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_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>,
}
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::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPortRangeException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPortRangeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPortRangeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPortRangeException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPortRangeException {}
pub mod invalid_port_range_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::InvalidPortRangeException {
crate::error::InvalidPortRangeException {
message: self.message,
}
}
}
}
impl InvalidPortRangeException {
pub fn builder() -> crate::error::invalid_port_range_exception::Builder {
crate::error::invalid_port_range_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEndpointGroupError {
pub kind: UpdateEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEndpointGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEndpointGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => _inner.fmt(f),
UpdateEndpointGroupErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UpdateEndpointGroupErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateEndpointGroupErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEndpointGroupError {
fn code(&self) -> Option<&str> {
UpdateEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEndpointGroupError {
pub fn new(kind: UpdateEndpointGroupErrorKind, 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: UpdateEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEndpointGroupErrorKind::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,
UpdateEndpointGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEndpointGroupErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEndpointGroupErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for UpdateEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEndpointGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => Some(_inner),
UpdateEndpointGroupErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UpdateEndpointGroupErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateEndpointGroupErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointGroupNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EndpointGroupNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EndpointGroupNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EndpointGroupNotFoundException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for EndpointGroupNotFoundException {}
pub mod endpoint_group_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>,
}
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::EndpointGroupNotFoundException {
crate::error::EndpointGroupNotFoundException {
message: self.message,
}
}
}
}
impl EndpointGroupNotFoundException {
pub fn builder() -> crate::error::endpoint_group_not_found_exception::Builder {
crate::error::endpoint_group_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCustomRoutingListenerError {
pub kind: UpdateCustomRoutingListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCustomRoutingListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCustomRoutingListenerErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidPortRangeException(crate::error::InvalidPortRangeException),
LimitExceededException(crate::error::LimitExceededException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCustomRoutingListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateCustomRoutingListenerErrorKind::InvalidPortRangeException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingListenerErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCustomRoutingListenerError {
fn code(&self) -> Option<&str> {
UpdateCustomRoutingListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCustomRoutingListenerError {
pub fn new(kind: UpdateCustomRoutingListenerErrorKind, 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: UpdateCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCustomRoutingListenerErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_port_range_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingListenerErrorKind::InvalidPortRangeException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingListenerErrorKind::LimitExceededException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for UpdateCustomRoutingListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateCustomRoutingListenerErrorKind::InvalidPortRangeException(_inner) => Some(_inner),
UpdateCustomRoutingListenerErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
UpdateCustomRoutingListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCustomRoutingAcceleratorAttributesError {
pub kind: UpdateCustomRoutingAcceleratorAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for UpdateCustomRoutingAcceleratorAttributesError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCustomRoutingAcceleratorAttributesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCustomRoutingAcceleratorAttributesErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AccessDeniedException(crate::error::AccessDeniedException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCustomRoutingAcceleratorAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(
_inner,
) => _inner.fmt(f),
UpdateCustomRoutingAcceleratorAttributesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
UpdateCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingAcceleratorAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCustomRoutingAcceleratorAttributesError {
fn code(&self) -> Option<&str> {
UpdateCustomRoutingAcceleratorAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCustomRoutingAcceleratorAttributesError {
pub fn new(
kind: UpdateCustomRoutingAcceleratorAttributesErrorKind,
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: UpdateCustomRoutingAcceleratorAttributesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCustomRoutingAcceleratorAttributesErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorAttributesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for UpdateCustomRoutingAcceleratorAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(
_inner,
) => Some(_inner),
UpdateCustomRoutingAcceleratorAttributesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
UpdateCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingAcceleratorAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AcceleratorNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AcceleratorNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AcceleratorNotFoundException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for AcceleratorNotFoundException {}
pub mod accelerator_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>,
}
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::AcceleratorNotFoundException {
crate::error::AcceleratorNotFoundException {
message: self.message,
}
}
}
}
impl AcceleratorNotFoundException {
pub fn builder() -> crate::error::accelerator_not_found_exception::Builder {
crate::error::accelerator_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCustomRoutingAcceleratorError {
pub kind: UpdateCustomRoutingAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCustomRoutingAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCustomRoutingAcceleratorErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCustomRoutingAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
UpdateCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCustomRoutingAcceleratorError {
fn code(&self) -> Option<&str> {
UpdateCustomRoutingAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCustomRoutingAcceleratorError {
pub fn new(
kind: UpdateCustomRoutingAcceleratorErrorKind,
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: UpdateCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCustomRoutingAcceleratorErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for UpdateCustomRoutingAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
UpdateCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAcceleratorAttributesError {
pub kind: UpdateAcceleratorAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAcceleratorAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAcceleratorAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAcceleratorAttributesErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AccessDeniedException(crate::error::AccessDeniedException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAcceleratorAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateAcceleratorAttributesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateAcceleratorAttributesErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
UpdateAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateAcceleratorAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAcceleratorAttributesError {
fn code(&self) -> Option<&str> {
UpdateAcceleratorAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAcceleratorAttributesError {
pub fn new(kind: UpdateAcceleratorAttributesErrorKind, 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: UpdateAcceleratorAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAcceleratorAttributesErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorAttributesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorAttributesErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorAttributesErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for UpdateAcceleratorAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
UpdateAcceleratorAttributesErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateAcceleratorAttributesErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
UpdateAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateAcceleratorAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAcceleratorError {
pub kind: UpdateAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAcceleratorErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AccessDeniedException(crate::error::AccessDeniedException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
UpdateAcceleratorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateAcceleratorErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UpdateAcceleratorErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAcceleratorError {
fn code(&self) -> Option<&str> {
UpdateAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAcceleratorError {
pub fn new(kind: UpdateAcceleratorErrorKind, 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: UpdateAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAcceleratorErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for UpdateAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
UpdateAcceleratorErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateAcceleratorErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UpdateAcceleratorErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateAcceleratorErrorKind::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 {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
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::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InvalidArgumentException(_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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
UntagResourceErrorKind::InvalidArgumentException(_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 {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
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::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InvalidArgumentException(_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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
TagResourceErrorKind::InvalidArgumentException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveEndpointsError {
pub kind: RemoveEndpointsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveEndpointsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveEndpointsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
TransactionInProgressException(crate::error::TransactionInProgressException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveEndpointsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveEndpointsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RemoveEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => _inner.fmt(f),
RemoveEndpointsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
RemoveEndpointsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
RemoveEndpointsErrorKind::TransactionInProgressException(_inner) => _inner.fmt(f),
RemoveEndpointsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveEndpointsError {
fn code(&self) -> Option<&str> {
RemoveEndpointsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveEndpointsError {
pub fn new(kind: RemoveEndpointsErrorKind, 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: RemoveEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveEndpointsErrorKind::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,
RemoveEndpointsErrorKind::AccessDeniedException(_)
)
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveEndpointsErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveEndpointsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
RemoveEndpointsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_transaction_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
RemoveEndpointsErrorKind::TransactionInProgressException(_)
)
}
}
impl std::error::Error for RemoveEndpointsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveEndpointsErrorKind::AccessDeniedException(_inner) => Some(_inner),
RemoveEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => Some(_inner),
RemoveEndpointsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
RemoveEndpointsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
RemoveEndpointsErrorKind::TransactionInProgressException(_inner) => Some(_inner),
RemoveEndpointsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TransactionInProgressException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TransactionInProgressException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TransactionInProgressException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TransactionInProgressException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for TransactionInProgressException {}
pub mod transaction_in_progress_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::TransactionInProgressException {
crate::error::TransactionInProgressException {
message: self.message,
}
}
}
}
impl TransactionInProgressException {
pub fn builder() -> crate::error::transaction_in_progress_exception::Builder {
crate::error::transaction_in_progress_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveCustomRoutingEndpointsError {
pub kind: RemoveCustomRoutingEndpointsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveCustomRoutingEndpointsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveCustomRoutingEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveCustomRoutingEndpointsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
EndpointNotFoundException(crate::error::EndpointNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveCustomRoutingEndpointsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveCustomRoutingEndpointsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RemoveCustomRoutingEndpointsErrorKind::ConflictException(_inner) => _inner.fmt(f),
RemoveCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
RemoveCustomRoutingEndpointsErrorKind::EndpointNotFoundException(_inner) => {
_inner.fmt(f)
}
RemoveCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
RemoveCustomRoutingEndpointsErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
RemoveCustomRoutingEndpointsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveCustomRoutingEndpointsError {
fn code(&self) -> Option<&str> {
RemoveCustomRoutingEndpointsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveCustomRoutingEndpointsError {
pub fn new(kind: RemoveCustomRoutingEndpointsErrorKind, 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: RemoveCustomRoutingEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveCustomRoutingEndpointsErrorKind::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,
RemoveCustomRoutingEndpointsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
RemoveCustomRoutingEndpointsErrorKind::ConflictException(_)
)
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_endpoint_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveCustomRoutingEndpointsErrorKind::EndpointNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
RemoveCustomRoutingEndpointsErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for RemoveCustomRoutingEndpointsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveCustomRoutingEndpointsErrorKind::AccessDeniedException(_inner) => Some(_inner),
RemoveCustomRoutingEndpointsErrorKind::ConflictException(_inner) => Some(_inner),
RemoveCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
RemoveCustomRoutingEndpointsErrorKind::EndpointNotFoundException(_inner) => {
Some(_inner)
}
RemoveCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
RemoveCustomRoutingEndpointsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
RemoveCustomRoutingEndpointsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EndpointNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EndpointNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EndpointNotFoundException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for EndpointNotFoundException {}
pub mod endpoint_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>,
}
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::EndpointNotFoundException {
crate::error::EndpointNotFoundException {
message: self.message,
}
}
}
}
impl EndpointNotFoundException {
pub fn builder() -> crate::error::endpoint_not_found_exception::Builder {
crate::error::endpoint_not_found_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>,
}
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_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
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>,
}
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::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ProvisionByoipCidrError {
pub kind: ProvisionByoipCidrErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ProvisionByoipCidrError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ProvisionByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ProvisionByoipCidrErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
IncorrectCidrStateException(crate::error::IncorrectCidrStateException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ProvisionByoipCidrError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ProvisionByoipCidrErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ProvisionByoipCidrErrorKind::IncorrectCidrStateException(_inner) => _inner.fmt(f),
ProvisionByoipCidrErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ProvisionByoipCidrErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ProvisionByoipCidrErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ProvisionByoipCidrErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ProvisionByoipCidrError {
fn code(&self) -> Option<&str> {
ProvisionByoipCidrError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ProvisionByoipCidrError {
pub fn new(kind: ProvisionByoipCidrErrorKind, 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: ProvisionByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ProvisionByoipCidrErrorKind::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,
ProvisionByoipCidrErrorKind::AccessDeniedException(_)
)
}
pub fn is_incorrect_cidr_state_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionByoipCidrErrorKind::IncorrectCidrStateException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionByoipCidrErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionByoipCidrErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionByoipCidrErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for ProvisionByoipCidrError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ProvisionByoipCidrErrorKind::AccessDeniedException(_inner) => Some(_inner),
ProvisionByoipCidrErrorKind::IncorrectCidrStateException(_inner) => Some(_inner),
ProvisionByoipCidrErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ProvisionByoipCidrErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ProvisionByoipCidrErrorKind::LimitExceededException(_inner) => Some(_inner),
ProvisionByoipCidrErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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 {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
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::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidArgumentException(_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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListListenersError {
pub kind: ListListenersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListListenersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListListenersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListListenersErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListListenersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListListenersErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
ListListenersErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListListenersErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListListenersErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListListenersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListListenersError {
fn code(&self) -> Option<&str> {
ListListenersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListListenersError {
pub fn new(kind: ListListenersErrorKind, 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: ListListenersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListListenersErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListListenersErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListListenersErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListListenersErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListListenersErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListListenersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListListenersErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
ListListenersErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListListenersErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListListenersErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListListenersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_token_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::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEndpointGroupsError {
pub kind: ListEndpointGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEndpointGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEndpointGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEndpointGroupsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEndpointGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEndpointGroupsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListEndpointGroupsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListEndpointGroupsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListEndpointGroupsErrorKind::ListenerNotFoundException(_inner) => _inner.fmt(f),
ListEndpointGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEndpointGroupsError {
fn code(&self) -> Option<&str> {
ListEndpointGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEndpointGroupsError {
pub fn new(kind: ListEndpointGroupsErrorKind, 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: ListEndpointGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEndpointGroupsErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListEndpointGroupsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListEndpointGroupsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListEndpointGroupsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEndpointGroupsErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for ListEndpointGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEndpointGroupsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListEndpointGroupsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListEndpointGroupsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListEndpointGroupsErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
ListEndpointGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomRoutingPortMappingsByDestinationError {
pub kind: ListCustomRoutingPortMappingsByDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListCustomRoutingPortMappingsByDestinationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomRoutingPortMappingsByDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomRoutingPortMappingsByDestinationErrorKind {
EndpointNotFoundException(crate::error::EndpointNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomRoutingPortMappingsByDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomRoutingPortMappingsByDestinationErrorKind::EndpointNotFoundException(
_inner,
) => _inner.fmt(f),
ListCustomRoutingPortMappingsByDestinationErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidArgumentException(
_inner,
) => _inner.fmt(f),
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidNextTokenException(
_inner,
) => _inner.fmt(f),
ListCustomRoutingPortMappingsByDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCustomRoutingPortMappingsByDestinationError {
fn code(&self) -> Option<&str> {
ListCustomRoutingPortMappingsByDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomRoutingPortMappingsByDestinationError {
pub fn new(
kind: ListCustomRoutingPortMappingsByDestinationErrorKind,
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: ListCustomRoutingPortMappingsByDestinationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomRoutingPortMappingsByDestinationErrorKind::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_endpoint_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsByDestinationErrorKind::EndpointNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsByDestinationErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListCustomRoutingPortMappingsByDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomRoutingPortMappingsByDestinationErrorKind::EndpointNotFoundException(
_inner,
) => Some(_inner),
ListCustomRoutingPortMappingsByDestinationErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidArgumentException(
_inner,
) => Some(_inner),
ListCustomRoutingPortMappingsByDestinationErrorKind::InvalidNextTokenException(
_inner,
) => Some(_inner),
ListCustomRoutingPortMappingsByDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomRoutingPortMappingsError {
pub kind: ListCustomRoutingPortMappingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCustomRoutingPortMappingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomRoutingPortMappingsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomRoutingPortMappingsErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomRoutingPortMappingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomRoutingPortMappingsErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingPortMappingsErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingPortMappingsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingPortMappingsErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingPortMappingsErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingPortMappingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCustomRoutingPortMappingsError {
fn code(&self) -> Option<&str> {
ListCustomRoutingPortMappingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomRoutingPortMappingsError {
pub fn new(
kind: ListCustomRoutingPortMappingsErrorKind,
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: ListCustomRoutingPortMappingsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomRoutingPortMappingsErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingPortMappingsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListCustomRoutingPortMappingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomRoutingPortMappingsErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
ListCustomRoutingPortMappingsErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
ListCustomRoutingPortMappingsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
ListCustomRoutingPortMappingsErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
ListCustomRoutingPortMappingsErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
ListCustomRoutingPortMappingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomRoutingListenersError {
pub kind: ListCustomRoutingListenersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCustomRoutingListenersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomRoutingListenersErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomRoutingListenersErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomRoutingListenersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomRoutingListenersErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingListenersErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingListenersErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListCustomRoutingListenersErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListCustomRoutingListenersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCustomRoutingListenersError {
fn code(&self) -> Option<&str> {
ListCustomRoutingListenersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomRoutingListenersError {
pub fn new(kind: ListCustomRoutingListenersErrorKind, 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: ListCustomRoutingListenersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomRoutingListenersErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingListenersErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingListenersErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingListenersErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingListenersErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListCustomRoutingListenersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomRoutingListenersErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
ListCustomRoutingListenersErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
ListCustomRoutingListenersErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListCustomRoutingListenersErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListCustomRoutingListenersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomRoutingEndpointGroupsError {
pub kind: ListCustomRoutingEndpointGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCustomRoutingEndpointGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomRoutingEndpointGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomRoutingEndpointGroupsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomRoutingEndpointGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomRoutingEndpointGroupsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingEndpointGroupsErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingEndpointGroupsErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingEndpointGroupsErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingEndpointGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCustomRoutingEndpointGroupsError {
fn code(&self) -> Option<&str> {
ListCustomRoutingEndpointGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomRoutingEndpointGroupsError {
pub fn new(
kind: ListCustomRoutingEndpointGroupsErrorKind,
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: ListCustomRoutingEndpointGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomRoutingEndpointGroupsErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingEndpointGroupsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingEndpointGroupsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingEndpointGroupsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingEndpointGroupsErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for ListCustomRoutingEndpointGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomRoutingEndpointGroupsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
ListCustomRoutingEndpointGroupsErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
ListCustomRoutingEndpointGroupsErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
ListCustomRoutingEndpointGroupsErrorKind::ListenerNotFoundException(_inner) => {
Some(_inner)
}
ListCustomRoutingEndpointGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomRoutingAcceleratorsError {
pub kind: ListCustomRoutingAcceleratorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCustomRoutingAcceleratorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomRoutingAcceleratorsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomRoutingAcceleratorsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomRoutingAcceleratorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomRoutingAcceleratorsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingAcceleratorsErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingAcceleratorsErrorKind::InvalidNextTokenException(_inner) => {
_inner.fmt(f)
}
ListCustomRoutingAcceleratorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCustomRoutingAcceleratorsError {
fn code(&self) -> Option<&str> {
ListCustomRoutingAcceleratorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomRoutingAcceleratorsError {
pub fn new(
kind: ListCustomRoutingAcceleratorsErrorKind,
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: ListCustomRoutingAcceleratorsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomRoutingAcceleratorsErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingAcceleratorsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingAcceleratorsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomRoutingAcceleratorsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListCustomRoutingAcceleratorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomRoutingAcceleratorsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
ListCustomRoutingAcceleratorsErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
ListCustomRoutingAcceleratorsErrorKind::InvalidNextTokenException(_inner) => {
Some(_inner)
}
ListCustomRoutingAcceleratorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListByoipCidrsError {
pub kind: ListByoipCidrsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListByoipCidrsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListByoipCidrsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListByoipCidrsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListByoipCidrsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListByoipCidrsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListByoipCidrsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListByoipCidrsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListByoipCidrsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListByoipCidrsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListByoipCidrsError {
fn code(&self) -> Option<&str> {
ListByoipCidrsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListByoipCidrsError {
pub fn new(kind: ListByoipCidrsErrorKind, 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: ListByoipCidrsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListByoipCidrsErrorKind::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,
ListByoipCidrsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListByoipCidrsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListByoipCidrsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListByoipCidrsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListByoipCidrsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListByoipCidrsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListByoipCidrsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListByoipCidrsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListByoipCidrsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListByoipCidrsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAcceleratorsError {
pub kind: ListAcceleratorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAcceleratorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAcceleratorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAcceleratorsErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAcceleratorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAcceleratorsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
ListAcceleratorsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListAcceleratorsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
ListAcceleratorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAcceleratorsError {
fn code(&self) -> Option<&str> {
ListAcceleratorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAcceleratorsError {
pub fn new(kind: ListAcceleratorsErrorKind, 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: ListAcceleratorsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAcceleratorsErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
ListAcceleratorsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListAcceleratorsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
ListAcceleratorsErrorKind::InvalidNextTokenException(_)
)
}
}
impl std::error::Error for ListAcceleratorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAcceleratorsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
ListAcceleratorsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListAcceleratorsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
ListAcceleratorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeListenerError {
pub kind: DescribeListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeListenerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeListenerErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeListenerErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DescribeListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DescribeListenerErrorKind::ListenerNotFoundException(_inner) => _inner.fmt(f),
DescribeListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeListenerError {
fn code(&self) -> Option<&str> {
DescribeListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeListenerError {
pub fn new(kind: DescribeListenerErrorKind, 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: DescribeListenerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeListenerErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for DescribeListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeListenerErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DescribeListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DescribeListenerErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
DescribeListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEndpointGroupError {
pub kind: DescribeEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEndpointGroupErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => _inner.fmt(f),
DescribeEndpointGroupErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DescribeEndpointGroupErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DescribeEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEndpointGroupError {
fn code(&self) -> Option<&str> {
DescribeEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEndpointGroupError {
pub fn new(kind: DescribeEndpointGroupErrorKind, 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: DescribeEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEndpointGroupErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEndpointGroupErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => Some(_inner),
DescribeEndpointGroupErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DescribeEndpointGroupErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DescribeEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCustomRoutingListenerError {
pub kind: DescribeCustomRoutingListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCustomRoutingListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCustomRoutingListenerErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCustomRoutingListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCustomRoutingListenerError {
fn code(&self) -> Option<&str> {
DescribeCustomRoutingListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCustomRoutingListenerError {
pub fn new(
kind: DescribeCustomRoutingListenerErrorKind,
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: DescribeCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCustomRoutingListenerErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for DescribeCustomRoutingListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCustomRoutingEndpointGroupError {
pub kind: DescribeCustomRoutingEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCustomRoutingEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCustomRoutingEndpointGroupErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCustomRoutingEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCustomRoutingEndpointGroupError {
fn code(&self) -> Option<&str> {
DescribeCustomRoutingEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCustomRoutingEndpointGroupError {
pub fn new(
kind: DescribeCustomRoutingEndpointGroupErrorKind,
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: DescribeCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCustomRoutingEndpointGroupErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeCustomRoutingEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCustomRoutingAcceleratorAttributesError {
pub kind: DescribeCustomRoutingAcceleratorAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeCustomRoutingAcceleratorAttributesError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCustomRoutingAcceleratorAttributesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCustomRoutingAcceleratorAttributesErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCustomRoutingAcceleratorAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(
_inner,
) => _inner.fmt(f),
DescribeCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(
_inner,
) => _inner.fmt(f),
DescribeCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(
_inner,
) => _inner.fmt(f),
DescribeCustomRoutingAcceleratorAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCustomRoutingAcceleratorAttributesError {
fn code(&self) -> Option<&str> {
DescribeCustomRoutingAcceleratorAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCustomRoutingAcceleratorAttributesError {
pub fn new(
kind: DescribeCustomRoutingAcceleratorAttributesErrorKind,
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: DescribeCustomRoutingAcceleratorAttributesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCustomRoutingAcceleratorAttributesErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeCustomRoutingAcceleratorAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCustomRoutingAcceleratorAttributesErrorKind::AcceleratorNotFoundException(
_inner,
) => Some(_inner),
DescribeCustomRoutingAcceleratorAttributesErrorKind::InternalServiceErrorException(
_inner,
) => Some(_inner),
DescribeCustomRoutingAcceleratorAttributesErrorKind::InvalidArgumentException(
_inner,
) => Some(_inner),
DescribeCustomRoutingAcceleratorAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCustomRoutingAcceleratorError {
pub kind: DescribeCustomRoutingAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCustomRoutingAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCustomRoutingAcceleratorErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCustomRoutingAcceleratorErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCustomRoutingAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DescribeCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCustomRoutingAcceleratorError {
fn code(&self) -> Option<&str> {
DescribeCustomRoutingAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCustomRoutingAcceleratorError {
pub fn new(
kind: DescribeCustomRoutingAcceleratorErrorKind,
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: DescribeCustomRoutingAcceleratorErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCustomRoutingAcceleratorErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeCustomRoutingAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DescribeCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAcceleratorAttributesError {
pub kind: DescribeAcceleratorAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAcceleratorAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAcceleratorAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAcceleratorAttributesErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAcceleratorAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeAcceleratorAttributesErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DescribeAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DescribeAcceleratorAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAcceleratorAttributesError {
fn code(&self) -> Option<&str> {
DescribeAcceleratorAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAcceleratorAttributesError {
pub fn new(
kind: DescribeAcceleratorAttributesErrorKind,
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: DescribeAcceleratorAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAcceleratorAttributesErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorAttributesErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorAttributesErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeAcceleratorAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAcceleratorAttributesErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
DescribeAcceleratorAttributesErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DescribeAcceleratorAttributesErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DescribeAcceleratorAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAcceleratorError {
pub kind: DescribeAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAcceleratorErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
DescribeAcceleratorErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DescribeAcceleratorErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DescribeAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAcceleratorError {
fn code(&self) -> Option<&str> {
DescribeAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAcceleratorError {
pub fn new(kind: DescribeAcceleratorErrorKind, 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: DescribeAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAcceleratorErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DescribeAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
DescribeAcceleratorErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DescribeAcceleratorErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DescribeAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeprovisionByoipCidrError {
pub kind: DeprovisionByoipCidrErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeprovisionByoipCidrError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeprovisionByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeprovisionByoipCidrErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ByoipCidrNotFoundException(crate::error::ByoipCidrNotFoundException),
IncorrectCidrStateException(crate::error::IncorrectCidrStateException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeprovisionByoipCidrError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeprovisionByoipCidrErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeprovisionByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => _inner.fmt(f),
DeprovisionByoipCidrErrorKind::IncorrectCidrStateException(_inner) => _inner.fmt(f),
DeprovisionByoipCidrErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeprovisionByoipCidrErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DeprovisionByoipCidrErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeprovisionByoipCidrError {
fn code(&self) -> Option<&str> {
DeprovisionByoipCidrError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeprovisionByoipCidrError {
pub fn new(kind: DeprovisionByoipCidrErrorKind, 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: DeprovisionByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeprovisionByoipCidrErrorKind::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,
DeprovisionByoipCidrErrorKind::AccessDeniedException(_)
)
}
pub fn is_byoip_cidr_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeprovisionByoipCidrErrorKind::ByoipCidrNotFoundException(_)
)
}
pub fn is_incorrect_cidr_state_exception(&self) -> bool {
matches!(
&self.kind,
DeprovisionByoipCidrErrorKind::IncorrectCidrStateException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeprovisionByoipCidrErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeprovisionByoipCidrErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DeprovisionByoipCidrError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeprovisionByoipCidrErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeprovisionByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => Some(_inner),
DeprovisionByoipCidrErrorKind::IncorrectCidrStateException(_inner) => Some(_inner),
DeprovisionByoipCidrErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeprovisionByoipCidrErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DeprovisionByoipCidrErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DenyCustomRoutingTrafficError {
pub kind: DenyCustomRoutingTrafficErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DenyCustomRoutingTrafficError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DenyCustomRoutingTrafficErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DenyCustomRoutingTrafficErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DenyCustomRoutingTrafficError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DenyCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
DenyCustomRoutingTrafficErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DenyCustomRoutingTrafficErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DenyCustomRoutingTrafficErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DenyCustomRoutingTrafficError {
fn code(&self) -> Option<&str> {
DenyCustomRoutingTrafficError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DenyCustomRoutingTrafficError {
pub fn new(kind: DenyCustomRoutingTrafficErrorKind, 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: DenyCustomRoutingTrafficErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DenyCustomRoutingTrafficErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DenyCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DenyCustomRoutingTrafficErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DenyCustomRoutingTrafficErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DenyCustomRoutingTrafficError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DenyCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
DenyCustomRoutingTrafficErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DenyCustomRoutingTrafficErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DenyCustomRoutingTrafficErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteListenerError {
pub kind: DeleteListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteListenerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteListenerErrorKind {
AssociatedEndpointGroupFoundException(crate::error::AssociatedEndpointGroupFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteListenerErrorKind::AssociatedEndpointGroupFoundException(_inner) => _inner.fmt(f),
DeleteListenerErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DeleteListenerErrorKind::ListenerNotFoundException(_inner) => _inner.fmt(f),
DeleteListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteListenerError {
fn code(&self) -> Option<&str> {
DeleteListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteListenerError {
pub fn new(kind: DeleteListenerErrorKind, 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: DeleteListenerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteListenerErrorKind::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_associated_endpoint_group_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteListenerErrorKind::AssociatedEndpointGroupFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for DeleteListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteListenerErrorKind::AssociatedEndpointGroupFoundException(_inner) => Some(_inner),
DeleteListenerErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DeleteListenerErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
DeleteListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociatedEndpointGroupFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AssociatedEndpointGroupFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AssociatedEndpointGroupFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AssociatedEndpointGroupFoundException")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for AssociatedEndpointGroupFoundException {}
pub mod associated_endpoint_group_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>,
}
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::AssociatedEndpointGroupFoundException {
crate::error::AssociatedEndpointGroupFoundException {
message: self.message,
}
}
}
}
impl AssociatedEndpointGroupFoundException {
pub fn builder() -> crate::error::associated_endpoint_group_found_exception::Builder {
crate::error::associated_endpoint_group_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteEndpointGroupError {
pub kind: DeleteEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteEndpointGroupErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => _inner.fmt(f),
DeleteEndpointGroupErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteEndpointGroupErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DeleteEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteEndpointGroupError {
fn code(&self) -> Option<&str> {
DeleteEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteEndpointGroupError {
pub fn new(kind: DeleteEndpointGroupErrorKind, 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: DeleteEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteEndpointGroupErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEndpointGroupErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DeleteEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => Some(_inner),
DeleteEndpointGroupErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteEndpointGroupErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DeleteEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCustomRoutingListenerError {
pub kind: DeleteCustomRoutingListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCustomRoutingListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCustomRoutingListenerErrorKind {
AssociatedEndpointGroupFoundException(crate::error::AssociatedEndpointGroupFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCustomRoutingListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCustomRoutingListenerErrorKind::AssociatedEndpointGroupFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DeleteCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCustomRoutingListenerError {
fn code(&self) -> Option<&str> {
DeleteCustomRoutingListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCustomRoutingListenerError {
pub fn new(kind: DeleteCustomRoutingListenerErrorKind, 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: DeleteCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCustomRoutingListenerErrorKind::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_associated_endpoint_group_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingListenerErrorKind::AssociatedEndpointGroupFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingListenerErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for DeleteCustomRoutingListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCustomRoutingListenerErrorKind::AssociatedEndpointGroupFoundException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DeleteCustomRoutingListenerErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
DeleteCustomRoutingListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCustomRoutingEndpointGroupError {
pub kind: DeleteCustomRoutingEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCustomRoutingEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCustomRoutingEndpointGroupErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCustomRoutingEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCustomRoutingEndpointGroupError {
fn code(&self) -> Option<&str> {
DeleteCustomRoutingEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCustomRoutingEndpointGroupError {
pub fn new(
kind: DeleteCustomRoutingEndpointGroupErrorKind,
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: DeleteCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCustomRoutingEndpointGroupErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DeleteCustomRoutingEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCustomRoutingEndpointGroupErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCustomRoutingAcceleratorError {
pub kind: DeleteCustomRoutingAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCustomRoutingAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCustomRoutingAcceleratorErrorKind {
AcceleratorNotDisabledException(crate::error::AcceleratorNotDisabledException),
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AssociatedListenerFoundException(crate::error::AssociatedListenerFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCustomRoutingAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotDisabledException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingAcceleratorErrorKind::AssociatedListenerFoundException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
DeleteCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCustomRoutingAcceleratorError {
fn code(&self) -> Option<&str> {
DeleteCustomRoutingAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCustomRoutingAcceleratorError {
pub fn new(
kind: DeleteCustomRoutingAcceleratorErrorKind,
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: DeleteCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCustomRoutingAcceleratorErrorKind::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_accelerator_not_disabled_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotDisabledException(_)
)
}
pub fn is_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_associated_listener_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingAcceleratorErrorKind::AssociatedListenerFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DeleteCustomRoutingAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotDisabledException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingAcceleratorErrorKind::AssociatedListenerFoundException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
DeleteCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AssociatedListenerFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AssociatedListenerFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AssociatedListenerFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AssociatedListenerFoundException")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for AssociatedListenerFoundException {}
pub mod associated_listener_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>,
}
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::AssociatedListenerFoundException {
crate::error::AssociatedListenerFoundException {
message: self.message,
}
}
}
}
impl AssociatedListenerFoundException {
pub fn builder() -> crate::error::associated_listener_found_exception::Builder {
crate::error::associated_listener_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AcceleratorNotDisabledException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AcceleratorNotDisabledException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AcceleratorNotDisabledException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AcceleratorNotDisabledException")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for AcceleratorNotDisabledException {}
pub mod accelerator_not_disabled_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::AcceleratorNotDisabledException {
crate::error::AcceleratorNotDisabledException {
message: self.message,
}
}
}
}
impl AcceleratorNotDisabledException {
pub fn builder() -> crate::error::accelerator_not_disabled_exception::Builder {
crate::error::accelerator_not_disabled_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAcceleratorError {
pub kind: DeleteAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAcceleratorErrorKind {
AcceleratorNotDisabledException(crate::error::AcceleratorNotDisabledException),
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AssociatedListenerFoundException(crate::error::AssociatedListenerFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAcceleratorErrorKind::AcceleratorNotDisabledException(_inner) => _inner.fmt(f),
DeleteAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
DeleteAcceleratorErrorKind::AssociatedListenerFoundException(_inner) => _inner.fmt(f),
DeleteAcceleratorErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
DeleteAcceleratorErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
DeleteAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAcceleratorError {
fn code(&self) -> Option<&str> {
DeleteAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAcceleratorError {
pub fn new(kind: DeleteAcceleratorErrorKind, 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: DeleteAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAcceleratorErrorKind::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_accelerator_not_disabled_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAcceleratorErrorKind::AcceleratorNotDisabledException(_)
)
}
pub fn is_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAcceleratorErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_associated_listener_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAcceleratorErrorKind::AssociatedListenerFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAcceleratorErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for DeleteAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAcceleratorErrorKind::AcceleratorNotDisabledException(_inner) => Some(_inner),
DeleteAcceleratorErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
DeleteAcceleratorErrorKind::AssociatedListenerFoundException(_inner) => Some(_inner),
DeleteAcceleratorErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
DeleteAcceleratorErrorKind::InvalidArgumentException(_inner) => Some(_inner),
DeleteAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateListenerError {
pub kind: CreateListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateListenerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateListenerErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidPortRangeException(crate::error::InvalidPortRangeException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateListenerErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
CreateListenerErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
CreateListenerErrorKind::InvalidPortRangeException(_inner) => _inner.fmt(f),
CreateListenerErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateListenerError {
fn code(&self) -> Option<&str> {
CreateListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateListenerError {
pub fn new(kind: CreateListenerErrorKind, 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: CreateListenerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateListenerErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateListenerErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_port_range_exception(&self) -> bool {
matches!(
&self.kind,
CreateListenerErrorKind::InvalidPortRangeException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateListenerErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateListenerErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
CreateListenerErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
CreateListenerErrorKind::InvalidPortRangeException(_inner) => Some(_inner),
CreateListenerErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateEndpointGroupError {
pub kind: CreateEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateEndpointGroupErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AccessDeniedException(crate::error::AccessDeniedException),
EndpointGroupAlreadyExistsException(crate::error::EndpointGroupAlreadyExistsException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateEndpointGroupErrorKind::AcceleratorNotFoundException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
CreateEndpointGroupErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::ListenerNotFoundException(_inner) => _inner.fmt(f),
CreateEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateEndpointGroupError {
fn code(&self) -> Option<&str> {
CreateEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateEndpointGroupError {
pub fn new(kind: CreateEndpointGroupErrorKind, 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: CreateEndpointGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateEndpointGroupErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_endpoint_group_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::LimitExceededException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateEndpointGroupErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for CreateEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateEndpointGroupErrorKind::AcceleratorNotFoundException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(_inner) => {
Some(_inner)
}
CreateEndpointGroupErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::InvalidArgumentException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::ListenerNotFoundException(_inner) => Some(_inner),
CreateEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointGroupAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EndpointGroupAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EndpointGroupAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EndpointGroupAlreadyExistsException")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for EndpointGroupAlreadyExistsException {}
pub mod endpoint_group_already_exists_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::EndpointGroupAlreadyExistsException {
crate::error::EndpointGroupAlreadyExistsException {
message: self.message,
}
}
}
}
impl EndpointGroupAlreadyExistsException {
pub fn builder() -> crate::error::endpoint_group_already_exists_exception::Builder {
crate::error::endpoint_group_already_exists_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCustomRoutingListenerError {
pub kind: CreateCustomRoutingListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCustomRoutingListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCustomRoutingListenerErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidPortRangeException(crate::error::InvalidPortRangeException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCustomRoutingListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCustomRoutingListenerErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
CreateCustomRoutingListenerErrorKind::InvalidPortRangeException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingListenerErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateCustomRoutingListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCustomRoutingListenerError {
fn code(&self) -> Option<&str> {
CreateCustomRoutingListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCustomRoutingListenerError {
pub fn new(kind: CreateCustomRoutingListenerErrorKind, 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: CreateCustomRoutingListenerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCustomRoutingListenerErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingListenerErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingListenerErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingListenerErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_port_range_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingListenerErrorKind::InvalidPortRangeException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingListenerErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateCustomRoutingListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCustomRoutingListenerErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
CreateCustomRoutingListenerErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
CreateCustomRoutingListenerErrorKind::InvalidArgumentException(_inner) => Some(_inner),
CreateCustomRoutingListenerErrorKind::InvalidPortRangeException(_inner) => Some(_inner),
CreateCustomRoutingListenerErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateCustomRoutingListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCustomRoutingEndpointGroupError {
pub kind: CreateCustomRoutingEndpointGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCustomRoutingEndpointGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCustomRoutingEndpointGroupErrorKind {
AcceleratorNotFoundException(crate::error::AcceleratorNotFoundException),
AccessDeniedException(crate::error::AccessDeniedException),
EndpointGroupAlreadyExistsException(crate::error::EndpointGroupAlreadyExistsException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidPortRangeException(crate::error::InvalidPortRangeException),
LimitExceededException(crate::error::LimitExceededException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCustomRoutingEndpointGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCustomRoutingEndpointGroupErrorKind::AcceleratorNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(
_inner,
) => _inner.fmt(f),
CreateCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::InvalidPortRangeException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCustomRoutingEndpointGroupError {
fn code(&self) -> Option<&str> {
CreateCustomRoutingEndpointGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCustomRoutingEndpointGroupError {
pub fn new(
kind: CreateCustomRoutingEndpointGroupErrorKind,
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: CreateCustomRoutingEndpointGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCustomRoutingEndpointGroupErrorKind::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_accelerator_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::AcceleratorNotFoundException(_)
)
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_endpoint_group_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_port_range_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::InvalidPortRangeException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::LimitExceededException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingEndpointGroupErrorKind::ListenerNotFoundException(_)
)
}
}
impl std::error::Error for CreateCustomRoutingEndpointGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCustomRoutingEndpointGroupErrorKind::AcceleratorNotFoundException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::EndpointGroupAlreadyExistsException(
_inner,
) => Some(_inner),
CreateCustomRoutingEndpointGroupErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::InvalidPortRangeException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::ListenerNotFoundException(_inner) => {
Some(_inner)
}
CreateCustomRoutingEndpointGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCustomRoutingAcceleratorError {
pub kind: CreateCustomRoutingAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCustomRoutingAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCustomRoutingAcceleratorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCustomRoutingAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCustomRoutingAcceleratorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingAcceleratorErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
CreateCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCustomRoutingAcceleratorError {
fn code(&self) -> Option<&str> {
CreateCustomRoutingAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCustomRoutingAcceleratorError {
pub fn new(
kind: CreateCustomRoutingAcceleratorErrorKind,
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: CreateCustomRoutingAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCustomRoutingAcceleratorErrorKind::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,
CreateCustomRoutingAcceleratorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCustomRoutingAcceleratorErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateCustomRoutingAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCustomRoutingAcceleratorErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateCustomRoutingAcceleratorErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
CreateCustomRoutingAcceleratorErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
CreateCustomRoutingAcceleratorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateCustomRoutingAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAcceleratorError {
pub kind: CreateAcceleratorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAcceleratorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAcceleratorErrorKind {
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAcceleratorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAcceleratorErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
CreateAcceleratorErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
CreateAcceleratorErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateAcceleratorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAcceleratorError {
fn code(&self) -> Option<&str> {
CreateAcceleratorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAcceleratorError {
pub fn new(kind: CreateAcceleratorErrorKind, 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: CreateAcceleratorErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAcceleratorErrorKind::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_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateAcceleratorErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateAcceleratorErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAcceleratorErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for CreateAcceleratorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAcceleratorErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
CreateAcceleratorErrorKind::InvalidArgumentException(_inner) => Some(_inner),
CreateAcceleratorErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateAcceleratorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AllowCustomRoutingTrafficError {
pub kind: AllowCustomRoutingTrafficErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AllowCustomRoutingTrafficError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AllowCustomRoutingTrafficErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AllowCustomRoutingTrafficErrorKind {
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AllowCustomRoutingTrafficError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AllowCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
AllowCustomRoutingTrafficErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
AllowCustomRoutingTrafficErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
AllowCustomRoutingTrafficErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AllowCustomRoutingTrafficError {
fn code(&self) -> Option<&str> {
AllowCustomRoutingTrafficError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AllowCustomRoutingTrafficError {
pub fn new(kind: AllowCustomRoutingTrafficErrorKind, 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: AllowCustomRoutingTrafficErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AllowCustomRoutingTrafficErrorKind::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_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AllowCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
AllowCustomRoutingTrafficErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
AllowCustomRoutingTrafficErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for AllowCustomRoutingTrafficError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AllowCustomRoutingTrafficErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
AllowCustomRoutingTrafficErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
AllowCustomRoutingTrafficErrorKind::InvalidArgumentException(_inner) => Some(_inner),
AllowCustomRoutingTrafficErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AdvertiseByoipCidrError {
pub kind: AdvertiseByoipCidrErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AdvertiseByoipCidrError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AdvertiseByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AdvertiseByoipCidrErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ByoipCidrNotFoundException(crate::error::ByoipCidrNotFoundException),
IncorrectCidrStateException(crate::error::IncorrectCidrStateException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AdvertiseByoipCidrError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AdvertiseByoipCidrErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AdvertiseByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => _inner.fmt(f),
AdvertiseByoipCidrErrorKind::IncorrectCidrStateException(_inner) => _inner.fmt(f),
AdvertiseByoipCidrErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
AdvertiseByoipCidrErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
AdvertiseByoipCidrErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AdvertiseByoipCidrError {
fn code(&self) -> Option<&str> {
AdvertiseByoipCidrError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AdvertiseByoipCidrError {
pub fn new(kind: AdvertiseByoipCidrErrorKind, 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: AdvertiseByoipCidrErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AdvertiseByoipCidrErrorKind::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,
AdvertiseByoipCidrErrorKind::AccessDeniedException(_)
)
}
pub fn is_byoip_cidr_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AdvertiseByoipCidrErrorKind::ByoipCidrNotFoundException(_)
)
}
pub fn is_incorrect_cidr_state_exception(&self) -> bool {
matches!(
&self.kind,
AdvertiseByoipCidrErrorKind::IncorrectCidrStateException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
AdvertiseByoipCidrErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
AdvertiseByoipCidrErrorKind::InvalidArgumentException(_)
)
}
}
impl std::error::Error for AdvertiseByoipCidrError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AdvertiseByoipCidrErrorKind::AccessDeniedException(_inner) => Some(_inner),
AdvertiseByoipCidrErrorKind::ByoipCidrNotFoundException(_inner) => Some(_inner),
AdvertiseByoipCidrErrorKind::IncorrectCidrStateException(_inner) => Some(_inner),
AdvertiseByoipCidrErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
AdvertiseByoipCidrErrorKind::InvalidArgumentException(_inner) => Some(_inner),
AdvertiseByoipCidrErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddEndpointsError {
pub kind: AddEndpointsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddEndpointsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddEndpointsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
TransactionInProgressException(crate::error::TransactionInProgressException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddEndpointsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddEndpointsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::InternalServiceErrorException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::TransactionInProgressException(_inner) => _inner.fmt(f),
AddEndpointsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddEndpointsError {
fn code(&self) -> Option<&str> {
AddEndpointsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddEndpointsError {
pub fn new(kind: AddEndpointsErrorKind, 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: AddEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddEndpointsErrorKind::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, AddEndpointsErrorKind::AccessDeniedException(_))
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AddEndpointsErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
AddEndpointsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
AddEndpointsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, AddEndpointsErrorKind::LimitExceededException(_))
}
pub fn is_transaction_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
AddEndpointsErrorKind::TransactionInProgressException(_)
)
}
}
impl std::error::Error for AddEndpointsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddEndpointsErrorKind::AccessDeniedException(_inner) => Some(_inner),
AddEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => Some(_inner),
AddEndpointsErrorKind::InternalServiceErrorException(_inner) => Some(_inner),
AddEndpointsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
AddEndpointsErrorKind::LimitExceededException(_inner) => Some(_inner),
AddEndpointsErrorKind::TransactionInProgressException(_inner) => Some(_inner),
AddEndpointsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddCustomRoutingEndpointsError {
pub kind: AddCustomRoutingEndpointsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddCustomRoutingEndpointsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddCustomRoutingEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddCustomRoutingEndpointsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
EndpointAlreadyExistsException(crate::error::EndpointAlreadyExistsException),
EndpointGroupNotFoundException(crate::error::EndpointGroupNotFoundException),
InternalServiceErrorException(crate::error::InternalServiceErrorException),
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddCustomRoutingEndpointsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddCustomRoutingEndpointsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AddCustomRoutingEndpointsErrorKind::ConflictException(_inner) => _inner.fmt(f),
AddCustomRoutingEndpointsErrorKind::EndpointAlreadyExistsException(_inner) => {
_inner.fmt(f)
}
AddCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => {
_inner.fmt(f)
}
AddCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_inner) => {
_inner.fmt(f)
}
AddCustomRoutingEndpointsErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
AddCustomRoutingEndpointsErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
AddCustomRoutingEndpointsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddCustomRoutingEndpointsError {
fn code(&self) -> Option<&str> {
AddCustomRoutingEndpointsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddCustomRoutingEndpointsError {
pub fn new(kind: AddCustomRoutingEndpointsErrorKind, 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: AddCustomRoutingEndpointsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddCustomRoutingEndpointsErrorKind::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,
AddCustomRoutingEndpointsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::ConflictException(_)
)
}
pub fn is_endpoint_already_exists_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::EndpointAlreadyExistsException(_)
)
}
pub fn is_endpoint_group_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_)
)
}
pub fn is_internal_service_error_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AddCustomRoutingEndpointsErrorKind::LimitExceededException(_)
)
}
}
impl std::error::Error for AddCustomRoutingEndpointsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddCustomRoutingEndpointsErrorKind::AccessDeniedException(_inner) => Some(_inner),
AddCustomRoutingEndpointsErrorKind::ConflictException(_inner) => Some(_inner),
AddCustomRoutingEndpointsErrorKind::EndpointAlreadyExistsException(_inner) => {
Some(_inner)
}
AddCustomRoutingEndpointsErrorKind::EndpointGroupNotFoundException(_inner) => {
Some(_inner)
}
AddCustomRoutingEndpointsErrorKind::InternalServiceErrorException(_inner) => {
Some(_inner)
}
AddCustomRoutingEndpointsErrorKind::InvalidArgumentException(_inner) => Some(_inner),
AddCustomRoutingEndpointsErrorKind::LimitExceededException(_inner) => Some(_inner),
AddCustomRoutingEndpointsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct EndpointAlreadyExistsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl EndpointAlreadyExistsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for EndpointAlreadyExistsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "EndpointAlreadyExistsException")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for EndpointAlreadyExistsException {}
pub mod endpoint_already_exists_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::EndpointAlreadyExistsException {
crate::error::EndpointAlreadyExistsException {
message: self.message,
}
}
}
}
impl EndpointAlreadyExistsException {
pub fn builder() -> crate::error::endpoint_already_exists_exception::Builder {
crate::error::endpoint_already_exists_exception::Builder::default()
}
}
#[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 _)
}
}