#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RegisterScalableTargetError {
pub kind: RegisterScalableTargetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterScalableTargetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterScalableTargetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterScalableTargetErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
LimitExceededException(crate::error::LimitExceededException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RegisterScalableTargetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterScalableTargetErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
RegisterScalableTargetErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
RegisterScalableTargetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
RegisterScalableTargetErrorKind::ValidationException(_inner) => _inner.fmt(f),
RegisterScalableTargetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterScalableTargetError {
fn code(&self) -> Option<&str> {
RegisterScalableTargetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterScalableTargetError {
pub fn new(kind: RegisterScalableTargetErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: RegisterScalableTargetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterScalableTargetErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
RegisterScalableTargetErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
RegisterScalableTargetErrorKind::InternalServiceException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
RegisterScalableTargetErrorKind::LimitExceededException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
RegisterScalableTargetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for RegisterScalableTargetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterScalableTargetErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
RegisterScalableTargetErrorKind::InternalServiceException(_inner) => Some(_inner),
RegisterScalableTargetErrorKind::LimitExceededException(_inner) => Some(_inner),
RegisterScalableTargetErrorKind::ValidationException(_inner) => Some(_inner),
RegisterScalableTargetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServiceException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServiceException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServiceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServiceException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServiceException {}
pub mod internal_service_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServiceException {
crate::error::InternalServiceException {
message: self.message,
}
}
}
}
impl InternalServiceException {
pub fn builder() -> crate::error::internal_service_exception::Builder {
crate::error::internal_service_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConcurrentUpdateException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConcurrentUpdateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentUpdateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentUpdateException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ConcurrentUpdateException {}
pub mod concurrent_update_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConcurrentUpdateException {
crate::error::ConcurrentUpdateException {
message: self.message,
}
}
}
}
impl ConcurrentUpdateException {
pub fn builder() -> crate::error::concurrent_update_exception::Builder {
crate::error::concurrent_update_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutScheduledActionError {
pub kind: PutScheduledActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutScheduledActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutScheduledActionErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
LimitExceededException(crate::error::LimitExceededException),
ObjectNotFoundException(crate::error::ObjectNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutScheduledActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutScheduledActionErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
PutScheduledActionErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
PutScheduledActionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutScheduledActionErrorKind::ObjectNotFoundException(_inner) => _inner.fmt(f),
PutScheduledActionErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutScheduledActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutScheduledActionError {
fn code(&self) -> Option<&str> {
PutScheduledActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutScheduledActionError {
pub fn new(kind: PutScheduledActionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutScheduledActionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutScheduledActionErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
PutScheduledActionErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
PutScheduledActionErrorKind::InternalServiceException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutScheduledActionErrorKind::LimitExceededException(_)
)
}
pub fn is_object_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutScheduledActionErrorKind::ObjectNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutScheduledActionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutScheduledActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutScheduledActionErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
PutScheduledActionErrorKind::InternalServiceException(_inner) => Some(_inner),
PutScheduledActionErrorKind::LimitExceededException(_inner) => Some(_inner),
PutScheduledActionErrorKind::ObjectNotFoundException(_inner) => Some(_inner),
PutScheduledActionErrorKind::ValidationException(_inner) => Some(_inner),
PutScheduledActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ObjectNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ObjectNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ObjectNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ObjectNotFoundException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ObjectNotFoundException {}
pub mod object_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ObjectNotFoundException {
crate::error::ObjectNotFoundException {
message: self.message,
}
}
}
}
impl ObjectNotFoundException {
pub fn builder() -> crate::error::object_not_found_exception::Builder {
crate::error::object_not_found_exception::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 {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
FailedResourceAccessException(crate::error::FailedResourceAccessException),
InternalServiceException(crate::error::InternalServiceException),
LimitExceededException(crate::error::LimitExceededException),
ObjectNotFoundException(crate::error::ObjectNotFoundException),
ValidationException(crate::error::ValidationException),
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::ConcurrentUpdateException(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::FailedResourceAccessException(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::ObjectNotFoundException(_inner) => _inner.fmt(f),
PutScalingPolicyErrorKind::ValidationException(_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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_failed_resource_access_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::FailedResourceAccessException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::InternalServiceException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::LimitExceededException(_)
)
}
pub fn is_object_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::ObjectNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutScalingPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutScalingPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutScalingPolicyErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::FailedResourceAccessException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::InternalServiceException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::LimitExceededException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::ObjectNotFoundException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::ValidationException(_inner) => Some(_inner),
PutScalingPolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct FailedResourceAccessException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl FailedResourceAccessException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for FailedResourceAccessException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "FailedResourceAccessException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for FailedResourceAccessException {}
pub mod failed_resource_access_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::FailedResourceAccessException {
crate::error::FailedResourceAccessException {
message: self.message,
}
}
}
}
impl FailedResourceAccessException {
pub fn builder() -> crate::error::failed_resource_access_exception::Builder {
crate::error::failed_resource_access_exception::Builder::default()
}
}
#[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 {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ValidationException(crate::error::ValidationException),
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::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DescribeScheduledActionsErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DescribeScheduledActionsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeScheduledActionsErrorKind::ValidationException(_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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::InternalServiceException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScheduledActionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeScheduledActionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScheduledActionsErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::InternalServiceException(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeScheduledActionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNextTokenException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNextTokenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNextTokenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNextTokenException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNextTokenException {}
pub mod invalid_next_token_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidNextTokenException {
crate::error::InvalidNextTokenException {
message: self.message,
}
}
}
}
impl InvalidNextTokenException {
pub fn builder() -> crate::error::invalid_next_token_exception::Builder {
crate::error::invalid_next_token_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeScalingPoliciesError {
pub kind: DescribeScalingPoliciesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeScalingPoliciesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeScalingPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeScalingPoliciesErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
FailedResourceAccessException(crate::error::FailedResourceAccessException),
InternalServiceException(crate::error::InternalServiceException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeScalingPoliciesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeScalingPoliciesErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DescribeScalingPoliciesErrorKind::FailedResourceAccessException(_inner) => {
_inner.fmt(f)
}
DescribeScalingPoliciesErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DescribeScalingPoliciesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeScalingPoliciesErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeScalingPoliciesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeScalingPoliciesError {
fn code(&self) -> Option<&str> {
DescribeScalingPoliciesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeScalingPoliciesError {
pub fn new(kind: DescribeScalingPoliciesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeScalingPoliciesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeScalingPoliciesErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingPoliciesErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_failed_resource_access_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingPoliciesErrorKind::FailedResourceAccessException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingPoliciesErrorKind::InternalServiceException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingPoliciesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingPoliciesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeScalingPoliciesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScalingPoliciesErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DescribeScalingPoliciesErrorKind::FailedResourceAccessException(_inner) => Some(_inner),
DescribeScalingPoliciesErrorKind::InternalServiceException(_inner) => Some(_inner),
DescribeScalingPoliciesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeScalingPoliciesErrorKind::ValidationException(_inner) => Some(_inner),
DescribeScalingPoliciesErrorKind::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 {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ValidationException(crate::error::ValidationException),
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::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DescribeScalingActivitiesErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DescribeScalingActivitiesErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeScalingActivitiesErrorKind::ValidationException(_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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::InternalServiceException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalingActivitiesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeScalingActivitiesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScalingActivitiesErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::InternalServiceException(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::ValidationException(_inner) => Some(_inner),
DescribeScalingActivitiesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeScalableTargetsError {
pub kind: DescribeScalableTargetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeScalableTargetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeScalableTargetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeScalableTargetsErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
InvalidNextTokenException(crate::error::InvalidNextTokenException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeScalableTargetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeScalableTargetsErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DescribeScalableTargetsErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DescribeScalableTargetsErrorKind::InvalidNextTokenException(_inner) => _inner.fmt(f),
DescribeScalableTargetsErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeScalableTargetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeScalableTargetsError {
fn code(&self) -> Option<&str> {
DescribeScalableTargetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeScalableTargetsError {
pub fn new(kind: DescribeScalableTargetsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeScalableTargetsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeScalableTargetsErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalableTargetsErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalableTargetsErrorKind::InternalServiceException(_)
)
}
pub fn is_invalid_next_token_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalableTargetsErrorKind::InvalidNextTokenException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeScalableTargetsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeScalableTargetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeScalableTargetsErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DescribeScalableTargetsErrorKind::InternalServiceException(_inner) => Some(_inner),
DescribeScalableTargetsErrorKind::InvalidNextTokenException(_inner) => Some(_inner),
DescribeScalableTargetsErrorKind::ValidationException(_inner) => Some(_inner),
DescribeScalableTargetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeregisterScalableTargetError {
pub kind: DeregisterScalableTargetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeregisterScalableTargetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeregisterScalableTargetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeregisterScalableTargetErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
ObjectNotFoundException(crate::error::ObjectNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeregisterScalableTargetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeregisterScalableTargetErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DeregisterScalableTargetErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DeregisterScalableTargetErrorKind::ObjectNotFoundException(_inner) => _inner.fmt(f),
DeregisterScalableTargetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeregisterScalableTargetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeregisterScalableTargetError {
fn code(&self) -> Option<&str> {
DeregisterScalableTargetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeregisterScalableTargetError {
pub fn new(kind: DeregisterScalableTargetErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeregisterScalableTargetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeregisterScalableTargetErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterScalableTargetErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterScalableTargetErrorKind::InternalServiceException(_)
)
}
pub fn is_object_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterScalableTargetErrorKind::ObjectNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeregisterScalableTargetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeregisterScalableTargetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeregisterScalableTargetErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DeregisterScalableTargetErrorKind::InternalServiceException(_inner) => Some(_inner),
DeregisterScalableTargetErrorKind::ObjectNotFoundException(_inner) => Some(_inner),
DeregisterScalableTargetErrorKind::ValidationException(_inner) => Some(_inner),
DeregisterScalableTargetErrorKind::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 {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
ObjectNotFoundException(crate::error::ObjectNotFoundException),
ValidationException(crate::error::ValidationException),
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::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DeleteScheduledActionErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DeleteScheduledActionErrorKind::ObjectNotFoundException(_inner) => _inner.fmt(f),
DeleteScheduledActionErrorKind::ValidationException(_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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScheduledActionErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScheduledActionErrorKind::InternalServiceException(_)
)
}
pub fn is_object_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScheduledActionErrorKind::ObjectNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScheduledActionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteScheduledActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteScheduledActionErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DeleteScheduledActionErrorKind::InternalServiceException(_inner) => Some(_inner),
DeleteScheduledActionErrorKind::ObjectNotFoundException(_inner) => Some(_inner),
DeleteScheduledActionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteScheduledActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteScalingPolicyError {
pub kind: DeleteScalingPolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteScalingPolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteScalingPolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteScalingPolicyErrorKind {
ConcurrentUpdateException(crate::error::ConcurrentUpdateException),
InternalServiceException(crate::error::InternalServiceException),
ObjectNotFoundException(crate::error::ObjectNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteScalingPolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteScalingPolicyErrorKind::ConcurrentUpdateException(_inner) => _inner.fmt(f),
DeleteScalingPolicyErrorKind::InternalServiceException(_inner) => _inner.fmt(f),
DeleteScalingPolicyErrorKind::ObjectNotFoundException(_inner) => _inner.fmt(f),
DeleteScalingPolicyErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteScalingPolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteScalingPolicyError {
fn code(&self) -> Option<&str> {
DeleteScalingPolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteScalingPolicyError {
pub fn new(kind: DeleteScalingPolicyErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteScalingPolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteScalingPolicyErrorKind::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_concurrent_update_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScalingPolicyErrorKind::ConcurrentUpdateException(_)
)
}
pub fn is_internal_service_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScalingPolicyErrorKind::InternalServiceException(_)
)
}
pub fn is_object_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScalingPolicyErrorKind::ObjectNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteScalingPolicyErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteScalingPolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteScalingPolicyErrorKind::ConcurrentUpdateException(_inner) => Some(_inner),
DeleteScalingPolicyErrorKind::InternalServiceException(_inner) => Some(_inner),
DeleteScalingPolicyErrorKind::ObjectNotFoundException(_inner) => Some(_inner),
DeleteScalingPolicyErrorKind::ValidationException(_inner) => Some(_inner),
DeleteScalingPolicyErrorKind::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 _)
}
}