aws-sdk-sagemakerinferencerouterruntime 1.2.0

AWS SDK for Amazon SageMaker Inference Router Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub(crate) fn de_body_payload(
    body: &[u8],
) -> std::result::Result<::std::option::Option<::aws_smithy_types::Blob>, crate::operation::invoke_inference_router::InvokeInferenceRouterError> {
    (!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_bytes("Content-Type");
    ::aws_smithy_http::header::one_or_none_bytes(headers)
}

pub(crate) fn de_custom_attributes_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_bytes("X-Amzn-SageMaker-Custom-Attributes");
    ::aws_smithy_http::header::one_or_none_bytes(headers)
}

pub(crate) fn de_invoked_production_variant_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_bytes("X-Amzn-Invoked-Production-Variant");
    ::aws_smithy_http::header::one_or_none_bytes(headers)
}

pub(crate) fn de_invoked_routed_resource_arn_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_bytes("X-Amzn-SageMaker-Invoked-Routed-Resource-Arn");
    ::aws_smithy_http::header::one_or_none_bytes(headers)
}

pub(crate) fn de_routing_reason_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_bytes("X-Amzn-SageMaker-Invoked-Routing-Reason");
    ::aws_smithy_http::header::one_or_none_bytes(headers)
}