aws-sdk-transfer 1.113.0

AWS SDK for AWS Transfer Family
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Matcher union: {"output":{"path":"Server.State","expected":"OFFLINE","comparator":"stringEquals"}}
pub(crate) fn match_describe_server_6b9ca5e1f0af273ce(
    _result: ::std::result::Result<&crate::operation::describe_server::DescribeServerOutput, &crate::operation::describe_server::DescribeServerError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::describe_server::DescribeServerOutput) -> ::std::option::Option<&'a crate::types::State> {
        let _fld_1 = _output.server.as_ref()?;
        let _fld_2 = _fld_1.state.as_ref()?;
        ::std::option::Option::Some(_fld_2)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "OFFLINE";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}

/// Matcher union: {"output":{"path":"Server.State","expected":"STOP_FAILED","comparator":"stringEquals"}}
pub(crate) fn match_describe_server_78b00e0f6950dd361(
    _result: ::std::result::Result<&crate::operation::describe_server::DescribeServerOutput, &crate::operation::describe_server::DescribeServerError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::describe_server::DescribeServerOutput) -> ::std::option::Option<&'a crate::types::State> {
        let _fld_1 = _output.server.as_ref()?;
        let _fld_2 = _fld_1.state.as_ref()?;
        ::std::option::Option::Some(_fld_2)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "STOP_FAILED";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}

/// Matcher union: {"output":{"path":"Server.State","expected":"ONLINE","comparator":"stringEquals"}}
pub(crate) fn match_describe_server_eac34b935546de66c(
    _result: ::std::result::Result<&crate::operation::describe_server::DescribeServerOutput, &crate::operation::describe_server::DescribeServerError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::describe_server::DescribeServerOutput) -> ::std::option::Option<&'a crate::types::State> {
        let _fld_1 = _output.server.as_ref()?;
        let _fld_2 = _fld_1.state.as_ref()?;
        ::std::option::Option::Some(_fld_2)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "ONLINE";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}

/// Matcher union: {"output":{"path":"Server.State","expected":"START_FAILED","comparator":"stringEquals"}}
pub(crate) fn match_describe_server_229e1fb38d7d34476(
    _result: ::std::result::Result<&crate::operation::describe_server::DescribeServerOutput, &crate::operation::describe_server::DescribeServerError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::describe_server::DescribeServerOutput) -> ::std::option::Option<&'a crate::types::State> {
        let _fld_1 = _output.server.as_ref()?;
        let _fld_2 = _fld_1.state.as_ref()?;
        ::std::option::Option::Some(_fld_2)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "START_FAILED";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}