aws_sdk_codedeploy/waiters/
matchers.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Matcher union: {"output":{"path":"deploymentInfo.status","expected":"Succeeded","comparator":"stringEquals"}}
4pub(crate) fn match_get_deployment_71cb2e8fd4234325e(
5    _result: ::std::result::Result<&crate::operation::get_deployment::GetDeploymentOutput, &crate::operation::get_deployment::GetDeploymentError>,
6) -> bool {
7    fn path_traversal<'a>(
8        _output: &'a crate::operation::get_deployment::GetDeploymentOutput,
9    ) -> ::std::option::Option<&'a crate::types::DeploymentStatus> {
10        let _fld_1 = _output.deployment_info.as_ref()?;
11        let _fld_2 = _fld_1.status.as_ref()?;
12        ::std::option::Option::Some(_fld_2)
13    }
14    _result
15        .as_ref()
16        .ok()
17        .and_then(|output| path_traversal(output))
18        .map(|value| {
19            let _tmp_2 = value.as_str();
20            let right = "Succeeded";
21            let _cmp_1 = _tmp_2 == right;
22            _cmp_1
23        })
24        .unwrap_or_default()
25}
26
27/// Matcher union: {"output":{"path":"deploymentInfo.status","expected":"Failed","comparator":"stringEquals"}}
28pub(crate) fn match_get_deployment_817cfc4588b7c2c91(
29    _result: ::std::result::Result<&crate::operation::get_deployment::GetDeploymentOutput, &crate::operation::get_deployment::GetDeploymentError>,
30) -> bool {
31    fn path_traversal<'a>(
32        _output: &'a crate::operation::get_deployment::GetDeploymentOutput,
33    ) -> ::std::option::Option<&'a crate::types::DeploymentStatus> {
34        let _fld_1 = _output.deployment_info.as_ref()?;
35        let _fld_2 = _fld_1.status.as_ref()?;
36        ::std::option::Option::Some(_fld_2)
37    }
38    _result
39        .as_ref()
40        .ok()
41        .and_then(|output| path_traversal(output))
42        .map(|value| {
43            let _tmp_2 = value.as_str();
44            let right = "Failed";
45            let _cmp_1 = _tmp_2 == right;
46            _cmp_1
47        })
48        .unwrap_or_default()
49}
50
51/// Matcher union: {"output":{"path":"deploymentInfo.status","expected":"Stopped","comparator":"stringEquals"}}
52pub(crate) fn match_get_deployment_3fade3e995b1dd6db(
53    _result: ::std::result::Result<&crate::operation::get_deployment::GetDeploymentOutput, &crate::operation::get_deployment::GetDeploymentError>,
54) -> bool {
55    fn path_traversal<'a>(
56        _output: &'a crate::operation::get_deployment::GetDeploymentOutput,
57    ) -> ::std::option::Option<&'a crate::types::DeploymentStatus> {
58        let _fld_1 = _output.deployment_info.as_ref()?;
59        let _fld_2 = _fld_1.status.as_ref()?;
60        ::std::option::Option::Some(_fld_2)
61    }
62    _result
63        .as_ref()
64        .ok()
65        .and_then(|output| path_traversal(output))
66        .map(|value| {
67            let _tmp_2 = value.as_str();
68            let right = "Stopped";
69            let _cmp_1 = _tmp_2 == right;
70            _cmp_1
71        })
72        .unwrap_or_default()
73}