Client Test

Client Test

rev. 163d4d6410694aaf071424777ecbecd050925f36

Files changed:

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding/_put_with_content_encoding_input.rs

@@ -43,43 +131,168 @@
   63     63   
            ser.write_string(&PUTWITHCONTENTENCODINGINPUT_MEMBER_ENCODING, val)?;
   64     64   
        }
   65     65   
        if let Some(ref val) = self.data {
   66     66   
            ser.write_string(&PUTWITHCONTENTENCODINGINPUT_MEMBER_DATA, val)?;
   67     67   
        }
   68     68   
        Ok(())
   69     69   
    }
   70     70   
}
   71     71   
impl PutWithContentEncodingInput {
   72     72   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   73         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   74         -
        deserializer: &mut D,
          73  +
    pub fn deserialize(
          74  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   75     75   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   76     76   
        #[allow(unused_variables, unused_mut)]
   77     77   
        let mut builder = Self::builder();
   78     78   
        #[allow(
   79     79   
            unused_variables,
   80     80   
            unreachable_code,
   81     81   
            clippy::single_match,
   82     82   
            clippy::match_single_binding,
   83     83   
            clippy::diverging_sub_expression
   84     84   
        )]
   85         -
        deserializer.read_struct(&PUTWITHCONTENTENCODINGINPUT_SCHEMA, (), |_, member, deser| {
          85  +
        deserializer.read_struct(&PUTWITHCONTENTENCODINGINPUT_SCHEMA, &mut |member, deser| {
   86     86   
            match member.member_index() {
   87     87   
                Some(0) => {
   88     88   
                    builder.encoding = Some(deser.read_string(member)?);
   89     89   
                }
   90     90   
                Some(1) => {
   91     91   
                    builder.data = Some(deser.read_string(member)?);
   92     92   
                }
   93     93   
                _ => {}
   94     94   
            }
   95     95   
            Ok(())
   96     96   
        })?;
   97     97   
        builder
   98     98   
            .build()
   99     99   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  100    100   
    }
  101    101   
}
         102  +
impl PutWithContentEncodingInput {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response headers.
         104  +
    /// Header-bound members are read directly from headers, avoiding runtime
         105  +
    /// member iteration overhead. Body members are read via the deserializer.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        #[allow(unused_variables, unused_mut)]
         113  +
        let mut builder = Self::builder();
         114  +
        if let Some(val) = headers.get("Content-Encoding") {
         115  +
            builder.encoding = Some(val.to_string());
         116  +
        }
         117  +
        #[allow(
         118  +
            unused_variables,
         119  +
            unreachable_code,
         120  +
            clippy::single_match,
         121  +
            clippy::match_single_binding,
         122  +
            clippy::diverging_sub_expression
         123  +
        )]
         124  +
        deserializer.read_struct(&PUTWITHCONTENTENCODINGINPUT_SCHEMA, &mut |member, deser| {
         125  +
            match member.member_index() {
         126  +
                Some(0) => { /* read from headers above */ }
         127  +
                Some(1) => {
         128  +
                    builder.data = Some(deser.read_string(member)?);
         129  +
                }
         130  +
                _ => {}
         131  +
            }
         132  +
            Ok(())
         133  +
        })?;
         134  +
        builder
         135  +
            .build()
         136  +
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
         137  +
    }
         138  +
}
  102    139   
impl PutWithContentEncodingInput {
  103    140   
    /// Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::operation::put_with_content_encoding::PutWithContentEncodingInput).
  104    141   
    pub fn builder() -> crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder {
  105    142   
        crate::operation::put_with_content_encoding::builders::PutWithContentEncodingInputBuilder::default()
  106    143   
    }
  107    144   
}
  108    145   
  109    146   
/// A builder for [`PutWithContentEncodingInput`](crate::operation::put_with_content_encoding::PutWithContentEncodingInput).
  110    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    148   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/put_with_content_encoding/_put_with_content_encoding_output.rs

@@ -1,1 +65,76 @@
   18     18   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   19     19   
    fn serialize_members(
   20     20   
        &self,
   21     21   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   22     22   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   23     23   
        Ok(())
   24     24   
    }
   25     25   
}
   26     26   
impl PutWithContentEncodingOutput {
   27     27   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   28         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   29         -
        deserializer: &mut D,
          28  +
    pub fn deserialize(
          29  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   30     30   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   31     31   
        #[allow(unused_variables, unused_mut)]
   32     32   
        let mut builder = Self::builder();
   33     33   
        #[allow(
   34     34   
            unused_variables,
   35     35   
            unreachable_code,
   36     36   
            clippy::single_match,
   37     37   
            clippy::match_single_binding,
   38     38   
            clippy::diverging_sub_expression
   39     39   
        )]
   40         -
        deserializer.read_struct(&PUTWITHCONTENTENCODINGOUTPUT_SCHEMA, (), |_, member, deser| {
          40  +
        deserializer.read_struct(&PUTWITHCONTENTENCODINGOUTPUT_SCHEMA, &mut |member, deser| {
   41     41   
            match member.member_index() {
   42     42   
                _ => {}
   43     43   
            }
   44     44   
            Ok(())
   45     45   
        })?;
   46     46   
        Ok(builder.build())
   47     47   
    }
   48     48   
}
          49  +
impl PutWithContentEncodingOutput {
          50  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          51  +
    pub fn deserialize_with_response(
          52  +
        _deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          53  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          54  +
        _status: u16,
          55  +
        _body: &[u8],
          56  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          57  +
        Ok(Self::builder().build())
          58  +
    }
          59  +
}
   49     60   
impl PutWithContentEncodingOutput {
   50     61   
    /// Creates a new builder-style object to manufacture [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
   51     62   
    pub fn builder() -> crate::operation::put_with_content_encoding::builders::PutWithContentEncodingOutputBuilder {
   52     63   
        crate::operation::put_with_content_encoding::builders::PutWithContentEncodingOutputBuilder::default()
   53     64   
    }
   54     65   
}
   55     66   
   56     67   
/// A builder for [`PutWithContentEncodingOutput`](crate::operation::put_with_content_encoding::PutWithContentEncodingOutput).
   57     68   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   58     69   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `SimpleScalarProperties`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SimpleScalarProperties;
    6      6   
impl SimpleScalarProperties {
    7      7   
    /// Creates a new `SimpleScalarProperties`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::simple_scalar_properties::SimpleScalarPropertiesError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -113,117 +239,239 @@
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct SimpleScalarPropertiesResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SimpleScalarPropertiesResponseDeserializer {
  140    144   
    fn deserialize_nonstreaming(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    150   
        #[allow(unused_mut)]
  148    151   
        let mut force_error = false;
  149    152   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_error(status, headers, body)
         153  +
        if !success && status != 200 || force_error {
         154  +
            let headers = response.headers();
         155  +
            let body = response.body().bytes().expect("body loaded");
         156  +
            #[allow(unused_mut)]
         157  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         158  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         159  +
            })?;
         160  +
         161  +
            let generic = generic_builder.build();
         162  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         163  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         164  +
                    crate::operation::simple_scalar_properties::SimpleScalarPropertiesError::generic(generic),
         165  +
                ),
         166  +
            ))
  152    167   
        } else {
  153         -
            crate::protocol_serde::shape_simple_scalar_properties::de_simple_scalar_properties_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let mut deser = protocol
         172  +
                .deserialize_response(response, SimpleScalarProperties::OUTPUT_SCHEMA, _cfg)
         173  +
                .map_err(|e| {
         174  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
                })?;
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            let output = crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput::deserialize_with_response(
         178  +
                &mut *deser,
         179  +
                response.headers(),
         180  +
                response.status().into(),
         181  +
                body,
         182  +
            )
         183  +
            .map_err(|e| {
         184  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         185  +
            })?;
         186  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         187  +
        }
  156    188   
    }
  157    189   
}
  158    190   
