pub(crate) fn match_describe_cache_clusters_a9fc40b8034e15559(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
!value.is_empty()
&& value.iter().all(|value| {
let _tmp_2 = value.as_str();
let right = "available";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_c8c67f1604362d6d1(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "deleted";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_bca147da1a8d059ec(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "deleting";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_6ff5fd2b4d5851182(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "incompatible-network";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_723593c7b9870d199(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "restore-failed";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_9b0db4ce0e1cae9d1(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
!value.is_empty()
&& value.iter().all(|value| {
let _tmp_2 = value.as_str();
let right = "deleted";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_13fb1ec270a894d62(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
if let ::std::result::Result::Err(err) = _result {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(err) {
return code == "CacheClusterNotFound";
}
}
false
}
pub(crate) fn match_describe_cache_clusters_ddb2abc814c08e34b(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "available";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_2041fc59b2bfcabbb(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "creating";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_5eb6db81edfe1118d(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "modifying";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_cache_clusters_2126b8344a1788d4a(
_result: ::std::result::Result<
&crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
&crate::operation::describe_cache_clusters::DescribeCacheClustersError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_cache_clusters::DescribeCacheClustersOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.cache_clusters.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::CacheCluster) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.cache_cluster_status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "snapshotting";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_replication_groups_d13a4075701004c5b(
_result: ::std::result::Result<
&crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
&crate::operation::describe_replication_groups::DescribeReplicationGroupsError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.replication_groups.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::ReplicationGroup) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
!value.is_empty()
&& value.iter().all(|value| {
let _tmp_2 = value.as_str();
let right = "available";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_replication_groups_f27f835974b2d0bb2(
_result: ::std::result::Result<
&crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
&crate::operation::describe_replication_groups::DescribeReplicationGroupsError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.replication_groups.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::ReplicationGroup) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "deleted";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_replication_groups_700c41c947ca044e6(
_result: ::std::result::Result<
&crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
&crate::operation::describe_replication_groups::DescribeReplicationGroupsError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.replication_groups.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::ReplicationGroup) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
!value.is_empty()
&& value.iter().all(|value| {
let _tmp_2 = value.as_str();
let right = "deleted";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_replication_groups_2a2f28b3d31b54908(
_result: ::std::result::Result<
&crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
&crate::operation::describe_replication_groups::DescribeReplicationGroupsError,
>,
) -> bool {
fn path_traversal<'a>(
_output: &'a crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
) -> ::std::option::Option<::std::vec::Vec<&'a ::std::string::String>> {
let _fld_1 = _output.replication_groups.as_ref()?;
let _prj_3 = _fld_1
.iter()
.flat_map(|v| {
#[allow(clippy::let_and_return)]
fn map(_v: &crate::types::ReplicationGroup) -> ::std::option::Option<&::std::string::String> {
let _fld_2 = _v.status.as_ref();
_fld_2
}
map(v)
})
.collect::<::std::vec::Vec<_>>();
::std::option::Option::Some(_prj_3)
}
_result
.as_ref()
.ok()
.and_then(|output| path_traversal(output))
.map(|value| {
value.iter().any(|value| {
let _tmp_2 = value.as_str();
let right = "available";
let _cmp_1 = _tmp_2 == right;
_cmp_1
})
})
.unwrap_or_default()
}
pub(crate) fn match_describe_replication_groups_45d927441d5ac69a7(
_result: ::std::result::Result<
&crate::operation::describe_replication_groups::DescribeReplicationGroupsOutput,
&crate::operation::describe_replication_groups::DescribeReplicationGroupsError,
>,
) -> bool {
if let ::std::result::Result::Err(err) = _result {
if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(err) {
return code == "ReplicationGroupNotFoundFault";
}
}
false
}