Client Test

Client Test

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

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         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_content_type_without_body.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_without_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_without_body::MalformedContentTypeWithoutBodyOutput,
    9         -
    crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError,
   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_without_body::MalformedContentTypeWithoutBodyError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_content_type_without_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_without_body::MalformedContentTypeWithoutBodyOutput,
   25         -
    crate::operation::malformed_content_type_without_body::MalformedContentTypeWithoutBodyError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_content_type_without_body::builders::MalformedContentTypeWithoutBodyOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}

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

@@ -1,0 +50,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_without_body_empty_input_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_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput,
    9         -
    crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError,
   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_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_content_type_without_body_empty_input_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_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputOutput,
   25         -
    crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_content_type_without_body_empty_input::builders::MalformedContentTypeWithoutBodyEmptyInputOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_content_type_without_body_empty_input_headers(
   35         -
    input: &crate::operation::malformed_content_type_without_body_empty_input::MalformedContentTypeWithoutBodyEmptyInputInput,
   36         -
    mut builder: ::http_1x::request::Builder,
   37         -
) -> std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
   38         -
    if let ::std::option::Option::Some(inner_1) = &input.header {
   39         -
        let formatted_2 = inner_1.as_str();
   40         -
        let header_value = formatted_2;
   41         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
   42         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   43         -
                "header",
   44         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45         -
            )
   46         -
        })?;
   47         -
        builder = builder.header("header", header_value);
   48         -
    }
   49         -
    Ok(builder)
   50         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_double.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_double_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_double::MalformedDoubleOutput, crate::operation::malformed_double::MalformedDoubleError> {
    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_double::MalformedDoubleError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_double::MalformedDoubleError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_double_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_double::MalformedDoubleOutput, crate::operation::malformed_double::MalformedDoubleError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_double::builders::MalformedDoubleOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_double_headers(
   29         -
    input: &crate::operation::malformed_double::MalformedDoubleInput,
   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.double_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         -
                "double_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("doubleInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_double_input(
   48         -
    input: &crate::operation::malformed_double::MalformedDoubleInput,
   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_double_input::ser_malformed_double_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_double_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_double_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_double::MalformedDoubleInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.double_in_body {
    7         -
        object.key("doubleInBody").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::Float((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_float.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_float_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_float::MalformedFloatOutput, crate::operation::malformed_float::MalformedFloatError> {
    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_float::MalformedFloatError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_float::MalformedFloatError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_float_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_float::MalformedFloatOutput, crate::operation::malformed_float::MalformedFloatError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_float::builders::MalformedFloatOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_float_headers(
   29         -
    input: &crate::operation::malformed_float::MalformedFloatInput,
   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.float_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         -
                "float_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("floatInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_float_input(
   48         -
    input: &crate::operation::malformed_float::MalformedFloatInput,
   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_float_input::ser_malformed_float_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_float_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_float_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_float::MalformedFloatInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.float_in_body {
    7         -
        object.key("floatInBody").number(
    8         -
            #[allow(clippy::useless_conversion)]
    9         -
            ::aws_smithy_types::Number::Float((*var_1).into()),
   10         -
        );
   11         -
    }
   12         -
    Ok(())
   13         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_integer.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_integer_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_integer::MalformedIntegerOutput, crate::operation::malformed_integer::MalformedIntegerError> {
    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_integer::MalformedIntegerError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_integer::MalformedIntegerError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_integer_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_integer::MalformedIntegerOutput, crate::operation::malformed_integer::MalformedIntegerError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_integer::builders::MalformedIntegerOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_integer_headers(
   29         -
    input: &crate::operation::malformed_integer::MalformedIntegerInput,
   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.integer_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         -
                "integer_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("integerInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_integer_input(
   48         -
    input: &crate::operation::malformed_integer::MalformedIntegerInput,
   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_integer_input::ser_malformed_integer_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_integer_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_integer_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_integer::MalformedIntegerInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.integer_in_body {
    7         -
        object.key("integerInBody").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_list.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_list_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_list::MalformedListOutput, crate::operation::malformed_list::MalformedListError> {
    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_list::MalformedListError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_list::MalformedListError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_list_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_list::MalformedListOutput, crate::operation::malformed_list::MalformedListError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_list::builders::MalformedListOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_list_input(
   29         -
    input: &crate::operation::malformed_list::MalformedListInput,
   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_list_input::ser_malformed_list_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_list_input.rs

@@ -1,0 +16,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_list_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_list::MalformedListInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.body_list {
    7         -
        let mut array_2 = object.key("bodyList").start_array();
    8         -
        for item_3 in var_1 {
    9         -
            {
   10         -
                array_2.value().string(item_3.as_str());
   11         -
            }
   12         -
        }
   13         -
        array_2.finish();
   14         -
    }
   15         -
    Ok(())
   16         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_long.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_long_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_long::MalformedLongOutput, crate::operation::malformed_long::MalformedLongError> {
    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_long::MalformedLongError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_long::MalformedLongError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_long_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_long::MalformedLongOutput, crate::operation::malformed_long::MalformedLongError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_long::builders::MalformedLongOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_long_headers(
   29         -
    input: &crate::operation::malformed_long::MalformedLongInput,
   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.long_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         -
                "long_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("longInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_long_input(
   48         -
    input: &crate::operation::malformed_long::MalformedLongInput,
   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_long_input::ser_malformed_long_input_input(&mut object, input)?;
   53         -
    object.finish();
   54         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   55         -
}