aws-sdk-elementalinference 1.2.0

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

/// Matcher union: {"errorType":"ResourceNotFoundException"}
pub(crate) fn match_get_feed_1cce2c05524fb92d4(
    _result: ::std::result::Result<&crate::operation::get_feed::GetFeedOutput, &crate::operation::get_feed::GetFeedError>,
) -> 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 == "ResourceNotFoundException";
        }
    }
    false
}

/// Matcher union: {"output":{"path":"status","expected":"DELETED","comparator":"stringEquals"}}
pub(crate) fn match_get_feed_8edac4c36e2a37f69(
    _result: ::std::result::Result<&crate::operation::get_feed::GetFeedOutput, &crate::operation::get_feed::GetFeedError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::get_feed::GetFeedOutput) -> ::std::option::Option<&'a crate::types::FeedStatus> {
        let _fld_1 = &_output.status;
        ::std::option::Option::Some(_fld_1)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "DELETED";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}

/// Matcher union: {"output":{"path":"status","expected":"DELETING","comparator":"stringEquals"}}
pub(crate) fn match_get_feed_ac9cf40eec4f10ab5(
    _result: ::std::result::Result<&crate::operation::get_feed::GetFeedOutput, &crate::operation::get_feed::GetFeedError>,
) -> bool {
    fn path_traversal<'a>(_output: &'a crate::operation::get_feed::GetFeedOutput) -> ::std::option::Option<&'a crate::types::FeedStatus> {
        let _fld_1 = &_output.status;
        ::std::option::Option::Some(_fld_1)
    }
    _result
        .as_ref()
        .ok()
        .and_then(|output| path_traversal(output))
        .map(|value| {
            let _tmp_2 = value.as_str();
            let right = "DELETING";
            let _cmp_1 = _tmp_2 == right;
            _cmp_1
        })
        .unwrap_or_default()
}

/// Matcher union: {"errorType":"InternalServerErrorException"}
pub(crate) fn match_get_feed_23a4ee68df28eed70(
    _result: ::std::result::Result<&crate::operation::get_feed::GetFeedOutput, &crate::operation::get_feed::GetFeedError>,
) -> 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 == "InternalServerErrorException";
        }
    }
    false
}

/// Matcher union: {"errorType":"TooManyRequestException"}
pub(crate) fn match_get_feed_9e27ec506faa3605f(
    _result: ::std::result::Result<&crate::operation::get_feed::GetFeedOutput, &crate::operation::get_feed::GetFeedError>,
) -> 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 == "TooManyRequestException";
        }
    }
    false
}