#[derive(Debug)]
  159    191   
struct SimpleScalarPropertiesRequestSerializer;
  160    192   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SimpleScalarPropertiesRequestSerializer {
  161    193   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    194   
    fn serialize_input(
  163    195   
        &self,
  164    196   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    197   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    198   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    199   
        let input = input
  168    200   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput>()
  169    201   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
  183         -
            }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput,
  187         -
                builder: ::http_1x::request::Builder,
  188         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189         -
                let mut uri = ::std::string::String::new();
  190         -
                uri_base(input, &mut uri)?;
  191         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192         -
            }
  193         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195         -
            builder = _header_serialization_settings.set_default_header(
  196         -
                builder,
  197         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198         -
                "JsonProtocol.SimpleScalarProperties",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(
  203         -
            crate::protocol_serde::shape_simple_scalar_properties::ser_simple_scalar_properties_input(&input)?,
  204         -
        );
  205         -
        if let Some(content_length) = body.content_length() {
  206         -
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208         -
        }
  209         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        let mut request = protocol
         206  +
            .serialize_request(&input, SimpleScalarProperties::INPUT_SCHEMA, "", _cfg)
         207  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         208  +
         209  +
        return ::std::result::Result::Ok(request);
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct SimpleScalarPropertiesEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SimpleScalarPropertiesEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "SimpleScalarPropertiesEndpointParamsInterceptor"
  218    218   
    }
  219    219   
@@ -388,388 +568,598 @@
  408    408   
            .expect("the config must have a deserializer");
  409    409   
  410    410   
        let parsed = de.deserialize_streaming(&mut http_response);
  411    411   
        let parsed = parsed.unwrap_or_else(|| {
  412    412   
            let http_response = http_response.map(|body| {
  413    413   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  414    414   
                    body.bytes().unwrap(),
  415    415   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  416    416   
                )))
  417    417   
            });
  418         -
            de.deserialize_nonstreaming(&http_response)
         418  +
            // Build a config bag with the protocol for schema-based deserialization
         419  +
            #[allow(unused_mut)]
         420  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         421  +
            {
         422  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         423  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         424  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         425  +
                ));
         426  +
                test_cfg.push_shared_layer(layer.freeze());
         427  +
            }
         428  +
            de.deserialize_nonstreaming(&http_response, &test_cfg)
  419    429   
        });
  420    430   
        let parsed = parsed
  421    431   
            .expect("should be successful response")
  422    432   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  423    433   
            .unwrap();
  424    434   
        assert!(
  425    435   
            parsed.float_value.float_equals(&expected_output.float_value),
  426    436   
            "Unexpected value for `float_value` {:?} vs. {:?}",
  427    437   
            expected_output.float_value,
  428    438   
            parsed.float_value
  429    439   
        );
  430    440   
        assert!(
  431    441   
            parsed.double_value.float_equals(&expected_output.double_value),
  432    442   
            "Unexpected value for `double_value` {:?} vs. {:?}",
  433    443   
            expected_output.double_value,
  434    444   
            parsed.double_value
  435    445   
        );
  436    446   
    }
  437    447   
  438    448   
    /// Supports handling Infinity float values.
  439    449   
    /// Test ID: AwsJson11SupportsInfinityFloatInputs
  440    450   
    #[::tokio::test]
  441    451   
    #[::tracing_test::traced_test]
  442    452   
    async fn aws_json11_supports_infinity_float_inputs_response() {
  443    453   
        let expected_output = crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput::builder()
  444    454   
            .set_float_value(::std::option::Option::Some(
  445    455   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  446    456   
            ))
  447    457   
            .set_double_value(::std::option::Option::Some(
  448    458   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("Infinity").expect("invalid string for number"),
  449    459   
            ))
  450    460   
            .build();
  451    461   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  452    462   
            ::http_1x::response::Builder::new()
  453    463   
                .header("Content-Type", "application/x-amz-json-1.1")
  454    464   
                .status(200)
  455    465   
                .body(::aws_smithy_types::body::SdkBody::from(
  456    466   
                    "{\n    \"floatValue\": \"Infinity\",\n    \"doubleValue\": \"Infinity\"\n}",
  457    467   
                ))
  458    468   
                .unwrap(),
  459    469   
        )
  460    470   
        .unwrap();
  461    471   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  462    472   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  463    473   
  464    474   
        let op = crate::operation::simple_scalar_properties::SimpleScalarProperties::new();
  465    475   
        let config = op.config().expect("the operation has config");
  466    476   
        let de = config
  467    477   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  468    478   
            .expect("the config must have a deserializer");
  469    479   
  470    480   
        let parsed = de.deserialize_streaming(&mut http_response);
  471    481   
        let parsed = parsed.unwrap_or_else(|| {
  472    482   
            let http_response = http_response.map(|body| {
  473    483   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  474    484   
                    body.bytes().unwrap(),
  475    485   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  476    486   
                )))
  477    487   
            });
  478         -
            de.deserialize_nonstreaming(&http_response)
         488  +
            // Build a config bag with the protocol for schema-based deserialization
         489  +
            #[allow(unused_mut)]
         490  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         491  +
            {
         492  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         493  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         494  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         495  +
                ));
         496  +
                test_cfg.push_shared_layer(layer.freeze());
         497  +
            }
         498  +
            de.deserialize_nonstreaming(&http_response, &test_cfg)
  479    499   
        });
  480    500   
        let parsed = parsed
  481    501   
            .expect("should be successful response")
  482    502   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  483    503   
            .unwrap();
  484    504   
        assert!(
  485    505   
            parsed.float_value.float_equals(&expected_output.float_value),
  486    506   
            "Unexpected value for `float_value` {:?} vs. {:?}",
  487    507   
            expected_output.float_value,
  488    508   
            parsed.float_value
  489    509   
        );
  490    510   
        assert!(
  491    511   
            parsed.double_value.float_equals(&expected_output.double_value),
  492    512   
            "Unexpected value for `double_value` {:?} vs. {:?}",
  493    513   
            expected_output.double_value,
  494    514   
            parsed.double_value
  495    515   
        );
  496    516   
    }
  497    517   
  498    518   
    /// Supports handling -Infinity float values.
  499    519   
    /// Test ID: AwsJson11SupportsNegativeInfinityFloatInputs
  500    520   
    #[::tokio::test]
  501    521   
    #[::tracing_test::traced_test]
  502    522   
    async fn aws_json11_supports_negative_infinity_float_inputs_response() {
  503    523   
        let expected_output = crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput::builder()
  504    524   
            .set_float_value(::std::option::Option::Some(
  505    525   
                <f32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  506    526   
            ))
  507    527   
            .set_double_value(::std::option::Option::Some(
  508    528   
                <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive("-Infinity").expect("invalid string for number"),
  509    529   
            ))
  510    530   
            .build();
  511    531   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  512    532   
            ::http_1x::response::Builder::new()
  513    533   
                .header("Content-Type", "application/x-amz-json-1.1")
  514    534   
                .status(200)
  515    535   
                .body(::aws_smithy_types::body::SdkBody::from(
  516    536   
                    "{\n    \"floatValue\": \"-Infinity\",\n    \"doubleValue\": \"-Infinity\"\n}",
  517    537   
                ))
  518    538   
                .unwrap(),
  519    539   
        )
  520    540   
        .unwrap();
  521    541   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  522    542   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  523    543   
  524    544   
        let op = crate::operation::simple_scalar_properties::SimpleScalarProperties::new();
  525    545   
        let config = op.config().expect("the operation has config");
  526    546   
        let de = config
  527    547   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  528    548   
            .expect("the config must have a deserializer");
  529    549   
  530    550   
        let parsed = de.deserialize_streaming(&mut http_response);
  531    551   
        let parsed = parsed.unwrap_or_else(|| {
  532    552   
            let http_response = http_response.map(|body| {
  533    553   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  534    554   
                    body.bytes().unwrap(),
  535    555   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  536    556   
                )))
  537    557   
            });
  538         -
            de.deserialize_nonstreaming(&http_response)
         558  +
            // Build a config bag with the protocol for schema-based deserialization
         559  +
            #[allow(unused_mut)]
         560  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         561  +
            {
         562  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         563  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         564  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         565  +
                ));
         566  +
                test_cfg.push_shared_layer(layer.freeze());
         567  +
            }
         568  +
            de.deserialize_nonstreaming(&http_response, &test_cfg)
  539    569   
        });
  540    570   
        let parsed = parsed
  541    571   
            .expect("should be successful response")
  542    572   
            .downcast::<crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput>()
  543    573   
            .unwrap();
  544    574   
        assert!(
  545    575   
            parsed.float_value.float_equals(&expected_output.float_value),
  546    576   
            "Unexpected value for `float_value` {:?} vs. {:?}",
  547    577   
            expected_output.float_value,
  548    578   
            parsed.float_value

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties/_simple_scalar_properties_input.rs

@@ -3,3 +133,144 @@
   23     23   
    "aws.protocoltests.json.synthetic",
   24     24   
    "SimpleScalarPropertiesInput",
   25     25   
);
   26     26   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "aws.protocoltests.json.synthetic#SimpleScalarPropertiesInput$floatValue",
   29     29   
        "aws.protocoltests.json.synthetic",
   30     30   
        "SimpleScalarPropertiesInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::Float,
   33         -
    "float_value",
          33  +
    "floatValue",
   34     34   
    0,
   35     35   
);
   36     36   
static SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "aws.protocoltests.json.synthetic#SimpleScalarPropertiesInput$doubleValue",
   39     39   
        "aws.protocoltests.json.synthetic",
   40     40   
        "SimpleScalarPropertiesInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Double,
   43         -
    "double_value",
          43  +
    "doubleValue",
   44     44   
    1,
   45     45   
);
   46     46   
static SIMPLESCALARPROPERTIESINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    SIMPLESCALARPROPERTIESINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE,
   51     51   
        &SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE,
   52     52   
    ],
   53     53   
);
   54     54   
impl SimpleScalarPropertiesInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIMPLESCALARPROPERTIESINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for SimpleScalarPropertiesInput {
   59     59   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     60   
    fn serialize_members(
   61     61   
        &self,
   62     62   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     63   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     64   
        if let Some(ref val) = self.float_value {
   65     65   
            ser.write_float(&SIMPLESCALARPROPERTIESINPUT_MEMBER_FLOAT_VALUE, *val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.double_value {
   68     68   
            ser.write_double(&SIMPLESCALARPROPERTIESINPUT_MEMBER_DOUBLE_VALUE, *val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl SimpleScalarPropertiesInput {
   74     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   75         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   76         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   77     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   78     78   
        #[allow(unused_variables, unused_mut)]
   79     79   
        let mut builder = Self::builder();
   80     80   
        #[allow(
   81     81   
            unused_variables,
   82     82   
            unreachable_code,
   83     83   
            clippy::single_match,
   84     84   
            clippy::match_single_binding,
   85     85   
            clippy::diverging_sub_expression
   86     86   
        )]
   87         -
        deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESINPUT_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.float_value = Some(deser.read_float(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.double_value = Some(deser.read_double(member)?);
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        builder
  100    100   
            .build()
  101    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  102    102   
    }
  103    103   
}
         104  +
impl SimpleScalarPropertiesInput {
         105  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         106  +
    pub fn deserialize_with_response(
         107  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         108  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         109  +
        _status: u16,
         110  +
        _body: &[u8],
         111  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         112  +
        Self::deserialize(deserializer)
         113  +
    }
         114  +
}
  104    115   
impl SimpleScalarPropertiesInput {
  105    116   
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
  106    117   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder {
  107    118   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesInputBuilder::default()
  108    119   
    }
  109    120   
}
  110    121   
  111    122   
/// A builder for [`SimpleScalarPropertiesInput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesInput).
  112    123   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  113    124   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/simple_scalar_properties/_simple_scalar_properties_output.rs

@@ -3,3 +131,142 @@
   23     23   
    "aws.protocoltests.json.synthetic",
   24     24   
    "SimpleScalarPropertiesOutput",
   25     25   
);
   26     26   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "aws.protocoltests.json.synthetic#SimpleScalarPropertiesOutput$floatValue",
   29     29   
        "aws.protocoltests.json.synthetic",
   30     30   
        "SimpleScalarPropertiesOutput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::Float,
   33         -
    "float_value",
          33  +
    "floatValue",
   34     34   
    0,
   35     35   
);
   36     36   
static SIMPLESCALARPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "aws.protocoltests.json.synthetic#SimpleScalarPropertiesOutput$doubleValue",
   39     39   
        "aws.protocoltests.json.synthetic",
   40     40   
        "SimpleScalarPropertiesOutput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Double,
   43         -
    "double_value",
          43  +
    "doubleValue",
   44     44   
    1,
   45     45   
);
   46     46   
static SIMPLESCALARPROPERTIESOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    SIMPLESCALARPROPERTIESOUTPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE,
   51     51   
        &SIMPLESCALARPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE,
   52     52   
    ],
   53     53   
);
   54     54   
impl SimpleScalarPropertiesOutput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &SIMPLESCALARPROPERTIESOUTPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for SimpleScalarPropertiesOutput {
   59     59   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   60     60   
    fn serialize_members(
   61     61   
        &self,
   62     62   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   63     63   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   64     64   
        if let Some(ref val) = self.float_value {
   65     65   
            ser.write_float(&SIMPLESCALARPROPERTIESOUTPUT_MEMBER_FLOAT_VALUE, *val)?;
   66     66   
        }
   67     67   
        if let Some(ref val) = self.double_value {
   68     68   
            ser.write_double(&SIMPLESCALARPROPERTIESOUTPUT_MEMBER_DOUBLE_VALUE, *val)?;
   69     69   
        }
   70     70   
        Ok(())
   71     71   
    }
   72     72   
}
   73     73   
impl SimpleScalarPropertiesOutput {
   74     74   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   75         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   76         -
        deserializer: &mut D,
          75  +
    pub fn deserialize(
          76  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   77     77   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   78     78   
        #[allow(unused_variables, unused_mut)]
   79     79   
        let mut builder = Self::builder();
   80     80   
        #[allow(
   81     81   
            unused_variables,
   82     82   
            unreachable_code,
   83     83   
            clippy::single_match,
   84     84   
            clippy::match_single_binding,
   85     85   
            clippy::diverging_sub_expression
   86     86   
        )]
   87         -
        deserializer.read_struct(&SIMPLESCALARPROPERTIESOUTPUT_SCHEMA, (), |_, member, deser| {
          87  +
        deserializer.read_struct(&SIMPLESCALARPROPERTIESOUTPUT_SCHEMA, &mut |member, deser| {
   88     88   
            match member.member_index() {
   89     89   
                Some(0) => {
   90     90   
                    builder.float_value = Some(deser.read_float(member)?);
   91     91   
                }
   92     92   
                Some(1) => {
   93     93   
                    builder.double_value = Some(deser.read_double(member)?);
   94     94   
                }
   95     95   
                _ => {}
   96     96   
            }
   97     97   
            Ok(())
   98     98   
        })?;
   99     99   
        Ok(builder.build())
  100    100   
    }
  101    101   
}
         102  +
