Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_accept_with_generic_string.rs

@@ -1,0 +33,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_accept_with_generic_string_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringOutput,
    9         -
    crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_accept_with_generic_string_http_response(
   20         -
    _response_status: u16,
   21         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22         -
    _response_body: &[u8],
   23         -
) -> std::result::Result<
   24         -
    crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringOutput,
   25         -
    crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_accept_with_generic_string::builders::MalformedAcceptWithGenericStringOutputBuilder::default();
   30         -
        output = output.set_payload(crate::protocol_serde::shape_malformed_accept_with_generic_string_output::de_payload_payload(_response_body)?);
   31         -
        output.build()
   32         -
    })
   33         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_accept_with_generic_string_output.rs

@@ -1,0 +15,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_payload_payload(
    3         -
    body: &[u8],
    4         -
) -> std::result::Result<
    5         -
    ::std::option::Option<::std::string::String>,
    6         -
    crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError,
    7         -
> {
    8         -
    (!body.is_empty())
    9         -
        .then(|| {
   10         -
            let body_str = std::str::from_utf8(body)
   11         -
                .map_err(crate::operation::malformed_accept_with_generic_string::MalformedAcceptWithGenericStringError::unhandled)?;
   12         -
            Ok(body_str.to_string())
   13         -
        })
   14         -
        .transpose()
   15         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_accept_with_payload.rs

@@ -1,0 +37,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_accept_with_payload_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadOutput,
    9         -
    crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadError::generic(
   16         -
        generic,
   17         -
    ))
   18         -
}
   19         -
   20         -
#[allow(clippy::unnecessary_wraps)]
   21         -
pub fn de_malformed_accept_with_payload_http_response(
   22         -
    _response_status: u16,
   23         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   24         -
    _response_body: &[u8],
   25         -
) -> std::result::Result<
   26         -
    crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadOutput,
   27         -
    crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadError,
   28         -
