Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_short.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_short_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_short::MalformedShortOutput, crate::operation::malformed_short::MalformedShortError> {
    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_short::MalformedShortError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_short::MalformedShortError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_short_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_short::MalformedShortOutput, crate::operation::malformed_short::MalformedShortError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_short::builders::MalformedShortOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_short_headers(
   29         -
    input: &crate::operation::malformed_short::MalformedShortInput,
   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.short_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         -
                "short_in_header",
   39         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   40         -
            )
   41         -
        })?;
   42         -
        builder = builder.header("shortInHeader", header_value);
   43         -
    }
   44         -
    Ok(builder)
   45         -
}
   46         -
   47         -
pub fn ser_malformed_short_input(
   48         -
    input: &crate::operation::malformed_short::MalformedShortInput,
   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_short_input::ser_malformed_short_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_short_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_short_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_short::MalformedShortInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.short_in_body {
    7         -
        object.key("shortInBody").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_string.rs

@@ -1,0 +44,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_string_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_string::MalformedStringOutput, crate::operation::malformed_string::MalformedStringError> {
    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_string::MalformedStringError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::malformed_string::MalformedStringError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_malformed_string_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_string::MalformedStringOutput, crate::operation::malformed_string::MalformedStringError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::malformed_string::builders::MalformedStringOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_malformed_string_headers(
   29         -
    input: &crate::operation::malformed_string::MalformedStringInput,
   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.blob {
   33         -
        let formatted_2 = ::aws_smithy_types::base64::encode(inner_1);
   34         -
        let header_value = formatted_2;
   35         -
        let header_value: ::http_1x::HeaderValue = header_value.parse().map_err(|err| {
   36         -
            ::aws_smithy_types::error::operation::BuildError::invalid_field(
   37         -
                "blob",
   38         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   39         -
            )
   40         -
        })?;
   41         -
        builder = builder.header("amz-media-typed-header", header_value);
   42         -
    }
   43         -
    Ok(builder)
   44         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_body_date_time.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_timestamp_body_date_time_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_timestamp_body_date_time::MalformedTimestampBodyDateTimeOutput,
    9         -
    crate::operation::malformed_timestamp_body_date_time::MalformedTimestampBodyDateTimeError,
   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_timestamp_body_date_time::MalformedTimestampBodyDateTimeError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_body_date_time::MalformedTimestampBodyDateTimeError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_body_date_time_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_timestamp_body_date_time::MalformedTimestampBodyDateTimeOutput,
   25         -
    crate::operation::malformed_timestamp_body_date_time::MalformedTimestampBodyDateTimeError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_body_date_time::builders::MalformedTimestampBodyDateTimeOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_body_date_time_input(
   35         -
    input: &crate::operation::malformed_timestamp_body_date_time::MalformedTimestampBodyDateTimeInput,
   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_timestamp_body_date_time_input::ser_malformed_timestamp_body_date_time_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_timestamp_body_date_time_input.rs

@@ -1,0 +12,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_timestamp_body_date_time_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_timestamp_body_date_time::MalformedTimestampBodyDateTimeInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.timestamp {
    7         -
        object
    8         -
            .key("timestamp")
    9         -
            .date_time(var_1, ::aws_smithy_types::date_time::Format::DateTime)?;
   10         -
    }
   11         -
    Ok(())
   12         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_body_default.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_timestamp_body_default_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_timestamp_body_default::MalformedTimestampBodyDefaultOutput,
    9         -
    crate::operation::malformed_timestamp_body_default::MalformedTimestampBodyDefaultError,
   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_timestamp_body_default::MalformedTimestampBodyDefaultError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_body_default::MalformedTimestampBodyDefaultError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_body_default_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_timestamp_body_default::MalformedTimestampBodyDefaultOutput,
   25         -
    crate::operation::malformed_timestamp_body_default::MalformedTimestampBodyDefaultError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_body_default::builders::MalformedTimestampBodyDefaultOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_body_default_input(
   35         -
    input: &crate::operation::malformed_timestamp_body_default::MalformedTimestampBodyDefaultInput,
   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_timestamp_body_default_input::ser_malformed_timestamp_body_default_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_timestamp_body_default_input.rs

@@ -1,0 +12,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_timestamp_body_default_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_timestamp_body_default::MalformedTimestampBodyDefaultInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.timestamp {
    7         -
        object
    8         -
            .key("timestamp")
    9         -
            .date_time(var_1, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
   10         -
    }
   11         -
    Ok(())
   12         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_body_http_date.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_timestamp_body_http_date_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_timestamp_body_http_date::MalformedTimestampBodyHttpDateOutput,
    9         -
    crate::operation::malformed_timestamp_body_http_date::MalformedTimestampBodyHttpDateError,
   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_timestamp_body_http_date::MalformedTimestampBodyHttpDateError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_body_http_date::MalformedTimestampBodyHttpDateError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_body_http_date_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_timestamp_body_http_date::MalformedTimestampBodyHttpDateOutput,
   25         -
    crate::operation::malformed_timestamp_body_http_date::MalformedTimestampBodyHttpDateError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_body_http_date::builders::MalformedTimestampBodyHttpDateOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_body_http_date_input(
   35         -
    input: &crate::operation::malformed_timestamp_body_http_date::MalformedTimestampBodyHttpDateInput,
   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_timestamp_body_http_date_input::ser_malformed_timestamp_body_http_date_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_timestamp_body_http_date_input.rs

@@ -1,0 +12,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_malformed_timestamp_body_http_date_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::malformed_timestamp_body_http_date::MalformedTimestampBodyHttpDateInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.timestamp {
    7         -
        object
    8         -
            .key("timestamp")
    9         -
            .date_time(var_1, ::aws_smithy_types::date_time::Format::HttpDate)?;
   10         -
    }
   11         -
    Ok(())
   12         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_header_date_time.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_timestamp_header_date_time_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_timestamp_header_date_time::MalformedTimestampHeaderDateTimeOutput,
    9         -
    crate::operation::malformed_timestamp_header_date_time::MalformedTimestampHeaderDateTimeError,
   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_timestamp_header_date_time::MalformedTimestampHeaderDateTimeError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_header_date_time::MalformedTimestampHeaderDateTimeError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_header_date_time_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_timestamp_header_date_time::MalformedTimestampHeaderDateTimeOutput,
   25         -
    crate::operation::malformed_timestamp_header_date_time::MalformedTimestampHeaderDateTimeError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_header_date_time::builders::MalformedTimestampHeaderDateTimeOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_header_date_time_headers(
   35         -
    input: &crate::operation::malformed_timestamp_header_date_time::MalformedTimestampHeaderDateTimeInput,
   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.timestamp {
   39         -
        let formatted_2 = inner_1.fmt(::aws_smithy_types::date_time::Format::DateTime)?;
   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         -
                "timestamp",
   44         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45         -
            )
   46         -
        })?;
   47         -
        builder = builder.header("timestamp", header_value);
   48         -
    }
   49         -
    Ok(builder)
   50         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_header_default.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_timestamp_header_default_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_timestamp_header_default::MalformedTimestampHeaderDefaultOutput,
    9         -
    crate::operation::malformed_timestamp_header_default::MalformedTimestampHeaderDefaultError,
   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_timestamp_header_default::MalformedTimestampHeaderDefaultError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_header_default::MalformedTimestampHeaderDefaultError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_header_default_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_timestamp_header_default::MalformedTimestampHeaderDefaultOutput,
   25         -
    crate::operation::malformed_timestamp_header_default::MalformedTimestampHeaderDefaultError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_header_default::builders::MalformedTimestampHeaderDefaultOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_header_default_headers(
   35         -
    input: &crate::operation::malformed_timestamp_header_default::MalformedTimestampHeaderDefaultInput,
   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.timestamp {
   39         -
        let formatted_2 = inner_1.fmt(::aws_smithy_types::date_time::Format::HttpDate)?;
   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         -
                "timestamp",
   44         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45         -
            )
   46         -
        })?;
   47         -
        builder = builder.header("timestamp", header_value);
   48         -
    }
   49         -
    Ok(builder)
   50         -
}

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/protocol_serde/shape_malformed_timestamp_header_epoch.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_timestamp_header_epoch_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_timestamp_header_epoch::MalformedTimestampHeaderEpochOutput,
    9         -
    crate::operation::malformed_timestamp_header_epoch::MalformedTimestampHeaderEpochError,
   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_timestamp_header_epoch::MalformedTimestampHeaderEpochError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::malformed_timestamp_header_epoch::MalformedTimestampHeaderEpochError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_malformed_timestamp_header_epoch_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_timestamp_header_epoch::MalformedTimestampHeaderEpochOutput,
   25         -
    crate::operation::malformed_timestamp_header_epoch::MalformedTimestampHeaderEpochError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::malformed_timestamp_header_epoch::builders::MalformedTimestampHeaderEpochOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_malformed_timestamp_header_epoch_headers(
   35         -
    input: &crate::operation::malformed_timestamp_header_epoch::MalformedTimestampHeaderEpochInput,
   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.timestamp {
   39         -
        let formatted_2 = inner_1.fmt(::aws_smithy_types::date_time::Format::EpochSeconds)?;
   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         -
                "timestamp",
   44         -
                format!("`{}` cannot be used as a header value: {}", &header_value, err),
   45         -
            )
   46         -
        })?;
   47         -
        builder = builder.header("timestamp", header_value);
   48         -
    }
   49         -
    Ok(builder)
   50         -
}

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

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

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

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