aws-sdk-lexruntimev2 1.96.0

AWS SDK for Amazon Lex Runtime V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn de_audio_stream_payload(
    body: &mut ::aws_smithy_types::body::SdkBody,
) -> std::result::Result<::aws_smithy_types::byte_stream::ByteStream, crate::operation::recognize_utterance::RecognizeUtteranceError> {
    // replace the body with an empty body
    let body = std::mem::replace(body, ::aws_smithy_types::body::SdkBody::taken());
    Ok(::aws_smithy_types::byte_stream::ByteStream::new(body))
}

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_input_mode_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("x-amz-lex-input-mode");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_input_transcript_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("x-amz-lex-input-transcript");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_interpretations_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("x-amz-lex-interpretations");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_messages_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("x-amz-lex-messages");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_recognized_bot_member_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("x-amz-lex-recognized-bot-member");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_request_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("x-amz-lex-request-attributes");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_session_id_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("x-amz-lex-session-id");
    ::aws_smithy_http::header::one_or_none(headers)
}

pub(crate) fn de_session_state_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("x-amz-lex-session-state");
    ::aws_smithy_http::header::one_or_none(headers)
}