impl SimpleScalarPropertiesOutput {
         103  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         104  +
    pub fn deserialize_with_response(
         105  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         106  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         107  +
        _status: u16,
         108  +
        _body: &[u8],
         109  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         110  +
        Self::deserialize(deserializer)
         111  +
    }
         112  +
}
  102    113   
impl SimpleScalarPropertiesOutput {
  103    114   
    /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
  104    115   
    pub fn builder() -> crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder {
  105    116   
        crate::operation::simple_scalar_properties::builders::SimpleScalarPropertiesOutputBuilder::default()
  106    117   
    }
  107    118   
}
  108    119   
  109    120   
/// A builder for [`SimpleScalarPropertiesOutput`](crate::operation::simple_scalar_properties::SimpleScalarPropertiesOutput).
  110    121   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  111    122   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/sparse_nulls_operation.rs

@@ -1,1 +40,44 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `SparseNullsOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SparseNullsOperation;
    6      6   
impl SparseNullsOperation {
    7      7   
    /// Creates a new `SparseNullsOperation`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::sparse_nulls_operation::SparseNullsOperationInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::sparse_nulls_operation::SparseNullsOperationOutput::SCHEMA;
   11     15   
    pub(crate) async fn orchestrate(
   12     16   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     17   
        input: crate::operation::sparse_nulls_operation::SparseNullsOperationInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::sparse_nulls_operation::SparseNullsOperationOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::sparse_nulls_operation::SparseNullsOperationError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -113,117 +239,239 @@
  133    137   
        ::std::borrow::Cow::Owned(rcb)
  134    138   
    }
  135    139   
}
  136    140   
  137    141   
#[derive(Debug)]
  138    142   
struct SparseNullsOperationResponseDeserializer;
  139    143   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SparseNullsOperationResponseDeserializer {
  140    144   
    fn deserialize_nonstreaming(
  141    145   
        &self,
  142    146   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         147  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145         -
        let headers = response.headers();
  146         -
        let body = response.body().bytes().expect("body loaded");
  147    150   
        #[allow(unused_mut)]
  148    151   
        let mut force_error = false;
  149    152   
  150         -
        let parse_result = if !success && status != 200 || force_error {
  151         -
            crate::protocol_serde::shape_sparse_nulls_operation::de_sparse_nulls_operation_http_error(status, headers, body)
         153  +
        if !success && status != 200 || force_error {
         154  +
            let headers = response.headers();
         155  +
            let body = response.body().bytes().expect("body loaded");
         156  +
            #[allow(unused_mut)]
         157  +
            let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(status, headers, body).map_err(|e| {
         158  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         159  +
            })?;
         160  +
         161  +
            let generic = generic_builder.build();
         162  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         163  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(
         164  +
                    crate::operation::sparse_nulls_operation::SparseNullsOperationError::generic(generic),
         165  +
                ),
         166  +
            ))
  152    167   
        } else {
  153         -
            crate::protocol_serde::shape_sparse_nulls_operation::de_sparse_nulls_operation_http_response(status, headers, body)
  154         -
        };
  155         -
        crate::protocol_serde::type_erase_result(parse_result)
         168  +
            let protocol = _cfg
         169  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         170  +
                .expect("a SharedClientProtocol is required");
         171  +
            let mut deser = protocol
         172  +
                .deserialize_response(response, SparseNullsOperation::OUTPUT_SCHEMA, _cfg)
         173  +
                .map_err(|e| {
         174  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         175  +
                })?;
         176  +
            let body = response.body().bytes().expect("body loaded");
         177  +
            let output = crate::operation::sparse_nulls_operation::SparseNullsOperationOutput::deserialize_with_response(
         178  +
                &mut *deser,
         179  +
                response.headers(),
         180  +
                response.status().into(),
         181  +
                body,
         182  +
            )
         183  +
            .map_err(|e| {
         184  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         185  +
            })?;
         186  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         187  +
        }
  156    188   
    }
  157    189   
}
  158    190   
#[derive(Debug)]
  159    191   
struct SparseNullsOperationRequestSerializer;
  160    192   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for SparseNullsOperationRequestSerializer {
  161    193   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  162    194   
    fn serialize_input(
  163    195   
        &self,
  164    196   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  165    197   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  166    198   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  167    199   
        let input = input
  168    200   
            .downcast::<crate::operation::sparse_nulls_operation::SparseNullsOperationInput>()
  169    201   
            .expect("correct type");
  170         -
        let _header_serialization_settings = _cfg
  171         -
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  172         -
            .cloned()
  173         -
            .unwrap_or_default();
  174         -
        let mut request_builder = {
  175         -
            #[allow(clippy::uninlined_format_args)]
  176         -
            fn uri_base(
  177         -
                _input: &crate::operation::sparse_nulls_operation::SparseNullsOperationInput,
  178         -
                output: &mut ::std::string::String,
  179         -
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  180         -
                use ::std::fmt::Write as _;
  181         -
                ::std::write!(output, "/").expect("formatting should succeed");
  182         -
                ::std::result::Result::Ok(())
  183         -
            }
  184         -
            #[allow(clippy::unnecessary_wraps)]
  185         -
            fn update_http_builder(
  186         -
                input: &crate::operation::sparse_nulls_operation::SparseNullsOperationInput,
  187         -
                builder: ::http_1x::request::Builder,
  188         -
            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  189         -
                let mut uri = ::std::string::String::new();
  190         -
                uri_base(input, &mut uri)?;
  191         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  192         -
            }
  193         -
            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
  194         -
            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
  195         -
            builder = _header_serialization_settings.set_default_header(
  196         -
                builder,
  197         -
                ::http_1x::header::HeaderName::from_static("x-amz-target"),
  198         -
                "JsonProtocol.SparseNullsOperation",
  199         -
            );
  200         -
            builder
  201         -
        };
  202         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_sparse_nulls_operation::ser_sparse_nulls_operation_input(
  203         -
            &input,
  204         -
        )?);
  205         -
        if let Some(content_length) = body.content_length() {
  206         -
            let content_length = content_length.to_string();
  207         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
  208         -
        }
  209         -
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
         202  +
        let protocol = _cfg
         203  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         204  +
            .expect("a SharedClientProtocol is required");
         205  +
        let mut request = protocol
         206  +
            .serialize_request(&input, SparseNullsOperation::INPUT_SCHEMA, "", _cfg)
         207  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         208  +
         209  +
        return ::std::result::Result::Ok(request);
  210    210   
    }
  211    211   
}
  212    212   
#[derive(Debug)]
  213    213   
struct SparseNullsOperationEndpointParamsInterceptor;
  214    214   
  215    215   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for SparseNullsOperationEndpointParamsInterceptor {
  216    216   
    fn name(&self) -> &'static str {
  217    217   
        "SparseNullsOperationEndpointParamsInterceptor"
  218    218   
    }
  219    219   
@@ -338,338 +451,471 @@
  358    358   
            .expect("the config must have a deserializer");
  359    359   
  360    360   
        let parsed = de.deserialize_streaming(&mut http_response);
  361    361   
        let parsed = parsed.unwrap_or_else(|| {
  362    362   
            let http_response = http_response.map(|body| {
  363    363   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  364    364   
                    body.bytes().unwrap(),
  365    365   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  366    366   
                )))
  367    367   
            });
  368         -
            de.deserialize_nonstreaming(&http_response)
         368  +
            // Build a config bag with the protocol for schema-based deserialization
         369  +
            #[allow(unused_mut)]
         370  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         371  +
            {
         372  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         373  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         374  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         375  +
                ));
         376  +
                test_cfg.push_shared_layer(layer.freeze());
         377  +
            }
         378  +
            de.deserialize_nonstreaming(&http_response, &test_cfg)
  369    379   
        });
  370    380   
        let parsed = parsed
  371    381   
            .expect("should be successful response")
  372    382   
            .downcast::<crate::operation::sparse_nulls_operation::SparseNullsOperationOutput>()
  373    383   
            .unwrap();
  374    384   
        ::pretty_assertions::assert_eq!(
  375    385   
            parsed.sparse_string_list,
  376    386   
            expected_output.sparse_string_list,
  377    387   
            "Unexpected value for `sparse_string_list`"
  378    388   
        );
  379    389   
        ::pretty_assertions::assert_eq!(
  380    390   
            parsed.sparse_string_map,
  381    391   
            expected_output.sparse_string_map,
  382    392   
            "Unexpected value for `sparse_string_map`"
  383    393   
        );
  384    394   
    }
  385    395   
  386    396   
    /// Deserializes null values in lists
  387    397   
    /// Test ID: AwsJson11SparseListsDeserializeNull
  388    398   
    #[::tokio::test]
  389    399   
    #[::tracing_test::traced_test]
  390    400   
    async fn aws_json11_sparse_lists_deserialize_null_response() {
  391    401   
        let expected_output = crate::operation::sparse_nulls_operation::SparseNullsOperationOutput::builder()
  392    402   
            .set_sparse_string_list(::std::option::Option::Some(vec![::std::option::Option::None]))
  393    403   
            .build();
  394    404   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  395    405   
            ::http_1x::response::Builder::new()
  396    406   
                .header("Content-Type", "application/x-amz-json-1.1")
  397    407   
                .status(200)
  398    408   
                .body(::aws_smithy_types::body::SdkBody::from(
  399    409   
                    "{\n    \"sparseStringList\": [\n        null\n    ]\n}",
  400    410   
                ))
  401    411   
                .unwrap(),
  402    412   
        )
  403    413   
        .unwrap();
  404    414   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  405    415   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  406    416   
  407    417   
        let op = crate::operation::sparse_nulls_operation::SparseNullsOperation::new();
  408    418   
        let config = op.config().expect("the operation has config");
  409    419   
        let de = config
  410    420   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  411    421   
            .expect("the config must have a deserializer");
  412    422   
  413    423   
        let parsed = de.deserialize_streaming(&mut http_response);
  414    424   
        let parsed = parsed.unwrap_or_else(|| {
  415    425   
            let http_response = http_response.map(|body| {
  416    426   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  417    427   
                    body.bytes().unwrap(),
  418    428   
                    ::aws_smithy_protocol_test::MediaType::from("application/json"),
  419    429   
                )))
  420    430   
            });
  421         -
            de.deserialize_nonstreaming(&http_response)
         431  +
            // Build a config bag with the protocol for schema-based deserialization
         432  +
            #[allow(unused_mut)]
         433  +
            let mut test_cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
         434  +
            {
         435  +
                let mut layer = ::aws_smithy_types::config_bag::Layer::new("test_protocol");
         436  +
                layer.store_put(::aws_smithy_schema::protocol::SharedClientProtocol::new(
         437  +
                    ::aws_smithy_json::protocol::aws_json_rpc::AwsJsonRpcProtocol::aws_json_1_1("JsonProtocol"),
         438  +
                ));
         439  +
                test_cfg.push_shared_layer(layer.freeze());
         440  +
            }
         441  +
            de.deserialize_nonstreaming(&http_response, &test_cfg)
  422    442   
        });
  423    443   
        let parsed = parsed
  424    444   
            .expect("should be successful response")
  425    445   
            .downcast::<crate::operation::sparse_nulls_operation::SparseNullsOperationOutput>()
  426    446   
            .unwrap();
  427    447   
        ::pretty_assertions::assert_eq!(
  428    448   
            parsed.sparse_string_list,
  429    449   
            expected_output.sparse_string_list,
  430    450   
            "Unexpected value for `sparse_string_list`"
  431    451   
        );

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/sparse_nulls_operation/_sparse_nulls_operation_input.rs

@@ -7,7 +77,77 @@
   27     27   
    "aws.protocoltests.json.synthetic",
   28     28   
    "SparseNullsOperationInput",
   29     29   
);
   30     30   
static SPARSENULLSOPERATIONINPUT_MEMBER_SPARSE_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "aws.protocoltests.json.synthetic#SparseNullsOperationInput$sparseStringList",
   33     33   
        "aws.protocoltests.json.synthetic",
   34     34   
        "SparseNullsOperationInput",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::List,
   37         -
    "sparse_string_list",
          37  +
    "sparseStringList",
   38     38   
    0,
   39     39   
);
   40     40   
static SPARSENULLSOPERATIONINPUT_MEMBER_SPARSE_STRING_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "aws.protocoltests.json.synthetic#SparseNullsOperationInput$sparseStringMap",
   43     43   
        "aws.protocoltests.json.synthetic",
   44     44   
        "SparseNullsOperationInput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::Map,
   47         -
    "sparse_string_map",
          47  +
    "sparseStringMap",
   48     48   
    1,
   49     49   
);
   50     50   
static SPARSENULLSOPERATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     51   
    SPARSENULLSOPERATIONINPUT_SCHEMA_ID,
   52     52   
    ::aws_smithy_schema::ShapeType::Structure,
   53     53   
    &[
   54     54   
        &SPARSENULLSOPERATIONINPUT_MEMBER_SPARSE_STRING_LIST,
   55     55   
        &SPARSENULLSOPERATIONINPUT_MEMBER_SPARSE_STRING_MAP,
   56     56   
    ],
   57     57   
);
@@ -80,80 +201,206 @@
  100    100   
                    }
  101    101   
                    Ok(())
  102    102   
                },
  103    103   
            )?;
  104    104   
        }
  105    105   
        Ok(())
  106    106   
    }
  107    107   
}
  108    108   
impl SparseNullsOperationInput {
  109    109   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  110         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  111         -
        deserializer: &mut D,
         110  +
    pub fn deserialize(
         111  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  112    112   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  113    113   
        #[allow(unused_variables, unused_mut)]
  114    114   
        let mut builder = Self::builder();
  115    115   
        #[allow(
  116    116   
            unused_variables,
  117    117   
            unreachable_code,
  118    118   
            clippy::single_match,
  119    119   
            clippy::match_single_binding,
  120    120   
            clippy::diverging_sub_expression
  121    121   
        )]
  122         -
        deserializer.read_struct(&SPARSENULLSOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
         122  +
        deserializer.read_struct(&SPARSENULLSOPERATIONINPUT_SCHEMA, &mut |member, deser| {
  123    123   
            match member.member_index() {
  124    124   
                Some(0) => {
  125    125   
                    builder.sparse_string_list = Some({
  126         -
                        let container = if let Some(cap) = deser.container_size() {
  127         -
                            Vec::with_capacity(cap)
  128         -
                        } else {
  129         -
                            Vec::new()
  130         -
                        };
  131         -
                        deser.read_list(member, container, |mut list, deser| {
  132         -
                            list.push(if deser.is_null() {
  133         -
                                deser.read_string(member).ok();
         126  +
                        let mut container = Vec::new();
         127  +
                        deser.read_list(member, &mut |deser| {
         128  +
                            container.push(if deser.is_null() {
         129  +
                                deser.read_null()?;
  134    130   
                                None
  135    131   
                            } else {
  136    132   
                                Some(deser.read_string(member)?)
  137    133   
                            });
  138         -
                            Ok(list)
  139         -
                        })?
         134  +
                            Ok(())
         135  +
                        })?;
         136  +
                        container
  140    137   
                    });
  141    138   
                }
  142    139   
                Some(1) => {
  143    140   
                    builder.sparse_string_map = Some({
  144         -
                        let container = if let Some(cap) = deser.container_size() {
  145         -
                            std::collections::HashMap::with_capacity(cap)
  146         -
                        } else {
  147         -
                            std::collections::HashMap::new()
  148         -
                        };
  149         -
                        deser.read_map(member, container, |mut map, key, deser| {
  150         -
                            map.insert(
         141  +
                        let mut container = std::collections::HashMap::new();
         142  +
                        deser.read_map(member, &mut |key, deser| {
         143  +
                            container.insert(
  151    144   
                                key,
  152    145   
                                if deser.is_null() {
  153         -
                                    deser.read_string(member).ok();
         146  +
                                    deser.read_null()?;
  154    147   
                                    None
  155    148   
                                } else {
  156    149   
                                    Some(deser.read_string(member)?)
  157    150   
                                },
  158    151   
                            );
  159         -
                            Ok(map)
  160         -
                        })?
         152  +
                            Ok(())
         153  +
                        })?;
         154  +
                        container
  161    155   
                    });
  162    156   
                }
  163    157   
                _ => {}
  164    158   
            }
  165    159   
            Ok(())
  166    160   
        })?;
  167    161   
        builder
  168    162   
            .build()
  169    163   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  170    164   
    }
  171    165   
}
         166  +
impl SparseNullsOperationInput {
         167  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         168  +
    pub fn deserialize_with_response(
         169  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         170  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         171  +
        _status: u16,
         172  +
        _body: &[u8],
         173  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         174  +
        Self::deserialize(deserializer)
         175  +
    }
         176  +
}
  172    177   
impl SparseNullsOperationInput {
  173    178   
    /// Creates a new builder-style object to manufacture [`SparseNullsOperationInput`](crate::operation::sparse_nulls_operation::SparseNullsOperationInput).
  174    179   
    pub fn builder() -> crate::operation::sparse_nulls_operation::builders::SparseNullsOperationInputBuilder {
  175    180   
        crate::operation::sparse_nulls_operation::builders::SparseNullsOperationInputBuilder::default()
  176    181   
    }
  177    182   
}
  178    183   
  179    184   
/// A builder for [`SparseNullsOperationInput`](crate::operation::sparse_nulls_operation::SparseNullsOperationInput).
  180    185   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  181    186   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/operation/sparse_nulls_operation/_sparse_nulls_operation_output.rs

@@ -7,7 +77,77 @@
   27     27   
    "aws.protocoltests.json.synthetic",
   28     28   
    "SparseNullsOperationOutput",
   29     29   
);
   30     30   
static SPARSENULLSOPERATIONOUTPUT_MEMBER_SPARSE_STRING_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   31     31   
    ::aws_smithy_schema::ShapeId::from_static(
   32     32   
        "aws.protocoltests.json.synthetic#SparseNullsOperationOutput$sparseStringList",
   33     33   
        "aws.protocoltests.json.synthetic",
   34     34   
        "SparseNullsOperationOutput",
   35     35   
    ),
   36     36   
    ::aws_smithy_schema::ShapeType::List,
   37         -
    "sparse_string_list",
          37  +
    "sparseStringList",
   38     38   
    0,
   39     39   
);
   40     40   
static SPARSENULLSOPERATIONOUTPUT_MEMBER_SPARSE_STRING_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   41     41   
    ::aws_smithy_schema::ShapeId::from_static(
   42     42   
        "aws.protocoltests.json.synthetic#SparseNullsOperationOutput$sparseStringMap",
   43     43   
        "aws.protocoltests.json.synthetic",
   44     44   
        "SparseNullsOperationOutput",
   45     45   
    ),
   46     46   
    ::aws_smithy_schema::ShapeType::Map,
   47         -
    "sparse_string_map",
          47  +
    "sparseStringMap",
   48     48   
    1,
   49     49   
);
   50     50   
static SPARSENULLSOPERATIONOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   51     51   
    SPARSENULLSOPERATIONOUTPUT_SCHEMA_ID,
   52     52   
    ::aws_smithy_schema::ShapeType::Structure,
   53     53   
    &[
   54     54   
        &SPARSENULLSOPERATIONOUTPUT_MEMBER_SPARSE_STRING_LIST,
   55     55   
        &SPARSENULLSOPERATIONOUTPUT_MEMBER_SPARSE_STRING_MAP,
   56     56   
    ],
   57     57   
);
@@ -80,80 +199,204 @@
  100    100   
                    }
  101    101   
                    Ok(())
  102    102   
                },
  103    103   
            )?;
  104    104   
        }
  105    105   
        Ok(())
  106    106   
    }
  107    107   
}
  108    108   
impl SparseNullsOperationOutput {
  109    109   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  110         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  111         -
        deserializer: &mut D,
         110  +
    pub fn deserialize(
         111  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  112    112   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  113    113   
        #[allow(unused_variables, unused_mut)]
  114    114   
        let mut builder = Self::builder();
  115    115   
        #[allow(
  116    116   
            unused_variables,
  117    117   
            unreachable_code,
  118    118   
            clippy::single_match,
  119    119   
            clippy::match_single_binding,
  120    120   
            clippy::diverging_sub_expression
  121    121   
        )]
  122         -
        deserializer.read_struct(&SPARSENULLSOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
         122  +
        deserializer.read_struct(&SPARSENULLSOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
  123    123   
            match member.member_index() {
  124    124   
                Some(0) => {
  125    125   
                    builder.sparse_string_list = Some({
  126         -
                        let container = if let Some(cap) = deser.container_size() {
  127         -
                            Vec::with_capacity(cap)
  128         -
                        } else {
  129         -
                            Vec::new()
  130         -
                        };
  131         -
                        deser.read_list(member, container, |mut list, deser| {
  132         -
                            list.push(if deser.is_null() {
  133         -
                                deser.read_string(member).ok();
         126  +
                        let mut container = Vec::new();
         127  +
                        deser.read_list(member, &mut |deser| {
         128  +
                            container.push(if deser.is_null() {
         129  +
                                deser.read_null()?;
  134    130   
                                None
  135    131   
                            } else {
  136    132   
                                Some(deser.read_string(member)?)
  137    133   
                            });
  138         -
                            Ok(list)
  139         -
                        })?
         134  +
                            Ok(())
         135  +
                        })?;
         136  +
                        container
  140    137   
                    });
  141    138   
                }
  142    139   
                Some(1) => {
  143    140   
                    builder.sparse_string_map = Some({
  144         -
                        let container = if let Some(cap) = deser.container_size() {
  145         -
                            std::collections::HashMap::with_capacity(cap)
  146         -
                        } else {
  147         -
                            std::collections::HashMap::new()
  148         -
                        };
  149         -
                        deser.read_map(member, container, |mut map, key, deser| {
  150         -
                            map.insert(
         141  +
                        let mut container = std::collections::HashMap::new();
         142  +
                        deser.read_map(member, &mut |key, deser| {
         143  +
                            container.insert(
  151    144   
                                key,
  152    145   
                                if deser.is_null() {
  153         -
                                    deser.read_string(member).ok();
         146  +
                                    deser.read_null()?;
  154    147   
                                    None
  155    148   
                                } else {
  156    149   
                                    Some(deser.read_string(member)?)
  157    150   
                                },
  158    151   
                            );
  159         -
                            Ok(map)
  160         -
                        })?
         152  +
                            Ok(())
         153  +
                        })?;
         154  +
                        container
  161    155   
                    });
  162    156   
                }
  163    157   
                _ => {}
  164    158   
            }
  165    159   
            Ok(())
  166    160   
        })?;
  167    161   
        Ok(builder.build())
  168    162   
    }
  169    163   
}
         164  +
impl SparseNullsOperationOutput {
         165  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         166  +
    pub fn deserialize_with_response(
         167  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         168  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         169  +
        _status: u16,
         170  +
        _body: &[u8],
         171  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         172  +
        Self::deserialize(deserializer)
         173  +
    }
         174  +
}
  170    175   
impl SparseNullsOperationOutput {
  171    176   
    /// Creates a new builder-style object to manufacture [`SparseNullsOperationOutput`](crate::operation::sparse_nulls_operation::SparseNullsOperationOutput).
  172    177   
    pub fn builder() -> crate::operation::sparse_nulls_operation::builders::SparseNullsOperationOutputBuilder {
  173    178   
        crate::operation::sparse_nulls_operation::builders::SparseNullsOperationOutputBuilder::default()
  174    179   
    }
  175    180   
}
  176    181   
  177    182   
/// A builder for [`SparseNullsOperationOutput`](crate::operation::sparse_nulls_operation::SparseNullsOperationOutput).
  178    183   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  179    184   
#[non_exhaustive]

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

@@ -1,1 +156,0 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn type_erase_result<O, E>(
    3         -
    result: ::std::result::Result<O, E>,
    4         -
) -> ::std::result::Result<
    5         -
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6         -
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7         -
>
    8         -
where
    9         -
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10         -
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11         -
{
   12         -
    result
   13         -
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14         -
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15         -
        .map_err(::std::convert::Into::into)
   16         -
}
   17         -
   18      2   
pub fn parse_http_error_metadata(
   19      3   
    _response_status: u16,
   20      4   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21      5   
    response_body: &[u8],
   22      6   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23      7   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24      8   
}
   25         -
   26         -
pub(crate) mod shape_content_type_parameters;
   27         -
   28         -
pub(crate) mod shape_datetime_offsets;
   29         -
   30         -
pub(crate) mod shape_empty_operation;
   31         -
   32         -
pub(crate) mod shape_endpoint_operation;
   33         -
   34         -
pub(crate) mod shape_endpoint_with_host_label_operation;
   35         -
   36         -
pub(crate) mod shape_fractional_seconds;
   37         -
   38         -
pub(crate) mod shape_greeting_with_errors;
   39         -
   40         -
pub(crate) mod shape_host_with_path_operation;
   41         -
   42         -
pub(crate) mod shape_json_enums;
   43         -
   44         -
pub(crate) mod shape_json_int_enums;
   45         -
   46         -
pub(crate) mod shape_json_unions;
   47         -
   48         -
pub(crate) mod shape_kitchen_sink_operation;
   49         -
   50         -
pub(crate) mod shape_null_operation;
   51         -
   52         -
pub(crate) mod shape_operation_with_optional_input_output;
   53         -
   54         -
pub(crate) mod shape_put_and_get_inline_documents;
   55         -
   56         -
pub(crate) mod shape_put_with_content_encoding;
   57         -
   58         -
pub(crate) mod shape_simple_scalar_properties;
   59         -
   60         -
pub(crate) mod shape_sparse_nulls_operation;
   61         -
   62         -
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   63         -
    if data.is_empty() {
   64         -
        b"{}"
   65         -
    } else {
   66         -
        data
   67         -
    }
   68         -
}
   69         -
   70         -
pub(crate) mod shape_complex_error;
   71         -
   72         -
pub(crate) mod shape_content_type_parameters_input;
   73         -
   74         -
pub(crate) mod shape_endpoint_with_host_label_operation_input;
   75         -
   76         -
pub(crate) mod shape_error_with_members;
   77         -
   78         -
pub(crate) mod shape_error_without_members;
   79         -
   80         -
pub(crate) mod shape_foo_error;
   81         -
   82         -
pub(crate) mod shape_invalid_greeting;
   83         -
   84         -
pub(crate) mod shape_json_enums_input;
   85         -
   86         -
pub(crate) mod shape_json_int_enums_input;
   87         -
   88         -
pub(crate) mod shape_json_unions_input;
   89         -
   90         -
pub(crate) mod shape_kitchen_sink_operation_input;
   91         -
   92         -
pub(crate) mod shape_null_operation_input;
   93         -
   94         -
pub(crate) mod shape_operation_with_optional_input_output_input;
   95         -
   96         -
pub(crate) mod shape_put_and_get_inline_documents_input;
   97         -
   98         -
pub(crate) mod shape_put_with_content_encoding_input;
   99         -
  100         -
pub(crate) mod shape_simple_scalar_properties_input;
  101         -
  102         -
pub(crate) mod shape_sparse_nulls_operation_input;
  103         -
  104         -
pub(crate) mod shape_complex_nested_error_data;
  105         -
  106         -
pub(crate) mod shape_empty_struct;
  107         -
  108         -
pub(crate) mod shape_foo_enum_list;
  109         -
  110         -
pub(crate) mod shape_foo_enum_map;
  111         -
  112         -
pub(crate) mod shape_foo_enum_set;
  113         -
  114         -
pub(crate) mod shape_integer_enum_list;
  115         -
  116         -
pub(crate) mod shape_integer_enum_map;
  117         -
  118         -
pub(crate) mod shape_integer_enum_set;
  119         -
  120         -
pub(crate) mod shape_kitchen_sink;
  121         -
  122         -
pub(crate) mod shape_list_of_kitchen_sinks;
  123         -
  124         -
pub(crate) mod shape_list_of_list_of_strings;
  125         -
  126         -
pub(crate) mod shape_list_of_maps_of_strings;
  127         -
  128         -
pub(crate) mod shape_list_of_strings;
  129         -
  130         -
pub(crate) mod shape_list_of_structs;
  131         -
  132         -
pub(crate) mod shape_map_of_kitchen_sinks;
  133         -
  134         -
pub(crate) mod shape_map_of_lists_of_strings;
  135         -
  136         -
pub(crate) mod shape_map_of_map_of_strings;
  137         -
  138         -
pub(crate) mod shape_map_of_strings;
  139         -
  140         -
pub(crate) mod shape_map_of_structs;
  141         -
  142         -
pub(crate) mod shape_my_union;
  143         -
  144         -
pub(crate) mod shape_simple_struct;
  145         -
  146         -
pub(crate) mod shape_sparse_string_list;
  147         -
  148         -
pub(crate) mod shape_sparse_string_map;
  149         -
  150         -
pub(crate) mod shape_struct_with_json_name;
  151         -
  152         -
pub(crate) mod shape_greeting_struct;
  153         -
  154         -
pub(crate) mod shape_string_list;
  155         -
  156         -
pub(crate) mod shape_string_map;

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_complex_error.rs

@@ -1,0 +47,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_complex_error_json_err(
    3         -
    _value: &[u8],
    4         -
    mut builder: crate::types::error::builders::ComplexErrorBuilder,
    5         -
) -> ::std::result::Result<crate::types::error::builders::ComplexErrorBuilder, ::aws_smithy_json::deserialize::error::DeserializeError> {
    6         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
    7         -
    let tokens = &mut tokens_owned;
    8         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
    9         -
    loop {
   10         -
        match tokens.next().transpose()? {
   11         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   12         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   13         -
                "TopLevel" => {
   14         -
                    builder = builder.set_top_level(
   15         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   16         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   17         -
                            .transpose()?,
   18         -
                    );
   19         -
                }
   20         -
                "Nested" => {
   21         -
                    builder = builder.set_nested(crate::protocol_serde::shape_complex_nested_error_data::de_complex_nested_error_data(
   22         -
                        tokens, _value,
   23         -
                    )?);
   24         -
                }
   25         -
                "Message" => {
   26         -
                    builder = builder.set_message(
   27         -
                        ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   28         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   29         -
                            .transpose()?,
   30         -
                    );
   31         -
                }
   32         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   33         -
            },
   34         -
            other => {
   35         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   36         -
                    "expected object key or end object, found: {other:?}"
   37         -
                )))
   38         -
            }
   39         -
        }
   40         -
    }
   41         -
    if tokens.next().is_some() {
   42         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43         -
            "found more JSON tokens after completing parsing",
   44         -
        ));
   45         -
    }
   46         -
    Ok(builder)
   47         -
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_complex_nested_error_data.rs

@@ -1,0 +40,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_complex_nested_error_data<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::ComplexNestedErrorData>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::ComplexNestedErrorDataBuilder::default();
   14         -
            loop {
   15         -
                match tokens.next().transpose()? {
   16         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   17         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   18         -
                        "Foo" => {
   19         -
                            builder = builder.set_foo(
   20         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   21         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   22         -
                                    .transpose()?,
   23         -
                            );
   24         -
                        }
   25         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   26         -
                    },
   27         -
                    other => {
   28         -
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   29         -
                            "expected object key or end object, found: {other:?}"
   30         -
                        )))
   31         -
                    }
   32         -
                }
   33         -
            }
   34         -
            Ok(Some(builder.build()))
   35         -
        }
   36         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37         -
            "expected start object or null",
   38         -
        )),
   39         -
    }
   40         -
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_content_type_parameters.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_content_type_parameters_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::content_type_parameters::ContentTypeParametersOutput,
    9         -
    crate::operation::content_type_parameters::ContentTypeParametersError,
   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::content_type_parameters::ContentTypeParametersError::unhandled)?;
   14         -
    let generic = generic_builder.build();
   15         -
    Err(crate::operation::content_type_parameters::ContentTypeParametersError::generic(generic))
   16         -
}
   17         -
   18         -
#[allow(clippy::unnecessary_wraps)]
   19         -
pub fn de_content_type_parameters_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::content_type_parameters::ContentTypeParametersOutput,
   25         -
    crate::operation::content_type_parameters::ContentTypeParametersError,
   26         -
> {
   27         -
    Ok({
   28         -
        #[allow(unused_mut)]
   29         -
        let mut output = crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default();
   30         -
        output.build()
   31         -
    })
   32         -
}
   33         -
   34         -
pub fn ser_content_type_parameters_input(
   35         -
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
   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_content_type_parameters_input::ser_content_type_parameters_input_input(&mut object, input)?;
   40         -
    object.finish();
   41         -
    Ok(::aws_smithy_types::body::SdkBody::from(out))
   42         -
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_content_type_parameters_input.rs

@@ -1,0 +13,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub fn ser_content_type_parameters_input_input(
    3         -
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4         -
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
    5         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
    6         -
    if let Some(var_1) = &input.value {
    7         -
        object.key("value").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/json_rpc11/rust-client-codegen/src/protocol_serde/shape_datetime_offsets.rs

@@ -1,0 +71,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[allow(clippy::unnecessary_wraps)]
    3         -
pub fn de_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
    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::datetime_offsets::DatetimeOffsetsError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::datetime_offsets::DatetimeOffsetsError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_datetime_offsets_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::datetime_offsets::DatetimeOffsetsOutput, crate::operation::datetime_offsets::DatetimeOffsetsError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder::default();
   24         -
        output = crate::protocol_serde::shape_datetime_offsets::de_datetime_offsets(_response_body, output)
   25         -
            .map_err(crate::operation::datetime_offsets::DatetimeOffsetsError::unhandled)?;
   26         -
        output.build()
   27         -
    })
   28         -
}
   29         -
   30         -
pub fn ser_datetime_offsets_input(
   31         -
    _input: &crate::operation::datetime_offsets::DatetimeOffsetsInput,
   32         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   33         -
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
   34         -
}
   35         -
   36         -
pub(crate) fn de_datetime_offsets(
   37         -
    _value: &[u8],
   38         -
    mut builder: crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder,
   39         -
) -> ::std::result::Result<
   40         -
    crate::operation::datetime_offsets::builders::DatetimeOffsetsOutputBuilder,
   41         -
    ::aws_smithy_json::deserialize::error::DeserializeError,
   42         -
> {
   43         -
    let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(_value)).peekable();
   44         -
    let tokens = &mut tokens_owned;
   45         -
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
   46         -
    loop {
   47         -
        match tokens.next().transpose()? {
   48         -
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   49         -
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
   50         -
                "datetime" => {
   51         -
                    builder = builder.set_datetime(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   52         -
                        tokens.next(),
   53         -
                        ::aws_smithy_types::date_time::Format::DateTimeWithOffset,
   54         -
                    )?);
   55         -
                }
   56         -
                _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   57         -
            },
   58         -
            other => {
   59         -
                return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   60         -
                    "expected object key or end object, found: {other:?}"
   61         -
                )))
   62         -
            }
   63         -
        }
   64         -
    }
   65         -
    if tokens.next().is_some() {
   66         -
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   67         -
            "found more JSON tokens after completing parsing",
   68         -
        ));
   69         -
    }
   70         -
    Ok(builder)
   71         -
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_empty_operation.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_empty_operation_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::empty_operation::EmptyOperationOutput, crate::operation::empty_operation::EmptyOperationError> {
    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::empty_operation::EmptyOperationError::unhandled)?;
   11         -
    let generic = generic_builder.build();
   12         -
    Err(crate::operation::empty_operation::EmptyOperationError::generic(generic))
   13         -
}
   14         -
   15         -
#[allow(clippy::unnecessary_wraps)]
   16         -
pub fn de_empty_operation_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::empty_operation::EmptyOperationOutput, crate::operation::empty_operation::EmptyOperationError> {
   21         -
    Ok({
   22         -
        #[allow(unused_mut)]
   23         -
        let mut output = crate::operation::empty_operation::builders::EmptyOperationOutputBuilder::default();
   24         -
        output.build()
   25         -
    })
   26         -
}
   27         -
   28         -
pub fn ser_empty_operation_input(
   29         -
    _input: &crate::operation::empty_operation::EmptyOperationInput,
   30         -
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
   31         -
    Ok(::aws_smithy_types::body::SdkBody::from("{}"))
   32         -
}

tmp-codegen-diff/codegen-client-test/json_rpc11/rust-client-codegen/src/protocol_serde/shape_empty_struct.rs

@@ -1,0 +28,0 @@
    1         -
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub(crate) fn de_empty_struct<'a, I>(
    3         -
    tokens: &mut ::std::iter::Peekable<I>,
    4         -
    _value: &'a [u8],
    5         -
) -> ::std::result::Result<Option<crate::types::EmptyStruct>, ::aws_smithy_json::deserialize::error::DeserializeError>
    6         -
where
    7         -
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    8         -
{
    9         -
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
   12         -
            #[allow(unused_mut)]
   13         -
            let mut builder = crate::types::builders::EmptyStructBuilder::default();
   14         -
            ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
   15         -
            Ok(Some(builder.build()))
   16         -
        }
   17         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   18         -
            "expected start object or null",
   19         -
        )),
   20         -
    }
   21         -
}
   22         -
   23         -
pub fn ser_empty_struct(
   24         -
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   25         -
    #[allow(unused_variables)] input: &crate::types::EmptyStruct,
   26         -
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
   27         -
    Ok(())
   28         -
}