aws-sdk-appconfigdata 1.98.0

AWS SDK for AWS AppConfig Data
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn de_configuration_payload(
    body: &[u8],
) -> std::result::Result<::std::option::Option<::aws_smithy_types::Blob>, crate::operation::get_latest_configuration::GetLatestConfigurationError> {
    (!body.is_empty()).then(|| Ok(::aws_smithy_types::Blob::new(body))).transpose()
}

pub(crate) fn de_content_type_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("Content-Type");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_next_poll_configuration_token_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("Next-Poll-Configuration-Token");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_next_poll_interval_in_seconds_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<i32>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("Next-Poll-Interval-In-Seconds");
    let var_1 = ::aws_smithy_http::header::read_many_primitive::<i32>(headers)?;
    if var_1.len() > 1 {
        Err(::aws_smithy_http::header::ParseError::new(format!(
            "expected one item but found {}",
            var_1.len()
        )))
    } else {
        let mut var_1 = var_1;
        Ok(var_1.pop())
    }
}

pub(crate) fn de_version_label_header(
    header_map: &::aws_smithy_runtime_api::http::Headers,
) -> ::std::result::Result<::std::option::Option<::std::string::String>, ::aws_smithy_http::header::ParseError> {
    let headers = header_map.get_all("Version-Label");
    ::aws_smithy_http::header::one_or_none(headers)
}