#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TestFailoverError {
pub kind: TestFailoverErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TestFailoverError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TestFailoverErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TestFailoverErrorKind {
ApiCallRateForCustomerExceededFault(crate::error::ApiCallRateForCustomerExceededFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidKmsKeyFault(crate::error::InvalidKmsKeyFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
NodeGroupNotFoundFault(crate::error::NodeGroupNotFoundFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
TestFailoverNotAvailableFault(crate::error::TestFailoverNotAvailableFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TestFailoverError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TestFailoverErrorKind::ApiCallRateForCustomerExceededFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::InvalidKmsKeyFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
TestFailoverErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
TestFailoverErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::NodeGroupNotFoundFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::TestFailoverNotAvailableFault(_inner) => _inner.fmt(f),
TestFailoverErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TestFailoverError {
fn code(&self) -> Option<&str> {
TestFailoverError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TestFailoverError {
pub fn new(kind: TestFailoverErrorKind, 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: TestFailoverErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TestFailoverErrorKind::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_api_call_rate_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::ApiCallRateForCustomerExceededFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_kms_key_fault(&self) -> bool {
matches!(&self.kind, TestFailoverErrorKind::InvalidKmsKeyFault(_))
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_node_group_not_found_fault(&self) -> bool {
matches!(&self.kind, TestFailoverErrorKind::NodeGroupNotFoundFault(_))
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_test_failover_not_available_fault(&self) -> bool {
matches!(
&self.kind,
TestFailoverErrorKind::TestFailoverNotAvailableFault(_)
)
}
}
impl std::error::Error for TestFailoverError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TestFailoverErrorKind::ApiCallRateForCustomerExceededFault(_inner) => Some(_inner),
TestFailoverErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
TestFailoverErrorKind::InvalidKmsKeyFault(_inner) => Some(_inner),
TestFailoverErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
TestFailoverErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
TestFailoverErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
TestFailoverErrorKind::NodeGroupNotFoundFault(_inner) => Some(_inner),
TestFailoverErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
TestFailoverErrorKind::TestFailoverNotAvailableFault(_inner) => Some(_inner),
TestFailoverErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TestFailoverNotAvailableFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TestFailoverNotAvailableFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TestFailoverNotAvailableFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TestFailoverNotAvailableFault")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for TestFailoverNotAvailableFault {}
pub mod test_failover_not_available_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::TestFailoverNotAvailableFault {
crate::error::TestFailoverNotAvailableFault {
message: self.message,
}
}
}
}
impl TestFailoverNotAvailableFault {
pub fn builder() -> crate::error::test_failover_not_available_fault::Builder {
crate::error::test_failover_not_available_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReplicationGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReplicationGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReplicationGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReplicationGroupNotFoundFault")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ReplicationGroupNotFoundFault {}
pub mod replication_group_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::ReplicationGroupNotFoundFault {
crate::error::ReplicationGroupNotFoundFault {
message: self.message,
}
}
}
}
impl ReplicationGroupNotFoundFault {
pub fn builder() -> crate::error::replication_group_not_found_fault::Builder {
crate::error::replication_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NodeGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NodeGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NodeGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NodeGroupNotFoundFault")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for NodeGroupNotFoundFault {}
pub mod node_group_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::NodeGroupNotFoundFault {
crate::error::NodeGroupNotFoundFault {
message: self.message,
}
}
}
}
impl NodeGroupNotFoundFault {
pub fn builder() -> crate::error::node_group_not_found_fault::Builder {
crate::error::node_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidReplicationGroupStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidReplicationGroupStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidReplicationGroupStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidReplicationGroupStateFault")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidReplicationGroupStateFault {}
pub mod invalid_replication_group_state_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::InvalidReplicationGroupStateFault {
crate::error::InvalidReplicationGroupStateFault {
message: self.message,
}
}
}
}
impl InvalidReplicationGroupStateFault {
pub fn builder() -> crate::error::invalid_replication_group_state_fault::Builder {
crate::error::invalid_replication_group_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterValueException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterValueException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValueException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValueException {}
pub mod invalid_parameter_value_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 {
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::InvalidParameterValueException {
crate::error::InvalidParameterValueException {
message: self.message,
}
}
}
}
impl InvalidParameterValueException {
pub fn builder() -> crate::error::invalid_parameter_value_exception::Builder {
crate::error::invalid_parameter_value_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterCombinationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterCombinationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterCombinationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterCombinationException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterCombinationException {}
pub mod invalid_parameter_combination_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 {
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::InvalidParameterCombinationException {
crate::error::InvalidParameterCombinationException {
message: self.message,
}
}
}
}
impl InvalidParameterCombinationException {
pub fn builder() -> crate::error::invalid_parameter_combination_exception::Builder {
crate::error::invalid_parameter_combination_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidKmsKeyFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidKmsKeyFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidKmsKeyFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidKmsKeyFault [InvalidKMSKeyFault]")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidKmsKeyFault {}
pub mod invalid_kms_key_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::InvalidKmsKeyFault {
crate::error::InvalidKmsKeyFault {
message: self.message,
}
}
}
}
impl InvalidKmsKeyFault {
pub fn builder() -> crate::error::invalid_kms_key_fault::Builder {
crate::error::invalid_kms_key_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidCacheClusterStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidCacheClusterStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidCacheClusterStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidCacheClusterStateFault")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidCacheClusterStateFault {}
pub mod invalid_cache_cluster_state_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::InvalidCacheClusterStateFault {
crate::error::InvalidCacheClusterStateFault {
message: self.message,
}
}
}
}
impl InvalidCacheClusterStateFault {
pub fn builder() -> crate::error::invalid_cache_cluster_state_fault::Builder {
crate::error::invalid_cache_cluster_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ApiCallRateForCustomerExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ApiCallRateForCustomerExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ApiCallRateForCustomerExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"ApiCallRateForCustomerExceededFault [APICallRateForCustomerExceededFault]"
)?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ApiCallRateForCustomerExceededFault {}
pub mod api_call_rate_for_customer_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 {
#[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::ApiCallRateForCustomerExceededFault {
crate::error::ApiCallRateForCustomerExceededFault {
message: self.message,
}
}
}
}
impl ApiCallRateForCustomerExceededFault {
pub fn builder() -> crate::error::api_call_rate_for_customer_exceeded_fault::Builder {
crate::error::api_call_rate_for_customer_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartMigrationError {
pub kind: StartMigrationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartMigrationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartMigrationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartMigrationErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupAlreadyUnderMigrationFault(
crate::error::ReplicationGroupAlreadyUnderMigrationFault,
),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartMigrationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartMigrationErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
StartMigrationErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
StartMigrationErrorKind::ReplicationGroupAlreadyUnderMigrationFault(_inner) => {
_inner.fmt(f)
}
StartMigrationErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
StartMigrationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartMigrationError {
fn code(&self) -> Option<&str> {
StartMigrationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartMigrationError {
pub fn new(kind: StartMigrationErrorKind, 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: StartMigrationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartMigrationErrorKind::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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
StartMigrationErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
StartMigrationErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_already_under_migration_fault(&self) -> bool {
matches!(
&self.kind,
StartMigrationErrorKind::ReplicationGroupAlreadyUnderMigrationFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
StartMigrationErrorKind::ReplicationGroupNotFoundFault(_)
)
}
}
impl std::error::Error for StartMigrationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartMigrationErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
StartMigrationErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
StartMigrationErrorKind::ReplicationGroupAlreadyUnderMigrationFault(_inner) => {
Some(_inner)
}
StartMigrationErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
StartMigrationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReplicationGroupAlreadyUnderMigrationFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReplicationGroupAlreadyUnderMigrationFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReplicationGroupAlreadyUnderMigrationFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReplicationGroupAlreadyUnderMigrationFault")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for ReplicationGroupAlreadyUnderMigrationFault {}
pub mod replication_group_already_under_migration_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::ReplicationGroupAlreadyUnderMigrationFault {
crate::error::ReplicationGroupAlreadyUnderMigrationFault {
message: self.message,
}
}
}
}
impl ReplicationGroupAlreadyUnderMigrationFault {
pub fn builder() -> crate::error::replication_group_already_under_migration_fault::Builder {
crate::error::replication_group_already_under_migration_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RevokeCacheSecurityGroupIngressError {
pub kind: RevokeCacheSecurityGroupIngressErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RevokeCacheSecurityGroupIngressError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RevokeCacheSecurityGroupIngressErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RevokeCacheSecurityGroupIngressErrorKind {
AuthorizationNotFoundFault(crate::error::AuthorizationNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InvalidCacheSecurityGroupStateFault(crate::error::InvalidCacheSecurityGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RevokeCacheSecurityGroupIngressError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RevokeCacheSecurityGroupIngressErrorKind::AuthorizationNotFoundFault(_inner) => {
_inner.fmt(f)
}
RevokeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
RevokeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(
_inner,
) => _inner.fmt(f),
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
RevokeCacheSecurityGroupIngressErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RevokeCacheSecurityGroupIngressError {
fn code(&self) -> Option<&str> {
RevokeCacheSecurityGroupIngressError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RevokeCacheSecurityGroupIngressError {
pub fn new(
kind: RevokeCacheSecurityGroupIngressErrorKind,
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: RevokeCacheSecurityGroupIngressErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RevokeCacheSecurityGroupIngressErrorKind::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_authorization_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RevokeCacheSecurityGroupIngressErrorKind::AuthorizationNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RevokeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool {
matches!(
&self.kind,
RevokeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for RevokeCacheSecurityGroupIngressError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RevokeCacheSecurityGroupIngressErrorKind::AuthorizationNotFoundFault(_inner) => {
Some(_inner)
}
RevokeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
RevokeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(
_inner,
) => Some(_inner),
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
RevokeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
RevokeCacheSecurityGroupIngressErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidCacheSecurityGroupStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidCacheSecurityGroupStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidCacheSecurityGroupStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidCacheSecurityGroupStateFault")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidCacheSecurityGroupStateFault {}
pub mod invalid_cache_security_group_state_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::InvalidCacheSecurityGroupStateFault {
crate::error::InvalidCacheSecurityGroupStateFault {
message: self.message,
}
}
}
}
impl InvalidCacheSecurityGroupStateFault {
pub fn builder() -> crate::error::invalid_cache_security_group_state_fault::Builder {
crate::error::invalid_cache_security_group_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSecurityGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSecurityGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSecurityGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSecurityGroupNotFoundFault")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSecurityGroupNotFoundFault {}
pub mod cache_security_group_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::CacheSecurityGroupNotFoundFault {
crate::error::CacheSecurityGroupNotFoundFault {
message: self.message,
}
}
}
}
impl CacheSecurityGroupNotFoundFault {
pub fn builder() -> crate::error::cache_security_group_not_found_fault::Builder {
crate::error::cache_security_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AuthorizationNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AuthorizationNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AuthorizationNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AuthorizationNotFoundFault")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for AuthorizationNotFoundFault {}
pub mod authorization_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::AuthorizationNotFoundFault {
crate::error::AuthorizationNotFoundFault {
message: self.message,
}
}
}
}
impl AuthorizationNotFoundFault {
pub fn builder() -> crate::error::authorization_not_found_fault::Builder {
crate::error::authorization_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResetCacheParameterGroupError {
pub kind: ResetCacheParameterGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResetCacheParameterGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResetCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResetCacheParameterGroupErrorKind {
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
InvalidCacheParameterGroupStateFault(crate::error::InvalidCacheParameterGroupStateFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResetCacheParameterGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResetCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ResetCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
_inner.fmt(f)
}
ResetCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
ResetCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
ResetCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ResetCacheParameterGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResetCacheParameterGroupError {
fn code(&self) -> Option<&str> {
ResetCacheParameterGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResetCacheParameterGroupError {
pub fn new(kind: ResetCacheParameterGroupErrorKind, 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: ResetCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResetCacheParameterGroupErrorKind::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_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ResetCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ResetCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ResetCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ResetCacheParameterGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ResetCacheParameterGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for ResetCacheParameterGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResetCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
ResetCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
Some(_inner)
}
ResetCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
Some(_inner)
}
ResetCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
ResetCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ResetCacheParameterGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidGlobalReplicationGroupStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidGlobalReplicationGroupStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidGlobalReplicationGroupStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidGlobalReplicationGroupStateFault")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidGlobalReplicationGroupStateFault {}
pub mod invalid_global_replication_group_state_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::InvalidGlobalReplicationGroupStateFault {
crate::error::InvalidGlobalReplicationGroupStateFault {
message: self.message,
}
}
}
}
impl InvalidGlobalReplicationGroupStateFault {
pub fn builder() -> crate::error::invalid_global_replication_group_state_fault::Builder {
crate::error::invalid_global_replication_group_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidCacheParameterGroupStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidCacheParameterGroupStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidCacheParameterGroupStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidCacheParameterGroupStateFault")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidCacheParameterGroupStateFault {}
pub mod invalid_cache_parameter_group_state_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::InvalidCacheParameterGroupStateFault {
crate::error::InvalidCacheParameterGroupStateFault {
message: self.message,
}
}
}
}
impl InvalidCacheParameterGroupStateFault {
pub fn builder() -> crate::error::invalid_cache_parameter_group_state_fault::Builder {
crate::error::invalid_cache_parameter_group_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheParameterGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheParameterGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheParameterGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheParameterGroupNotFoundFault")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheParameterGroupNotFoundFault {}
pub mod cache_parameter_group_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::CacheParameterGroupNotFoundFault {
crate::error::CacheParameterGroupNotFoundFault {
message: self.message,
}
}
}
}
impl CacheParameterGroupNotFoundFault {
pub fn builder() -> crate::error::cache_parameter_group_not_found_fault::Builder {
crate::error::cache_parameter_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveTagsFromResourceError {
pub kind: RemoveTagsFromResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveTagsFromResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveTagsFromResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveTagsFromResourceErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
InvalidArnFault(crate::error::InvalidArnFault),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ReservedCacheNodeNotFoundFault(crate::error::ReservedCacheNodeNotFoundFault),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
TagNotFoundFault(crate::error::TagNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveTagsFromResourceErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
RemoveTagsFromResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
RemoveTagsFromResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::InvalidArnFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
RemoveTagsFromResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => {
_inner.fmt(f)
}
RemoveTagsFromResourceErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::TagNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
RemoveTagsFromResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveTagsFromResourceError {
fn code(&self) -> Option<&str> {
RemoveTagsFromResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveTagsFromResourceError {
pub fn new(kind: RemoveTagsFromResourceErrorKind, 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: RemoveTagsFromResourceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveTagsFromResourceErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_invalid_arn_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::InvalidArnFault(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_reserved_cache_node_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::ReservedCacheNodeNotFoundFault(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::SnapshotNotFoundFault(_)
)
}
pub fn is_tag_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::TagNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::UserGroupNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RemoveTagsFromResourceErrorKind::UserNotFoundFault(_)
)
}
}
impl std::error::Error for RemoveTagsFromResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveTagsFromResourceErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
RemoveTagsFromResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
RemoveTagsFromResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::InvalidArnFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
RemoveTagsFromResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::TagNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::UserNotFoundFault(_inner) => Some(_inner),
RemoveTagsFromResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserNotFoundFault")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for UserNotFoundFault {}
pub mod user_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::UserNotFoundFault {
crate::error::UserNotFoundFault {
message: self.message,
}
}
}
}
impl UserNotFoundFault {
pub fn builder() -> crate::error::user_not_found_fault::Builder {
crate::error::user_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserGroupNotFoundFault")?;
if let Some(inner_18) = &self.message {
{
write!(f, ": {}", inner_18)?;
}
}
Ok(())
}
}
impl std::error::Error for UserGroupNotFoundFault {}
pub mod user_group_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::UserGroupNotFoundFault {
crate::error::UserGroupNotFoundFault {
message: self.message,
}
}
}
}
impl UserGroupNotFoundFault {
pub fn builder() -> crate::error::user_group_not_found_fault::Builder {
crate::error::user_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TagNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TagNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TagNotFoundFault")?;
if let Some(inner_19) = &self.message {
{
write!(f, ": {}", inner_19)?;
}
}
Ok(())
}
}
impl std::error::Error for TagNotFoundFault {}
pub mod tag_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::TagNotFoundFault {
crate::error::TagNotFoundFault {
message: self.message,
}
}
}
}
impl TagNotFoundFault {
pub fn builder() -> crate::error::tag_not_found_fault::Builder {
crate::error::tag_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SnapshotNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotNotFoundFault")?;
if let Some(inner_20) = &self.message {
{
write!(f, ": {}", inner_20)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotNotFoundFault {}
pub mod snapshot_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::SnapshotNotFoundFault {
crate::error::SnapshotNotFoundFault {
message: self.message,
}
}
}
}
impl SnapshotNotFoundFault {
pub fn builder() -> crate::error::snapshot_not_found_fault::Builder {
crate::error::snapshot_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedCacheNodeNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReservedCacheNodeNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReservedCacheNodeNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReservedCacheNodeNotFoundFault")?;
if let Some(inner_21) = &self.message {
{
write!(f, ": {}", inner_21)?;
}
}
Ok(())
}
}
impl std::error::Error for ReservedCacheNodeNotFoundFault {}
pub mod reserved_cache_node_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::ReservedCacheNodeNotFoundFault {
crate::error::ReservedCacheNodeNotFoundFault {
message: self.message,
}
}
}
}
impl ReservedCacheNodeNotFoundFault {
pub fn builder() -> crate::error::reserved_cache_node_not_found_fault::Builder {
crate::error::reserved_cache_node_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidArnFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidArnFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidArnFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidArnFault [InvalidARNFault]")?;
if let Some(inner_22) = &self.message {
{
write!(f, ": {}", inner_22)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidArnFault {}
pub mod invalid_arn_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::InvalidArnFault {
crate::error::InvalidArnFault {
message: self.message,
}
}
}
}
impl InvalidArnFault {
pub fn builder() -> crate::error::invalid_arn_fault::Builder {
crate::error::invalid_arn_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSubnetGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSubnetGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSubnetGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSubnetGroupNotFoundFault")?;
if let Some(inner_23) = &self.message {
{
write!(f, ": {}", inner_23)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSubnetGroupNotFoundFault {}
pub mod cache_subnet_group_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::CacheSubnetGroupNotFoundFault {
crate::error::CacheSubnetGroupNotFoundFault {
message: self.message,
}
}
}
}
impl CacheSubnetGroupNotFoundFault {
pub fn builder() -> crate::error::cache_subnet_group_not_found_fault::Builder {
crate::error::cache_subnet_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheClusterNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheClusterNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheClusterNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheClusterNotFoundFault")?;
if let Some(inner_24) = &self.message {
{
write!(f, ": {}", inner_24)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheClusterNotFoundFault {}
pub mod cache_cluster_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::CacheClusterNotFoundFault {
crate::error::CacheClusterNotFoundFault {
message: self.message,
}
}
}
}
impl CacheClusterNotFoundFault {
pub fn builder() -> crate::error::cache_cluster_not_found_fault::Builder {
crate::error::cache_cluster_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RebootCacheClusterError {
pub kind: RebootCacheClusterErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RebootCacheClusterError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RebootCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RebootCacheClusterErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RebootCacheClusterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RebootCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
RebootCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
RebootCacheClusterErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RebootCacheClusterError {
fn code(&self) -> Option<&str> {
RebootCacheClusterError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RebootCacheClusterError {
pub fn new(kind: RebootCacheClusterErrorKind, 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: RebootCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RebootCacheClusterErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RebootCacheClusterErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
RebootCacheClusterErrorKind::InvalidCacheClusterStateFault(_)
)
}
}
impl std::error::Error for RebootCacheClusterError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RebootCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
RebootCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
RebootCacheClusterErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RebalanceSlotsInGlobalReplicationGroupError {
pub kind: RebalanceSlotsInGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RebalanceSlotsInGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RebalanceSlotsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RebalanceSlotsInGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RebalanceSlotsInGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RebalanceSlotsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
_inner.fmt(f)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
_inner.fmt(f)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RebalanceSlotsInGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
RebalanceSlotsInGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RebalanceSlotsInGlobalReplicationGroupError {
pub fn new(
kind: RebalanceSlotsInGlobalReplicationGroupErrorKind,
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: RebalanceSlotsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RebalanceSlotsInGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
RebalanceSlotsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(&self.kind, RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for RebalanceSlotsInGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RebalanceSlotsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
Some(_inner)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
Some(_inner)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
RebalanceSlotsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GlobalReplicationGroupNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl GlobalReplicationGroupNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GlobalReplicationGroupNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GlobalReplicationGroupNotFoundFault")?;
if let Some(inner_25) = &self.message {
{
write!(f, ": {}", inner_25)?;
}
}
Ok(())
}
}
impl std::error::Error for GlobalReplicationGroupNotFoundFault {}
pub mod global_replication_group_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::GlobalReplicationGroupNotFoundFault {
crate::error::GlobalReplicationGroupNotFoundFault {
message: self.message,
}
}
}
}
impl GlobalReplicationGroupNotFoundFault {
pub fn builder() -> crate::error::global_replication_group_not_found_fault::Builder {
crate::error::global_replication_group_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PurchaseReservedCacheNodesOfferingError {
pub kind: PurchaseReservedCacheNodesOfferingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PurchaseReservedCacheNodesOfferingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PurchaseReservedCacheNodesOfferingErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PurchaseReservedCacheNodesOfferingErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ReservedCacheNodeAlreadyExistsFault(crate::error::ReservedCacheNodeAlreadyExistsFault),
ReservedCacheNodeQuotaExceededFault(crate::error::ReservedCacheNodeQuotaExceededFault),
ReservedCacheNodesOfferingNotFoundFault(crate::error::ReservedCacheNodesOfferingNotFoundFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PurchaseReservedCacheNodesOfferingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterCombinationException(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeAlreadyExistsFault(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeQuotaExceededFault(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodesOfferingNotFoundFault(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::TagQuotaPerResourceExceeded(_inner) =>
_inner.fmt(f)
,
PurchaseReservedCacheNodesOfferingErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PurchaseReservedCacheNodesOfferingError {
fn code(&self) -> Option<&str> {
PurchaseReservedCacheNodesOfferingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PurchaseReservedCacheNodesOfferingError {
pub fn new(
kind: PurchaseReservedCacheNodesOfferingErrorKind,
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: PurchaseReservedCacheNodesOfferingErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PurchaseReservedCacheNodesOfferingErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_reserved_cache_node_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeAlreadyExistsFault(_)
)
}
pub fn is_reserved_cache_node_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeQuotaExceededFault(_)
)
}
pub fn is_reserved_cache_nodes_offering_not_found_fault(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodesOfferingNotFoundFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
PurchaseReservedCacheNodesOfferingErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for PurchaseReservedCacheNodesOfferingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterCombinationException(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeAlreadyExistsFault(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodeQuotaExceededFault(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::ReservedCacheNodesOfferingNotFoundFault(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::TagQuotaPerResourceExceeded(_inner) =>
Some(_inner)
,
PurchaseReservedCacheNodesOfferingErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TagQuotaPerResourceExceeded {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TagQuotaPerResourceExceeded {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TagQuotaPerResourceExceeded {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TagQuotaPerResourceExceeded")?;
if let Some(inner_26) = &self.message {
{
write!(f, ": {}", inner_26)?;
}
}
Ok(())
}
}
impl std::error::Error for TagQuotaPerResourceExceeded {}
pub mod tag_quota_per_resource_exceeded {
#[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::TagQuotaPerResourceExceeded {
crate::error::TagQuotaPerResourceExceeded {
message: self.message,
}
}
}
}
impl TagQuotaPerResourceExceeded {
pub fn builder() -> crate::error::tag_quota_per_resource_exceeded::Builder {
crate::error::tag_quota_per_resource_exceeded::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedCacheNodesOfferingNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReservedCacheNodesOfferingNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReservedCacheNodesOfferingNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReservedCacheNodesOfferingNotFoundFault")?;
if let Some(inner_27) = &self.message {
{
write!(f, ": {}", inner_27)?;
}
}
Ok(())
}
}
impl std::error::Error for ReservedCacheNodesOfferingNotFoundFault {}
pub mod reserved_cache_nodes_offering_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::ReservedCacheNodesOfferingNotFoundFault {
crate::error::ReservedCacheNodesOfferingNotFoundFault {
message: self.message,
}
}
}
}
impl ReservedCacheNodesOfferingNotFoundFault {
pub fn builder() -> crate::error::reserved_cache_nodes_offering_not_found_fault::Builder {
crate::error::reserved_cache_nodes_offering_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedCacheNodeQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReservedCacheNodeQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReservedCacheNodeQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReservedCacheNodeQuotaExceededFault")?;
if let Some(inner_28) = &self.message {
{
write!(f, ": {}", inner_28)?;
}
}
Ok(())
}
}
impl std::error::Error for ReservedCacheNodeQuotaExceededFault {}
pub mod reserved_cache_node_quota_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 {
#[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::ReservedCacheNodeQuotaExceededFault {
crate::error::ReservedCacheNodeQuotaExceededFault {
message: self.message,
}
}
}
}
impl ReservedCacheNodeQuotaExceededFault {
pub fn builder() -> crate::error::reserved_cache_node_quota_exceeded_fault::Builder {
crate::error::reserved_cache_node_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReservedCacheNodeAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReservedCacheNodeAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReservedCacheNodeAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReservedCacheNodeAlreadyExistsFault")?;
if let Some(inner_29) = &self.message {
{
write!(f, ": {}", inner_29)?;
}
}
Ok(())
}
}
impl std::error::Error for ReservedCacheNodeAlreadyExistsFault {}
pub mod reserved_cache_node_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 {
#[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::ReservedCacheNodeAlreadyExistsFault {
crate::error::ReservedCacheNodeAlreadyExistsFault {
message: self.message,
}
}
}
}
impl ReservedCacheNodeAlreadyExistsFault {
pub fn builder() -> crate::error::reserved_cache_node_already_exists_fault::Builder {
crate::error::reserved_cache_node_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyUserGroupError {
pub kind: ModifyUserGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyUserGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyUserGroupErrorKind {
DefaultUserRequired(crate::error::DefaultUserRequired),
DuplicateUserNameFault(crate::error::DuplicateUserNameFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidUserGroupStateFault(crate::error::InvalidUserGroupStateFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyUserGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyUserGroupErrorKind::DefaultUserRequired(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::DuplicateUserNameFault(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::InvalidUserGroupStateFault(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
ModifyUserGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyUserGroupError {
fn code(&self) -> Option<&str> {
ModifyUserGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyUserGroupError {
pub fn new(kind: ModifyUserGroupErrorKind, 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: ModifyUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyUserGroupErrorKind::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_default_user_required(&self) -> bool {
matches!(&self.kind, ModifyUserGroupErrorKind::DefaultUserRequired(_))
}
pub fn is_duplicate_user_name_fault(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::DuplicateUserNameFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_user_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::InvalidUserGroupStateFault(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyUserGroupErrorKind::UserGroupNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, ModifyUserGroupErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for ModifyUserGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyUserGroupErrorKind::DefaultUserRequired(_inner) => Some(_inner),
ModifyUserGroupErrorKind::DuplicateUserNameFault(_inner) => Some(_inner),
ModifyUserGroupErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
ModifyUserGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ModifyUserGroupErrorKind::InvalidUserGroupStateFault(_inner) => Some(_inner),
ModifyUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
ModifyUserGroupErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
ModifyUserGroupErrorKind::UserNotFoundFault(_inner) => Some(_inner),
ModifyUserGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceLinkedRoleNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceLinkedRoleNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceLinkedRoleNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceLinkedRoleNotFoundFault")?;
if let Some(inner_30) = &self.message {
{
write!(f, ": {}", inner_30)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceLinkedRoleNotFoundFault {}
pub mod service_linked_role_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::ServiceLinkedRoleNotFoundFault {
crate::error::ServiceLinkedRoleNotFoundFault {
message: self.message,
}
}
}
}
impl ServiceLinkedRoleNotFoundFault {
pub fn builder() -> crate::error::service_linked_role_not_found_fault::Builder {
crate::error::service_linked_role_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidUserGroupStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidUserGroupStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidUserGroupStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidUserGroupStateFault")?;
if let Some(inner_31) = &self.message {
{
write!(f, ": {}", inner_31)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidUserGroupStateFault {}
pub mod invalid_user_group_state_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::InvalidUserGroupStateFault {
crate::error::InvalidUserGroupStateFault {
message: self.message,
}
}
}
}
impl InvalidUserGroupStateFault {
pub fn builder() -> crate::error::invalid_user_group_state_fault::Builder {
crate::error::invalid_user_group_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DuplicateUserNameFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DuplicateUserNameFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DuplicateUserNameFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DuplicateUserNameFault")?;
if let Some(inner_32) = &self.message {
{
write!(f, ": {}", inner_32)?;
}
}
Ok(())
}
}
impl std::error::Error for DuplicateUserNameFault {}
pub mod duplicate_user_name_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::DuplicateUserNameFault {
crate::error::DuplicateUserNameFault {
message: self.message,
}
}
}
}
impl DuplicateUserNameFault {
pub fn builder() -> crate::error::duplicate_user_name_fault::Builder {
crate::error::duplicate_user_name_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultUserRequired {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DefaultUserRequired {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DefaultUserRequired {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DefaultUserRequired")?;
if let Some(inner_33) = &self.message {
{
write!(f, ": {}", inner_33)?;
}
}
Ok(())
}
}
impl std::error::Error for DefaultUserRequired {}
pub mod default_user_required {
#[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::DefaultUserRequired {
crate::error::DefaultUserRequired {
message: self.message,
}
}
}
}
impl DefaultUserRequired {
pub fn builder() -> crate::error::default_user_required::Builder {
crate::error::default_user_required::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyUserError {
pub kind: ModifyUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyUserErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidUserStateFault(crate::error::InvalidUserStateFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyUserErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
ModifyUserErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ModifyUserErrorKind::InvalidUserStateFault(_inner) => _inner.fmt(f),
ModifyUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
ModifyUserErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
ModifyUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyUserError {
fn code(&self) -> Option<&str> {
ModifyUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyUserError {
pub fn new(kind: ModifyUserErrorKind, 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: ModifyUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyUserErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyUserErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyUserErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_user_state_fault(&self) -> bool {
matches!(&self.kind, ModifyUserErrorKind::InvalidUserStateFault(_))
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyUserErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, ModifyUserErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for ModifyUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyUserErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
ModifyUserErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ModifyUserErrorKind::InvalidUserStateFault(_inner) => Some(_inner),
ModifyUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
ModifyUserErrorKind::UserNotFoundFault(_inner) => Some(_inner),
ModifyUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidUserStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidUserStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidUserStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidUserStateFault")?;
if let Some(inner_34) = &self.message {
{
write!(f, ": {}", inner_34)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidUserStateFault {}
pub mod invalid_user_state_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::InvalidUserStateFault {
crate::error::InvalidUserStateFault {
message: self.message,
}
}
}
}
impl InvalidUserStateFault {
pub fn builder() -> crate::error::invalid_user_state_fault::Builder {
crate::error::invalid_user_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyReplicationGroupShardConfigurationError {
pub kind: ModifyReplicationGroupShardConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ModifyReplicationGroupShardConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyReplicationGroupShardConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyReplicationGroupShardConfigurationErrorKind {
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidKmsKeyFault(crate::error::InvalidKmsKeyFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeGroupsPerReplicationGroupQuotaExceededFault(
crate::error::NodeGroupsPerReplicationGroupQuotaExceededFault,
),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyReplicationGroupShardConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyReplicationGroupShardConfigurationErrorKind::InsufficientCacheClusterCapacityFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidCacheClusterStateFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidKmsKeyFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterCombinationException(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidReplicationGroupStateFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidVpcNetworkStateFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::NodeQuotaForCustomerExceededFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::ReplicationGroupNotFoundFault(_inner) =>
_inner.fmt(f)
,
ModifyReplicationGroupShardConfigurationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyReplicationGroupShardConfigurationError {
fn code(&self) -> Option<&str> {
ModifyReplicationGroupShardConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyReplicationGroupShardConfigurationError {
pub fn new(
kind: ModifyReplicationGroupShardConfigurationErrorKind,
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: ModifyReplicationGroupShardConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyReplicationGroupShardConfigurationErrorKind::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_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(&self.kind, ModifyReplicationGroupShardConfigurationErrorKind::InsufficientCacheClusterCapacityFault(_))
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_kms_key_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidKmsKeyFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterCombinationException(
_
)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_groups_per_replication_group_quota_exceeded_fault(&self) -> bool {
matches!(&self.kind, ModifyReplicationGroupShardConfigurationErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_))
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupShardConfigurationErrorKind::ReplicationGroupNotFoundFault(_)
)
}
}
impl std::error::Error for ModifyReplicationGroupShardConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyReplicationGroupShardConfigurationErrorKind::InsufficientCacheClusterCapacityFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidCacheClusterStateFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidKmsKeyFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterCombinationException(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidReplicationGroupStateFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::InvalidVpcNetworkStateFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::NodeQuotaForCustomerExceededFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::ReplicationGroupNotFoundFault(_inner) =>
Some(_inner)
,
ModifyReplicationGroupShardConfigurationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NodeQuotaForCustomerExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NodeQuotaForCustomerExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NodeQuotaForCustomerExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NodeQuotaForCustomerExceededFault")?;
if let Some(inner_35) = &self.message {
{
write!(f, ": {}", inner_35)?;
}
}
Ok(())
}
}
impl std::error::Error for NodeQuotaForCustomerExceededFault {}
pub mod node_quota_for_customer_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 {
#[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::NodeQuotaForCustomerExceededFault {
crate::error::NodeQuotaForCustomerExceededFault {
message: self.message,
}
}
}
}
impl NodeQuotaForCustomerExceededFault {
pub fn builder() -> crate::error::node_quota_for_customer_exceeded_fault::Builder {
crate::error::node_quota_for_customer_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NodeGroupsPerReplicationGroupQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NodeGroupsPerReplicationGroupQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NodeGroupsPerReplicationGroupQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NodeGroupsPerReplicationGroupQuotaExceededFault")?;
if let Some(inner_36) = &self.message {
{
write!(f, ": {}", inner_36)?;
}
}
Ok(())
}
}
impl std::error::Error for NodeGroupsPerReplicationGroupQuotaExceededFault {}
pub mod node_groups_per_replication_group_quota_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 {
#[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::NodeGroupsPerReplicationGroupQuotaExceededFault {
crate::error::NodeGroupsPerReplicationGroupQuotaExceededFault {
message: self.message,
}
}
}
}
impl NodeGroupsPerReplicationGroupQuotaExceededFault {
pub fn builder() -> crate::error::node_groups_per_replication_group_quota_exceeded_fault::Builder
{
crate::error::node_groups_per_replication_group_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidVpcNetworkStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidVpcNetworkStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidVpcNetworkStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"InvalidVpcNetworkStateFault [InvalidVPCNetworkStateFault]"
)?;
if let Some(inner_37) = &self.message {
{
write!(f, ": {}", inner_37)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidVpcNetworkStateFault {}
pub mod invalid_vpc_network_state_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::InvalidVpcNetworkStateFault {
crate::error::InvalidVpcNetworkStateFault {
message: self.message,
}
}
}
}
impl InvalidVpcNetworkStateFault {
pub fn builder() -> crate::error::invalid_vpc_network_state_fault::Builder {
crate::error::invalid_vpc_network_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InsufficientCacheClusterCapacityFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InsufficientCacheClusterCapacityFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InsufficientCacheClusterCapacityFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InsufficientCacheClusterCapacityFault")?;
if let Some(inner_38) = &self.message {
{
write!(f, ": {}", inner_38)?;
}
}
Ok(())
}
}
impl std::error::Error for InsufficientCacheClusterCapacityFault {}
pub mod insufficient_cache_cluster_capacity_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::InsufficientCacheClusterCapacityFault {
crate::error::InsufficientCacheClusterCapacityFault {
message: self.message,
}
}
}
}
impl InsufficientCacheClusterCapacityFault {
pub fn builder() -> crate::error::insufficient_cache_cluster_capacity_fault::Builder {
crate::error::insufficient_cache_cluster_capacity_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyReplicationGroupError {
pub kind: ModifyReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyReplicationGroupErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidCacheSecurityGroupStateFault(crate::error::InvalidCacheSecurityGroupStateFault),
InvalidKmsKeyFault(crate::error::InvalidKmsKeyFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
InvalidUserGroupStateFault(crate::error::InvalidUserGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeQuotaForClusterExceededFault(crate::error::NodeQuotaForClusterExceededFault),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyReplicationGroupErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InvalidKmsKeyFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::InvalidUserGroupStateFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
ModifyReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyReplicationGroupError {
fn code(&self) -> Option<&str> {
ModifyReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyReplicationGroupError {
pub fn new(kind: ModifyReplicationGroupErrorKind, 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: ModifyReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyReplicationGroupErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidCacheSecurityGroupStateFault(_)
)
}
pub fn is_invalid_kms_key_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidKmsKeyFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_invalid_user_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidUserGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_quota_for_cluster_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyReplicationGroupErrorKind::UserGroupNotFoundFault(_)
)
}
}
impl std::error::Error for ModifyReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyReplicationGroupErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::InvalidKmsKeyFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::InvalidUserGroupStateFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
ModifyReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
ModifyReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NodeQuotaForClusterExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NodeQuotaForClusterExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NodeQuotaForClusterExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NodeQuotaForClusterExceededFault")?;
if let Some(inner_39) = &self.message {
{
write!(f, ": {}", inner_39)?;
}
}
Ok(())
}
}
impl std::error::Error for NodeQuotaForClusterExceededFault {}
pub mod node_quota_for_cluster_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 {
#[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::NodeQuotaForClusterExceededFault {
crate::error::NodeQuotaForClusterExceededFault {
message: self.message,
}
}
}
}
impl NodeQuotaForClusterExceededFault {
pub fn builder() -> crate::error::node_quota_for_cluster_exceeded_fault::Builder {
crate::error::node_quota_for_cluster_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyGlobalReplicationGroupError {
pub kind: ModifyGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ModifyGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => _inner.fmt(f),
ModifyGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ModifyGlobalReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
ModifyGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyGlobalReplicationGroupError {
pub fn new(kind: ModifyGlobalReplicationGroupErrorKind, 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: ModifyGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for ModifyGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
ModifyGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => Some(_inner),
ModifyGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ModifyGlobalReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyCacheSubnetGroupError {
pub kind: ModifyCacheSubnetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyCacheSubnetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyCacheSubnetGroupErrorKind {
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
CacheSubnetQuotaExceededFault(crate::error::CacheSubnetQuotaExceededFault),
InvalidSubnet(crate::error::InvalidSubnet),
SubnetInUse(crate::error::SubnetInUse),
SubnetNotAllowedFault(crate::error::SubnetNotAllowedFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyCacheSubnetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_inner) => _inner.fmt(f),
ModifyCacheSubnetGroupErrorKind::InvalidSubnet(_inner) => _inner.fmt(f),
ModifyCacheSubnetGroupErrorKind::SubnetInUse(_inner) => _inner.fmt(f),
ModifyCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_inner) => _inner.fmt(f),
ModifyCacheSubnetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyCacheSubnetGroupError {
fn code(&self) -> Option<&str> {
ModifyCacheSubnetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyCacheSubnetGroupError {
pub fn new(kind: ModifyCacheSubnetGroupErrorKind, 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: ModifyCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyCacheSubnetGroupErrorKind::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_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_)
)
}
pub fn is_invalid_subnet(&self) -> bool {
matches!(
&self.kind,
ModifyCacheSubnetGroupErrorKind::InvalidSubnet(_)
)
}
pub fn is_subnet_in_use(&self) -> bool {
matches!(&self.kind, ModifyCacheSubnetGroupErrorKind::SubnetInUse(_))
}
pub fn is_subnet_not_allowed_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_)
)
}
}
impl std::error::Error for ModifyCacheSubnetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
ModifyCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_inner) => Some(_inner),
ModifyCacheSubnetGroupErrorKind::InvalidSubnet(_inner) => Some(_inner),
ModifyCacheSubnetGroupErrorKind::SubnetInUse(_inner) => Some(_inner),
ModifyCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_inner) => Some(_inner),
ModifyCacheSubnetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetNotAllowedFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SubnetNotAllowedFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SubnetNotAllowedFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SubnetNotAllowedFault")?;
if let Some(inner_40) = &self.message {
{
write!(f, ": {}", inner_40)?;
}
}
Ok(())
}
}
impl std::error::Error for SubnetNotAllowedFault {}
pub mod subnet_not_allowed_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::SubnetNotAllowedFault {
crate::error::SubnetNotAllowedFault {
message: self.message,
}
}
}
}
impl SubnetNotAllowedFault {
pub fn builder() -> crate::error::subnet_not_allowed_fault::Builder {
crate::error::subnet_not_allowed_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubnetInUse {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SubnetInUse {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SubnetInUse {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SubnetInUse")?;
if let Some(inner_41) = &self.message {
{
write!(f, ": {}", inner_41)?;
}
}
Ok(())
}
}
impl std::error::Error for SubnetInUse {}
pub mod subnet_in_use {
#[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::SubnetInUse {
crate::error::SubnetInUse {
message: self.message,
}
}
}
}
impl SubnetInUse {
pub fn builder() -> crate::error::subnet_in_use::Builder {
crate::error::subnet_in_use::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSubnet {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSubnet {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSubnet {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSubnet")?;
if let Some(inner_42) = &self.message {
{
write!(f, ": {}", inner_42)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSubnet {}
pub mod invalid_subnet {
#[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::InvalidSubnet {
crate::error::InvalidSubnet {
message: self.message,
}
}
}
}
impl InvalidSubnet {
pub fn builder() -> crate::error::invalid_subnet::Builder {
crate::error::invalid_subnet::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSubnetQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSubnetQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSubnetQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSubnetQuotaExceededFault")?;
if let Some(inner_43) = &self.message {
{
write!(f, ": {}", inner_43)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSubnetQuotaExceededFault {}
pub mod cache_subnet_quota_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 {
#[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::CacheSubnetQuotaExceededFault {
crate::error::CacheSubnetQuotaExceededFault {
message: self.message,
}
}
}
}
impl CacheSubnetQuotaExceededFault {
pub fn builder() -> crate::error::cache_subnet_quota_exceeded_fault::Builder {
crate::error::cache_subnet_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyCacheParameterGroupError {
pub kind: ModifyCacheParameterGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyCacheParameterGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyCacheParameterGroupErrorKind {
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
InvalidCacheParameterGroupStateFault(crate::error::InvalidCacheParameterGroupStateFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyCacheParameterGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
_inner.fmt(f)
}
ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
ModifyCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
ModifyCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ModifyCacheParameterGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyCacheParameterGroupError {
fn code(&self) -> Option<&str> {
ModifyCacheParameterGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyCacheParameterGroupError {
pub fn new(kind: ModifyCacheParameterGroupErrorKind, 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: ModifyCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyCacheParameterGroupErrorKind::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_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCacheParameterGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCacheParameterGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for ModifyCacheParameterGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
ModifyCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
Some(_inner)
}
ModifyCacheParameterGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
Some(_inner)
}
ModifyCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
ModifyCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ModifyCacheParameterGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ModifyCacheClusterError {
pub kind: ModifyCacheClusterErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ModifyCacheClusterError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ModifyCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ModifyCacheClusterErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidCacheSecurityGroupStateFault(crate::error::InvalidCacheSecurityGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeQuotaForClusterExceededFault(crate::error::NodeQuotaForClusterExceededFault),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ModifyCacheClusterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ModifyCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
ModifyCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
_inner.fmt(f)
}
ModifyCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
ModifyCacheClusterErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_inner) => _inner.fmt(f),
ModifyCacheClusterErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ModifyCacheClusterError {
fn code(&self) -> Option<&str> {
ModifyCacheClusterError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ModifyCacheClusterError {
pub fn new(kind: ModifyCacheClusterErrorKind, 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: ModifyCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ModifyCacheClusterErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InvalidCacheSecurityGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_quota_for_cluster_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
ModifyCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
}
impl std::error::Error for ModifyCacheClusterError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ModifyCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
ModifyCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
Some(_inner)
}
ModifyCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
ModifyCacheClusterErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_inner) => Some(_inner),
ModifyCacheClusterErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
InvalidArnFault(crate::error::InvalidArnFault),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ReservedCacheNodeNotFoundFault(crate::error::ReservedCacheNodeNotFoundFault),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidArnFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
ListTagsForResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_invalid_arn_fault(&self) -> bool {
matches!(&self.kind, ListTagsForResourceErrorKind::InvalidArnFault(_))
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_reserved_cache_node_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ReservedCacheNodeNotFoundFault(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::SnapshotNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::UserGroupNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::UserNotFoundFault(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidArnFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::UserNotFoundFault(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAllowedNodeTypeModificationsError {
pub kind: ListAllowedNodeTypeModificationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAllowedNodeTypeModificationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAllowedNodeTypeModificationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAllowedNodeTypeModificationsErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAllowedNodeTypeModificationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAllowedNodeTypeModificationsErrorKind::CacheClusterNotFoundFault(_inner) => {
_inner.fmt(f)
}
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ListAllowedNodeTypeModificationsErrorKind::ReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
ListAllowedNodeTypeModificationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAllowedNodeTypeModificationsError {
fn code(&self) -> Option<&str> {
ListAllowedNodeTypeModificationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAllowedNodeTypeModificationsError {
pub fn new(
kind: ListAllowedNodeTypeModificationsErrorKind,
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: ListAllowedNodeTypeModificationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAllowedNodeTypeModificationsErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListAllowedNodeTypeModificationsErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
ListAllowedNodeTypeModificationsErrorKind::ReplicationGroupNotFoundFault(_)
)
}
}
impl std::error::Error for ListAllowedNodeTypeModificationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAllowedNodeTypeModificationsErrorKind::CacheClusterNotFoundFault(_inner) => {
Some(_inner)
}
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
ListAllowedNodeTypeModificationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ListAllowedNodeTypeModificationsErrorKind::ReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
ListAllowedNodeTypeModificationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct IncreaseReplicaCountError {
pub kind: IncreaseReplicaCountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for IncreaseReplicaCountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: IncreaseReplicaCountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum IncreaseReplicaCountErrorKind {
ClusterQuotaForCustomerExceededFault(crate::error::ClusterQuotaForCustomerExceededFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidKmsKeyFault(crate::error::InvalidKmsKeyFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeGroupsPerReplicationGroupQuotaExceededFault(
crate::error::NodeGroupsPerReplicationGroupQuotaExceededFault,
),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
NoOperationFault(crate::error::NoOperationFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for IncreaseReplicaCountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
IncreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
IncreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
IncreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::InvalidKmsKeyFault(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
IncreaseReplicaCountErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
IncreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
IncreaseReplicaCountErrorKind::NoOperationFault(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
IncreaseReplicaCountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for IncreaseReplicaCountError {
fn code(&self) -> Option<&str> {
IncreaseReplicaCountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl IncreaseReplicaCountError {
pub fn new(kind: IncreaseReplicaCountErrorKind, 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: IncreaseReplicaCountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: IncreaseReplicaCountErrorKind::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_cluster_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_kms_key_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidKmsKeyFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_groups_per_replication_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_no_operation_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::NoOperationFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
IncreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_)
)
}
}
impl std::error::Error for IncreaseReplicaCountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
IncreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
IncreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
IncreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::InvalidKmsKeyFault(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
IncreaseReplicaCountErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
IncreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => Some(_inner),
IncreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
IncreaseReplicaCountErrorKind::NoOperationFault(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
IncreaseReplicaCountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NoOperationFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NoOperationFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NoOperationFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NoOperationFault")?;
if let Some(inner_44) = &self.message {
{
write!(f, ": {}", inner_44)?;
}
}
Ok(())
}
}
impl std::error::Error for NoOperationFault {}
pub mod no_operation_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::NoOperationFault {
crate::error::NoOperationFault {
message: self.message,
}
}
}
}
impl NoOperationFault {
pub fn builder() -> crate::error::no_operation_fault::Builder {
crate::error::no_operation_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ClusterQuotaForCustomerExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ClusterQuotaForCustomerExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ClusterQuotaForCustomerExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ClusterQuotaForCustomerExceededFault")?;
if let Some(inner_45) = &self.message {
{
write!(f, ": {}", inner_45)?;
}
}
Ok(())
}
}
impl std::error::Error for ClusterQuotaForCustomerExceededFault {}
pub mod cluster_quota_for_customer_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 {
#[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::ClusterQuotaForCustomerExceededFault {
crate::error::ClusterQuotaForCustomerExceededFault {
message: self.message,
}
}
}
}
impl ClusterQuotaForCustomerExceededFault {
pub fn builder() -> crate::error::cluster_quota_for_customer_exceeded_fault::Builder {
crate::error::cluster_quota_for_customer_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct IncreaseNodeGroupsInGlobalReplicationGroupError {
pub kind: IncreaseNodeGroupsInGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for IncreaseNodeGroupsInGlobalReplicationGroupError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum IncreaseNodeGroupsInGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for IncreaseNodeGroupsInGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
_inner.fmt(f)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
_inner.fmt(f)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for IncreaseNodeGroupsInGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
IncreaseNodeGroupsInGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl IncreaseNodeGroupsInGlobalReplicationGroupError {
pub fn new(
kind: IncreaseNodeGroupsInGlobalReplicationGroupErrorKind,
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: IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(&self.kind, IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_))
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(&self.kind, IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for IncreaseNodeGroupsInGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
Some(_inner)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
Some(_inner)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
IncreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct FailoverGlobalReplicationGroupError {
pub kind: FailoverGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for FailoverGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: FailoverGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum FailoverGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for FailoverGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
FailoverGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(
_inner,
) => _inner.fmt(f),
FailoverGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => _inner.fmt(f),
FailoverGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
FailoverGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
FailoverGlobalReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for FailoverGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
FailoverGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl FailoverGlobalReplicationGroupError {
pub fn new(
kind: FailoverGlobalReplicationGroupErrorKind,
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: FailoverGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: FailoverGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
FailoverGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
FailoverGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
FailoverGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
FailoverGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for FailoverGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
FailoverGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(
_inner,
) => Some(_inner),
FailoverGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => Some(_inner),
FailoverGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
FailoverGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
FailoverGlobalReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateGlobalReplicationGroupError {
pub kind: DisassociateGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
_inner.fmt(f)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
_inner.fmt(f)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) =>
_inner.fmt(f)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
DisassociateGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
DisassociateGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateGlobalReplicationGroupError {
pub fn new(
kind: DisassociateGlobalReplicationGroupErrorKind,
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: DisassociateGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DisassociateGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DisassociateGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DisassociateGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
Some(_inner)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
Some(_inner)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) =>
Some(_inner)
,
DisassociateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
DisassociateGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUsersError {
pub kind: DescribeUsersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUsersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUsersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUsersErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUsersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUsersErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
DescribeUsersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUsersError {
fn code(&self) -> Option<&str> {
DescribeUsersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUsersError {
pub fn new(kind: DescribeUsersErrorKind, 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: DescribeUsersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUsersErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUsersErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeUsersErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, DescribeUsersErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for DescribeUsersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUsersErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DescribeUsersErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
DescribeUsersErrorKind::UserNotFoundFault(_inner) => Some(_inner),
DescribeUsersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUserGroupsError {
pub kind: DescribeUserGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUserGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUserGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUserGroupsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUserGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUserGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeUserGroupsErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
DescribeUserGroupsErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
DescribeUserGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUserGroupsError {
fn code(&self) -> Option<&str> {
DescribeUserGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUserGroupsError {
pub fn new(kind: DescribeUserGroupsErrorKind, 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: DescribeUserGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUserGroupsErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUserGroupsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeUserGroupsErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeUserGroupsErrorKind::UserGroupNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeUserGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUserGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeUserGroupsErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
DescribeUserGroupsErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
DescribeUserGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeUpdateActionsError {
pub kind: DescribeUpdateActionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeUpdateActionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeUpdateActionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeUpdateActionsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeUpdateActionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeUpdateActionsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeUpdateActionsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DescribeUpdateActionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeUpdateActionsError {
fn code(&self) -> Option<&str> {
DescribeUpdateActionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeUpdateActionsError {
pub fn new(kind: DescribeUpdateActionsErrorKind, 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: DescribeUpdateActionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeUpdateActionsErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateActionsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeUpdateActionsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeUpdateActionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeUpdateActionsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeUpdateActionsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DescribeUpdateActionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeSnapshotsError {
pub kind: DescribeSnapshotsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeSnapshotsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeSnapshotsErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeSnapshotsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeSnapshotsErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeSnapshotsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
DescribeSnapshotsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeSnapshotsError {
fn code(&self) -> Option<&str> {
DescribeSnapshotsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeSnapshotsError {
pub fn new(kind: DescribeSnapshotsErrorKind, 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: DescribeSnapshotsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeSnapshotsErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeSnapshotsErrorKind::SnapshotNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeSnapshotsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeSnapshotsErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeSnapshotsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
DescribeSnapshotsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeServiceUpdatesError {
pub kind: DescribeServiceUpdatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeServiceUpdatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeServiceUpdatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeServiceUpdatesErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ServiceUpdateNotFoundFault(crate::error::ServiceUpdateNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeServiceUpdatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeServiceUpdatesErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeServiceUpdatesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeServiceUpdatesErrorKind::ServiceUpdateNotFoundFault(_inner) => _inner.fmt(f),
DescribeServiceUpdatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeServiceUpdatesError {
fn code(&self) -> Option<&str> {
DescribeServiceUpdatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeServiceUpdatesError {
pub fn new(kind: DescribeServiceUpdatesErrorKind, 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: DescribeServiceUpdatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeServiceUpdatesErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeServiceUpdatesErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeServiceUpdatesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_service_update_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeServiceUpdatesErrorKind::ServiceUpdateNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeServiceUpdatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeServiceUpdatesErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeServiceUpdatesErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DescribeServiceUpdatesErrorKind::ServiceUpdateNotFoundFault(_inner) => Some(_inner),
DescribeServiceUpdatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUpdateNotFoundFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUpdateNotFoundFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUpdateNotFoundFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUpdateNotFoundFault")?;
if let Some(inner_46) = &self.message {
{
write!(f, ": {}", inner_46)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUpdateNotFoundFault {}
pub mod service_update_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::ServiceUpdateNotFoundFault {
crate::error::ServiceUpdateNotFoundFault {
message: self.message,
}
}
}
}
impl ServiceUpdateNotFoundFault {
pub fn builder() -> crate::error::service_update_not_found_fault::Builder {
crate::error::service_update_not_found_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeReservedCacheNodesOfferingsError {
pub kind: DescribeReservedCacheNodesOfferingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeReservedCacheNodesOfferingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeReservedCacheNodesOfferingsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeReservedCacheNodesOfferingsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ReservedCacheNodesOfferingNotFoundFault(crate::error::ReservedCacheNodesOfferingNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeReservedCacheNodesOfferingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterCombinationException(_inner) =>
_inner.fmt(f)
,
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
DescribeReservedCacheNodesOfferingsErrorKind::ReservedCacheNodesOfferingNotFoundFault(_inner) =>
_inner.fmt(f)
,
DescribeReservedCacheNodesOfferingsErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeReservedCacheNodesOfferingsError {
fn code(&self) -> Option<&str> {
DescribeReservedCacheNodesOfferingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeReservedCacheNodesOfferingsError {
pub fn new(
kind: DescribeReservedCacheNodesOfferingsErrorKind,
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: DescribeReservedCacheNodesOfferingsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeReservedCacheNodesOfferingsErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_reserved_cache_nodes_offering_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesOfferingsErrorKind::ReservedCacheNodesOfferingNotFoundFault(
_
)
)
}
}
impl std::error::Error for DescribeReservedCacheNodesOfferingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterCombinationException(_inner) =>
Some(_inner)
,
DescribeReservedCacheNodesOfferingsErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
DescribeReservedCacheNodesOfferingsErrorKind::ReservedCacheNodesOfferingNotFoundFault(_inner) =>
Some(_inner)
,
DescribeReservedCacheNodesOfferingsErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeReservedCacheNodesError {
pub kind: DescribeReservedCacheNodesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeReservedCacheNodesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeReservedCacheNodesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeReservedCacheNodesErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ReservedCacheNodeNotFoundFault(crate::error::ReservedCacheNodeNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeReservedCacheNodesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeReservedCacheNodesErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeReservedCacheNodesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeReservedCacheNodesErrorKind::ReservedCacheNodeNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeReservedCacheNodesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeReservedCacheNodesError {
fn code(&self) -> Option<&str> {
DescribeReservedCacheNodesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeReservedCacheNodesError {
pub fn new(kind: DescribeReservedCacheNodesErrorKind, 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: DescribeReservedCacheNodesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeReservedCacheNodesErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_reserved_cache_node_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeReservedCacheNodesErrorKind::ReservedCacheNodeNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeReservedCacheNodesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeReservedCacheNodesErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeReservedCacheNodesErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeReservedCacheNodesErrorKind::ReservedCacheNodeNotFoundFault(_inner) => {
Some(_inner)
}
DescribeReservedCacheNodesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeReplicationGroupsError {
pub kind: DescribeReplicationGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeReplicationGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeReplicationGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeReplicationGroupsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeReplicationGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeReplicationGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeReplicationGroupsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeReplicationGroupsErrorKind::ReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeReplicationGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeReplicationGroupsError {
fn code(&self) -> Option<&str> {
DescribeReplicationGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeReplicationGroupsError {
pub fn new(kind: DescribeReplicationGroupsErrorKind, 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: DescribeReplicationGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeReplicationGroupsErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReplicationGroupsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReplicationGroupsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeReplicationGroupsErrorKind::ReplicationGroupNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeReplicationGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeReplicationGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeReplicationGroupsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeReplicationGroupsErrorKind::ReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
DescribeReplicationGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeGlobalReplicationGroupsError {
pub kind: DescribeGlobalReplicationGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeGlobalReplicationGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeGlobalReplicationGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeGlobalReplicationGroupsErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeGlobalReplicationGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault(
_inner,
) => _inner.fmt(f),
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeGlobalReplicationGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeGlobalReplicationGroupsError {
fn code(&self) -> Option<&str> {
DescribeGlobalReplicationGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeGlobalReplicationGroupsError {
pub fn new(
kind: DescribeGlobalReplicationGroupsErrorKind,
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: DescribeGlobalReplicationGroupsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeGlobalReplicationGroupsErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeGlobalReplicationGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeGlobalReplicationGroupsErrorKind::GlobalReplicationGroupNotFoundFault(
_inner,
) => Some(_inner),
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
DescribeGlobalReplicationGroupsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeGlobalReplicationGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEventsError {
pub kind: DescribeEventsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEventsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEventsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEventsErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEventsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEventsErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
DescribeEventsErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DescribeEventsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEventsError {
fn code(&self) -> Option<&str> {
DescribeEventsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEventsError {
pub fn new(kind: DescribeEventsErrorKind, 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: DescribeEventsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEventsErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEventsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEventsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeEventsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEventsErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DescribeEventsErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DescribeEventsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeEngineDefaultParametersError {
pub kind: DescribeEngineDefaultParametersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeEngineDefaultParametersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeEngineDefaultParametersErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeEngineDefaultParametersErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeEngineDefaultParametersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeEngineDefaultParametersErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
DescribeEngineDefaultParametersErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeEngineDefaultParametersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeEngineDefaultParametersError {
fn code(&self) -> Option<&str> {
DescribeEngineDefaultParametersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeEngineDefaultParametersError {
pub fn new(
kind: DescribeEngineDefaultParametersErrorKind,
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: DescribeEngineDefaultParametersErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeEngineDefaultParametersErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEngineDefaultParametersErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeEngineDefaultParametersErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeEngineDefaultParametersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeEngineDefaultParametersErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
DescribeEngineDefaultParametersErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeEngineDefaultParametersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheSubnetGroupsError {
pub kind: DescribeCacheSubnetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheSubnetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheSubnetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheSubnetGroupsErrorKind {
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheSubnetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheSubnetGroupsErrorKind::CacheSubnetGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeCacheSubnetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheSubnetGroupsError {
fn code(&self) -> Option<&str> {
DescribeCacheSubnetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheSubnetGroupsError {
pub fn new(kind: DescribeCacheSubnetGroupsErrorKind, 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: DescribeCacheSubnetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheSubnetGroupsErrorKind::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_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeCacheSubnetGroupsErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
}
impl std::error::Error for DescribeCacheSubnetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheSubnetGroupsErrorKind::CacheSubnetGroupNotFoundFault(_inner) => {
Some(_inner)
}
DescribeCacheSubnetGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheSecurityGroupsError {
pub kind: DescribeCacheSecurityGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheSecurityGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheSecurityGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheSecurityGroupsErrorKind {
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheSecurityGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeCacheSecurityGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheSecurityGroupsError {
fn code(&self) -> Option<&str> {
DescribeCacheSecurityGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheSecurityGroupsError {
pub fn new(kind: DescribeCacheSecurityGroupsErrorKind, 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: DescribeCacheSecurityGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheSecurityGroupsErrorKind::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_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeCacheSecurityGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheSecurityGroupsErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
DescribeCacheSecurityGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeCacheSecurityGroupsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeCacheSecurityGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheParametersError {
pub kind: DescribeCacheParametersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheParametersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheParametersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheParametersErrorKind {
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheParametersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheParametersErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeCacheParametersErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeCacheParametersErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeCacheParametersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheParametersError {
fn code(&self) -> Option<&str> {
DescribeCacheParametersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheParametersError {
pub fn new(kind: DescribeCacheParametersErrorKind, 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: DescribeCacheParametersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheParametersErrorKind::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_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParametersErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParametersErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParametersErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeCacheParametersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheParametersErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
DescribeCacheParametersErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeCacheParametersErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeCacheParametersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheParameterGroupsError {
pub kind: DescribeCacheParameterGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheParameterGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheParameterGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheParameterGroupsErrorKind {
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheParameterGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheParameterGroupsErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DescribeCacheParameterGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeCacheParameterGroupsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeCacheParameterGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheParameterGroupsError {
fn code(&self) -> Option<&str> {
DescribeCacheParameterGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheParameterGroupsError {
pub fn new(kind: DescribeCacheParameterGroupsErrorKind, 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: DescribeCacheParameterGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheParameterGroupsErrorKind::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_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParameterGroupsErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParameterGroupsErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheParameterGroupsErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeCacheParameterGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheParameterGroupsErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
DescribeCacheParameterGroupsErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeCacheParameterGroupsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeCacheParameterGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheEngineVersionsError {
pub kind: DescribeCacheEngineVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheEngineVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheEngineVersionsErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheEngineVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheEngineVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheEngineVersionsError {
fn code(&self) -> Option<&str> {
DescribeCacheEngineVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheEngineVersionsError {
pub fn new(kind: DescribeCacheEngineVersionsErrorKind, 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: DescribeCacheEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheEngineVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
}
impl std::error::Error for DescribeCacheEngineVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheEngineVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCacheClustersError {
pub kind: DescribeCacheClustersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCacheClustersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCacheClustersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCacheClustersErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCacheClustersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCacheClustersErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
DescribeCacheClustersErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DescribeCacheClustersErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DescribeCacheClustersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCacheClustersError {
fn code(&self) -> Option<&str> {
DescribeCacheClustersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeCacheClustersError {
pub fn new(kind: DescribeCacheClustersErrorKind, 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: DescribeCacheClustersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCacheClustersErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DescribeCacheClustersErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheClustersErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCacheClustersErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DescribeCacheClustersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCacheClustersErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
DescribeCacheClustersErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DescribeCacheClustersErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DescribeCacheClustersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteUserGroupError {
pub kind: DeleteUserGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteUserGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteUserGroupErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidUserGroupStateFault(crate::error::InvalidUserGroupStateFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteUserGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteUserGroupErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteUserGroupErrorKind::InvalidUserGroupStateFault(_inner) => _inner.fmt(f),
DeleteUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
DeleteUserGroupErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
DeleteUserGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteUserGroupError {
fn code(&self) -> Option<&str> {
DeleteUserGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteUserGroupError {
pub fn new(kind: DeleteUserGroupErrorKind, 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: DeleteUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteUserGroupErrorKind::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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteUserGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_user_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteUserGroupErrorKind::InvalidUserGroupStateFault(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteUserGroupErrorKind::UserGroupNotFoundFault(_)
)
}
}
impl std::error::Error for DeleteUserGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteUserGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteUserGroupErrorKind::InvalidUserGroupStateFault(_inner) => Some(_inner),
DeleteUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
DeleteUserGroupErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
DeleteUserGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteUserError {
pub kind: DeleteUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteUserErrorKind {
DefaultUserAssociatedToUserGroupFault(crate::error::DefaultUserAssociatedToUserGroupFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidUserStateFault(crate::error::InvalidUserStateFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteUserErrorKind::DefaultUserAssociatedToUserGroupFault(_inner) => _inner.fmt(f),
DeleteUserErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteUserErrorKind::InvalidUserStateFault(_inner) => _inner.fmt(f),
DeleteUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
DeleteUserErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
DeleteUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteUserError {
fn code(&self) -> Option<&str> {
DeleteUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteUserError {
pub fn new(kind: DeleteUserErrorKind, 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: DeleteUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteUserErrorKind::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_default_user_associated_to_user_group_fault(&self) -> bool {
matches!(
&self.kind,
DeleteUserErrorKind::DefaultUserAssociatedToUserGroupFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteUserErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_user_state_fault(&self) -> bool {
matches!(&self.kind, DeleteUserErrorKind::InvalidUserStateFault(_))
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteUserErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, DeleteUserErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for DeleteUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteUserErrorKind::DefaultUserAssociatedToUserGroupFault(_inner) => Some(_inner),
DeleteUserErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteUserErrorKind::InvalidUserStateFault(_inner) => Some(_inner),
DeleteUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
DeleteUserErrorKind::UserNotFoundFault(_inner) => Some(_inner),
DeleteUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DefaultUserAssociatedToUserGroupFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DefaultUserAssociatedToUserGroupFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DefaultUserAssociatedToUserGroupFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DefaultUserAssociatedToUserGroupFault")?;
if let Some(inner_47) = &self.message {
{
write!(f, ": {}", inner_47)?;
}
}
Ok(())
}
}
impl std::error::Error for DefaultUserAssociatedToUserGroupFault {}
pub mod default_user_associated_to_user_group_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::DefaultUserAssociatedToUserGroupFault {
crate::error::DefaultUserAssociatedToUserGroupFault {
message: self.message,
}
}
}
}
impl DefaultUserAssociatedToUserGroupFault {
pub fn builder() -> crate::error::default_user_associated_to_user_group_fault::Builder {
crate::error::default_user_associated_to_user_group_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSnapshotError {
pub kind: DeleteSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSnapshotErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidSnapshotStateFault(crate::error::InvalidSnapshotStateFault),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSnapshotErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::InvalidSnapshotStateFault(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
DeleteSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSnapshotError {
fn code(&self) -> Option<&str> {
DeleteSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSnapshotError {
pub fn new(kind: DeleteSnapshotErrorKind, 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: DeleteSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSnapshotErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_snapshot_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::InvalidSnapshotStateFault(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteSnapshotErrorKind::SnapshotNotFoundFault(_)
)
}
}
impl std::error::Error for DeleteSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSnapshotErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteSnapshotErrorKind::InvalidSnapshotStateFault(_inner) => Some(_inner),
DeleteSnapshotErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
DeleteSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSnapshotStateFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidSnapshotStateFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSnapshotStateFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSnapshotStateFault")?;
if let Some(inner_48) = &self.message {
{
write!(f, ": {}", inner_48)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSnapshotStateFault {}
pub mod invalid_snapshot_state_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::InvalidSnapshotStateFault {
crate::error::InvalidSnapshotStateFault {
message: self.message,
}
}
}
}
impl InvalidSnapshotStateFault {
pub fn builder() -> crate::error::invalid_snapshot_state_fault::Builder {
crate::error::invalid_snapshot_state_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteReplicationGroupError {
pub kind: DeleteReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteReplicationGroupErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
SnapshotAlreadyExistsFault(crate::error::SnapshotAlreadyExistsFault),
SnapshotFeatureNotSupportedFault(crate::error::SnapshotFeatureNotSupportedFault),
SnapshotQuotaExceededFault(crate::error::SnapshotQuotaExceededFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DeleteReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DeleteReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
DeleteReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
DeleteReplicationGroupErrorKind::SnapshotAlreadyExistsFault(_inner) => _inner.fmt(f),
DeleteReplicationGroupErrorKind::SnapshotFeatureNotSupportedFault(_inner) => {
_inner.fmt(f)
}
DeleteReplicationGroupErrorKind::SnapshotQuotaExceededFault(_inner) => _inner.fmt(f),
DeleteReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteReplicationGroupError {
fn code(&self) -> Option<&str> {
DeleteReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteReplicationGroupError {
pub fn new(kind: DeleteReplicationGroupErrorKind, 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: DeleteReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteReplicationGroupErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_snapshot_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::SnapshotAlreadyExistsFault(_)
)
}
pub fn is_snapshot_feature_not_supported_fault(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::SnapshotFeatureNotSupportedFault(_)
)
}
pub fn is_snapshot_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
DeleteReplicationGroupErrorKind::SnapshotQuotaExceededFault(_)
)
}
}
impl std::error::Error for DeleteReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DeleteReplicationGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
DeleteReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
DeleteReplicationGroupErrorKind::SnapshotAlreadyExistsFault(_inner) => Some(_inner),
DeleteReplicationGroupErrorKind::SnapshotFeatureNotSupportedFault(_inner) => {
Some(_inner)
}
DeleteReplicationGroupErrorKind::SnapshotQuotaExceededFault(_inner) => Some(_inner),
DeleteReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SnapshotQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotQuotaExceededFault")?;
if let Some(inner_49) = &self.message {
{
write!(f, ": {}", inner_49)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotQuotaExceededFault {}
pub mod snapshot_quota_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 {
#[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::SnapshotQuotaExceededFault {
crate::error::SnapshotQuotaExceededFault {
message: self.message,
}
}
}
}
impl SnapshotQuotaExceededFault {
pub fn builder() -> crate::error::snapshot_quota_exceeded_fault::Builder {
crate::error::snapshot_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotFeatureNotSupportedFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SnapshotFeatureNotSupportedFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotFeatureNotSupportedFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotFeatureNotSupportedFault")?;
if let Some(inner_50) = &self.message {
{
write!(f, ": {}", inner_50)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotFeatureNotSupportedFault {}
pub mod snapshot_feature_not_supported_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::SnapshotFeatureNotSupportedFault {
crate::error::SnapshotFeatureNotSupportedFault {
message: self.message,
}
}
}
}
impl SnapshotFeatureNotSupportedFault {
pub fn builder() -> crate::error::snapshot_feature_not_supported_fault::Builder {
crate::error::snapshot_feature_not_supported_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SnapshotAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl SnapshotAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SnapshotAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SnapshotAlreadyExistsFault")?;
if let Some(inner_51) = &self.message {
{
write!(f, ": {}", inner_51)?;
}
}
Ok(())
}
}
impl std::error::Error for SnapshotAlreadyExistsFault {}
pub mod snapshot_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 {
#[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::SnapshotAlreadyExistsFault {
crate::error::SnapshotAlreadyExistsFault {
message: self.message,
}
}
}
}
impl SnapshotAlreadyExistsFault {
pub fn builder() -> crate::error::snapshot_already_exists_fault::Builder {
crate::error::snapshot_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGlobalReplicationGroupError {
pub kind: DeleteGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DeleteGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => _inner.fmt(f),
DeleteGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DeleteGlobalReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
DeleteGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteGlobalReplicationGroupError {
pub fn new(kind: DeleteGlobalReplicationGroupErrorKind, 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: DeleteGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DeleteGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
DeleteGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(
_inner,
) => Some(_inner),
DeleteGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DeleteGlobalReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCacheSubnetGroupError {
pub kind: DeleteCacheSubnetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCacheSubnetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCacheSubnetGroupErrorKind {
CacheSubnetGroupInUse(crate::error::CacheSubnetGroupInUse),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCacheSubnetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupInUse(_inner) => _inner.fmt(f),
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
DeleteCacheSubnetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCacheSubnetGroupError {
fn code(&self) -> Option<&str> {
DeleteCacheSubnetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCacheSubnetGroupError {
pub fn new(kind: DeleteCacheSubnetGroupErrorKind, 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: DeleteCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCacheSubnetGroupErrorKind::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_cache_subnet_group_in_use(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupInUse(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
}
impl std::error::Error for DeleteCacheSubnetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupInUse(_inner) => Some(_inner),
DeleteCacheSubnetGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
DeleteCacheSubnetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSubnetGroupInUse {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSubnetGroupInUse {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSubnetGroupInUse {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSubnetGroupInUse")?;
if let Some(inner_52) = &self.message {
{
write!(f, ": {}", inner_52)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSubnetGroupInUse {}
pub mod cache_subnet_group_in_use {
#[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::CacheSubnetGroupInUse {
crate::error::CacheSubnetGroupInUse {
message: self.message,
}
}
}
}
impl CacheSubnetGroupInUse {
pub fn builder() -> crate::error::cache_subnet_group_in_use::Builder {
crate::error::cache_subnet_group_in_use::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCacheSecurityGroupError {
pub kind: DeleteCacheSecurityGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCacheSecurityGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCacheSecurityGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCacheSecurityGroupErrorKind {
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InvalidCacheSecurityGroupStateFault(crate::error::InvalidCacheSecurityGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCacheSecurityGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCacheSecurityGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DeleteCacheSecurityGroupErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
_inner.fmt(f)
}
DeleteCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DeleteCacheSecurityGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DeleteCacheSecurityGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCacheSecurityGroupError {
fn code(&self) -> Option<&str> {
DeleteCacheSecurityGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCacheSecurityGroupError {
pub fn new(kind: DeleteCacheSecurityGroupErrorKind, 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: DeleteCacheSecurityGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCacheSecurityGroupErrorKind::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_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSecurityGroupErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSecurityGroupErrorKind::InvalidCacheSecurityGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheSecurityGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DeleteCacheSecurityGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCacheSecurityGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
DeleteCacheSecurityGroupErrorKind::InvalidCacheSecurityGroupStateFault(_inner) => {
Some(_inner)
}
DeleteCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DeleteCacheSecurityGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DeleteCacheSecurityGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCacheParameterGroupError {
pub kind: DeleteCacheParameterGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCacheParameterGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCacheParameterGroupErrorKind {
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
InvalidCacheParameterGroupStateFault(crate::error::InvalidCacheParameterGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCacheParameterGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
DeleteCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
_inner.fmt(f)
}
DeleteCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DeleteCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DeleteCacheParameterGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCacheParameterGroupError {
fn code(&self) -> Option<&str> {
DeleteCacheParameterGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCacheParameterGroupError {
pub fn new(kind: DeleteCacheParameterGroupErrorKind, 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: DeleteCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCacheParameterGroupErrorKind::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_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheParameterGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheParameterGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DeleteCacheParameterGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCacheParameterGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
DeleteCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
Some(_inner)
}
DeleteCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DeleteCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DeleteCacheParameterGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCacheClusterError {
pub kind: DeleteCacheClusterErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCacheClusterError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCacheClusterErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
SnapshotAlreadyExistsFault(crate::error::SnapshotAlreadyExistsFault),
SnapshotFeatureNotSupportedFault(crate::error::SnapshotFeatureNotSupportedFault),
SnapshotQuotaExceededFault(crate::error::SnapshotQuotaExceededFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCacheClusterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DeleteCacheClusterErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::SnapshotAlreadyExistsFault(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::SnapshotFeatureNotSupportedFault(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::SnapshotQuotaExceededFault(_inner) => _inner.fmt(f),
DeleteCacheClusterErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCacheClusterError {
fn code(&self) -> Option<&str> {
DeleteCacheClusterError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCacheClusterError {
pub fn new(kind: DeleteCacheClusterErrorKind, 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: DeleteCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCacheClusterErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_snapshot_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::SnapshotAlreadyExistsFault(_)
)
}
pub fn is_snapshot_feature_not_supported_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::SnapshotFeatureNotSupportedFault(_)
)
}
pub fn is_snapshot_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
DeleteCacheClusterErrorKind::SnapshotQuotaExceededFault(_)
)
}
}
impl std::error::Error for DeleteCacheClusterError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCacheClusterErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DeleteCacheClusterErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::SnapshotAlreadyExistsFault(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::SnapshotFeatureNotSupportedFault(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::SnapshotQuotaExceededFault(_inner) => Some(_inner),
DeleteCacheClusterErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DecreaseReplicaCountError {
pub kind: DecreaseReplicaCountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DecreaseReplicaCountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DecreaseReplicaCountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DecreaseReplicaCountErrorKind {
ClusterQuotaForCustomerExceededFault(crate::error::ClusterQuotaForCustomerExceededFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeGroupsPerReplicationGroupQuotaExceededFault(
crate::error::NodeGroupsPerReplicationGroupQuotaExceededFault,
),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
NoOperationFault(crate::error::NoOperationFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DecreaseReplicaCountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DecreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
DecreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
DecreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
DecreaseReplicaCountErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
DecreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
DecreaseReplicaCountErrorKind::NoOperationFault(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
DecreaseReplicaCountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DecreaseReplicaCountError {
fn code(&self) -> Option<&str> {
DecreaseReplicaCountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DecreaseReplicaCountError {
pub fn new(kind: DecreaseReplicaCountErrorKind, 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: DecreaseReplicaCountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DecreaseReplicaCountErrorKind::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_cluster_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_groups_per_replication_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_no_operation_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::NoOperationFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
DecreaseReplicaCountErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
}
impl std::error::Error for DecreaseReplicaCountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DecreaseReplicaCountErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
DecreaseReplicaCountErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
DecreaseReplicaCountErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
DecreaseReplicaCountErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
DecreaseReplicaCountErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => Some(_inner),
DecreaseReplicaCountErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
DecreaseReplicaCountErrorKind::NoOperationFault(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
DecreaseReplicaCountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DecreaseNodeGroupsInGlobalReplicationGroupError {
pub kind: DecreaseNodeGroupsInGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DecreaseNodeGroupsInGlobalReplicationGroupError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DecreaseNodeGroupsInGlobalReplicationGroupErrorKind {
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DecreaseNodeGroupsInGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
_inner.fmt(f)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
_inner.fmt(f)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) =>
_inner.fmt(f)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DecreaseNodeGroupsInGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
DecreaseNodeGroupsInGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DecreaseNodeGroupsInGlobalReplicationGroupError {
pub fn new(
kind: DecreaseNodeGroupsInGlobalReplicationGroupErrorKind,
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: DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::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_global_replication_group_not_found_fault(&self) -> bool {
matches!(&self.kind, DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_))
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(&self.kind, DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_))
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(&self.kind, DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_))
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for DecreaseNodeGroupsInGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) =>
Some(_inner)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) =>
Some(_inner)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) =>
Some(_inner)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
DecreaseNodeGroupsInGlobalReplicationGroupErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUserGroupError {
pub kind: CreateUserGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUserGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUserGroupErrorKind {
DefaultUserRequired(crate::error::DefaultUserRequired),
DuplicateUserNameFault(crate::error::DuplicateUserNameFault),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
UserGroupAlreadyExistsFault(crate::error::UserGroupAlreadyExistsFault),
UserGroupQuotaExceededFault(crate::error::UserGroupQuotaExceededFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUserGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUserGroupErrorKind::DefaultUserRequired(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::DuplicateUserNameFault(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::UserGroupAlreadyExistsFault(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::UserGroupQuotaExceededFault(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
CreateUserGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUserGroupError {
fn code(&self) -> Option<&str> {
CreateUserGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUserGroupError {
pub fn new(kind: CreateUserGroupErrorKind, 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: CreateUserGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUserGroupErrorKind::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_default_user_required(&self) -> bool {
matches!(&self.kind, CreateUserGroupErrorKind::DefaultUserRequired(_))
}
pub fn is_duplicate_user_name_fault(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::DuplicateUserNameFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::TagQuotaPerResourceExceeded(_)
)
}
pub fn is_user_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::UserGroupAlreadyExistsFault(_)
)
}
pub fn is_user_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateUserGroupErrorKind::UserGroupQuotaExceededFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, CreateUserGroupErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for CreateUserGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUserGroupErrorKind::DefaultUserRequired(_inner) => Some(_inner),
CreateUserGroupErrorKind::DuplicateUserNameFault(_inner) => Some(_inner),
CreateUserGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateUserGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
CreateUserGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateUserGroupErrorKind::UserGroupAlreadyExistsFault(_inner) => Some(_inner),
CreateUserGroupErrorKind::UserGroupQuotaExceededFault(_inner) => Some(_inner),
CreateUserGroupErrorKind::UserNotFoundFault(_inner) => Some(_inner),
CreateUserGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserGroupQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserGroupQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserGroupQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserGroupQuotaExceededFault")?;
if let Some(inner_53) = &self.message {
{
write!(f, ": {}", inner_53)?;
}
}
Ok(())
}
}
impl std::error::Error for UserGroupQuotaExceededFault {}
pub mod user_group_quota_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 {
#[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::UserGroupQuotaExceededFault {
crate::error::UserGroupQuotaExceededFault {
message: self.message,
}
}
}
}
impl UserGroupQuotaExceededFault {
pub fn builder() -> crate::error::user_group_quota_exceeded_fault::Builder {
crate::error::user_group_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserGroupAlreadyExistsFault")?;
if let Some(inner_54) = &self.message {
{
write!(f, ": {}", inner_54)?;
}
}
Ok(())
}
}
impl std::error::Error for UserGroupAlreadyExistsFault {}
pub mod user_group_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 {
#[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::UserGroupAlreadyExistsFault {
crate::error::UserGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl UserGroupAlreadyExistsFault {
pub fn builder() -> crate::error::user_group_already_exists_fault::Builder {
crate::error::user_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateUserError {
pub kind: CreateUserErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateUserError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateUserErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateUserErrorKind {
DuplicateUserNameFault(crate::error::DuplicateUserNameFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
UserAlreadyExistsFault(crate::error::UserAlreadyExistsFault),
UserQuotaExceededFault(crate::error::UserQuotaExceededFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateUserError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateUserErrorKind::DuplicateUserNameFault(_inner) => _inner.fmt(f),
CreateUserErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateUserErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CreateUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => _inner.fmt(f),
CreateUserErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateUserErrorKind::UserAlreadyExistsFault(_inner) => _inner.fmt(f),
CreateUserErrorKind::UserQuotaExceededFault(_inner) => _inner.fmt(f),
CreateUserErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateUserError {
fn code(&self) -> Option<&str> {
CreateUserError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateUserError {
pub fn new(kind: CreateUserErrorKind, 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: CreateUserErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateUserErrorKind::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_duplicate_user_name_fault(&self) -> bool {
matches!(&self.kind, CreateUserErrorKind::DuplicateUserNameFault(_))
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateUserErrorKind::TagQuotaPerResourceExceeded(_)
)
}
pub fn is_user_already_exists_fault(&self) -> bool {
matches!(&self.kind, CreateUserErrorKind::UserAlreadyExistsFault(_))
}
pub fn is_user_quota_exceeded_fault(&self) -> bool {
matches!(&self.kind, CreateUserErrorKind::UserQuotaExceededFault(_))
}
}
impl std::error::Error for CreateUserError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateUserErrorKind::DuplicateUserNameFault(_inner) => Some(_inner),
CreateUserErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateUserErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateUserErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => Some(_inner),
CreateUserErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateUserErrorKind::UserAlreadyExistsFault(_inner) => Some(_inner),
CreateUserErrorKind::UserQuotaExceededFault(_inner) => Some(_inner),
CreateUserErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserQuotaExceededFault")?;
if let Some(inner_55) = &self.message {
{
write!(f, ": {}", inner_55)?;
}
}
Ok(())
}
}
impl std::error::Error for UserQuotaExceededFault {}
pub mod user_quota_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 {
#[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::UserQuotaExceededFault {
crate::error::UserQuotaExceededFault {
message: self.message,
}
}
}
}
impl UserQuotaExceededFault {
pub fn builder() -> crate::error::user_quota_exceeded_fault::Builder {
crate::error::user_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UserAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl UserAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UserAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UserAlreadyExistsFault")?;
if let Some(inner_56) = &self.message {
{
write!(f, ": {}", inner_56)?;
}
}
Ok(())
}
}
impl std::error::Error for UserAlreadyExistsFault {}
pub mod user_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 {
#[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::UserAlreadyExistsFault {
crate::error::UserAlreadyExistsFault {
message: self.message,
}
}
}
}
impl UserAlreadyExistsFault {
pub fn builder() -> crate::error::user_already_exists_fault::Builder {
crate::error::user_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSnapshotError {
pub kind: CreateSnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSnapshotErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
SnapshotAlreadyExistsFault(crate::error::SnapshotAlreadyExistsFault),
SnapshotFeatureNotSupportedFault(crate::error::SnapshotFeatureNotSupportedFault),
SnapshotQuotaExceededFault(crate::error::SnapshotQuotaExceededFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSnapshotErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::SnapshotAlreadyExistsFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::SnapshotFeatureNotSupportedFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::SnapshotQuotaExceededFault(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateSnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSnapshotError {
fn code(&self) -> Option<&str> {
CreateSnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSnapshotError {
pub fn new(kind: CreateSnapshotErrorKind, 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: CreateSnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSnapshotErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_snapshot_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::SnapshotAlreadyExistsFault(_)
)
}
pub fn is_snapshot_feature_not_supported_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::SnapshotFeatureNotSupportedFault(_)
)
}
pub fn is_snapshot_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::SnapshotQuotaExceededFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateSnapshotErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CreateSnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSnapshotErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CreateSnapshotErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateSnapshotErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::SnapshotAlreadyExistsFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::SnapshotFeatureNotSupportedFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::SnapshotQuotaExceededFault(_inner) => Some(_inner),
CreateSnapshotErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateSnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateReplicationGroupError {
pub kind: CreateReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateReplicationGroupErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
ClusterQuotaForCustomerExceededFault(crate::error::ClusterQuotaForCustomerExceededFault),
GlobalReplicationGroupNotFoundFault(crate::error::GlobalReplicationGroupNotFoundFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidCacheClusterStateFault(crate::error::InvalidCacheClusterStateFault),
InvalidGlobalReplicationGroupStateFault(crate::error::InvalidGlobalReplicationGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidUserGroupStateFault(crate::error::InvalidUserGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeGroupsPerReplicationGroupQuotaExceededFault(
crate::error::NodeGroupsPerReplicationGroupQuotaExceededFault,
),
NodeQuotaForClusterExceededFault(crate::error::NodeQuotaForClusterExceededFault),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
ReplicationGroupAlreadyExistsFault(crate::error::ReplicationGroupAlreadyExistsFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateReplicationGroupErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::InvalidCacheClusterStateFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::InvalidUserGroupStateFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => _inner.fmt(f),
CreateReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::ReplicationGroupAlreadyExistsFault(_inner) => {
_inner.fmt(f)
}
CreateReplicationGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateReplicationGroupError {
fn code(&self) -> Option<&str> {
CreateReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateReplicationGroupError {
pub fn new(kind: CreateReplicationGroupErrorKind, 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: CreateReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateReplicationGroupErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_cluster_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::ClusterQuotaForCustomerExceededFault(_)
)
}
pub fn is_global_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_cache_cluster_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidCacheClusterStateFault(_)
)
}
pub fn is_invalid_global_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_user_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidUserGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_groups_per_replication_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(_)
)
}
pub fn is_node_quota_for_cluster_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_replication_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::ReplicationGroupAlreadyExistsFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::TagQuotaPerResourceExceeded(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateReplicationGroupErrorKind::UserGroupNotFoundFault(_)
)
}
}
impl std::error::Error for CreateReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateReplicationGroupErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::CacheParameterGroupNotFoundFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::CacheSecurityGroupNotFoundFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::GlobalReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::InvalidCacheClusterStateFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::InvalidGlobalReplicationGroupStateFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::InvalidUserGroupStateFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::NodeGroupsPerReplicationGroupQuotaExceededFault(
_inner,
) => Some(_inner),
CreateReplicationGroupErrorKind::NodeQuotaForClusterExceededFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::NodeQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::ReplicationGroupAlreadyExistsFault(_inner) => {
Some(_inner)
}
CreateReplicationGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
CreateReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReplicationGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReplicationGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReplicationGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReplicationGroupAlreadyExistsFault")?;
if let Some(inner_57) = &self.message {
{
write!(f, ": {}", inner_57)?;
}
}
Ok(())
}
}
impl std::error::Error for ReplicationGroupAlreadyExistsFault {}
pub mod replication_group_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 {
#[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::ReplicationGroupAlreadyExistsFault {
crate::error::ReplicationGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl ReplicationGroupAlreadyExistsFault {
pub fn builder() -> crate::error::replication_group_already_exists_fault::Builder {
crate::error::replication_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGlobalReplicationGroupError {
pub kind: CreateGlobalReplicationGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateGlobalReplicationGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGlobalReplicationGroupErrorKind {
GlobalReplicationGroupAlreadyExistsFault(
crate::error::GlobalReplicationGroupAlreadyExistsFault,
),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ServiceLinkedRoleNotFoundFault(crate::error::ServiceLinkedRoleNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateGlobalReplicationGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGlobalReplicationGroupErrorKind::GlobalReplicationGroupAlreadyExistsFault(
_inner,
) => _inner.fmt(f),
CreateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
CreateGlobalReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
_inner.fmt(f)
}
CreateGlobalReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => {
_inner.fmt(f)
}
CreateGlobalReplicationGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => {
_inner.fmt(f)
}
CreateGlobalReplicationGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGlobalReplicationGroupError {
fn code(&self) -> Option<&str> {
CreateGlobalReplicationGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateGlobalReplicationGroupError {
pub fn new(kind: CreateGlobalReplicationGroupErrorKind, 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: CreateGlobalReplicationGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGlobalReplicationGroupErrorKind::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_global_replication_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateGlobalReplicationGroupErrorKind::GlobalReplicationGroupAlreadyExistsFault(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateGlobalReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateGlobalReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_service_linked_role_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateGlobalReplicationGroupErrorKind::ServiceLinkedRoleNotFoundFault(_)
)
}
}
impl std::error::Error for CreateGlobalReplicationGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGlobalReplicationGroupErrorKind::GlobalReplicationGroupAlreadyExistsFault(
_inner,
) => Some(_inner),
CreateGlobalReplicationGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
CreateGlobalReplicationGroupErrorKind::InvalidReplicationGroupStateFault(_inner) => {
Some(_inner)
}
CreateGlobalReplicationGroupErrorKind::ReplicationGroupNotFoundFault(_inner) => {
Some(_inner)
}
CreateGlobalReplicationGroupErrorKind::ServiceLinkedRoleNotFoundFault(_inner) => {
Some(_inner)
}
CreateGlobalReplicationGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GlobalReplicationGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl GlobalReplicationGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GlobalReplicationGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GlobalReplicationGroupAlreadyExistsFault")?;
if let Some(inner_58) = &self.message {
{
write!(f, ": {}", inner_58)?;
}
}
Ok(())
}
}
impl std::error::Error for GlobalReplicationGroupAlreadyExistsFault {}
pub mod global_replication_group_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 {
#[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::GlobalReplicationGroupAlreadyExistsFault {
crate::error::GlobalReplicationGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl GlobalReplicationGroupAlreadyExistsFault {
pub fn builder() -> crate::error::global_replication_group_already_exists_fault::Builder {
crate::error::global_replication_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCacheSubnetGroupError {
pub kind: CreateCacheSubnetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCacheSubnetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCacheSubnetGroupErrorKind {
CacheSubnetGroupAlreadyExistsFault(crate::error::CacheSubnetGroupAlreadyExistsFault),
CacheSubnetGroupQuotaExceededFault(crate::error::CacheSubnetGroupQuotaExceededFault),
CacheSubnetQuotaExceededFault(crate::error::CacheSubnetQuotaExceededFault),
InvalidSubnet(crate::error::InvalidSubnet),
SubnetNotAllowedFault(crate::error::SubnetNotAllowedFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCacheSubnetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupAlreadyExistsFault(_inner) => {
_inner.fmt(f)
}
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupQuotaExceededFault(_inner) => {
_inner.fmt(f)
}
CreateCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_inner) => _inner.fmt(f),
CreateCacheSubnetGroupErrorKind::InvalidSubnet(_inner) => _inner.fmt(f),
CreateCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_inner) => _inner.fmt(f),
CreateCacheSubnetGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateCacheSubnetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCacheSubnetGroupError {
fn code(&self) -> Option<&str> {
CreateCacheSubnetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCacheSubnetGroupError {
pub fn new(kind: CreateCacheSubnetGroupErrorKind, 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: CreateCacheSubnetGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCacheSubnetGroupErrorKind::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_cache_subnet_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupAlreadyExistsFault(_)
)
}
pub fn is_cache_subnet_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupQuotaExceededFault(_)
)
}
pub fn is_cache_subnet_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_)
)
}
pub fn is_invalid_subnet(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::InvalidSubnet(_)
)
}
pub fn is_subnet_not_allowed_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateCacheSubnetGroupErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CreateCacheSubnetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupAlreadyExistsFault(_inner) => {
Some(_inner)
}
CreateCacheSubnetGroupErrorKind::CacheSubnetGroupQuotaExceededFault(_inner) => {
Some(_inner)
}
CreateCacheSubnetGroupErrorKind::CacheSubnetQuotaExceededFault(_inner) => Some(_inner),
CreateCacheSubnetGroupErrorKind::InvalidSubnet(_inner) => Some(_inner),
CreateCacheSubnetGroupErrorKind::SubnetNotAllowedFault(_inner) => Some(_inner),
CreateCacheSubnetGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateCacheSubnetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSubnetGroupQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSubnetGroupQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSubnetGroupQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSubnetGroupQuotaExceededFault")?;
if let Some(inner_59) = &self.message {
{
write!(f, ": {}", inner_59)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSubnetGroupQuotaExceededFault {}
pub mod cache_subnet_group_quota_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 {
#[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::CacheSubnetGroupQuotaExceededFault {
crate::error::CacheSubnetGroupQuotaExceededFault {
message: self.message,
}
}
}
}
impl CacheSubnetGroupQuotaExceededFault {
pub fn builder() -> crate::error::cache_subnet_group_quota_exceeded_fault::Builder {
crate::error::cache_subnet_group_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSubnetGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSubnetGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSubnetGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSubnetGroupAlreadyExistsFault")?;
if let Some(inner_60) = &self.message {
{
write!(f, ": {}", inner_60)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSubnetGroupAlreadyExistsFault {}
pub mod cache_subnet_group_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 {
#[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::CacheSubnetGroupAlreadyExistsFault {
crate::error::CacheSubnetGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl CacheSubnetGroupAlreadyExistsFault {
pub fn builder() -> crate::error::cache_subnet_group_already_exists_fault::Builder {
crate::error::cache_subnet_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCacheSecurityGroupError {
pub kind: CreateCacheSecurityGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCacheSecurityGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCacheSecurityGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCacheSecurityGroupErrorKind {
CacheSecurityGroupAlreadyExistsFault(crate::error::CacheSecurityGroupAlreadyExistsFault),
CacheSecurityGroupQuotaExceededFault(crate::error::CacheSecurityGroupQuotaExceededFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCacheSecurityGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupAlreadyExistsFault(_inner) => {
_inner.fmt(f)
}
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupQuotaExceededFault(_inner) => {
_inner.fmt(f)
}
CreateCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateCacheSecurityGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
CreateCacheSecurityGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateCacheSecurityGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCacheSecurityGroupError {
fn code(&self) -> Option<&str> {
CreateCacheSecurityGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCacheSecurityGroupError {
pub fn new(kind: CreateCacheSecurityGroupErrorKind, 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: CreateCacheSecurityGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCacheSecurityGroupErrorKind::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_cache_security_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupAlreadyExistsFault(_)
)
}
pub fn is_cache_security_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupQuotaExceededFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheSecurityGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateCacheSecurityGroupErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CreateCacheSecurityGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupAlreadyExistsFault(_inner) => {
Some(_inner)
}
CreateCacheSecurityGroupErrorKind::CacheSecurityGroupQuotaExceededFault(_inner) => {
Some(_inner)
}
CreateCacheSecurityGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateCacheSecurityGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
CreateCacheSecurityGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateCacheSecurityGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSecurityGroupQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSecurityGroupQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSecurityGroupQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSecurityGroupQuotaExceededFault")?;
if let Some(inner_61) = &self.message {
{
write!(f, ": {}", inner_61)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSecurityGroupQuotaExceededFault {}
pub mod cache_security_group_quota_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 {
#[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::CacheSecurityGroupQuotaExceededFault {
crate::error::CacheSecurityGroupQuotaExceededFault {
message: self.message,
}
}
}
}
impl CacheSecurityGroupQuotaExceededFault {
pub fn builder() -> crate::error::cache_security_group_quota_exceeded_fault::Builder {
crate::error::cache_security_group_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheSecurityGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheSecurityGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheSecurityGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheSecurityGroupAlreadyExistsFault")?;
if let Some(inner_62) = &self.message {
{
write!(f, ": {}", inner_62)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheSecurityGroupAlreadyExistsFault {}
pub mod cache_security_group_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 {
#[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::CacheSecurityGroupAlreadyExistsFault {
crate::error::CacheSecurityGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl CacheSecurityGroupAlreadyExistsFault {
pub fn builder() -> crate::error::cache_security_group_already_exists_fault::Builder {
crate::error::cache_security_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCacheParameterGroupError {
pub kind: CreateCacheParameterGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCacheParameterGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCacheParameterGroupErrorKind {
CacheParameterGroupAlreadyExistsFault(crate::error::CacheParameterGroupAlreadyExistsFault),
CacheParameterGroupQuotaExceededFault(crate::error::CacheParameterGroupQuotaExceededFault),
InvalidCacheParameterGroupStateFault(crate::error::InvalidCacheParameterGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCacheParameterGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCacheParameterGroupErrorKind::CacheParameterGroupAlreadyExistsFault(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::CacheParameterGroupQuotaExceededFault(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => {
_inner.fmt(f)
}
CreateCacheParameterGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCacheParameterGroupError {
fn code(&self) -> Option<&str> {
CreateCacheParameterGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCacheParameterGroupError {
pub fn new(kind: CreateCacheParameterGroupErrorKind, 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: CreateCacheParameterGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCacheParameterGroupErrorKind::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_cache_parameter_group_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::CacheParameterGroupAlreadyExistsFault(_)
)
}
pub fn is_cache_parameter_group_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::CacheParameterGroupQuotaExceededFault(_)
)
}
pub fn is_invalid_cache_parameter_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateCacheParameterGroupErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CreateCacheParameterGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCacheParameterGroupErrorKind::CacheParameterGroupAlreadyExistsFault(_inner) => {
Some(_inner)
}
CreateCacheParameterGroupErrorKind::CacheParameterGroupQuotaExceededFault(_inner) => {
Some(_inner)
}
CreateCacheParameterGroupErrorKind::InvalidCacheParameterGroupStateFault(_inner) => {
Some(_inner)
}
CreateCacheParameterGroupErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateCacheParameterGroupErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
CreateCacheParameterGroupErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateCacheParameterGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheParameterGroupQuotaExceededFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheParameterGroupQuotaExceededFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheParameterGroupQuotaExceededFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheParameterGroupQuotaExceededFault")?;
if let Some(inner_63) = &self.message {
{
write!(f, ": {}", inner_63)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheParameterGroupQuotaExceededFault {}
pub mod cache_parameter_group_quota_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 {
#[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::CacheParameterGroupQuotaExceededFault {
crate::error::CacheParameterGroupQuotaExceededFault {
message: self.message,
}
}
}
}
impl CacheParameterGroupQuotaExceededFault {
pub fn builder() -> crate::error::cache_parameter_group_quota_exceeded_fault::Builder {
crate::error::cache_parameter_group_quota_exceeded_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheParameterGroupAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheParameterGroupAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheParameterGroupAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheParameterGroupAlreadyExistsFault")?;
if let Some(inner_64) = &self.message {
{
write!(f, ": {}", inner_64)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheParameterGroupAlreadyExistsFault {}
pub mod cache_parameter_group_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 {
#[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::CacheParameterGroupAlreadyExistsFault {
crate::error::CacheParameterGroupAlreadyExistsFault {
message: self.message,
}
}
}
}
impl CacheParameterGroupAlreadyExistsFault {
pub fn builder() -> crate::error::cache_parameter_group_already_exists_fault::Builder {
crate::error::cache_parameter_group_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCacheClusterError {
pub kind: CreateCacheClusterErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCacheClusterError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCacheClusterErrorKind {
CacheClusterAlreadyExistsFault(crate::error::CacheClusterAlreadyExistsFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
ClusterQuotaForCustomerExceededFault(crate::error::ClusterQuotaForCustomerExceededFault),
InsufficientCacheClusterCapacityFault(crate::error::InsufficientCacheClusterCapacityFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
InvalidVpcNetworkStateFault(crate::error::InvalidVpcNetworkStateFault),
NodeQuotaForClusterExceededFault(crate::error::NodeQuotaForClusterExceededFault),
NodeQuotaForCustomerExceededFault(crate::error::NodeQuotaForCustomerExceededFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCacheClusterError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCacheClusterErrorKind::CacheClusterAlreadyExistsFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
_inner.fmt(f)
}
CreateCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
_inner.fmt(f)
}
CreateCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
_inner.fmt(f)
}
CreateCacheClusterErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::InvalidVpcNetworkStateFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CreateCacheClusterErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCacheClusterError {
fn code(&self) -> Option<&str> {
CreateCacheClusterError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCacheClusterError {
pub fn new(kind: CreateCacheClusterErrorKind, 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: CreateCacheClusterErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCacheClusterErrorKind::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_cache_cluster_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::CacheClusterAlreadyExistsFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_cluster_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::ClusterQuotaForCustomerExceededFault(_)
)
}
pub fn is_insufficient_cache_cluster_capacity_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_invalid_vpc_network_state_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::InvalidVpcNetworkStateFault(_)
)
}
pub fn is_node_quota_for_cluster_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_)
)
}
pub fn is_node_quota_for_customer_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CreateCacheClusterErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CreateCacheClusterError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCacheClusterErrorKind::CacheClusterAlreadyExistsFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::CacheParameterGroupNotFoundFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::CacheSecurityGroupNotFoundFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::ClusterQuotaForCustomerExceededFault(_inner) => {
Some(_inner)
}
CreateCacheClusterErrorKind::InsufficientCacheClusterCapacityFault(_inner) => {
Some(_inner)
}
CreateCacheClusterErrorKind::InvalidParameterCombinationException(_inner) => {
Some(_inner)
}
CreateCacheClusterErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CreateCacheClusterErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::InvalidVpcNetworkStateFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::NodeQuotaForClusterExceededFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::NodeQuotaForCustomerExceededFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
CreateCacheClusterErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CreateCacheClusterErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CacheClusterAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CacheClusterAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CacheClusterAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CacheClusterAlreadyExistsFault")?;
if let Some(inner_65) = &self.message {
{
write!(f, ": {}", inner_65)?;
}
}
Ok(())
}
}
impl std::error::Error for CacheClusterAlreadyExistsFault {}
pub mod cache_cluster_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 {
#[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::CacheClusterAlreadyExistsFault {
crate::error::CacheClusterAlreadyExistsFault {
message: self.message,
}
}
}
}
impl CacheClusterAlreadyExistsFault {
pub fn builder() -> crate::error::cache_cluster_already_exists_fault::Builder {
crate::error::cache_cluster_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CopySnapshotError {
pub kind: CopySnapshotErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CopySnapshotError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CopySnapshotErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CopySnapshotErrorKind {
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
InvalidSnapshotStateFault(crate::error::InvalidSnapshotStateFault),
SnapshotAlreadyExistsFault(crate::error::SnapshotAlreadyExistsFault),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
SnapshotQuotaExceededFault(crate::error::SnapshotQuotaExceededFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CopySnapshotError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CopySnapshotErrorKind::InvalidParameterCombinationException(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::InvalidSnapshotStateFault(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::SnapshotAlreadyExistsFault(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::SnapshotQuotaExceededFault(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
CopySnapshotErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CopySnapshotError {
fn code(&self) -> Option<&str> {
CopySnapshotError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CopySnapshotError {
pub fn new(kind: CopySnapshotErrorKind, 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: CopySnapshotErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CopySnapshotErrorKind::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_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_invalid_snapshot_state_fault(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::InvalidSnapshotStateFault(_)
)
}
pub fn is_snapshot_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::SnapshotAlreadyExistsFault(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(&self.kind, CopySnapshotErrorKind::SnapshotNotFoundFault(_))
}
pub fn is_snapshot_quota_exceeded_fault(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::SnapshotQuotaExceededFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
CopySnapshotErrorKind::TagQuotaPerResourceExceeded(_)
)
}
}
impl std::error::Error for CopySnapshotError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CopySnapshotErrorKind::InvalidParameterCombinationException(_inner) => Some(_inner),
CopySnapshotErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
CopySnapshotErrorKind::InvalidSnapshotStateFault(_inner) => Some(_inner),
CopySnapshotErrorKind::SnapshotAlreadyExistsFault(_inner) => Some(_inner),
CopySnapshotErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
CopySnapshotErrorKind::SnapshotQuotaExceededFault(_inner) => Some(_inner),
CopySnapshotErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
CopySnapshotErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CompleteMigrationError {
pub kind: CompleteMigrationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CompleteMigrationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CompleteMigrationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CompleteMigrationErrorKind {
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ReplicationGroupNotUnderMigrationFault(crate::error::ReplicationGroupNotUnderMigrationFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CompleteMigrationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CompleteMigrationErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
CompleteMigrationErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
CompleteMigrationErrorKind::ReplicationGroupNotUnderMigrationFault(_inner) => {
_inner.fmt(f)
}
CompleteMigrationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CompleteMigrationError {
fn code(&self) -> Option<&str> {
CompleteMigrationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CompleteMigrationError {
pub fn new(kind: CompleteMigrationErrorKind, 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: CompleteMigrationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CompleteMigrationErrorKind::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_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
CompleteMigrationErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
CompleteMigrationErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_replication_group_not_under_migration_fault(&self) -> bool {
matches!(
&self.kind,
CompleteMigrationErrorKind::ReplicationGroupNotUnderMigrationFault(_)
)
}
}
impl std::error::Error for CompleteMigrationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CompleteMigrationErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
CompleteMigrationErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
CompleteMigrationErrorKind::ReplicationGroupNotUnderMigrationFault(_inner) => {
Some(_inner)
}
CompleteMigrationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ReplicationGroupNotUnderMigrationFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ReplicationGroupNotUnderMigrationFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ReplicationGroupNotUnderMigrationFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ReplicationGroupNotUnderMigrationFault")?;
if let Some(inner_66) = &self.message {
{
write!(f, ": {}", inner_66)?;
}
}
Ok(())
}
}
impl std::error::Error for ReplicationGroupNotUnderMigrationFault {}
pub mod replication_group_not_under_migration_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::ReplicationGroupNotUnderMigrationFault {
crate::error::ReplicationGroupNotUnderMigrationFault {
message: self.message,
}
}
}
}
impl ReplicationGroupNotUnderMigrationFault {
pub fn builder() -> crate::error::replication_group_not_under_migration_fault::Builder {
crate::error::replication_group_not_under_migration_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchStopUpdateActionError {
pub kind: BatchStopUpdateActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchStopUpdateActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchStopUpdateActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchStopUpdateActionErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ServiceUpdateNotFoundFault(crate::error::ServiceUpdateNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchStopUpdateActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchStopUpdateActionErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
BatchStopUpdateActionErrorKind::ServiceUpdateNotFoundFault(_inner) => _inner.fmt(f),
BatchStopUpdateActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchStopUpdateActionError {
fn code(&self) -> Option<&str> {
BatchStopUpdateActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchStopUpdateActionError {
pub fn new(kind: BatchStopUpdateActionErrorKind, 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: BatchStopUpdateActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchStopUpdateActionErrorKind::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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
BatchStopUpdateActionErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_service_update_not_found_fault(&self) -> bool {
matches!(
&self.kind,
BatchStopUpdateActionErrorKind::ServiceUpdateNotFoundFault(_)
)
}
}
impl std::error::Error for BatchStopUpdateActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchStopUpdateActionErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
BatchStopUpdateActionErrorKind::ServiceUpdateNotFoundFault(_inner) => Some(_inner),
BatchStopUpdateActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchApplyUpdateActionError {
pub kind: BatchApplyUpdateActionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchApplyUpdateActionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchApplyUpdateActionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchApplyUpdateActionErrorKind {
InvalidParameterValueException(crate::error::InvalidParameterValueException),
ServiceUpdateNotFoundFault(crate::error::ServiceUpdateNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchApplyUpdateActionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchApplyUpdateActionErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
BatchApplyUpdateActionErrorKind::ServiceUpdateNotFoundFault(_inner) => _inner.fmt(f),
BatchApplyUpdateActionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchApplyUpdateActionError {
fn code(&self) -> Option<&str> {
BatchApplyUpdateActionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchApplyUpdateActionError {
pub fn new(kind: BatchApplyUpdateActionErrorKind, 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: BatchApplyUpdateActionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchApplyUpdateActionErrorKind::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_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
BatchApplyUpdateActionErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_service_update_not_found_fault(&self) -> bool {
matches!(
&self.kind,
BatchApplyUpdateActionErrorKind::ServiceUpdateNotFoundFault(_)
)
}
}
impl std::error::Error for BatchApplyUpdateActionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchApplyUpdateActionErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
BatchApplyUpdateActionErrorKind::ServiceUpdateNotFoundFault(_inner) => Some(_inner),
BatchApplyUpdateActionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AuthorizeCacheSecurityGroupIngressError {
pub kind: AuthorizeCacheSecurityGroupIngressErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AuthorizeCacheSecurityGroupIngressError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AuthorizeCacheSecurityGroupIngressErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AuthorizeCacheSecurityGroupIngressErrorKind {
AuthorizationAlreadyExistsFault(crate::error::AuthorizationAlreadyExistsFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
InvalidCacheSecurityGroupStateFault(crate::error::InvalidCacheSecurityGroupStateFault),
InvalidParameterCombinationException(crate::error::InvalidParameterCombinationException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AuthorizeCacheSecurityGroupIngressError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault(
_inner,
) => _inner.fmt(f),
AuthorizeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(
_inner,
) => _inner.fmt(f),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(
_inner,
) => _inner.fmt(f),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(
_inner,
) => _inner.fmt(f),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
AuthorizeCacheSecurityGroupIngressErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AuthorizeCacheSecurityGroupIngressError {
fn code(&self) -> Option<&str> {
AuthorizeCacheSecurityGroupIngressError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AuthorizeCacheSecurityGroupIngressError {
pub fn new(
kind: AuthorizeCacheSecurityGroupIngressErrorKind,
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: AuthorizeCacheSecurityGroupIngressErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AuthorizeCacheSecurityGroupIngressErrorKind::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_authorization_already_exists_fault(&self) -> bool {
matches!(
&self.kind,
AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AuthorizeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_invalid_cache_security_group_state_fault(&self) -> bool {
matches!(
&self.kind,
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(_)
)
}
pub fn is_invalid_parameter_combination_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_)
)
}
}
impl std::error::Error for AuthorizeCacheSecurityGroupIngressError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AuthorizeCacheSecurityGroupIngressErrorKind::AuthorizationAlreadyExistsFault(
_inner,
) => Some(_inner),
AuthorizeCacheSecurityGroupIngressErrorKind::CacheSecurityGroupNotFoundFault(
_inner,
) => Some(_inner),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidCacheSecurityGroupStateFault(
_inner,
) => Some(_inner),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterCombinationException(
_inner,
) => Some(_inner),
AuthorizeCacheSecurityGroupIngressErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
AuthorizeCacheSecurityGroupIngressErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AuthorizationAlreadyExistsFault {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AuthorizationAlreadyExistsFault {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AuthorizationAlreadyExistsFault {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AuthorizationAlreadyExistsFault")?;
if let Some(inner_67) = &self.message {
{
write!(f, ": {}", inner_67)?;
}
}
Ok(())
}
}
impl std::error::Error for AuthorizationAlreadyExistsFault {}
pub mod authorization_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 {
#[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::AuthorizationAlreadyExistsFault {
crate::error::AuthorizationAlreadyExistsFault {
message: self.message,
}
}
}
}
impl AuthorizationAlreadyExistsFault {
pub fn builder() -> crate::error::authorization_already_exists_fault::Builder {
crate::error::authorization_already_exists_fault::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddTagsToResourceError {
pub kind: AddTagsToResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddTagsToResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddTagsToResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddTagsToResourceErrorKind {
CacheClusterNotFoundFault(crate::error::CacheClusterNotFoundFault),
CacheParameterGroupNotFoundFault(crate::error::CacheParameterGroupNotFoundFault),
CacheSecurityGroupNotFoundFault(crate::error::CacheSecurityGroupNotFoundFault),
CacheSubnetGroupNotFoundFault(crate::error::CacheSubnetGroupNotFoundFault),
InvalidArnFault(crate::error::InvalidArnFault),
InvalidReplicationGroupStateFault(crate::error::InvalidReplicationGroupStateFault),
ReplicationGroupNotFoundFault(crate::error::ReplicationGroupNotFoundFault),
ReservedCacheNodeNotFoundFault(crate::error::ReservedCacheNodeNotFoundFault),
SnapshotNotFoundFault(crate::error::SnapshotNotFoundFault),
TagQuotaPerResourceExceeded(crate::error::TagQuotaPerResourceExceeded),
UserGroupNotFoundFault(crate::error::UserGroupNotFoundFault),
UserNotFoundFault(crate::error::UserNotFoundFault),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddTagsToResourceErrorKind::CacheClusterNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::InvalidArnFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::SnapshotNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::TagQuotaPerResourceExceeded(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::UserGroupNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::UserNotFoundFault(_inner) => _inner.fmt(f),
AddTagsToResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddTagsToResourceError {
fn code(&self) -> Option<&str> {
AddTagsToResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddTagsToResourceError {
pub fn new(kind: AddTagsToResourceErrorKind, 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: AddTagsToResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddTagsToResourceErrorKind::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_cache_cluster_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::CacheClusterNotFoundFault(_)
)
}
pub fn is_cache_parameter_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::CacheParameterGroupNotFoundFault(_)
)
}
pub fn is_cache_security_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::CacheSecurityGroupNotFoundFault(_)
)
}
pub fn is_cache_subnet_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::CacheSubnetGroupNotFoundFault(_)
)
}
pub fn is_invalid_arn_fault(&self) -> bool {
matches!(&self.kind, AddTagsToResourceErrorKind::InvalidArnFault(_))
}
pub fn is_invalid_replication_group_state_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::InvalidReplicationGroupStateFault(_)
)
}
pub fn is_replication_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::ReplicationGroupNotFoundFault(_)
)
}
pub fn is_reserved_cache_node_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::ReservedCacheNodeNotFoundFault(_)
)
}
pub fn is_snapshot_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::SnapshotNotFoundFault(_)
)
}
pub fn is_tag_quota_per_resource_exceeded(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::TagQuotaPerResourceExceeded(_)
)
}
pub fn is_user_group_not_found_fault(&self) -> bool {
matches!(
&self.kind,
AddTagsToResourceErrorKind::UserGroupNotFoundFault(_)
)
}
pub fn is_user_not_found_fault(&self) -> bool {
matches!(&self.kind, AddTagsToResourceErrorKind::UserNotFoundFault(_))
}
}
impl std::error::Error for AddTagsToResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddTagsToResourceErrorKind::CacheClusterNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::CacheParameterGroupNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::CacheSecurityGroupNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::CacheSubnetGroupNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::InvalidArnFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::InvalidReplicationGroupStateFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::ReplicationGroupNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::ReservedCacheNodeNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::SnapshotNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::TagQuotaPerResourceExceeded(_inner) => Some(_inner),
AddTagsToResourceErrorKind::UserGroupNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::UserNotFoundFault(_inner) => Some(_inner),
AddTagsToResourceErrorKind::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 _)
}
}