#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateAutoScalingGroupError {
pub kind: UpdateAutoScalingGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateAutoScalingGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateAutoScalingGroupErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateAutoScalingGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
UpdateAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_inner) => {
_inner.fmt(f)
}
UpdateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
UpdateAutoScalingGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateAutoScalingGroupError {
fn code(&self) -> Option<&str> {
UpdateAutoScalingGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateAutoScalingGroupError {
pub fn new(kind: UpdateAutoScalingGroupErrorKind, 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: UpdateAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateAutoScalingGroupErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
UpdateAutoScalingGroupErrorKind::ResourceContentionFault(_)
)
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
UpdateAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
UpdateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for UpdateAutoScalingGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => Some(_inner),
UpdateAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_inner) => Some(_inner),
UpdateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
UpdateAutoScalingGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceLinkedRoleFailure {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceLinkedRoleFailure {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceLinkedRoleFailure {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceLinkedRoleFailure")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceLinkedRoleFailure {}
pub mod service_linked_role_failure {
#[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::ServiceLinkedRoleFailure {
crate::error::ServiceLinkedRoleFailure {
message: self.message,
}
}
}
}
impl ServiceLinkedRoleFailure {
pub fn builder() -> crate::error::service_linked_role_failure::Builder {
crate::error::service_linked_role_failure::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ScalingActivityInProgressFault {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ScalingActivityInProgressFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ScalingActivityInProgressFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ScalingActivityInProgressFault")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ScalingActivityInProgressFault {}
pub mod scaling_activity_in_progress_fault {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ScalingActivityInProgressFault {
crate::error::ScalingActivityInProgressFault {
message: self.message,
}
}
}
}
impl ScalingActivityInProgressFault {
pub fn builder() -> crate::error::scaling_activity_in_progress_fault::Builder {
crate::error::scaling_activity_in_progress_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceContentionFault {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceContentionFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceContentionFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceContentionFault")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceContentionFault {}
pub mod resource_contention_fault {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceContentionFault {
crate::error::ResourceContentionFault {
message: self.message,
}
}
}
}
impl ResourceContentionFault {
pub fn builder() -> crate::error::resource_contention_fault::Builder {
crate::error::resource_contention_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TerminateInstanceInAutoScalingGroupError {
pub kind: TerminateInstanceInAutoScalingGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TerminateInstanceInAutoScalingGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TerminateInstanceInAutoScalingGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TerminateInstanceInAutoScalingGroupErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TerminateInstanceInAutoScalingGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TerminateInstanceInAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
TerminateInstanceInAutoScalingGroupErrorKind::ScalingActivityInProgressFault(
_inner,
) => _inner.fmt(f),
TerminateInstanceInAutoScalingGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TerminateInstanceInAutoScalingGroupError {
fn code(&self) -> Option<&str> {
TerminateInstanceInAutoScalingGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TerminateInstanceInAutoScalingGroupError {
pub fn new(
kind: TerminateInstanceInAutoScalingGroupErrorKind,
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: TerminateInstanceInAutoScalingGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TerminateInstanceInAutoScalingGroupErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
TerminateInstanceInAutoScalingGroupErrorKind::ResourceContentionFault(_)
)
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
TerminateInstanceInAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_)
)
}
}
impl std::error::Error for TerminateInstanceInAutoScalingGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TerminateInstanceInAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
TerminateInstanceInAutoScalingGroupErrorKind::ScalingActivityInProgressFault(
_inner,
) => Some(_inner),
TerminateInstanceInAutoScalingGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SuspendProcessesError {
pub kind: SuspendProcessesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SuspendProcessesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SuspendProcessesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SuspendProcessesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SuspendProcessesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SuspendProcessesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
SuspendProcessesErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
SuspendProcessesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SuspendProcessesError {
fn code(&self) -> Option<&str> {
SuspendProcessesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SuspendProcessesError {
pub fn new(kind: SuspendProcessesErrorKind, 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: SuspendProcessesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SuspendProcessesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
SuspendProcessesErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(&self.kind, SuspendProcessesErrorKind::ResourceInUseFault(_))
}
}
impl std::error::Error for SuspendProcessesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SuspendProcessesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
SuspendProcessesErrorKind::ResourceInUseFault(_inner) => Some(_inner),
SuspendProcessesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceInUseFault {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseFault")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseFault {}
pub mod resource_in_use_fault {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceInUseFault {
crate::error::ResourceInUseFault {
message: self.message,
}
}
}
}
impl ResourceInUseFault {
pub fn builder() -> crate::error::resource_in_use_fault::Builder {
crate::error::resource_in_use_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartInstanceRefreshError {
pub kind: StartInstanceRefreshErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartInstanceRefreshError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartInstanceRefreshErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartInstanceRefreshErrorKind {
InstanceRefreshInProgressFault(crate::error::InstanceRefreshInProgressFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartInstanceRefreshError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartInstanceRefreshErrorKind::InstanceRefreshInProgressFault(_inner) => _inner.fmt(f),
StartInstanceRefreshErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
StartInstanceRefreshErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
StartInstanceRefreshErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartInstanceRefreshError {
fn code(&self) -> Option<&str> {
StartInstanceRefreshError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartInstanceRefreshError {
pub fn new(kind: StartInstanceRefreshErrorKind, 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: StartInstanceRefreshErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartInstanceRefreshErrorKind::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_instance_refresh_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
StartInstanceRefreshErrorKind::InstanceRefreshInProgressFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
StartInstanceRefreshErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
StartInstanceRefreshErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for StartInstanceRefreshError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartInstanceRefreshErrorKind::InstanceRefreshInProgressFault(_inner) => Some(_inner),
StartInstanceRefreshErrorKind::LimitExceededFault(_inner) => Some(_inner),
StartInstanceRefreshErrorKind::ResourceContentionFault(_inner) => Some(_inner),
StartInstanceRefreshErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededFault {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededFault")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededFault {}
pub mod limit_exceeded_fault {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededFault {
crate::error::LimitExceededFault {
message: self.message,
}
}
}
}
impl LimitExceededFault {
pub fn builder() -> crate::error::limit_exceeded_fault::Builder {
crate::error::limit_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceRefreshInProgressFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InstanceRefreshInProgressFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InstanceRefreshInProgressFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InstanceRefreshInProgressFault")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InstanceRefreshInProgressFault {}
pub mod instance_refresh_in_progress_fault {
#[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::InstanceRefreshInProgressFault {
crate::error::InstanceRefreshInProgressFault {
message: self.message,
}
}
}
}
impl InstanceRefreshInProgressFault {
pub fn builder() -> crate::error::instance_refresh_in_progress_fault::Builder {
crate::error::instance_refresh_in_progress_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetInstanceProtectionError {
pub kind: SetInstanceProtectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetInstanceProtectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetInstanceProtectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetInstanceProtectionErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetInstanceProtectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetInstanceProtectionErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
SetInstanceProtectionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
SetInstanceProtectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetInstanceProtectionError {
fn code(&self) -> Option<&str> {
SetInstanceProtectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetInstanceProtectionError {
pub fn new(kind: SetInstanceProtectionErrorKind, 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: SetInstanceProtectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetInstanceProtectionErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
SetInstanceProtectionErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
SetInstanceProtectionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for SetInstanceProtectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetInstanceProtectionErrorKind::LimitExceededFault(_inner) => Some(_inner),
SetInstanceProtectionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
SetInstanceProtectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetInstanceHealthError {
pub kind: SetInstanceHealthErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetInstanceHealthError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetInstanceHealthErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetInstanceHealthErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetInstanceHealthError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetInstanceHealthErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
SetInstanceHealthErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetInstanceHealthError {
fn code(&self) -> Option<&str> {
SetInstanceHealthError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetInstanceHealthError {
pub fn new(kind: SetInstanceHealthErrorKind, 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: SetInstanceHealthErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetInstanceHealthErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
SetInstanceHealthErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for SetInstanceHealthError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetInstanceHealthErrorKind::ResourceContentionFault(_inner) => Some(_inner),
SetInstanceHealthErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetDesiredCapacityError {
pub kind: SetDesiredCapacityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SetDesiredCapacityError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SetDesiredCapacityErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetDesiredCapacityErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SetDesiredCapacityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetDesiredCapacityErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
SetDesiredCapacityErrorKind::ScalingActivityInProgressFault(_inner) => _inner.fmt(f),
SetDesiredCapacityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetDesiredCapacityError {
fn code(&self) -> Option<&str> {
SetDesiredCapacityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl SetDesiredCapacityError {
pub fn new(kind: SetDesiredCapacityErrorKind, 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: SetDesiredCapacityErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetDesiredCapacityErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
SetDesiredCapacityErrorKind::ResourceContentionFault(_)
)
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
SetDesiredCapacityErrorKind::ScalingActivityInProgressFault(_)
)
}
}
impl std::error::Error for SetDesiredCapacityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetDesiredCapacityErrorKind::ResourceContentionFault(_inner) => Some(_inner),
SetDesiredCapacityErrorKind::ScalingActivityInProgressFault(_inner) => Some(_inner),
SetDesiredCapacityErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResumeProcessesError {
pub kind: ResumeProcessesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResumeProcessesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResumeProcessesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResumeProcessesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResumeProcessesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResumeProcessesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
ResumeProcessesErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
ResumeProcessesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResumeProcessesError {
fn code(&self) -> Option<&str> {
ResumeProcessesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResumeProcessesError {
pub fn new(kind: ResumeProcessesErrorKind, 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: ResumeProcessesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResumeProcessesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
ResumeProcessesErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(&self.kind, ResumeProcessesErrorKind::ResourceInUseFault(_))
}
}
impl std::error::Error for ResumeProcessesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResumeProcessesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
ResumeProcessesErrorKind::ResourceInUseFault(_inner) => Some(_inner),
ResumeProcessesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RecordLifecycleActionHeartbeatError {
pub kind: RecordLifecycleActionHeartbeatErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RecordLifecycleActionHeartbeatError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RecordLifecycleActionHeartbeatErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RecordLifecycleActionHeartbeatErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RecordLifecycleActionHeartbeatError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RecordLifecycleActionHeartbeatErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
RecordLifecycleActionHeartbeatErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RecordLifecycleActionHeartbeatError {
fn code(&self) -> Option<&str> {
RecordLifecycleActionHeartbeatError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RecordLifecycleActionHeartbeatError {
pub fn new(
kind: RecordLifecycleActionHeartbeatErrorKind,
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: RecordLifecycleActionHeartbeatErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RecordLifecycleActionHeartbeatErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
RecordLifecycleActionHeartbeatErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for RecordLifecycleActionHeartbeatError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RecordLifecycleActionHeartbeatErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
RecordLifecycleActionHeartbeatErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutWarmPoolError {
pub kind: PutWarmPoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutWarmPoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutWarmPoolErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutWarmPoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutWarmPoolErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutWarmPoolErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
PutWarmPoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutWarmPoolError {
fn code(&self) -> Option<&str> {
PutWarmPoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutWarmPoolError {
pub fn new(kind: PutWarmPoolErrorKind, 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: PutWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutWarmPoolErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(&self.kind, PutWarmPoolErrorKind::LimitExceededFault(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(&self.kind, PutWarmPoolErrorKind::ResourceContentionFault(_))
}
}
impl std::error::Error for PutWarmPoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutWarmPoolErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutWarmPoolErrorKind::ResourceContentionFault(_inner) => Some(_inner),
PutWarmPoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutScheduledUpdateGroupActionError {
pub kind: PutScheduledUpdateGroupActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutScheduledUpdateGroupActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutScheduledUpdateGroupActionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutScheduledUpdateGroupActionErrorKind {
AlreadyExistsFault(crate::error::AlreadyExistsFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutScheduledUpdateGroupActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_inner) => _inner.fmt(f),
PutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
PutScheduledUpdateGroupActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutScheduledUpdateGroupActionError {
fn code(&self) -> Option<&str> {
PutScheduledUpdateGroupActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutScheduledUpdateGroupActionError {
pub fn new(
kind: PutScheduledUpdateGroupActionErrorKind,
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: PutScheduledUpdateGroupActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutScheduledUpdateGroupActionErrorKind::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_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
PutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
PutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
PutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for PutScheduledUpdateGroupActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_inner) => Some(_inner),
PutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
PutScheduledUpdateGroupActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AlreadyExistsFault {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AlreadyExistsFault")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for AlreadyExistsFault {}
pub mod already_exists_fault {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AlreadyExistsFault {
crate::error::AlreadyExistsFault {
message: self.message,
}
}
}
}
impl AlreadyExistsFault {
pub fn builder() -> crate::error::already_exists_fault::Builder {
crate::error::already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutScalingPolicyError {
pub kind: PutScalingPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutScalingPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutScalingPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutScalingPolicyErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutScalingPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutScalingPolicyErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutScalingPolicyError {
fn code(&self) -> Option<&str> {
PutScalingPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutScalingPolicyError {
pub fn new(kind: PutScalingPolicyErrorKind, 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: PutScalingPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutScalingPolicyErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(&self.kind, PutScalingPolicyErrorKind::LimitExceededFault(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for PutScalingPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutScalingPolicyErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutScalingPolicyErrorKind::ResourceContentionFault(_inner) => Some(_inner),
PutScalingPolicyErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
PutScalingPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutNotificationConfigurationError {
pub kind: PutNotificationConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutNotificationConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutNotificationConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutNotificationConfigurationErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutNotificationConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutNotificationConfigurationErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutNotificationConfigurationErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
PutNotificationConfigurationErrorKind::ServiceLinkedRoleFailure(_inner) => {
_inner.fmt(f)
}
PutNotificationConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutNotificationConfigurationError {
fn code(&self) -> Option<&str> {
PutNotificationConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutNotificationConfigurationError {
pub fn new(kind: PutNotificationConfigurationErrorKind, 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: PutNotificationConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutNotificationConfigurationErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
PutNotificationConfigurationErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
PutNotificationConfigurationErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
PutNotificationConfigurationErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for PutNotificationConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutNotificationConfigurationErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutNotificationConfigurationErrorKind::ResourceContentionFault(_inner) => Some(_inner),
PutNotificationConfigurationErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
PutNotificationConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutLifecycleHookError {
pub kind: PutLifecycleHookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutLifecycleHookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutLifecycleHookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutLifecycleHookErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutLifecycleHookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutLifecycleHookErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
PutLifecycleHookErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
PutLifecycleHookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutLifecycleHookError {
fn code(&self) -> Option<&str> {
PutLifecycleHookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutLifecycleHookError {
pub fn new(kind: PutLifecycleHookErrorKind, 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: PutLifecycleHookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutLifecycleHookErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(&self.kind, PutLifecycleHookErrorKind::LimitExceededFault(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
PutLifecycleHookErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for PutLifecycleHookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutLifecycleHookErrorKind::LimitExceededFault(_inner) => Some(_inner),
PutLifecycleHookErrorKind::ResourceContentionFault(_inner) => Some(_inner),
PutLifecycleHookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPredictiveScalingForecastError {
pub kind: GetPredictiveScalingForecastErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetPredictiveScalingForecastError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetPredictiveScalingForecastErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPredictiveScalingForecastErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetPredictiveScalingForecastError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPredictiveScalingForecastErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
GetPredictiveScalingForecastErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPredictiveScalingForecastError {
fn code(&self) -> Option<&str> {
GetPredictiveScalingForecastError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetPredictiveScalingForecastError {
pub fn new(kind: GetPredictiveScalingForecastErrorKind, 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: GetPredictiveScalingForecastErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPredictiveScalingForecastErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
GetPredictiveScalingForecastErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for GetPredictiveScalingForecastError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPredictiveScalingForecastErrorKind::ResourceContentionFault(_inner) => Some(_inner),
GetPredictiveScalingForecastErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExitStandbyError {
pub kind: ExitStandbyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExitStandbyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExitStandbyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExitStandbyErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExitStandbyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExitStandbyErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
ExitStandbyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExitStandbyError {
fn code(&self) -> Option<&str> {
ExitStandbyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExitStandbyError {
pub fn new(kind: ExitStandbyErrorKind, 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: ExitStandbyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExitStandbyErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(&self.kind, ExitStandbyErrorKind::ResourceContentionFault(_))
}
}
impl std::error::Error for ExitStandbyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExitStandbyErrorKind::ResourceContentionFault(_inner) => Some(_inner),
ExitStandbyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExecutePolicyError {
pub kind: ExecutePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExecutePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExecutePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExecutePolicyErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExecutePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExecutePolicyErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
ExecutePolicyErrorKind::ScalingActivityInProgressFault(_inner) => _inner.fmt(f),
ExecutePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExecutePolicyError {
fn code(&self) -> Option<&str> {
ExecutePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExecutePolicyError {
pub fn new(kind: ExecutePolicyErrorKind, 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: ExecutePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExecutePolicyErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
ExecutePolicyErrorKind::ResourceContentionFault(_)
)
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
ExecutePolicyErrorKind::ScalingActivityInProgressFault(_)
)
}
}
impl std::error::Error for ExecutePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExecutePolicyErrorKind::ResourceContentionFault(_inner) => Some(_inner),
ExecutePolicyErrorKind::ScalingActivityInProgressFault(_inner) => Some(_inner),
ExecutePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnterStandbyError {
pub kind: EnterStandbyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnterStandbyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnterStandbyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnterStandbyErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnterStandbyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnterStandbyErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
EnterStandbyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnterStandbyError {
fn code(&self) -> Option<&str> {
EnterStandbyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnterStandbyError {
pub fn new(kind: EnterStandbyErrorKind, 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: EnterStandbyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnterStandbyErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
EnterStandbyErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for EnterStandbyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnterStandbyErrorKind::ResourceContentionFault(_inner) => Some(_inner),
EnterStandbyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct EnableMetricsCollectionError {
pub kind: EnableMetricsCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for EnableMetricsCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: EnableMetricsCollectionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum EnableMetricsCollectionErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for EnableMetricsCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
EnableMetricsCollectionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
EnableMetricsCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for EnableMetricsCollectionError {
fn code(&self) -> Option<&str> {
EnableMetricsCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl EnableMetricsCollectionError {
pub fn new(kind: EnableMetricsCollectionErrorKind, 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: EnableMetricsCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: EnableMetricsCollectionErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
EnableMetricsCollectionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for EnableMetricsCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
EnableMetricsCollectionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
EnableMetricsCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisableMetricsCollectionError {
pub kind: DisableMetricsCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisableMetricsCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisableMetricsCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisableMetricsCollectionErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisableMetricsCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisableMetricsCollectionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DisableMetricsCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisableMetricsCollectionError {
fn code(&self) -> Option<&str> {
DisableMetricsCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisableMetricsCollectionError {
pub fn new(kind: DisableMetricsCollectionErrorKind, 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: DisableMetricsCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisableMetricsCollectionErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DisableMetricsCollectionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DisableMetricsCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisableMetricsCollectionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DisableMetricsCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachTrafficSourcesError {
pub kind: DetachTrafficSourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachTrafficSourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachTrafficSourcesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachTrafficSourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachTrafficSourcesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DetachTrafficSourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachTrafficSourcesError {
fn code(&self) -> Option<&str> {
DetachTrafficSourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachTrafficSourcesError {
pub fn new(kind: DetachTrafficSourcesErrorKind, 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: DetachTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachTrafficSourcesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DetachTrafficSourcesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DetachTrafficSourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachTrafficSourcesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DetachTrafficSourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachLoadBalancerTargetGroupsError {
pub kind: DetachLoadBalancerTargetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachLoadBalancerTargetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachLoadBalancerTargetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachLoadBalancerTargetGroupsErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachLoadBalancerTargetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DetachLoadBalancerTargetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachLoadBalancerTargetGroupsError {
fn code(&self) -> Option<&str> {
DetachLoadBalancerTargetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachLoadBalancerTargetGroupsError {
pub fn new(
kind: DetachLoadBalancerTargetGroupsErrorKind,
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: DetachLoadBalancerTargetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachLoadBalancerTargetGroupsErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DetachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DetachLoadBalancerTargetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DetachLoadBalancerTargetGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachLoadBalancersError {
pub kind: DetachLoadBalancersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachLoadBalancersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachLoadBalancersErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachLoadBalancersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachLoadBalancersErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DetachLoadBalancersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachLoadBalancersError {
fn code(&self) -> Option<&str> {
DetachLoadBalancersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachLoadBalancersError {
pub fn new(kind: DetachLoadBalancersErrorKind, 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: DetachLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachLoadBalancersErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DetachLoadBalancersErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DetachLoadBalancersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachLoadBalancersErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DetachLoadBalancersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachInstancesError {
pub kind: DetachInstancesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachInstancesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachInstancesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachInstancesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachInstancesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachInstancesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DetachInstancesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachInstancesError {
fn code(&self) -> Option<&str> {
DetachInstancesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachInstancesError {
pub fn new(kind: DetachInstancesErrorKind, 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: DetachInstancesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachInstancesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DetachInstancesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DetachInstancesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachInstancesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DetachInstancesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeWarmPoolError {
pub kind: DescribeWarmPoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeWarmPoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeWarmPoolErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeWarmPoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeWarmPoolErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeWarmPoolErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
DescribeWarmPoolErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeWarmPoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeWarmPoolError {
fn code(&self) -> Option<&str> {
DescribeWarmPoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeWarmPoolError {
pub fn new(kind: DescribeWarmPoolErrorKind, 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: DescribeWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeWarmPoolErrorKind::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_invalid_next_token(&self) -> bool {
matches!(&self.kind, DescribeWarmPoolErrorKind::InvalidNextToken(_))
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(&self.kind, DescribeWarmPoolErrorKind::LimitExceededFault(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeWarmPoolErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeWarmPoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeWarmPoolErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeWarmPoolErrorKind::LimitExceededFault(_inner) => Some(_inner),
DescribeWarmPoolErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeWarmPoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextToken {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextToken {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextToken {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextToken")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextToken {}
pub mod invalid_next_token {
#[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 {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidNextToken {
crate::error::InvalidNextToken {
message: self.message,
}
}
}
}
impl InvalidNextToken {
pub fn builder() -> crate::error::invalid_next_token::Builder {
crate::error::invalid_next_token::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTrafficSourcesError {
pub kind: DescribeTrafficSourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTrafficSourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTrafficSourcesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTrafficSourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTrafficSourcesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeTrafficSourcesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeTrafficSourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTrafficSourcesError {
fn code(&self) -> Option<&str> {
DescribeTrafficSourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTrafficSourcesError {
pub fn new(kind: DescribeTrafficSourcesErrorKind, 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: DescribeTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTrafficSourcesErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeTrafficSourcesErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeTrafficSourcesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeTrafficSourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTrafficSourcesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeTrafficSourcesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeTrafficSourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTerminationPolicyTypesError {
pub kind: DescribeTerminationPolicyTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTerminationPolicyTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTerminationPolicyTypesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTerminationPolicyTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTerminationPolicyTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTerminationPolicyTypesErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DescribeTerminationPolicyTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTerminationPolicyTypesError {
fn code(&self) -> Option<&str> {
DescribeTerminationPolicyTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeTerminationPolicyTypesError {
pub fn new(
kind: DescribeTerminationPolicyTypesErrorKind,
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: DescribeTerminationPolicyTypesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTerminationPolicyTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeTerminationPolicyTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeTerminationPolicyTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTerminationPolicyTypesErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DescribeTerminationPolicyTypesErrorKind::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 {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
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::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeTagsErrorKind::ResourceContentionFault(_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_invalid_next_token(&self) -> bool {
matches!(&self.kind, DescribeTagsErrorKind::InvalidNextToken(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeTagsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTagsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeTagsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeScheduledActionsError {
pub kind: DescribeScheduledActionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeScheduledActionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeScheduledActionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeScheduledActionsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeScheduledActionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeScheduledActionsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeScheduledActionsErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeScheduledActionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeScheduledActionsError {
fn code(&self) -> Option<&str> {
DescribeScheduledActionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeScheduledActionsError {
pub fn new(kind: DescribeScheduledActionsErrorKind, 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: DescribeScheduledActionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeScheduledActionsErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeScheduledActionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScheduledActionsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeScalingProcessTypesError {
pub kind: DescribeScalingProcessTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeScalingProcessTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeScalingProcessTypesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeScalingProcessTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeScalingProcessTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeScalingProcessTypesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeScalingProcessTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeScalingProcessTypesError {
fn code(&self) -> Option<&str> {
DescribeScalingProcessTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeScalingProcessTypesError {
pub fn new(kind: DescribeScalingProcessTypesErrorKind, 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: DescribeScalingProcessTypesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeScalingProcessTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeScalingProcessTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeScalingProcessTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScalingProcessTypesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeScalingProcessTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeScalingActivitiesError {
pub kind: DescribeScalingActivitiesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeScalingActivitiesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeScalingActivitiesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeScalingActivitiesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeScalingActivitiesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeScalingActivitiesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeScalingActivitiesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeScalingActivitiesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeScalingActivitiesError {
fn code(&self) -> Option<&str> {
DescribeScalingActivitiesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeScalingActivitiesError {
pub fn new(kind: DescribeScalingActivitiesErrorKind, 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: DescribeScalingActivitiesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeScalingActivitiesErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeScalingActivitiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScalingActivitiesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePoliciesError {
pub kind: DescribePoliciesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePoliciesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePoliciesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePoliciesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePoliciesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePoliciesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribePoliciesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribePoliciesErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
DescribePoliciesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePoliciesError {
fn code(&self) -> Option<&str> {
DescribePoliciesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePoliciesError {
pub fn new(kind: DescribePoliciesErrorKind, 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: DescribePoliciesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePoliciesErrorKind::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_invalid_next_token(&self) -> bool {
matches!(&self.kind, DescribePoliciesErrorKind::InvalidNextToken(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribePoliciesErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
DescribePoliciesErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for DescribePoliciesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePoliciesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribePoliciesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribePoliciesErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
DescribePoliciesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeNotificationConfigurationsError {
pub kind: DescribeNotificationConfigurationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeNotificationConfigurationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeNotificationConfigurationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeNotificationConfigurationsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeNotificationConfigurationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeNotificationConfigurationsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeNotificationConfigurationsErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DescribeNotificationConfigurationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeNotificationConfigurationsError {
fn code(&self) -> Option<&str> {
DescribeNotificationConfigurationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeNotificationConfigurationsError {
pub fn new(
kind: DescribeNotificationConfigurationsErrorKind,
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: DescribeNotificationConfigurationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeNotificationConfigurationsErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationConfigurationsErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeNotificationConfigurationsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeNotificationConfigurationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeNotificationConfigurationsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeNotificationConfigurationsErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DescribeNotificationConfigurationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeMetricCollectionTypesError {
pub kind: DescribeMetricCollectionTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeMetricCollectionTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeMetricCollectionTypesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeMetricCollectionTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeMetricCollectionTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeMetricCollectionTypesErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DescribeMetricCollectionTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeMetricCollectionTypesError {
fn code(&self) -> Option<&str> {
DescribeMetricCollectionTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeMetricCollectionTypesError {
pub fn new(
kind: DescribeMetricCollectionTypesErrorKind,
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: DescribeMetricCollectionTypesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeMetricCollectionTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeMetricCollectionTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeMetricCollectionTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeMetricCollectionTypesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeMetricCollectionTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLoadBalancerTargetGroupsError {
pub kind: DescribeLoadBalancerTargetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLoadBalancerTargetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLoadBalancerTargetGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLoadBalancerTargetGroupsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLoadBalancerTargetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLoadBalancerTargetGroupsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DescribeLoadBalancerTargetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLoadBalancerTargetGroupsError {
fn code(&self) -> Option<&str> {
DescribeLoadBalancerTargetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLoadBalancerTargetGroupsError {
pub fn new(
kind: DescribeLoadBalancerTargetGroupsErrorKind,
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: DescribeLoadBalancerTargetGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLoadBalancerTargetGroupsErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerTargetGroupsErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeLoadBalancerTargetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancerTargetGroupsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DescribeLoadBalancerTargetGroupsErrorKind::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 {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
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::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeLoadBalancersErrorKind::ResourceContentionFault(_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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancersErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeLoadBalancersErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeLoadBalancersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLoadBalancersErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeLoadBalancersErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeLoadBalancersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLifecycleHookTypesError {
pub kind: DescribeLifecycleHookTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLifecycleHookTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLifecycleHookTypesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLifecycleHookTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLifecycleHookTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLifecycleHookTypesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeLifecycleHookTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLifecycleHookTypesError {
fn code(&self) -> Option<&str> {
DescribeLifecycleHookTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLifecycleHookTypesError {
pub fn new(kind: DescribeLifecycleHookTypesErrorKind, 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: DescribeLifecycleHookTypesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLifecycleHookTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeLifecycleHookTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeLifecycleHookTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLifecycleHookTypesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeLifecycleHookTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLifecycleHooksError {
pub kind: DescribeLifecycleHooksErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLifecycleHooksError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLifecycleHooksErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLifecycleHooksErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLifecycleHooksError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLifecycleHooksErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeLifecycleHooksErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLifecycleHooksError {
fn code(&self) -> Option<&str> {
DescribeLifecycleHooksError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLifecycleHooksError {
pub fn new(kind: DescribeLifecycleHooksErrorKind, 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: DescribeLifecycleHooksErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLifecycleHooksErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeLifecycleHooksErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeLifecycleHooksError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLifecycleHooksErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeLifecycleHooksErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeLaunchConfigurationsError {
pub kind: DescribeLaunchConfigurationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeLaunchConfigurationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeLaunchConfigurationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeLaunchConfigurationsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeLaunchConfigurationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeLaunchConfigurationsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeLaunchConfigurationsErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeLaunchConfigurationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeLaunchConfigurationsError {
fn code(&self) -> Option<&str> {
DescribeLaunchConfigurationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeLaunchConfigurationsError {
pub fn new(kind: DescribeLaunchConfigurationsErrorKind, 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: DescribeLaunchConfigurationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeLaunchConfigurationsErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeLaunchConfigurationsErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeLaunchConfigurationsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeLaunchConfigurationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeLaunchConfigurationsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeLaunchConfigurationsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeLaunchConfigurationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceRefreshesError {
pub kind: DescribeInstanceRefreshesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeInstanceRefreshesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeInstanceRefreshesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeInstanceRefreshesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeInstanceRefreshesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeInstanceRefreshesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeInstanceRefreshesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeInstanceRefreshesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeInstanceRefreshesError {
fn code(&self) -> Option<&str> {
DescribeInstanceRefreshesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeInstanceRefreshesError {
pub fn new(kind: DescribeInstanceRefreshesErrorKind, 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: DescribeInstanceRefreshesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeInstanceRefreshesErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceRefreshesErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceRefreshesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeInstanceRefreshesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeInstanceRefreshesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeInstanceRefreshesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeInstanceRefreshesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAutoScalingNotificationTypesError {
pub kind: DescribeAutoScalingNotificationTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAutoScalingNotificationTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAutoScalingNotificationTypesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAutoScalingNotificationTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAutoScalingNotificationTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAutoScalingNotificationTypesErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DescribeAutoScalingNotificationTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAutoScalingNotificationTypesError {
fn code(&self) -> Option<&str> {
DescribeAutoScalingNotificationTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAutoScalingNotificationTypesError {
pub fn new(
kind: DescribeAutoScalingNotificationTypesErrorKind,
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: DescribeAutoScalingNotificationTypesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAutoScalingNotificationTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingNotificationTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeAutoScalingNotificationTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAutoScalingNotificationTypesErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DescribeAutoScalingNotificationTypesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAutoScalingInstancesError {
pub kind: DescribeAutoScalingInstancesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAutoScalingInstancesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAutoScalingInstancesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAutoScalingInstancesErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAutoScalingInstancesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAutoScalingInstancesErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeAutoScalingInstancesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeAutoScalingInstancesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAutoScalingInstancesError {
fn code(&self) -> Option<&str> {
DescribeAutoScalingInstancesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAutoScalingInstancesError {
pub fn new(kind: DescribeAutoScalingInstancesErrorKind, 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: DescribeAutoScalingInstancesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAutoScalingInstancesErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingInstancesErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingInstancesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeAutoScalingInstancesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAutoScalingInstancesErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeAutoScalingInstancesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeAutoScalingInstancesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAutoScalingGroupsError {
pub kind: DescribeAutoScalingGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAutoScalingGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAutoScalingGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAutoScalingGroupsErrorKind {
InvalidNextToken(crate::error::InvalidNextToken),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAutoScalingGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAutoScalingGroupsErrorKind::InvalidNextToken(_inner) => _inner.fmt(f),
DescribeAutoScalingGroupsErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeAutoScalingGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAutoScalingGroupsError {
fn code(&self) -> Option<&str> {
DescribeAutoScalingGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAutoScalingGroupsError {
pub fn new(kind: DescribeAutoScalingGroupsErrorKind, 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: DescribeAutoScalingGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAutoScalingGroupsErrorKind::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_invalid_next_token(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingGroupsErrorKind::InvalidNextToken(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAutoScalingGroupsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeAutoScalingGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAutoScalingGroupsErrorKind::InvalidNextToken(_inner) => Some(_inner),
DescribeAutoScalingGroupsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeAutoScalingGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAdjustmentTypesError {
pub kind: DescribeAdjustmentTypesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeAdjustmentTypesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAdjustmentTypesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAdjustmentTypesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAdjustmentTypesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAdjustmentTypesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DescribeAdjustmentTypesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAdjustmentTypesError {
fn code(&self) -> Option<&str> {
DescribeAdjustmentTypesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAdjustmentTypesError {
pub fn new(kind: DescribeAdjustmentTypesErrorKind, 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: DescribeAdjustmentTypesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAdjustmentTypesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAdjustmentTypesErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeAdjustmentTypesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAdjustmentTypesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeAdjustmentTypesErrorKind::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 {
ResourceContentionFault(crate::error::ResourceContentionFault),
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::ResourceContentionFault(_inner) => _inner.fmt(f),
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()
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DescribeAccountLimitsErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DescribeAccountLimitsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountLimitsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DescribeAccountLimitsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWarmPoolError {
pub kind: DeleteWarmPoolErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWarmPoolError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWarmPoolErrorKind {
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWarmPoolError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWarmPoolErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
DeleteWarmPoolErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteWarmPoolErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
DeleteWarmPoolErrorKind::ScalingActivityInProgressFault(_inner) => _inner.fmt(f),
DeleteWarmPoolErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWarmPoolError {
fn code(&self) -> Option<&str> {
DeleteWarmPoolError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteWarmPoolError {
pub fn new(kind: DeleteWarmPoolErrorKind, 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: DeleteWarmPoolErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWarmPoolErrorKind::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_limit_exceeded_fault(&self) -> bool {
matches!(&self.kind, DeleteWarmPoolErrorKind::LimitExceededFault(_))
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteWarmPoolErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(&self.kind, DeleteWarmPoolErrorKind::ResourceInUseFault(_))
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
DeleteWarmPoolErrorKind::ScalingActivityInProgressFault(_)
)
}
}
impl std::error::Error for DeleteWarmPoolError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWarmPoolErrorKind::LimitExceededFault(_inner) => Some(_inner),
DeleteWarmPoolErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteWarmPoolErrorKind::ResourceInUseFault(_inner) => Some(_inner),
DeleteWarmPoolErrorKind::ScalingActivityInProgressFault(_inner) => Some(_inner),
DeleteWarmPoolErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTagsError {
pub kind: DeleteTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTagsErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTagsErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
DeleteTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTagsError {
fn code(&self) -> Option<&str> {
DeleteTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteTagsError {
pub fn new(kind: DeleteTagsErrorKind, 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: DeleteTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTagsErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(&self.kind, DeleteTagsErrorKind::ResourceContentionFault(_))
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(&self.kind, DeleteTagsErrorKind::ResourceInUseFault(_))
}
}
impl std::error::Error for DeleteTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTagsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteTagsErrorKind::ResourceInUseFault(_inner) => Some(_inner),
DeleteTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteScheduledActionError {
pub kind: DeleteScheduledActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteScheduledActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteScheduledActionErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteScheduledActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteScheduledActionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteScheduledActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteScheduledActionError {
fn code(&self) -> Option<&str> {
DeleteScheduledActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteScheduledActionError {
pub fn new(kind: DeleteScheduledActionErrorKind, 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: DeleteScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteScheduledActionErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteScheduledActionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DeleteScheduledActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteScheduledActionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteScheduledActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePolicyError {
pub kind: DeletePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePolicyErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePolicyErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeletePolicyErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
DeletePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePolicyError {
fn code(&self) -> Option<&str> {
DeletePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePolicyError {
pub fn new(kind: DeletePolicyErrorKind, 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: DeletePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePolicyErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeletePolicyErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
DeletePolicyErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for DeletePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePolicyErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeletePolicyErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
DeletePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteNotificationConfigurationError {
pub kind: DeleteNotificationConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteNotificationConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteNotificationConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteNotificationConfigurationErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteNotificationConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteNotificationConfigurationErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
DeleteNotificationConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteNotificationConfigurationError {
fn code(&self) -> Option<&str> {
DeleteNotificationConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteNotificationConfigurationError {
pub fn new(
kind: DeleteNotificationConfigurationErrorKind,
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: DeleteNotificationConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteNotificationConfigurationErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteNotificationConfigurationErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DeleteNotificationConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteNotificationConfigurationErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
DeleteNotificationConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLifecycleHookError {
pub kind: DeleteLifecycleHookErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLifecycleHookError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLifecycleHookErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLifecycleHookErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLifecycleHookError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLifecycleHookErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteLifecycleHookErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLifecycleHookError {
fn code(&self) -> Option<&str> {
DeleteLifecycleHookError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLifecycleHookError {
pub fn new(kind: DeleteLifecycleHookErrorKind, 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: DeleteLifecycleHookErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLifecycleHookErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteLifecycleHookErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for DeleteLifecycleHookError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLifecycleHookErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteLifecycleHookErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteLaunchConfigurationError {
pub kind: DeleteLaunchConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteLaunchConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteLaunchConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteLaunchConfigurationErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteLaunchConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteLaunchConfigurationErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteLaunchConfigurationErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
DeleteLaunchConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteLaunchConfigurationError {
fn code(&self) -> Option<&str> {
DeleteLaunchConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteLaunchConfigurationError {
pub fn new(kind: DeleteLaunchConfigurationErrorKind, 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: DeleteLaunchConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteLaunchConfigurationErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteLaunchConfigurationErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(
&self.kind,
DeleteLaunchConfigurationErrorKind::ResourceInUseFault(_)
)
}
}
impl std::error::Error for DeleteLaunchConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteLaunchConfigurationErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteLaunchConfigurationErrorKind::ResourceInUseFault(_inner) => Some(_inner),
DeleteLaunchConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAutoScalingGroupError {
pub kind: DeleteAutoScalingGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAutoScalingGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAutoScalingGroupErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
ScalingActivityInProgressFault(crate::error::ScalingActivityInProgressFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAutoScalingGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
DeleteAutoScalingGroupErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
DeleteAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_inner) => {
_inner.fmt(f)
}
DeleteAutoScalingGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAutoScalingGroupError {
fn code(&self) -> Option<&str> {
DeleteAutoScalingGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAutoScalingGroupError {
pub fn new(kind: DeleteAutoScalingGroupErrorKind, 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: DeleteAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAutoScalingGroupErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingGroupErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingGroupErrorKind::ResourceInUseFault(_)
)
}
pub fn is_scaling_activity_in_progress_fault(&self) -> bool {
matches!(
&self.kind,
DeleteAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_)
)
}
}
impl std::error::Error for DeleteAutoScalingGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => Some(_inner),
DeleteAutoScalingGroupErrorKind::ResourceInUseFault(_inner) => Some(_inner),
DeleteAutoScalingGroupErrorKind::ScalingActivityInProgressFault(_inner) => Some(_inner),
DeleteAutoScalingGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateOrUpdateTagsError {
pub kind: CreateOrUpdateTagsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateOrUpdateTagsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateOrUpdateTagsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateOrUpdateTagsErrorKind {
AlreadyExistsFault(crate::error::AlreadyExistsFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
ResourceInUseFault(crate::error::ResourceInUseFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateOrUpdateTagsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateOrUpdateTagsErrorKind::AlreadyExistsFault(_inner) => _inner.fmt(f),
CreateOrUpdateTagsErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
CreateOrUpdateTagsErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
CreateOrUpdateTagsErrorKind::ResourceInUseFault(_inner) => _inner.fmt(f),
CreateOrUpdateTagsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateOrUpdateTagsError {
fn code(&self) -> Option<&str> {
CreateOrUpdateTagsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateOrUpdateTagsError {
pub fn new(kind: CreateOrUpdateTagsErrorKind, 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: CreateOrUpdateTagsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateOrUpdateTagsErrorKind::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_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateOrUpdateTagsErrorKind::AlreadyExistsFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateOrUpdateTagsErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
CreateOrUpdateTagsErrorKind::ResourceContentionFault(_)
)
}
pub fn is_resource_in_use_fault(&self) -> bool {
matches!(
&self.kind,
CreateOrUpdateTagsErrorKind::ResourceInUseFault(_)
)
}
}
impl std::error::Error for CreateOrUpdateTagsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateOrUpdateTagsErrorKind::AlreadyExistsFault(_inner) => Some(_inner),
CreateOrUpdateTagsErrorKind::LimitExceededFault(_inner) => Some(_inner),
CreateOrUpdateTagsErrorKind::ResourceContentionFault(_inner) => Some(_inner),
CreateOrUpdateTagsErrorKind::ResourceInUseFault(_inner) => Some(_inner),
CreateOrUpdateTagsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateLaunchConfigurationError {
pub kind: CreateLaunchConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateLaunchConfigurationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateLaunchConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateLaunchConfigurationErrorKind {
AlreadyExistsFault(crate::error::AlreadyExistsFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateLaunchConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateLaunchConfigurationErrorKind::AlreadyExistsFault(_inner) => _inner.fmt(f),
CreateLaunchConfigurationErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
CreateLaunchConfigurationErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
CreateLaunchConfigurationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateLaunchConfigurationError {
fn code(&self) -> Option<&str> {
CreateLaunchConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateLaunchConfigurationError {
pub fn new(kind: CreateLaunchConfigurationErrorKind, 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: CreateLaunchConfigurationErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateLaunchConfigurationErrorKind::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_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateLaunchConfigurationErrorKind::AlreadyExistsFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateLaunchConfigurationErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
CreateLaunchConfigurationErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for CreateLaunchConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateLaunchConfigurationErrorKind::AlreadyExistsFault(_inner) => Some(_inner),
CreateLaunchConfigurationErrorKind::LimitExceededFault(_inner) => Some(_inner),
CreateLaunchConfigurationErrorKind::ResourceContentionFault(_inner) => Some(_inner),
CreateLaunchConfigurationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAutoScalingGroupError {
pub kind: CreateAutoScalingGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAutoScalingGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAutoScalingGroupErrorKind {
AlreadyExistsFault(crate::error::AlreadyExistsFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAutoScalingGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAutoScalingGroupErrorKind::AlreadyExistsFault(_inner) => _inner.fmt(f),
CreateAutoScalingGroupErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
CreateAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
CreateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
CreateAutoScalingGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAutoScalingGroupError {
fn code(&self) -> Option<&str> {
CreateAutoScalingGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAutoScalingGroupError {
pub fn new(kind: CreateAutoScalingGroupErrorKind, 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: CreateAutoScalingGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAutoScalingGroupErrorKind::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_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingGroupErrorKind::AlreadyExistsFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingGroupErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingGroupErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
CreateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for CreateAutoScalingGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAutoScalingGroupErrorKind::AlreadyExistsFault(_inner) => Some(_inner),
CreateAutoScalingGroupErrorKind::LimitExceededFault(_inner) => Some(_inner),
CreateAutoScalingGroupErrorKind::ResourceContentionFault(_inner) => Some(_inner),
CreateAutoScalingGroupErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
CreateAutoScalingGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CompleteLifecycleActionError {
pub kind: CompleteLifecycleActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CompleteLifecycleActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CompleteLifecycleActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CompleteLifecycleActionErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CompleteLifecycleActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CompleteLifecycleActionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
CompleteLifecycleActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CompleteLifecycleActionError {
fn code(&self) -> Option<&str> {
CompleteLifecycleActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CompleteLifecycleActionError {
pub fn new(kind: CompleteLifecycleActionErrorKind, 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: CompleteLifecycleActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CompleteLifecycleActionErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
CompleteLifecycleActionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for CompleteLifecycleActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CompleteLifecycleActionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
CompleteLifecycleActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelInstanceRefreshError {
pub kind: CancelInstanceRefreshErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelInstanceRefreshError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelInstanceRefreshErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelInstanceRefreshErrorKind {
ActiveInstanceRefreshNotFoundFault(crate::error::ActiveInstanceRefreshNotFoundFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelInstanceRefreshError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelInstanceRefreshErrorKind::ActiveInstanceRefreshNotFoundFault(_inner) => {
_inner.fmt(f)
}
CancelInstanceRefreshErrorKind::LimitExceededFault(_inner) => _inner.fmt(f),
CancelInstanceRefreshErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
CancelInstanceRefreshErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelInstanceRefreshError {
fn code(&self) -> Option<&str> {
CancelInstanceRefreshError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelInstanceRefreshError {
pub fn new(kind: CancelInstanceRefreshErrorKind, 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: CancelInstanceRefreshErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelInstanceRefreshErrorKind::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_active_instance_refresh_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CancelInstanceRefreshErrorKind::ActiveInstanceRefreshNotFoundFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CancelInstanceRefreshErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
CancelInstanceRefreshErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for CancelInstanceRefreshError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelInstanceRefreshErrorKind::ActiveInstanceRefreshNotFoundFault(_inner) => {
Some(_inner)
}
CancelInstanceRefreshErrorKind::LimitExceededFault(_inner) => Some(_inner),
CancelInstanceRefreshErrorKind::ResourceContentionFault(_inner) => Some(_inner),
CancelInstanceRefreshErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ActiveInstanceRefreshNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ActiveInstanceRefreshNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ActiveInstanceRefreshNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ActiveInstanceRefreshNotFoundFault")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ActiveInstanceRefreshNotFoundFault {}
pub mod active_instance_refresh_not_found_fault {
#[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::ActiveInstanceRefreshNotFoundFault {
crate::error::ActiveInstanceRefreshNotFoundFault {
message: self.message,
}
}
}
}
impl ActiveInstanceRefreshNotFoundFault {
pub fn builder() -> crate::error::active_instance_refresh_not_found_fault::Builder {
crate::error::active_instance_refresh_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchPutScheduledUpdateGroupActionError {
pub kind: BatchPutScheduledUpdateGroupActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchPutScheduledUpdateGroupActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchPutScheduledUpdateGroupActionErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchPutScheduledUpdateGroupActionErrorKind {
AlreadyExistsFault(crate::error::AlreadyExistsFault),
LimitExceededFault(crate::error::LimitExceededFault),
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchPutScheduledUpdateGroupActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_inner) => {
_inner.fmt(f)
}
BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_inner) => {
_inner.fmt(f)
}
BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
BatchPutScheduledUpdateGroupActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchPutScheduledUpdateGroupActionError {
fn code(&self) -> Option<&str> {
BatchPutScheduledUpdateGroupActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchPutScheduledUpdateGroupActionError {
pub fn new(
kind: BatchPutScheduledUpdateGroupActionErrorKind,
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: BatchPutScheduledUpdateGroupActionErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchPutScheduledUpdateGroupActionErrorKind::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_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_)
)
}
pub fn is_limit_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_)
)
}
pub fn is_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for BatchPutScheduledUpdateGroupActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchPutScheduledUpdateGroupActionErrorKind::AlreadyExistsFault(_inner) => Some(_inner),
BatchPutScheduledUpdateGroupActionErrorKind::LimitExceededFault(_inner) => Some(_inner),
BatchPutScheduledUpdateGroupActionErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
BatchPutScheduledUpdateGroupActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDeleteScheduledActionError {
pub kind: BatchDeleteScheduledActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchDeleteScheduledActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDeleteScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDeleteScheduledActionErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDeleteScheduledActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDeleteScheduledActionErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
BatchDeleteScheduledActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchDeleteScheduledActionError {
fn code(&self) -> Option<&str> {
BatchDeleteScheduledActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchDeleteScheduledActionError {
pub fn new(kind: BatchDeleteScheduledActionErrorKind, 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: BatchDeleteScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDeleteScheduledActionErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
BatchDeleteScheduledActionErrorKind::ResourceContentionFault(_)
)
}
}
impl std::error::Error for BatchDeleteScheduledActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDeleteScheduledActionErrorKind::ResourceContentionFault(_inner) => Some(_inner),
BatchDeleteScheduledActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachTrafficSourcesError {
pub kind: AttachTrafficSourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachTrafficSourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachTrafficSourcesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachTrafficSourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachTrafficSourcesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
AttachTrafficSourcesErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
AttachTrafficSourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachTrafficSourcesError {
fn code(&self) -> Option<&str> {
AttachTrafficSourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachTrafficSourcesError {
pub fn new(kind: AttachTrafficSourcesErrorKind, 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: AttachTrafficSourcesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachTrafficSourcesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
AttachTrafficSourcesErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
AttachTrafficSourcesErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for AttachTrafficSourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachTrafficSourcesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
AttachTrafficSourcesErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
AttachTrafficSourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachLoadBalancerTargetGroupsError {
pub kind: AttachLoadBalancerTargetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachLoadBalancerTargetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachLoadBalancerTargetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachLoadBalancerTargetGroupsErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachLoadBalancerTargetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
_inner.fmt(f)
}
AttachLoadBalancerTargetGroupsErrorKind::ServiceLinkedRoleFailure(_inner) => {
_inner.fmt(f)
}
AttachLoadBalancerTargetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachLoadBalancerTargetGroupsError {
fn code(&self) -> Option<&str> {
AttachLoadBalancerTargetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachLoadBalancerTargetGroupsError {
pub fn new(
kind: AttachLoadBalancerTargetGroupsErrorKind,
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: AttachLoadBalancerTargetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachLoadBalancerTargetGroupsErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancerTargetGroupsErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for AttachLoadBalancerTargetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachLoadBalancerTargetGroupsErrorKind::ResourceContentionFault(_inner) => {
Some(_inner)
}
AttachLoadBalancerTargetGroupsErrorKind::ServiceLinkedRoleFailure(_inner) => {
Some(_inner)
}
AttachLoadBalancerTargetGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachLoadBalancersError {
pub kind: AttachLoadBalancersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachLoadBalancersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachLoadBalancersErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachLoadBalancersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachLoadBalancersErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
AttachLoadBalancersErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
AttachLoadBalancersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachLoadBalancersError {
fn code(&self) -> Option<&str> {
AttachLoadBalancersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachLoadBalancersError {
pub fn new(kind: AttachLoadBalancersErrorKind, 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: AttachLoadBalancersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachLoadBalancersErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancersErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
AttachLoadBalancersErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for AttachLoadBalancersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachLoadBalancersErrorKind::ResourceContentionFault(_inner) => Some(_inner),
AttachLoadBalancersErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
AttachLoadBalancersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachInstancesError {
pub kind: AttachInstancesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachInstancesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachInstancesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachInstancesErrorKind {
ResourceContentionFault(crate::error::ResourceContentionFault),
ServiceLinkedRoleFailure(crate::error::ServiceLinkedRoleFailure),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachInstancesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachInstancesErrorKind::ResourceContentionFault(_inner) => _inner.fmt(f),
AttachInstancesErrorKind::ServiceLinkedRoleFailure(_inner) => _inner.fmt(f),
AttachInstancesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachInstancesError {
fn code(&self) -> Option<&str> {
AttachInstancesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachInstancesError {
pub fn new(kind: AttachInstancesErrorKind, 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: AttachInstancesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachInstancesErrorKind::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_resource_contention_fault(&self) -> bool {
matches!(
&self.kind,
AttachInstancesErrorKind::ResourceContentionFault(_)
)
}
pub fn is_service_linked_role_failure(&self) -> bool {
matches!(
&self.kind,
AttachInstancesErrorKind::ServiceLinkedRoleFailure(_)
)
}
}
impl std::error::Error for AttachInstancesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachInstancesErrorKind::ResourceContentionFault(_inner) => Some(_inner),
AttachInstancesErrorKind::ServiceLinkedRoleFailure(_inner) => Some(_inner),
AttachInstancesErrorKind::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 _)
}
}