> {
   29         -
    Ok({
   30         -
        #[allow(unused_mut)]
   31         -
        let mut output = crate::operation::malformed_accept_with_payload::builders::MalformedAcceptWithPayloadOutputBuilder::default();
   32         -
        output = output.set_payload(crate::protocol_serde::shape_malformed_accept_with_payload_output::de_payload_payload(
   33         -
            _response_body,
   34         -
        )?);
   35         -
        output.build()
   36         -
    })
   37         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_accept_with_payload_output.rs

@@ -1,0 +9,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_payload_payload(
    3         -
    body: &[u8],
    4         -
) -> std::result::Result<
    5         -
    ::std::option::Option<::aws_smithy_types::Blob>,
    6         -
    crate::operation::malformed_accept_with_payload::MalformedAcceptWithPayloadError,
    7         -
> {
    8         -
    (!body.is_empty()).then(|| Ok(::aws_smithy_types::Blob::new(body))).transpose()
    9         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_blob.rs

@@ -1,0 +36,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_blob_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::malformed_blob::MalformedBlobOutput, crate::operation::malformed_blob::MalformedBlobError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::malformed_blob::MalformedBlobError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_blob::MalformedBlobError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_blob_http_response(
   17         -
    _response_status: u16,
   18         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19         -
    _response_body: &[u8],
   20         -
) -> std::result::Result<crate::operation::malformed_blob::MalformedBlobOutput, crate::operation::malformed_blob::MalformedBlobError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_blob::builders::MalformedBlobOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_blob_input(
   29         -
    input: &crate::operation::malformed_blob::MalformedBlobInput,
   30         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   31         -
    let mut out = String::new();
   32         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   33         -
    crate::protocol_serde::shape_malformed_blob_input::ser_malformed_blob_input_input(&mut object, input)?;
   34         -
    object.finish();
   35         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   36         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_blob_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_blob_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_blob::MalformedBlobInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.blob {
    7         -
        object.key("blob").string_unchecked(&::aws_smithy_types::base64::encode(var_1));
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_boolean.rs

@@ -1,0 +55,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_boolean_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::malformed_boolean::MalformedBooleanOutput, crate::operation::malformed_boolean::MalformedBooleanError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::malformed_boolean::MalformedBooleanError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_boolean::MalformedBooleanError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_boolean_http_response(
   17         -
    _response_status: u16,
   18         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19         -
    _response_body: &[u8],
   20         -
) -> std::result::Result<crate::operation::malformed_boolean::MalformedBooleanOutput, crate::operation::malformed_boolean::MalformedBooleanError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_boolean::builders::MalformedBooleanOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_boolean_headers(
   29         -
    input: &crate::operation::malformed_boolean::MalformedBooleanInput,
   30         -
    mut builder: ::http_1x::request::Builder,
   31         -
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   32         -
    if let ::std::option::Option::Some(inner_1) = &input.boolean_in_header {
   33         -
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
   34         -
        let formatted_2 = encoder.encode();
   35         -
        let header_value = formatted_2;
   36         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
   37         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   38         -
                "boolean_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("booleanInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_boolean_input(
   48         -
    input: &crate::operation::malformed_boolean::MalformedBooleanInput,
   49         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   50         -
    let mut out = String::new();
   51         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   52         -
    crate::protocol_serde::shape_malformed_boolean_input::ser_malformed_boolean_input_input(&mut object, input)?;
   53         -
    object.finish();
   54         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   55         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_boolean_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_boolean_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_boolean::MalformedBooleanInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.boolean_in_body {
    7         -
        object.key("booleanInBody").boolean(*var_1);
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_byte.rs

@@ -1,0 +55,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_byte_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<crate::operation::malformed_byte::MalformedByteOutput, crate::operation::malformed_byte::MalformedByteError> {
    8         -
    #[allow(unused_mut)]
    9         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10         -
        .map_err(crate::operation::malformed_byte::MalformedByteError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_byte::MalformedByteError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_byte_http_response(
   17         -
    _response_status: u16,
   18         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19         -
    _response_body: &[u8],
   20         -
) -> std::result::Result<crate::operation::malformed_byte::MalformedByteOutput, crate::operation::malformed_byte::MalformedByteError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_byte::builders::MalformedByteOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_byte_headers(
   29         -
    input: &crate::operation::malformed_byte::MalformedByteInput,
   30         -
    mut builder: ::http_1x::request::Builder,
   31         -
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   32         -
    if let ::std::option::Option::Some(inner_1) = &input.byte_in_header {
   33         -
        let mut encoder = ::aws_smithy_types::primitive::Encoder::from(*inner_1);
   34         -
        let formatted_2 = encoder.encode();
   35         -
        let header_value = formatted_2;
   36         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
   37         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   38         -
                "byte_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("byteInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_byte_input(
   48         -
    input: &crate::operation::malformed_byte::MalformedByteInput,
   49         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   50         -
    let mut out = String::new();
   51         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   52         -
    crate::protocol_serde::shape_malformed_byte_input::ser_malformed_byte_input_input(&mut object, input)?;
   53         -
    object.finish();
   54         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   55         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_byte_input.rs

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_byte_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_byte::MalformedByteInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.byte_in_body {
    7         -
        object.key("byteInBody").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_body.rs

@@ -1,0 +42,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_content_type_with_body_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyOutput,
    9         -
    crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_content_type_with_body_http_response(
   20         -
    _response_status: u16,
   21         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22         -
    _response_body: &[u8],
   23         -
) -> std::result::Result<
   24         -
    crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyOutput,
   25         -
    crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_content_type_with_body::builders::MalformedContentTypeWithBodyOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_content_type_with_body_input(
   35         -
    input: &crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyInput,
   36         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   37         -
    let mut out = String::new();
   38         -
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
   39         -
    crate::protocol_serde::shape_malformed_content_type_with_body_input::ser_malformed_content_type_with_body_input_input(&mut object, input)?;
   40         -
    object.finish();
   41         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   42         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_body_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_content_type_with_body_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_content_type_with_body::MalformedContentTypeWithBodyInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.hi {
    7         -
        object.key("hi").string(var_1.as_str());
    8         -
    }
    9         -
    Ok(())
   10         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_generic_string.rs

@@ -1,0 +33,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_content_type_with_generic_string_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringOutput,
    9         -
    crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_content_type_with_generic_string_http_response(
   20         -
    _response_status: u16,
   21         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22         -
    _response_body: &[u8],
   23         -
) -> std::result::Result<
   24         -
    crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringOutput,
   25         -
    crate::operation::malformed_content_type_with_generic_string::MalformedContentTypeWithGenericStringError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output =
   30         -
            crate::operation::malformed_content_type_with_generic_string::builders::MalformedContentTypeWithGenericStringOutputBuilder::default();
   31         -
        output.build()
   32         -
    })
   33         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_generic_string_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_payload_http_payload(
    3         -
    payload: ::std::option::Option<::std::string::String>,
    4         -
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    5         -
    let payload = match payload {
    6         -
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
    8         -
    };
    9         -
    Ok(payload.into_bytes())
   10         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_payload.rs

@@ -1,0 +32,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_malformed_content_type_with_payload_http_error(
    4         -
    _response_status: u16,
    5         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6         -
    _response_body: &[u8],
    7         -
) -> std::result::Result<
    8         -
    crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadOutput,
    9         -
    crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadError,
   10         -
> {
   11         -
    #[allow(unused_mut)]
   12         -
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   13         -
        .map_err(crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_content_type_with_payload_http_response(
   20         -
    _response_status: u16,
   21         -
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   22         -
    _response_body: &[u8],
   23         -
) -> std::result::Result<
   24         -
    crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadOutput,
   25         -
    crate::operation::malformed_content_type_with_payload::MalformedContentTypeWithPayloadError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_content_type_with_payload::builders::MalformedContentTypeWithPayloadOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_with_payload_input.rs

@@ -1,0 +10,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_payload_http_payload(
    3         -
    payload: ::std::option::Option<::aws_smithy_types::Blob>,
    4         -
) -> ::std::result::Result<::std::vec::Vec<u8>, ::aws_smithy_types::error::operation::BuildError> {
    5         -
    let payload = match payload {
    6         -
        Some(t) => t,
    7         -
        None => return Ok(Vec::new()),
    8         -
    };
    9         -
    Ok(payload.into_inner())
   10         -
}