aws-sdk-pricingplanmanager 1.0.0

AWS SDK for PricingPlanManager
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn de_e_tag_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("ETag");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_subscription_payload(
    body: &[u8],
) -> std::result::Result<::std::option::Option<crate::types::Subscription>, crate::operation::update_subscription::UpdateSubscriptionError> {
    (!body.is_empty())
        .then(|| {
            crate::protocol_serde::shape_subscription::de_subscription_payload(body)
                .map_err(crate::operation::update_subscription::UpdateSubscriptionError::unhandled)
        })
        .transpose()
}