#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetLoadBalancerPoliciesOfListenerError {
pub kind: SetLoadBalancerPoliciesOfListenerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetLoadBalancerPoliciesOfListenerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetLoadBalancerPoliciesOfListenerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetLoadBalancerPoliciesOfListenerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
PolicyNotFoundException(crate::error::PolicyNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetLoadBalancerPoliciesOfListenerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetLoadBalancerPoliciesOfListenerErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
SetLoadBalancerPoliciesOfListenerErrorKind::InvalidConfigurationRequestException(
_inner,
) => _inner.fmt(f),
SetLoadBalancerPoliciesOfListenerErrorKind::ListenerNotFoundException(_inner) => {
_inner.fmt(f)
}
SetLoadBalancerPoliciesOfListenerErrorKind::PolicyNotFoundException(_inner) => {
_inner.fmt(f)
}
SetLoadBalancerPoliciesOfListenerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetLoadBalancerPoliciesOfListenerError {
fn code(&self) -> Option<&str> {
SetLoadBalancerPoliciesOfListenerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetLoadBalancerPoliciesOfListenerError {
pub fn new(
kind: SetLoadBalancerPoliciesOfListenerErrorKind,
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: SetLoadBalancerPoliciesOfListenerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetLoadBalancerPoliciesOfListenerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesOfListenerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesOfListenerErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesOfListenerErrorKind::ListenerNotFoundException(_)
)
}
pub fn is_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesOfListenerErrorKind::PolicyNotFoundException(_)
)
}
}
impl std::error::Error for SetLoadBalancerPoliciesOfListenerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetLoadBalancerPoliciesOfListenerErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
SetLoadBalancerPoliciesOfListenerErrorKind::InvalidConfigurationRequestException(
_inner,
) => Some(_inner),
SetLoadBalancerPoliciesOfListenerErrorKind::ListenerNotFoundException(_inner) => {
Some(_inner)
}
SetLoadBalancerPoliciesOfListenerErrorKind::PolicyNotFoundException(_inner) => {
Some(_inner)
}
SetLoadBalancerPoliciesOfListenerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PolicyNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PolicyNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PolicyNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PolicyNotFoundException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for PolicyNotFoundException {}
pub mod policy_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::PolicyNotFoundException {
crate::error::PolicyNotFoundException {
message: self.message,
}
}
}
}
impl PolicyNotFoundException {
pub fn builder() -> crate::error::policy_not_found_exception::Builder {
crate::error::policy_not_found_exception::Builder::default()
}
}
#[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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
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 InvalidConfigurationRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidConfigurationRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidConfigurationRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidConfigurationRequestException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidConfigurationRequestException {}
pub mod invalid_configuration_request_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::InvalidConfigurationRequestException {
crate::error::InvalidConfigurationRequestException {
message: self.message,
}
}
}
}
impl InvalidConfigurationRequestException {
pub fn builder() -> crate::error::invalid_configuration_request_exception::Builder {
crate::error::invalid_configuration_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessPointNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessPointNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessPointNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessPointNotFoundException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessPointNotFoundException {}
pub mod access_point_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::AccessPointNotFoundException {
crate::error::AccessPointNotFoundException {
message: self.message,
}
}
}
}
impl AccessPointNotFoundException {
pub fn builder() -> crate::error::access_point_not_found_exception::Builder {
crate::error::access_point_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetLoadBalancerPoliciesForBackendServerError {
pub kind: SetLoadBalancerPoliciesForBackendServerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for SetLoadBalancerPoliciesForBackendServerError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetLoadBalancerPoliciesForBackendServerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetLoadBalancerPoliciesForBackendServerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
PolicyNotFoundException(crate::error::PolicyNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetLoadBalancerPoliciesForBackendServerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetLoadBalancerPoliciesForBackendServerErrorKind::AccessPointNotFoundException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::InvalidConfigurationRequestException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::PolicyNotFoundException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetLoadBalancerPoliciesForBackendServerError {
fn code(&self) -> Option<&str> {
SetLoadBalancerPoliciesForBackendServerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetLoadBalancerPoliciesForBackendServerError {
pub fn new(
kind: SetLoadBalancerPoliciesForBackendServerErrorKind,
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: SetLoadBalancerPoliciesForBackendServerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetLoadBalancerPoliciesForBackendServerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesForBackendServerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesForBackendServerErrorKind::InvalidConfigurationRequestException(
_
)
)
}
pub fn is_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerPoliciesForBackendServerErrorKind::PolicyNotFoundException(_)
)
}
}
impl std::error::Error for SetLoadBalancerPoliciesForBackendServerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetLoadBalancerPoliciesForBackendServerErrorKind::AccessPointNotFoundException(_inner) =>
Some(_inner)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::InvalidConfigurationRequestException(_inner) =>
Some(_inner)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::PolicyNotFoundException(_inner) =>
Some(_inner)
,
SetLoadBalancerPoliciesForBackendServerErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetLoadBalancerListenerSSLCertificateError {
pub kind: SetLoadBalancerListenerSSLCertificateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetLoadBalancerListenerSSLCertificateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetLoadBalancerListenerSSLCertificateErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetLoadBalancerListenerSSLCertificateErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
CertificateNotFoundException(crate::error::CertificateNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
ListenerNotFoundException(crate::error::ListenerNotFoundException),
UnsupportedProtocolException(crate::error::UnsupportedProtocolException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetLoadBalancerListenerSSLCertificateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetLoadBalancerListenerSSLCertificateErrorKind::AccessPointNotFoundException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerListenerSSLCertificateErrorKind::CertificateNotFoundException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerListenerSSLCertificateErrorKind::InvalidConfigurationRequestException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerListenerSSLCertificateErrorKind::ListenerNotFoundException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerListenerSSLCertificateErrorKind::UnsupportedProtocolException(_inner) =>
_inner.fmt(f)
,
SetLoadBalancerListenerSSLCertificateErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetLoadBalancerListenerSSLCertificateError {
fn code(&self) -> Option<&str> {
SetLoadBalancerListenerSSLCertificateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetLoadBalancerListenerSSLCertificateError {
pub fn new(
kind: SetLoadBalancerListenerSSLCertificateErrorKind,
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: SetLoadBalancerListenerSSLCertificateErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetLoadBalancerListenerSSLCertificateErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerListenerSSLCertificateErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_certificate_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerListenerSSLCertificateErrorKind::CertificateNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerListenerSSLCertificateErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_listener_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerListenerSSLCertificateErrorKind::ListenerNotFoundException(_)
)
}
pub fn is_unsupported_protocol_exception(&self) -> bool {
matches!(
&self.kind,
SetLoadBalancerListenerSSLCertificateErrorKind::UnsupportedProtocolException(_)
)
}
}
impl std::error::Error for SetLoadBalancerListenerSSLCertificateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetLoadBalancerListenerSSLCertificateErrorKind::AccessPointNotFoundException(_inner) =>
Some(_inner)
,
SetLoadBalancerListenerSSLCertificateErrorKind::CertificateNotFoundException(_inner) =>
Some(_inner)
,
SetLoadBalancerListenerSSLCertificateErrorKind::InvalidConfigurationRequestException(_inner) =>
Some(_inner)
,
SetLoadBalancerListenerSSLCertificateErrorKind::ListenerNotFoundException(_inner) =>
Some(_inner)
,
SetLoadBalancerListenerSSLCertificateErrorKind::UnsupportedProtocolException(_inner) =>
Some(_inner)
,
SetLoadBalancerListenerSSLCertificateErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedProtocolException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UnsupportedProtocolException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedProtocolException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnsupportedProtocolException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedProtocolException {}
pub mod unsupported_protocol_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::UnsupportedProtocolException {
crate::error::UnsupportedProtocolException {
message: self.message,
}
}
}
}
impl UnsupportedProtocolException {
pub fn builder() -> crate::error::unsupported_protocol_exception::Builder {
crate::error::unsupported_protocol_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CertificateNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CertificateNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CertificateNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CertificateNotFoundException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for CertificateNotFoundException {}
pub mod certificate_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::CertificateNotFoundException {
crate::error::CertificateNotFoundException {
message: self.message,
}
}
}
}
impl CertificateNotFoundException {
pub fn builder() -> crate::error::certificate_not_found_exception::Builder {
crate::error::certificate_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveTagsError {
pub kind: RemoveTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveTagsErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveTagsErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
RemoveTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveTagsError {
fn code(&self) -> Option<&str> {
RemoveTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveTagsError {
pub fn new(kind: RemoveTagsErrorKind, 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: RemoveTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveTagsErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveTagsErrorKind::AccessPointNotFoundException(_)
)
}
}
impl std::error::Error for RemoveTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveTagsErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
RemoveTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterInstancesWithLoadBalancerError {
pub kind: RegisterInstancesWithLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterInstancesWithLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterInstancesWithLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterInstancesWithLoadBalancerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidEndPointException(crate::error::InvalidEndPointException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RegisterInstancesWithLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterInstancesWithLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
RegisterInstancesWithLoadBalancerErrorKind::InvalidEndPointException(_inner) => {
_inner.fmt(f)
}
RegisterInstancesWithLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterInstancesWithLoadBalancerError {
fn code(&self) -> Option<&str> {
RegisterInstancesWithLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterInstancesWithLoadBalancerError {
pub fn new(
kind: RegisterInstancesWithLoadBalancerErrorKind,
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: RegisterInstancesWithLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterInstancesWithLoadBalancerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RegisterInstancesWithLoadBalancerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_end_point_exception(&self) -> bool {
matches!(
&self.kind,
RegisterInstancesWithLoadBalancerErrorKind::InvalidEndPointException(_)
)
}
}
impl std::error::Error for RegisterInstancesWithLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterInstancesWithLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
RegisterInstancesWithLoadBalancerErrorKind::InvalidEndPointException(_inner) => {
Some(_inner)
}
RegisterInstancesWithLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidEndPointException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidEndPointException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidEndPointException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidEndPointException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidEndPointException {}
pub mod invalid_end_point_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::InvalidEndPointException {
crate::error::InvalidEndPointException {
message: self.message,
}
}
}
}
impl InvalidEndPointException {
pub fn builder() -> crate::error::invalid_end_point_exception::Builder {
crate::error::invalid_end_point_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyLoadBalancerAttributesError {
pub kind: ModifyLoadBalancerAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyLoadBalancerAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyLoadBalancerAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyLoadBalancerAttributesErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
LoadBalancerAttributeNotFoundException(crate::error::LoadBalancerAttributeNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyLoadBalancerAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
ModifyLoadBalancerAttributesErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
ModifyLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(
_inner,
) => _inner.fmt(f),
ModifyLoadBalancerAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyLoadBalancerAttributesError {
fn code(&self) -> Option<&str> {
ModifyLoadBalancerAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyLoadBalancerAttributesError {
pub fn new(kind: ModifyLoadBalancerAttributesErrorKind, 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: ModifyLoadBalancerAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyLoadBalancerAttributesErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
ModifyLoadBalancerAttributesErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_load_balancer_attribute_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ModifyLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(_)
)
}
}
impl std::error::Error for ModifyLoadBalancerAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
ModifyLoadBalancerAttributesErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
ModifyLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(
_inner,
) => Some(_inner),
ModifyLoadBalancerAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LoadBalancerAttributeNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LoadBalancerAttributeNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LoadBalancerAttributeNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LoadBalancerAttributeNotFoundException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for LoadBalancerAttributeNotFoundException {}
pub mod load_balancer_attribute_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::LoadBalancerAttributeNotFoundException {
crate::error::LoadBalancerAttributeNotFoundException {
message: self.message,
}
}
}
}
impl LoadBalancerAttributeNotFoundException {
pub fn builder() -> crate::error::load_balancer_attribute_not_found_exception::Builder {
crate::error::load_balancer_attribute_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableAvailabilityZonesForLoadBalancerError {
pub kind: EnableAvailabilityZonesForLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableAvailabilityZonesForLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableAvailabilityZonesForLoadBalancerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableAvailabilityZonesForLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(
_inner,
) => _inner.fmt(f),
EnableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableAvailabilityZonesForLoadBalancerError {
fn code(&self) -> Option<&str> {
EnableAvailabilityZonesForLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableAvailabilityZonesForLoadBalancerError {
pub fn new(
kind: EnableAvailabilityZonesForLoadBalancerErrorKind,
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: EnableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableAvailabilityZonesForLoadBalancerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
EnableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(_)
)
}
}
impl std::error::Error for EnableAvailabilityZonesForLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(
_inner,
) => Some(_inner),
EnableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableAvailabilityZonesForLoadBalancerError {
pub kind: DisableAvailabilityZonesForLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DisableAvailabilityZonesForLoadBalancerError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableAvailabilityZonesForLoadBalancerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableAvailabilityZonesForLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(_inner) =>
_inner.fmt(f)
,
DisableAvailabilityZonesForLoadBalancerErrorKind::InvalidConfigurationRequestException(_inner) =>
_inner.fmt(f)
,
DisableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableAvailabilityZonesForLoadBalancerError {
fn code(&self) -> Option<&str> {
DisableAvailabilityZonesForLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableAvailabilityZonesForLoadBalancerError {
pub fn new(
kind: DisableAvailabilityZonesForLoadBalancerErrorKind,
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: DisableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableAvailabilityZonesForLoadBalancerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
DisableAvailabilityZonesForLoadBalancerErrorKind::InvalidConfigurationRequestException(
_
)
)
}
}
impl std::error::Error for DisableAvailabilityZonesForLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableAvailabilityZonesForLoadBalancerErrorKind::AccessPointNotFoundException(_inner) =>
Some(_inner)
,
DisableAvailabilityZonesForLoadBalancerErrorKind::InvalidConfigurationRequestException(_inner) =>
Some(_inner)
,
DisableAvailabilityZonesForLoadBalancerErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachLoadBalancerFromSubnetsError {
pub kind: DetachLoadBalancerFromSubnetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachLoadBalancerFromSubnetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachLoadBalancerFromSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachLoadBalancerFromSubnetsErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachLoadBalancerFromSubnetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachLoadBalancerFromSubnetsErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DetachLoadBalancerFromSubnetsErrorKind::InvalidConfigurationRequestException(
_inner,
) => _inner.fmt(f),
DetachLoadBalancerFromSubnetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachLoadBalancerFromSubnetsError {
fn code(&self) -> Option<&str> {
DetachLoadBalancerFromSubnetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachLoadBalancerFromSubnetsError {
pub fn new(
kind: DetachLoadBalancerFromSubnetsErrorKind,
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: DetachLoadBalancerFromSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachLoadBalancerFromSubnetsErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DetachLoadBalancerFromSubnetsErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
DetachLoadBalancerFromSubnetsErrorKind::InvalidConfigurationRequestException(_)
)
}
}
impl std::error::Error for DetachLoadBalancerFromSubnetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachLoadBalancerFromSubnetsErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
DetachLoadBalancerFromSubnetsErrorKind::InvalidConfigurationRequestException(
_inner,
) => Some(_inner),
DetachLoadBalancerFromSubnetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTagsError {
pub kind: DescribeTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTagsErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTagsErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTagsError {
fn code(&self) -> Option<&str> {
DescribeTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTagsError {
pub fn new(kind: DescribeTagsErrorKind, 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: DescribeTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTagsErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTagsErrorKind::AccessPointNotFoundException(_)
)
}
}
impl std::error::Error for DescribeTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTagsErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
DescribeTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoadBalancersError {
pub kind: DescribeLoadBalancersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoadBalancersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoadBalancersErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
DependencyThrottleException(crate::error::DependencyThrottleException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoadBalancersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoadBalancersErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
DescribeLoadBalancersErrorKind::DependencyThrottleException(_inner) => _inner.fmt(f),
DescribeLoadBalancersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoadBalancersError {
fn code(&self) -> Option<&str> {
DescribeLoadBalancersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoadBalancersError {
pub fn new(kind: DescribeLoadBalancersErrorKind, 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: DescribeLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoadBalancersErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancersErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_dependency_throttle_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancersErrorKind::DependencyThrottleException(_)
)
}
}
impl std::error::Error for DescribeLoadBalancersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancersErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
DescribeLoadBalancersErrorKind::DependencyThrottleException(_inner) => Some(_inner),
DescribeLoadBalancersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DependencyThrottleException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DependencyThrottleException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DependencyThrottleException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DependencyThrottleException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for DependencyThrottleException {}
pub mod dependency_throttle_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::DependencyThrottleException {
crate::error::DependencyThrottleException {
message: self.message,
}
}
}
}
impl DependencyThrottleException {
pub fn builder() -> crate::error::dependency_throttle_exception::Builder {
crate::error::dependency_throttle_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoadBalancerPolicyTypesError {
pub kind: DescribeLoadBalancerPolicyTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoadBalancerPolicyTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoadBalancerPolicyTypesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoadBalancerPolicyTypesErrorKind {
PolicyTypeNotFoundException(crate::error::PolicyTypeNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoadBalancerPolicyTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoadBalancerPolicyTypesErrorKind::PolicyTypeNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeLoadBalancerPolicyTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoadBalancerPolicyTypesError {
fn code(&self) -> Option<&str> {
DescribeLoadBalancerPolicyTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoadBalancerPolicyTypesError {
pub fn new(
kind: DescribeLoadBalancerPolicyTypesErrorKind,
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: DescribeLoadBalancerPolicyTypesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoadBalancerPolicyTypesErrorKind::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_policy_type_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerPolicyTypesErrorKind::PolicyTypeNotFoundException(_)
)
}
}
impl std::error::Error for DescribeLoadBalancerPolicyTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancerPolicyTypesErrorKind::PolicyTypeNotFoundException(_inner) => {
Some(_inner)
}
DescribeLoadBalancerPolicyTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PolicyTypeNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PolicyTypeNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PolicyTypeNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PolicyTypeNotFoundException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for PolicyTypeNotFoundException {}
pub mod policy_type_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::PolicyTypeNotFoundException {
crate::error::PolicyTypeNotFoundException {
message: self.message,
}
}
}
}
impl PolicyTypeNotFoundException {
pub fn builder() -> crate::error::policy_type_not_found_exception::Builder {
crate::error::policy_type_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoadBalancerPoliciesError {
pub kind: DescribeLoadBalancerPoliciesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoadBalancerPoliciesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoadBalancerPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoadBalancerPoliciesErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
PolicyNotFoundException(crate::error::PolicyNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoadBalancerPoliciesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoadBalancerPoliciesErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeLoadBalancerPoliciesErrorKind::PolicyNotFoundException(_inner) => _inner.fmt(f),
DescribeLoadBalancerPoliciesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoadBalancerPoliciesError {
fn code(&self) -> Option<&str> {
DescribeLoadBalancerPoliciesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoadBalancerPoliciesError {
pub fn new(kind: DescribeLoadBalancerPoliciesErrorKind, 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: DescribeLoadBalancerPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoadBalancerPoliciesErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerPoliciesErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_policy_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerPoliciesErrorKind::PolicyNotFoundException(_)
)
}
}
impl std::error::Error for DescribeLoadBalancerPoliciesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancerPoliciesErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
DescribeLoadBalancerPoliciesErrorKind::PolicyNotFoundException(_inner) => Some(_inner),
DescribeLoadBalancerPoliciesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoadBalancerAttributesError {
pub kind: DescribeLoadBalancerAttributesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoadBalancerAttributesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoadBalancerAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoadBalancerAttributesErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
LoadBalancerAttributeNotFoundException(crate::error::LoadBalancerAttributeNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoadBalancerAttributesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(
_inner,
) => _inner.fmt(f),
DescribeLoadBalancerAttributesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoadBalancerAttributesError {
fn code(&self) -> Option<&str> {
DescribeLoadBalancerAttributesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoadBalancerAttributesError {
pub fn new(
kind: DescribeLoadBalancerAttributesErrorKind,
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: DescribeLoadBalancerAttributesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoadBalancerAttributesErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_load_balancer_attribute_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(_)
)
}
}
impl std::error::Error for DescribeLoadBalancerAttributesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancerAttributesErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
DescribeLoadBalancerAttributesErrorKind::LoadBalancerAttributeNotFoundException(
_inner,
) => Some(_inner),
DescribeLoadBalancerAttributesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceHealthError {
pub kind: DescribeInstanceHealthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeInstanceHealthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeInstanceHealthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeInstanceHealthErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidEndPointException(crate::error::InvalidEndPointException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeInstanceHealthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeInstanceHealthErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
DescribeInstanceHealthErrorKind::InvalidEndPointException(_inner) => _inner.fmt(f),
DescribeInstanceHealthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeInstanceHealthError {
fn code(&self) -> Option<&str> {
DescribeInstanceHealthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeInstanceHealthError {
pub fn new(kind: DescribeInstanceHealthErrorKind, 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: DescribeInstanceHealthErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeInstanceHealthErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceHealthErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_end_point_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceHealthErrorKind::InvalidEndPointException(_)
)
}
}
impl std::error::Error for DescribeInstanceHealthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeInstanceHealthErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
DescribeInstanceHealthErrorKind::InvalidEndPointException(_inner) => Some(_inner),
DescribeInstanceHealthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountLimitsError {
pub kind: DescribeAccountLimitsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAccountLimitsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountLimitsErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountLimitsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountLimitsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountLimitsError {
fn code(&self) -> Option<&str> {
DescribeAccountLimitsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAccountLimitsError {
pub fn new(kind: DescribeAccountLimitsErrorKind, 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: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountLimitsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for DescribeAccountLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterInstancesFromLoadBalancerError {
pub kind: DeregisterInstancesFromLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterInstancesFromLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterInstancesFromLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterInstancesFromLoadBalancerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidEndPointException(crate::error::InvalidEndPointException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeregisterInstancesFromLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterInstancesFromLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DeregisterInstancesFromLoadBalancerErrorKind::InvalidEndPointException(_inner) => {
_inner.fmt(f)
}
DeregisterInstancesFromLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterInstancesFromLoadBalancerError {
fn code(&self) -> Option<&str> {
DeregisterInstancesFromLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterInstancesFromLoadBalancerError {
pub fn new(
kind: DeregisterInstancesFromLoadBalancerErrorKind,
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: DeregisterInstancesFromLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterInstancesFromLoadBalancerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterInstancesFromLoadBalancerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_end_point_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterInstancesFromLoadBalancerErrorKind::InvalidEndPointException(_)
)
}
}
impl std::error::Error for DeregisterInstancesFromLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterInstancesFromLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
DeregisterInstancesFromLoadBalancerErrorKind::InvalidEndPointException(_inner) => {
Some(_inner)
}
DeregisterInstancesFromLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLoadBalancerPolicyError {
pub kind: DeleteLoadBalancerPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLoadBalancerPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLoadBalancerPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLoadBalancerPolicyErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLoadBalancerPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
DeleteLoadBalancerPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLoadBalancerPolicyError {
fn code(&self) -> Option<&str> {
DeleteLoadBalancerPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLoadBalancerPolicyError {
pub fn new(kind: DeleteLoadBalancerPolicyErrorKind, 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: DeleteLoadBalancerPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLoadBalancerPolicyErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_)
)
}
}
impl std::error::Error for DeleteLoadBalancerPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
DeleteLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
DeleteLoadBalancerPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLoadBalancerListenersError {
pub kind: DeleteLoadBalancerListenersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLoadBalancerListenersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLoadBalancerListenersErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLoadBalancerListenersErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLoadBalancerListenersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLoadBalancerListenersErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteLoadBalancerListenersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLoadBalancerListenersError {
fn code(&self) -> Option<&str> {
DeleteLoadBalancerListenersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLoadBalancerListenersError {
pub fn new(kind: DeleteLoadBalancerListenersErrorKind, 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: DeleteLoadBalancerListenersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLoadBalancerListenersErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteLoadBalancerListenersErrorKind::AccessPointNotFoundException(_)
)
}
}
impl std::error::Error for DeleteLoadBalancerListenersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLoadBalancerListenersErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
DeleteLoadBalancerListenersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLoadBalancerError {
pub kind: DeleteLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLoadBalancerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLoadBalancerErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLoadBalancerError {
fn code(&self) -> Option<&str> {
DeleteLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLoadBalancerError {
pub fn new(kind: DeleteLoadBalancerErrorKind, 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: DeleteLoadBalancerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLoadBalancerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for DeleteLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLoadBalancerPolicyError {
pub kind: CreateLoadBalancerPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLoadBalancerPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLoadBalancerPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLoadBalancerPolicyErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
DuplicatePolicyNameException(crate::error::DuplicatePolicyNameException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
PolicyTypeNotFoundException(crate::error::PolicyTypeNotFoundException),
TooManyPoliciesException(crate::error::TooManyPoliciesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLoadBalancerPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerPolicyErrorKind::DuplicatePolicyNameException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerPolicyErrorKind::PolicyTypeNotFoundException(_inner) => _inner.fmt(f),
CreateLoadBalancerPolicyErrorKind::TooManyPoliciesException(_inner) => _inner.fmt(f),
CreateLoadBalancerPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLoadBalancerPolicyError {
fn code(&self) -> Option<&str> {
CreateLoadBalancerPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLoadBalancerPolicyError {
pub fn new(kind: CreateLoadBalancerPolicyErrorKind, 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: CreateLoadBalancerPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLoadBalancerPolicyErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_duplicate_policy_name_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerPolicyErrorKind::DuplicatePolicyNameException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_policy_type_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerPolicyErrorKind::PolicyTypeNotFoundException(_)
)
}
pub fn is_too_many_policies_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerPolicyErrorKind::TooManyPoliciesException(_)
)
}
}
impl std::error::Error for CreateLoadBalancerPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLoadBalancerPolicyErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
CreateLoadBalancerPolicyErrorKind::DuplicatePolicyNameException(_inner) => Some(_inner),
CreateLoadBalancerPolicyErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
CreateLoadBalancerPolicyErrorKind::PolicyTypeNotFoundException(_inner) => Some(_inner),
CreateLoadBalancerPolicyErrorKind::TooManyPoliciesException(_inner) => Some(_inner),
CreateLoadBalancerPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyPoliciesException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyPoliciesException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyPoliciesException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyPoliciesException")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyPoliciesException {}
pub mod too_many_policies_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::TooManyPoliciesException {
crate::error::TooManyPoliciesException {
message: self.message,
}
}
}
}
impl TooManyPoliciesException {
pub fn builder() -> crate::error::too_many_policies_exception::Builder {
crate::error::too_many_policies_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicatePolicyNameException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicatePolicyNameException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicatePolicyNameException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicatePolicyNameException")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicatePolicyNameException {}
pub mod duplicate_policy_name_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::DuplicatePolicyNameException {
crate::error::DuplicatePolicyNameException {
message: self.message,
}
}
}
}
impl DuplicatePolicyNameException {
pub fn builder() -> crate::error::duplicate_policy_name_exception::Builder {
crate::error::duplicate_policy_name_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLoadBalancerListenersError {
pub kind: CreateLoadBalancerListenersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLoadBalancerListenersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLoadBalancerListenersErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLoadBalancerListenersErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
CertificateNotFoundException(crate::error::CertificateNotFoundException),
DuplicateListenerException(crate::error::DuplicateListenerException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
UnsupportedProtocolException(crate::error::UnsupportedProtocolException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLoadBalancerListenersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLoadBalancerListenersErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerListenersErrorKind::CertificateNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerListenersErrorKind::DuplicateListenerException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerListenersErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerListenersErrorKind::UnsupportedProtocolException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerListenersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLoadBalancerListenersError {
fn code(&self) -> Option<&str> {
CreateLoadBalancerListenersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLoadBalancerListenersError {
pub fn new(kind: CreateLoadBalancerListenersErrorKind, 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: CreateLoadBalancerListenersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLoadBalancerListenersErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerListenersErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_certificate_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerListenersErrorKind::CertificateNotFoundException(_)
)
}
pub fn is_duplicate_listener_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerListenersErrorKind::DuplicateListenerException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerListenersErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_unsupported_protocol_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerListenersErrorKind::UnsupportedProtocolException(_)
)
}
}
impl std::error::Error for CreateLoadBalancerListenersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLoadBalancerListenersErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
CreateLoadBalancerListenersErrorKind::CertificateNotFoundException(_inner) => {
Some(_inner)
}
CreateLoadBalancerListenersErrorKind::DuplicateListenerException(_inner) => {
Some(_inner)
}
CreateLoadBalancerListenersErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
CreateLoadBalancerListenersErrorKind::UnsupportedProtocolException(_inner) => {
Some(_inner)
}
CreateLoadBalancerListenersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateListenerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateListenerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateListenerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateListenerException")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateListenerException {}
pub mod duplicate_listener_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::DuplicateListenerException {
crate::error::DuplicateListenerException {
message: self.message,
}
}
}
}
impl DuplicateListenerException {
pub fn builder() -> crate::error::duplicate_listener_exception::Builder {
crate::error::duplicate_listener_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLoadBalancerError {
pub kind: CreateLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLoadBalancerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLoadBalancerErrorKind {
CertificateNotFoundException(crate::error::CertificateNotFoundException),
DuplicateAccessPointNameException(crate::error::DuplicateAccessPointNameException),
DuplicateTagKeysException(crate::error::DuplicateTagKeysException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
InvalidSchemeException(crate::error::InvalidSchemeException),
InvalidSecurityGroupException(crate::error::InvalidSecurityGroupException),
InvalidSubnetException(crate::error::InvalidSubnetException),
OperationNotPermittedException(crate::error::OperationNotPermittedException),
SubnetNotFoundException(crate::error::SubnetNotFoundException),
TooManyAccessPointsException(crate::error::TooManyAccessPointsException),
TooManyTagsException(crate::error::TooManyTagsException),
UnsupportedProtocolException(crate::error::UnsupportedProtocolException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLoadBalancerErrorKind::CertificateNotFoundException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::DuplicateAccessPointNameException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::DuplicateTagKeysException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
CreateLoadBalancerErrorKind::InvalidSchemeException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::InvalidSecurityGroupException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::InvalidSubnetException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::OperationNotPermittedException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::SubnetNotFoundException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::TooManyAccessPointsException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::UnsupportedProtocolException(_inner) => _inner.fmt(f),
CreateLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLoadBalancerError {
fn code(&self) -> Option<&str> {
CreateLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLoadBalancerError {
pub fn new(kind: CreateLoadBalancerErrorKind, 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: CreateLoadBalancerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLoadBalancerErrorKind::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_certificate_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::CertificateNotFoundException(_)
)
}
pub fn is_duplicate_access_point_name_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::DuplicateAccessPointNameException(_)
)
}
pub fn is_duplicate_tag_keys_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::DuplicateTagKeysException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_invalid_scheme_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::InvalidSchemeException(_)
)
}
pub fn is_invalid_security_group_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::InvalidSecurityGroupException(_)
)
}
pub fn is_invalid_subnet_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::InvalidSubnetException(_)
)
}
pub fn is_operation_not_permitted_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::OperationNotPermittedException(_)
)
}
pub fn is_subnet_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::SubnetNotFoundException(_)
)
}
pub fn is_too_many_access_points_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::TooManyAccessPointsException(_)
)
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::TooManyTagsException(_)
)
}
pub fn is_unsupported_protocol_exception(&self) -> bool {
matches!(
&self.kind,
CreateLoadBalancerErrorKind::UnsupportedProtocolException(_)
)
}
}
impl std::error::Error for CreateLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLoadBalancerErrorKind::CertificateNotFoundException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::DuplicateAccessPointNameException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::DuplicateTagKeysException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
CreateLoadBalancerErrorKind::InvalidSchemeException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::InvalidSecurityGroupException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::InvalidSubnetException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::OperationNotPermittedException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::SubnetNotFoundException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::TooManyAccessPointsException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::TooManyTagsException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::UnsupportedProtocolException(_inner) => Some(_inner),
CreateLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyTagsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyTagsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyTagsException")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyTagsException {}
pub mod too_many_tags_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::TooManyTagsException {
crate::error::TooManyTagsException {
message: self.message,
}
}
}
}
impl TooManyTagsException {
pub fn builder() -> crate::error::too_many_tags_exception::Builder {
crate::error::too_many_tags_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyAccessPointsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyAccessPointsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyAccessPointsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyAccessPointsException")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyAccessPointsException {}
pub mod too_many_access_points_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::TooManyAccessPointsException {
crate::error::TooManyAccessPointsException {
message: self.message,
}
}
}
}
impl TooManyAccessPointsException {
pub fn builder() -> crate::error::too_many_access_points_exception::Builder {
crate::error::too_many_access_points_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SubnetNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SubnetNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SubnetNotFoundException")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for SubnetNotFoundException {}
pub mod subnet_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::SubnetNotFoundException {
crate::error::SubnetNotFoundException {
message: self.message,
}
}
}
}
impl SubnetNotFoundException {
pub fn builder() -> crate::error::subnet_not_found_exception::Builder {
crate::error::subnet_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OperationNotPermittedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OperationNotPermittedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OperationNotPermittedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OperationNotPermittedException")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for OperationNotPermittedException {}
pub mod operation_not_permitted_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::OperationNotPermittedException {
crate::error::OperationNotPermittedException {
message: self.message,
}
}
}
}
impl OperationNotPermittedException {
pub fn builder() -> crate::error::operation_not_permitted_exception::Builder {
crate::error::operation_not_permitted_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSubnetException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSubnetException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSubnetException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSubnetException")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSubnetException {}
pub mod invalid_subnet_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::InvalidSubnetException {
crate::error::InvalidSubnetException {
message: self.message,
}
}
}
}
impl InvalidSubnetException {
pub fn builder() -> crate::error::invalid_subnet_exception::Builder {
crate::error::invalid_subnet_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSecurityGroupException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSecurityGroupException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSecurityGroupException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSecurityGroupException")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSecurityGroupException {}
pub mod invalid_security_group_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::InvalidSecurityGroupException {
crate::error::InvalidSecurityGroupException {
message: self.message,
}
}
}
}
impl InvalidSecurityGroupException {
pub fn builder() -> crate::error::invalid_security_group_exception::Builder {
crate::error::invalid_security_group_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSchemeException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSchemeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSchemeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSchemeException")?;
if let Some(inner_20) = &self.message {
{
write!(f, ": {}", inner_20)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSchemeException {}
pub mod invalid_scheme_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::InvalidSchemeException {
crate::error::InvalidSchemeException {
message: self.message,
}
}
}
}
impl InvalidSchemeException {
pub fn builder() -> crate::error::invalid_scheme_exception::Builder {
crate::error::invalid_scheme_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateTagKeysException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateTagKeysException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateTagKeysException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateTagKeysException")?;
if let Some(inner_21) = &self.message {
{
write!(f, ": {}", inner_21)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateTagKeysException {}
pub mod duplicate_tag_keys_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::DuplicateTagKeysException {
crate::error::DuplicateTagKeysException {
message: self.message,
}
}
}
}
impl DuplicateTagKeysException {
pub fn builder() -> crate::error::duplicate_tag_keys_exception::Builder {
crate::error::duplicate_tag_keys_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateAccessPointNameException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateAccessPointNameException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateAccessPointNameException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateAccessPointNameException")?;
if let Some(inner_22) = &self.message {
{
write!(f, ": {}", inner_22)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateAccessPointNameException {}
pub mod duplicate_access_point_name_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::DuplicateAccessPointNameException {
crate::error::DuplicateAccessPointNameException {
message: self.message,
}
}
}
}
impl DuplicateAccessPointNameException {
pub fn builder() -> crate::error::duplicate_access_point_name_exception::Builder {
crate::error::duplicate_access_point_name_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLBCookieStickinessPolicyError {
pub kind: CreateLBCookieStickinessPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLBCookieStickinessPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLBCookieStickinessPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLBCookieStickinessPolicyErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
DuplicatePolicyNameException(crate::error::DuplicatePolicyNameException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
TooManyPoliciesException(crate::error::TooManyPoliciesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLBCookieStickinessPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLBCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateLBCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_inner) => {
_inner.fmt(f)
}
CreateLBCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(
_inner,
) => _inner.fmt(f),
CreateLBCookieStickinessPolicyErrorKind::TooManyPoliciesException(_inner) => {
_inner.fmt(f)
}
CreateLBCookieStickinessPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLBCookieStickinessPolicyError {
fn code(&self) -> Option<&str> {
CreateLBCookieStickinessPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLBCookieStickinessPolicyError {
pub fn new(
kind: CreateLBCookieStickinessPolicyErrorKind,
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: CreateLBCookieStickinessPolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLBCookieStickinessPolicyErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateLBCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_duplicate_policy_name_exception(&self) -> bool {
matches!(
&self.kind,
CreateLBCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateLBCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_too_many_policies_exception(&self) -> bool {
matches!(
&self.kind,
CreateLBCookieStickinessPolicyErrorKind::TooManyPoliciesException(_)
)
}
}
impl std::error::Error for CreateLBCookieStickinessPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLBCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
CreateLBCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_inner) => {
Some(_inner)
}
CreateLBCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(
_inner,
) => Some(_inner),
CreateLBCookieStickinessPolicyErrorKind::TooManyPoliciesException(_inner) => {
Some(_inner)
}
CreateLBCookieStickinessPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAppCookieStickinessPolicyError {
pub kind: CreateAppCookieStickinessPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAppCookieStickinessPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAppCookieStickinessPolicyErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAppCookieStickinessPolicyErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
DuplicatePolicyNameException(crate::error::DuplicatePolicyNameException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
TooManyPoliciesException(crate::error::TooManyPoliciesException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAppCookieStickinessPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAppCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateAppCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_inner) => {
_inner.fmt(f)
}
CreateAppCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(
_inner,
) => _inner.fmt(f),
CreateAppCookieStickinessPolicyErrorKind::TooManyPoliciesException(_inner) => {
_inner.fmt(f)
}
CreateAppCookieStickinessPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAppCookieStickinessPolicyError {
fn code(&self) -> Option<&str> {
CreateAppCookieStickinessPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAppCookieStickinessPolicyError {
pub fn new(
kind: CreateAppCookieStickinessPolicyErrorKind,
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: CreateAppCookieStickinessPolicyErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAppCookieStickinessPolicyErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_duplicate_policy_name_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_too_many_policies_exception(&self) -> bool {
matches!(
&self.kind,
CreateAppCookieStickinessPolicyErrorKind::TooManyPoliciesException(_)
)
}
}
impl std::error::Error for CreateAppCookieStickinessPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAppCookieStickinessPolicyErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
CreateAppCookieStickinessPolicyErrorKind::DuplicatePolicyNameException(_inner) => {
Some(_inner)
}
CreateAppCookieStickinessPolicyErrorKind::InvalidConfigurationRequestException(
_inner,
) => Some(_inner),
CreateAppCookieStickinessPolicyErrorKind::TooManyPoliciesException(_inner) => {
Some(_inner)
}
CreateAppCookieStickinessPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ConfigureHealthCheckError {
pub kind: ConfigureHealthCheckErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ConfigureHealthCheckError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ConfigureHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ConfigureHealthCheckErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ConfigureHealthCheckError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ConfigureHealthCheckErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
ConfigureHealthCheckErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ConfigureHealthCheckError {
fn code(&self) -> Option<&str> {
ConfigureHealthCheckError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ConfigureHealthCheckError {
pub fn new(kind: ConfigureHealthCheckErrorKind, 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: ConfigureHealthCheckErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ConfigureHealthCheckErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ConfigureHealthCheckErrorKind::AccessPointNotFoundException(_)
)
}
}
impl std::error::Error for ConfigureHealthCheckError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ConfigureHealthCheckErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
ConfigureHealthCheckErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachLoadBalancerToSubnetsError {
pub kind: AttachLoadBalancerToSubnetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachLoadBalancerToSubnetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachLoadBalancerToSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachLoadBalancerToSubnetsErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
InvalidSubnetException(crate::error::InvalidSubnetException),
SubnetNotFoundException(crate::error::SubnetNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachLoadBalancerToSubnetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachLoadBalancerToSubnetsErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
AttachLoadBalancerToSubnetsErrorKind::InvalidConfigurationRequestException(_inner) => {
_inner.fmt(f)
}
AttachLoadBalancerToSubnetsErrorKind::InvalidSubnetException(_inner) => _inner.fmt(f),
AttachLoadBalancerToSubnetsErrorKind::SubnetNotFoundException(_inner) => _inner.fmt(f),
AttachLoadBalancerToSubnetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachLoadBalancerToSubnetsError {
fn code(&self) -> Option<&str> {
AttachLoadBalancerToSubnetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachLoadBalancerToSubnetsError {
pub fn new(kind: AttachLoadBalancerToSubnetsErrorKind, 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: AttachLoadBalancerToSubnetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachLoadBalancerToSubnetsErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerToSubnetsErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerToSubnetsErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_invalid_subnet_exception(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerToSubnetsErrorKind::InvalidSubnetException(_)
)
}
pub fn is_subnet_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerToSubnetsErrorKind::SubnetNotFoundException(_)
)
}
}
impl std::error::Error for AttachLoadBalancerToSubnetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachLoadBalancerToSubnetsErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
AttachLoadBalancerToSubnetsErrorKind::InvalidConfigurationRequestException(_inner) => {
Some(_inner)
}
AttachLoadBalancerToSubnetsErrorKind::InvalidSubnetException(_inner) => Some(_inner),
AttachLoadBalancerToSubnetsErrorKind::SubnetNotFoundException(_inner) => Some(_inner),
AttachLoadBalancerToSubnetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ApplySecurityGroupsToLoadBalancerError {
pub kind: ApplySecurityGroupsToLoadBalancerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ApplySecurityGroupsToLoadBalancerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ApplySecurityGroupsToLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ApplySecurityGroupsToLoadBalancerErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
InvalidConfigurationRequestException(crate::error::InvalidConfigurationRequestException),
InvalidSecurityGroupException(crate::error::InvalidSecurityGroupException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ApplySecurityGroupsToLoadBalancerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ApplySecurityGroupsToLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
_inner.fmt(f)
}
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidConfigurationRequestException(
_inner,
) => _inner.fmt(f),
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidSecurityGroupException(_inner) => {
_inner.fmt(f)
}
ApplySecurityGroupsToLoadBalancerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ApplySecurityGroupsToLoadBalancerError {
fn code(&self) -> Option<&str> {
ApplySecurityGroupsToLoadBalancerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ApplySecurityGroupsToLoadBalancerError {
pub fn new(
kind: ApplySecurityGroupsToLoadBalancerErrorKind,
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: ApplySecurityGroupsToLoadBalancerErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ApplySecurityGroupsToLoadBalancerErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ApplySecurityGroupsToLoadBalancerErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_invalid_configuration_request_exception(&self) -> bool {
matches!(
&self.kind,
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidConfigurationRequestException(_)
)
}
pub fn is_invalid_security_group_exception(&self) -> bool {
matches!(
&self.kind,
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidSecurityGroupException(_)
)
}
}
impl std::error::Error for ApplySecurityGroupsToLoadBalancerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ApplySecurityGroupsToLoadBalancerErrorKind::AccessPointNotFoundException(_inner) => {
Some(_inner)
}
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidConfigurationRequestException(
_inner,
) => Some(_inner),
ApplySecurityGroupsToLoadBalancerErrorKind::InvalidSecurityGroupException(_inner) => {
Some(_inner)
}
ApplySecurityGroupsToLoadBalancerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddTagsError {
pub kind: AddTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddTagsErrorKind {
AccessPointNotFoundException(crate::error::AccessPointNotFoundException),
DuplicateTagKeysException(crate::error::DuplicateTagKeysException),
TooManyTagsException(crate::error::TooManyTagsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddTagsErrorKind::AccessPointNotFoundException(_inner) => _inner.fmt(f),
AddTagsErrorKind::DuplicateTagKeysException(_inner) => _inner.fmt(f),
AddTagsErrorKind::TooManyTagsException(_inner) => _inner.fmt(f),
AddTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddTagsError {
fn code(&self) -> Option<&str> {
AddTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddTagsError {
pub fn new(kind: AddTagsErrorKind, 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: AddTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddTagsErrorKind::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_point_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AddTagsErrorKind::AccessPointNotFoundException(_)
)
}
pub fn is_duplicate_tag_keys_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::DuplicateTagKeysException(_))
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, AddTagsErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for AddTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddTagsErrorKind::AccessPointNotFoundException(_inner) => Some(_inner),
AddTagsErrorKind::DuplicateTagKeysException(_inner) => Some(_inner),
AddTagsErrorKind::TooManyTagsException(_inner) => Some(_inner),
AddTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}