// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn deser_payload_put_session_put_session_output_audio_stream(
    body: &mut aws_smithy_http::body::SdkBody,
) -> std::result::Result<aws_smithy_http::byte_stream::ByteStream, crate::error::PutSessionError> {
    // replace the body with an empty body
    let body = std::mem::replace(body, aws_smithy_http::body::SdkBody::taken());
    Ok(aws_smithy_http::byte_stream::ByteStream::new(body))
}

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

pub fn deser_header_put_session_put_session_output_messages(
    header_map: &http::HeaderMap,
) -> std::result::Result<
    std::option::Option<std::string::String>,
    aws_smithy_http::header::ParseError,
> {
    let headers = header_map.get_all("x-amz-lex-messages").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_put_session_put_session_output_request_attributes(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_put_session_put_session_output_session_id(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_put_session_put_session_output_session_state(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_payload_recognize_utterance_recognize_utterance_output_audio_stream(
    body: &mut aws_smithy_http::body::SdkBody,
) -> std::result::Result<
    aws_smithy_http::byte_stream::ByteStream,
    crate::error::RecognizeUtteranceError,
> {
    // replace the body with an empty body
    let body = std::mem::replace(body, aws_smithy_http::body::SdkBody::taken());
    Ok(aws_smithy_http::byte_stream::ByteStream::new(body))
}

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

pub fn deser_header_recognize_utterance_recognize_utterance_output_input_mode(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_input_transcript(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_interpretations(
    header_map: &http::HeaderMap,
) -> std::result::Result<
    std::option::Option<std::string::String>,
    aws_smithy_http::header::ParseError,
> {
    let headers = header_map.get_all("x-amz-lex-interpretations").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_messages(
    header_map: &http::HeaderMap,
) -> std::result::Result<
    std::option::Option<std::string::String>,
    aws_smithy_http::header::ParseError,
> {
    let headers = header_map.get_all("x-amz-lex-messages").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_request_attributes(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_session_id(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}

pub fn deser_header_recognize_utterance_recognize_utterance_output_session_state(
    header_map: &http::HeaderMap,
) -> 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").iter();
    aws_smithy_http::header::one_or_none(headers)
}
