Client Test

Client Test

rev. ec7b2441254af868911fccffe8d8dca83aff0045

Files changed:

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `SingleMemberStructOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct SingleMemberStructOperation;
    6      6   
impl SingleMemberStructOperation {
    7      7   
    /// Creates a new `SingleMemberStructOperation`
    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 =
          13  +
        crate::operation::single_member_struct_operation::SingleMemberStructOperationInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::single_member_struct_operation::SingleMemberStructOperationInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -110,116 +172,179 @@
  130    136   
                crate::operation::single_member_struct_operation::SingleMemberStructOperationError,
  131    137   
            >::new());
  132    138   
  133    139   
        ::std::borrow::Cow::Owned(rcb)
  134    140   
    }
  135    141   
}
  136    142   
  137    143   
#[derive(Debug)]
  138    144   
struct SingleMemberStructOperationResponseDeserializer;
  139    145   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for SingleMemberStructOperationResponseDeserializer {
  140         -
    fn deserialize_nonstreaming(
         146  +
    fn deserialize_nonstreaming_with_config(
  141    147   
        &self,
  142    148   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         149  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  143    150   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  144    151   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  145    152   
        let headers = response.headers();
  146    153   
        let body = response.body().bytes().expect("body loaded");
  147    154   
        #[allow(unused_mut)]
  148    155   
        let mut force_error = false;
  149    156   
  150    157   
        let parse_result = if !success && status != 200 || force_error {
  151    158   
            crate::protocol_serde::shape_single_member_struct_operation::de_single_member_struct_operation_http_error(status, headers, body)
  152    159   
        } else {

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation/_single_member_struct_operation_input.rs

@@ -23,23 +108,119 @@
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.message {
   46     46   
            ser.write_string(&SINGLEMEMBERSTRUCTOPERATIONINPUT_MEMBER_MESSAGE, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl SingleMemberStructOperationInput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&SINGLEMEMBERSTRUCTOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&SINGLEMEMBERSTRUCTOPERATIONINPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.message = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        builder
   75     75   
            .build()
   76     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   77     77   
    }
   78     78   
}
          79  +
impl SingleMemberStructOperationInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   79     90   
impl SingleMemberStructOperationInput {
   80     91   
    /// Creates a new builder-style object to manufacture [`SingleMemberStructOperationInput`](crate::operation::single_member_struct_operation::SingleMemberStructOperationInput).
   81     92   
    pub fn builder() -> crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationInputBuilder {
   82     93   
        crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationInputBuilder::default()
   83     94   
    }
   84     95   
}
   85     96   
   86     97   
/// A builder for [`SingleMemberStructOperationInput`](crate::operation::single_member_struct_operation::SingleMemberStructOperationInput).
   87     98   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   88     99   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/single_member_struct_operation/_single_member_struct_operation_output.rs

@@ -23,23 +106,117 @@
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45     45   
        if let Some(ref val) = self.message {
   46     46   
            ser.write_string(&SINGLEMEMBERSTRUCTOPERATIONOUTPUT_MEMBER_MESSAGE, val)?;
   47     47   
        }
   48     48   
        Ok(())
   49     49   
    }
   50     50   
}
   51     51   
impl SingleMemberStructOperationOutput {
   52     52   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   53         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   54         -
        deserializer: &mut D,
          53  +
    pub fn deserialize(
          54  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   55     55   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   56     56   
        #[allow(unused_variables, unused_mut)]
   57     57   
        let mut builder = Self::builder();
   58     58   
        #[allow(
   59     59   
            unused_variables,
   60     60   
            unreachable_code,
   61     61   
            clippy::single_match,
   62     62   
            clippy::match_single_binding,
   63     63   
            clippy::diverging_sub_expression
   64     64   
        )]
   65         -
        deserializer.read_struct(&SINGLEMEMBERSTRUCTOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          65  +
        deserializer.read_struct(&SINGLEMEMBERSTRUCTOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
   66     66   
            match member.member_index() {
   67     67   
                Some(0) => {
   68     68   
                    builder.message = Some(deser.read_string(member)?);
   69     69   
                }
   70     70   
                _ => {}
   71     71   
            }
   72     72   
            Ok(())
   73     73   
        })?;
   74     74   
        Ok(builder.build())
   75     75   
    }
   76     76   
}
          77  +
impl SingleMemberStructOperationOutput {
          78  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          79  +
    pub fn deserialize_with_response(
          80  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          81  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          82  +
        _status: u16,
          83  +
        _body: &[u8],
          84  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          85  +
        Self::deserialize(deserializer)
          86  +
    }
          87  +
}
   77     88   
impl SingleMemberStructOperationOutput {
   78     89   
    /// Creates a new builder-style object to manufacture [`SingleMemberStructOperationOutput`](crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput).
   79     90   
    pub fn builder() -> crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder {
   80     91   
        crate::operation::single_member_struct_operation::builders::SingleMemberStructOperationOutputBuilder::default()
   81     92   
    }
   82     93   
}
   83     94   
   84     95   
/// A builder for [`SingleMemberStructOperationOutput`](crate::operation::single_member_struct_operation::SingleMemberStructOperationOutput).
   85     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
   86     97   
#[non_exhaustive]

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_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 `StreamingOperation`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StreamingOperation;
    6      6   
impl StreamingOperation {
    7      7   
    /// Creates a new `StreamingOperation`
    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::streaming_operation::StreamingOperationInput::SCHEMA;
          13  +
    /// The schema for this operation's output shape.
          14  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema = crate::operation::streaming_operation::StreamingOperationOutput::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::streaming_operation::StreamingOperationInput,
   14     18   
    ) -> ::std::result::Result<
   15     19   
        crate::operation::streaming_operation::StreamingOperationOutput,
   16     20   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     21   
            crate::operation::streaming_operation::StreamingOperationError,
   18     22   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     23   
        >,
   20     24   
    > {
@@ -125,129 +187,192 @@
  145    149   
  146    150   
        // If this is an error, defer to the non-streaming parser
  147    151   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  148    152   
            return ::std::option::Option::None;
  149    153   
        }
  150    154   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  151    155   
            crate::protocol_serde::shape_streaming_operation::de_streaming_operation_http_response(response),
  152    156   
        ))
  153    157   
    }
  154    158   
  155         -
    fn deserialize_nonstreaming(
         159  +
    fn deserialize_nonstreaming_with_config(
  156    160   
        &self,
  157    161   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         162  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  158    163   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  159    164   
        // For streaming operations, we only hit this case if its an error
  160    165   
        let body = response.body().bytes().expect("body loaded");
  161    166   
        crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_streaming_operation::de_streaming_operation_http_error(
  162    167   
            response.status().as_u16(),
  163    168   
            response.headers(),
  164    169   
            body,
  165    170   
        ))
  166    171   
    }
  167    172   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation/_streaming_operation_input.rs

@@ -15,15 +112,119 @@
   35     35   
impl StreamingOperationInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45         -
        {
   46         -
            let val = &self.events;
   47         -
            ser.write_null(&STREAMINGOPERATIONINPUT_MEMBER_EVENTS)?;
   48         -
        }
   49     45   
        Ok(())
   50     46   
    }
   51     47   
}
   52     48   
impl StreamingOperationInput {
   53     49   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          50  +
    pub fn deserialize(
          51  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     52   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     53   
        #[allow(unused_variables, unused_mut)]
   58     54   
        let mut builder = Self::builder();
   59     55   
        #[allow(
   60     56   
            unused_variables,
   61     57   
            unreachable_code,
   62     58   
            clippy::single_match,
   63     59   
            clippy::match_single_binding,
   64     60   
            clippy::diverging_sub_expression
   65     61   
        )]
   66         -
        deserializer.read_struct(&STREAMINGOPERATIONINPUT_SCHEMA, (), |_, member, deser| {
          62  +
        deserializer.read_struct(&STREAMINGOPERATIONINPUT_SCHEMA, &mut |member, deser| {
   67     63   
            match member.member_index() {
   68     64   
                Some(0) => {
   69     65   
                    builder.events = Some({
   70     66   
                        let _ = member;
   71         -
                        todo!("deserialize aggregate")
          67  +
                        todo!("deserialize streaming union")
   72     68   
                    });
   73     69   
                }
   74     70   
                _ => {}
   75     71   
            }
   76     72   
            Ok(())
   77     73   
        })?;
   78     74   
        builder
   79     75   
            .build()
   80     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   81     77   
    }
   82     78   
}
          79  +
impl StreamingOperationInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   83     90   
impl StreamingOperationInput {
   84     91   
    /// Creates a new builder-style object to manufacture [`StreamingOperationInput`](crate::operation::streaming_operation::StreamingOperationInput).
   85     92   
    pub fn builder() -> crate::operation::streaming_operation::builders::StreamingOperationInputBuilder {
   86     93   
        crate::operation::streaming_operation::builders::StreamingOperationInputBuilder::default()
   87     94   
    }
   88     95   
    #[allow(unused)]
   89     96   
    pub(crate) fn into_builder(self) -> crate::operation::streaming_operation::builders::StreamingOperationInputBuilder {
   90     97   
        Self::builder().events(self.events)
   91     98   
    }
   92     99   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation/_streaming_operation_output.rs

@@ -15,15 +112,119 @@
   35     35   
impl StreamingOperationOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationOutput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45         -
        {
   46         -
            let val = &self.events;
   47         -
            ser.write_null(&STREAMINGOPERATIONOUTPUT_MEMBER_EVENTS)?;
   48         -
        }
   49     45   
        Ok(())
   50     46   
    }
   51     47   
}
   52     48   
impl StreamingOperationOutput {
   53     49   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          50  +
    pub fn deserialize(
          51  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     52   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     53   
        #[allow(unused_variables, unused_mut)]
   58     54   
        let mut builder = Self::builder();
   59     55   
        #[allow(
   60     56   
            unused_variables,
   61     57   
            unreachable_code,
   62     58   
            clippy::single_match,
   63     59   
            clippy::match_single_binding,
   64     60   
            clippy::diverging_sub_expression
   65     61   
        )]
   66         -
        deserializer.read_struct(&STREAMINGOPERATIONOUTPUT_SCHEMA, (), |_, member, deser| {
          62  +
        deserializer.read_struct(&STREAMINGOPERATIONOUTPUT_SCHEMA, &mut |member, deser| {
   67     63   
            match member.member_index() {
   68     64   
                Some(0) => {
   69     65   
                    builder.events = Some({
   70     66   
                        let _ = member;
   71         -
                        todo!("deserialize aggregate")
          67  +
                        todo!("deserialize streaming union")
   72     68   
                    });
   73     69   
                }
   74     70   
                _ => {}
   75     71   
            }
   76     72   
            Ok(())
   77     73   
        })?;
   78     74   
        builder
   79     75   
            .build()
   80     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   81     77   
    }
   82     78   
}
          79  +
impl StreamingOperationOutput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   83     90   
impl StreamingOperationOutput {
   84     91   
    /// Creates a new builder-style object to manufacture [`StreamingOperationOutput`](crate::operation::streaming_operation::StreamingOperationOutput).
   85     92   
    pub fn builder() -> crate::operation::streaming_operation::builders::StreamingOperationOutputBuilder {
   86     93   
        crate::operation::streaming_operation::builders::StreamingOperationOutputBuilder::default()
   87     94   
    }
   88     95   
    #[allow(unused)]
   89     96   
    pub(crate) fn into_builder(self) -> crate::operation::streaming_operation::builders::StreamingOperationOutputBuilder {
   90     97   
        Self::builder().events(self.events)
   91     98   
    }
   92     99   
}

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_data.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `StreamingOperationWithInitialData`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StreamingOperationWithInitialData;
    6      6   
impl StreamingOperationWithInitialData {
    7      7   
    /// Creates a new `StreamingOperationWithInitialData`
    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 =
          13  +
        crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -125,131 +187,194 @@
  145    151   
  146    152   
        // If this is an error, defer to the non-streaming parser
  147    153   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  148    154   
            return ::std::option::Option::None;
  149    155   
        }
  150    156   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  151    157   
            crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data_http_response(response),
  152    158   
        ))
  153    159   
    }
  154    160   
  155         -
    fn deserialize_nonstreaming(
         161  +
    fn deserialize_nonstreaming_with_config(
  156    162   
        &self,
  157    163   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         164  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  158    165   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  159    166   
        // For streaming operations, we only hit this case if its an error
  160    167   
        let body = response.body().bytes().expect("body loaded");
  161    168   
        crate::protocol_serde::type_erase_result(
  162    169   
            crate::protocol_serde::shape_streaming_operation_with_initial_data::de_streaming_operation_with_initial_data_http_error(
  163    170   
                response.status().as_u16(),
  164    171   
                response.headers(),
  165    172   
                body,
  166    173   
            ),
  167    174   
        )

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_data/_streaming_operation_with_initial_data_input.rs

@@ -3,3 +137,145 @@
   23     23   
    "smithy.protocoltests.rpcv2Cbor.synthetic",
   24     24   
    "StreamingOperationWithInitialDataInput",
   25     25   
);
   26     26   
static STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_INITIAL_DATA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithInitialDataInput$initialData",
   29     29   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   30     30   
        "StreamingOperationWithInitialDataInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "initial_data",
          33  +
    "initialData",
   34     34   
    0,
   35     35   
);
   36     36   
static STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_EVENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithInitialDataInput$events",
   39     39   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   40     40   
        "StreamingOperationWithInitialDataInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Union,
   43     43   
    "events",
   44     44   
    1,
   45     45   
);
   46     46   
static STREAMINGOPERATIONWITHINITIALDATAINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    STREAMINGOPERATIONWITHINITIALDATAINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_INITIAL_DATA,
   51     51   
        &STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_EVENTS,
   52     52   
    ],
   53     53   
);
   54     54   
impl StreamingOperationWithInitialDataInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHINITIALDATAINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithInitialDataInput {
   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.initial_data {
   65     65   
            ser.write_string(&STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_INITIAL_DATA, val)?;
   66     66   
        }
   67         -
        {
   68         -
            let val = &self.events;
   69         -
            ser.write_null(&STREAMINGOPERATIONWITHINITIALDATAINPUT_MEMBER_EVENTS)?;
   70         -
        }
   71     67   
        Ok(())
   72     68   
    }
   73     69   
}
   74     70   
impl StreamingOperationWithInitialDataInput {
   75     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   78     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79     75   
        #[allow(unused_variables, unused_mut)]
   80     76   
        let mut builder = Self::builder();
   81     77   
        #[allow(
   82     78   
            unused_variables,
   83     79   
            unreachable_code,
   84     80   
            clippy::single_match,
   85     81   
            clippy::match_single_binding,
   86     82   
            clippy::diverging_sub_expression
   87     83   
        )]
   88         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALDATAINPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALDATAINPUT_SCHEMA, &mut |member, deser| {
   89     85   
            match member.member_index() {
   90     86   
                Some(0) => {
   91     87   
                    builder.initial_data = Some(deser.read_string(member)?);
   92     88   
                }
   93     89   
                Some(1) => {
   94     90   
                    builder.events = Some({
   95     91   
                        let _ = member;
   96         -
                        todo!("deserialize aggregate")
          92  +
                        todo!("deserialize streaming union")
   97     93   
                    });
   98     94   
                }
   99     95   
                _ => {}
  100     96   
            }
  101     97   
            Ok(())
  102     98   
        })?;
          99  +
        builder.initial_data = builder.initial_data.or(Some(String::new()));
  103    100   
        builder
  104    101   
            .build()
  105    102   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  106    103   
    }
  107    104   
}
         105  +
impl StreamingOperationWithInitialDataInput {
         106  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         107  +
    pub fn deserialize_with_response(
         108  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         109  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         110  +
        _status: u16,
         111  +
        _body: &[u8],
         112  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         113  +
        Self::deserialize(deserializer)
         114  +
    }
         115  +
}
  108    116   
impl StreamingOperationWithInitialDataInput {
  109    117   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialDataInput`](crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataInput).
  110    118   
    pub fn builder() -> crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataInputBuilder {
  111    119   
        crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataInputBuilder::default()
  112    120   
    }
  113    121   
    #[allow(unused)]
  114    122   
    pub(crate) fn into_builder(
  115    123   
        self,
  116    124   
    ) -> crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataInputBuilder {
  117    125   
        Self::builder().set_initial_data(self.initial_data).events(self.events)

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_data/_streaming_operation_with_initial_data_output.rs

@@ -15,15 +112,119 @@
   35     35   
impl StreamingOperationWithInitialDataOutput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHINITIALDATAOUTPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithInitialDataOutput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45         -
        {
   46         -
            let val = &self.events;
   47         -
            ser.write_null(&STREAMINGOPERATIONWITHINITIALDATAOUTPUT_MEMBER_EVENTS)?;
   48         -
        }
   49     45   
        Ok(())
   50     46   
    }
   51     47   
}
   52     48   
impl StreamingOperationWithInitialDataOutput {
   53     49   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          50  +
    pub fn deserialize(
          51  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     52   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     53   
        #[allow(unused_variables, unused_mut)]
   58     54   
        let mut builder = Self::builder();
   59     55   
        #[allow(
   60     56   
            unused_variables,
   61     57   
            unreachable_code,
   62     58   
            clippy::single_match,
   63     59   
            clippy::match_single_binding,
   64     60   
            clippy::diverging_sub_expression
   65     61   
        )]
   66         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALDATAOUTPUT_SCHEMA, (), |_, member, deser| {
          62  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALDATAOUTPUT_SCHEMA, &mut |member, deser| {
   67     63   
            match member.member_index() {
   68     64   
                Some(0) => {
   69     65   
                    builder.events = Some({
   70     66   
                        let _ = member;
   71         -
                        todo!("deserialize aggregate")
          67  +
                        todo!("deserialize streaming union")
   72     68   
                    });
   73     69   
                }
   74     70   
                _ => {}
   75     71   
            }
   76     72   
            Ok(())
   77     73   
        })?;
   78     74   
        builder
   79     75   
            .build()
   80     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   81     77   
    }
   82     78   
}
          79  +
impl StreamingOperationWithInitialDataOutput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   83     90   
impl StreamingOperationWithInitialDataOutput {
   84     91   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialDataOutput`](crate::operation::streaming_operation_with_initial_data::StreamingOperationWithInitialDataOutput).
   85     92   
    pub fn builder() -> crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataOutputBuilder {
   86     93   
        crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataOutputBuilder::default()
   87     94   
    }
   88     95   
    #[allow(unused)]
   89     96   
    pub(crate) fn into_builder(
   90     97   
        self,
   91     98   
    ) -> crate::operation::streaming_operation_with_initial_data::builders::StreamingOperationWithInitialDataOutputBuilder {
   92     99   
        Self::builder().events(self.events)

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_response.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `StreamingOperationWithInitialResponse`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StreamingOperationWithInitialResponse;
    6      6   
impl StreamingOperationWithInitialResponse {
    7      7   
    /// Creates a new `StreamingOperationWithInitialResponse`
    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 =
          13  +
        crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -127,133 +189,196 @@
  147    153   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  148    154   
            return ::std::option::Option::None;
  149    155   
        }
  150    156   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  151    157   
            crate::protocol_serde::shape_streaming_operation_with_initial_response::de_streaming_operation_with_initial_response_http_response(
  152    158   
                response,
  153    159   
            ),
  154    160   
        ))
  155    161   
    }
  156    162   
  157         -
    fn deserialize_nonstreaming(
         163  +
    fn deserialize_nonstreaming_with_config(
  158    164   
        &self,
  159    165   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         166  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  160    167   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  161    168   
        // For streaming operations, we only hit this case if its an error
  162    169   
        let body = response.body().bytes().expect("body loaded");
  163    170   
        crate::protocol_serde::type_erase_result(
  164    171   
            crate::protocol_serde::shape_streaming_operation_with_initial_response::de_streaming_operation_with_initial_response_http_error(
  165    172   
                response.status().as_u16(),
  166    173   
                response.headers(),
  167    174   
                body,
  168    175   
            ),
  169    176   
        )

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_response/_streaming_operation_with_initial_response_input.rs

@@ -15,15 +112,119 @@
   35     35   
impl StreamingOperationWithInitialResponseInput {
   36     36   
    /// The schema for this shape.
   37     37   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHINITIALRESPONSEINPUT_SCHEMA;
   38     38   
}
   39     39   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithInitialResponseInput {
   40     40   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   41     41   
    fn serialize_members(
   42     42   
        &self,
   43     43   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   44     44   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   45         -
        {
   46         -
            let val = &self.events;
   47         -
            ser.write_null(&STREAMINGOPERATIONWITHINITIALRESPONSEINPUT_MEMBER_EVENTS)?;
   48         -
        }
   49     45   
        Ok(())
   50     46   
    }
   51     47   
}
   52     48   
impl StreamingOperationWithInitialResponseInput {
   53     49   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   54         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   55         -
        deserializer: &mut D,
          50  +
    pub fn deserialize(
          51  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   56     52   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   57     53   
        #[allow(unused_variables, unused_mut)]
   58     54   
        let mut builder = Self::builder();
   59     55   
        #[allow(
   60     56   
            unused_variables,
   61     57   
            unreachable_code,
   62     58   
            clippy::single_match,
   63     59   
            clippy::match_single_binding,
   64     60   
            clippy::diverging_sub_expression
   65     61   
        )]
   66         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALRESPONSEINPUT_SCHEMA, (), |_, member, deser| {
          62  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALRESPONSEINPUT_SCHEMA, &mut |member, deser| {
   67     63   
            match member.member_index() {
   68     64   
                Some(0) => {
   69     65   
                    builder.events = Some({
   70     66   
                        let _ = member;
   71         -
                        todo!("deserialize aggregate")
          67  +
                        todo!("deserialize streaming union")
   72     68   
                    });
   73     69   
                }
   74     70   
                _ => {}
   75     71   
            }
   76     72   
            Ok(())
   77     73   
        })?;
   78     74   
        builder
   79     75   
            .build()
   80     76   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
   81     77   
    }
   82     78   
}
          79  +
impl StreamingOperationWithInitialResponseInput {
          80  +
    /// Deserializes this structure from a body deserializer and HTTP response.
          81  +
    pub fn deserialize_with_response(
          82  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
          83  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
          84  +
        _status: u16,
          85  +
        _body: &[u8],
          86  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
          87  +
        Self::deserialize(deserializer)
          88  +
    }
          89  +
}
   83     90   
impl StreamingOperationWithInitialResponseInput {
   84     91   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialResponseInput`](crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseInput).
   85     92   
    pub fn builder() -> crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseInputBuilder {
   86     93   
        crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseInputBuilder::default()
   87     94   
    }
   88     95   
    #[allow(unused)]
   89     96   
    pub(crate) fn into_builder(
   90     97   
        self,
   91     98   
    ) -> crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseInputBuilder {
   92     99   
        Self::builder().events(self.events)

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_initial_response/_streaming_operation_with_initial_response_output.rs

@@ -4,4 +139,147 @@
   24     24   
    "smithy.protocoltests.rpcv2Cbor.synthetic",
   25     25   
    "StreamingOperationWithInitialResponseOutput",
   26     26   
);
   27     27   
static STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_RESPONSE_DATA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   28     28   
    ::aws_smithy_schema::ShapeId::from_static(
   29     29   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithInitialResponseOutput$responseData",
   30     30   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   31     31   
        "StreamingOperationWithInitialResponseOutput",
   32     32   
    ),
   33     33   
    ::aws_smithy_schema::ShapeType::String,
   34         -
    "response_data",
          34  +
    "responseData",
   35     35   
    0,
   36     36   
);
   37     37   
static STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_EVENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   38     38   
    ::aws_smithy_schema::ShapeId::from_static(
   39     39   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithInitialResponseOutput$events",
   40     40   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   41     41   
        "StreamingOperationWithInitialResponseOutput",
   42     42   
    ),
   43     43   
    ::aws_smithy_schema::ShapeType::Union,
   44     44   
    "events",
   45     45   
    1,
   46     46   
);
   47     47   
static STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   48     48   
    STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_SCHEMA_ID,
   49     49   
    ::aws_smithy_schema::ShapeType::Structure,
   50     50   
    &[
   51     51   
        &STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_RESPONSE_DATA,
   52     52   
        &STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_EVENTS,
   53     53   
    ],
   54     54   
);
   55     55   
impl StreamingOperationWithInitialResponseOutput {
   56     56   
    /// The schema for this shape.
   57     57   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_SCHEMA;
   58     58   
}
   59     59   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithInitialResponseOutput {
   60     60   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
   61     61   
    fn serialize_members(
   62     62   
        &self,
   63     63   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
   64     64   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
   65     65   
        {
   66     66   
            let val = &self.response_data;
   67     67   
            ser.write_string(&STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_RESPONSE_DATA, val)?;
   68     68   
        }
   69         -
        {
   70         -
            let val = &self.events;
   71         -
            ser.write_null(&STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_MEMBER_EVENTS)?;
   72         -
        }
   73     69   
        Ok(())
   74     70   
    }
   75     71   
}
   76     72   
impl StreamingOperationWithInitialResponseOutput {
   77     73   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   78         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   79         -
        deserializer: &mut D,
          74  +
    pub fn deserialize(
          75  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   80     76   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   81     77   
        #[allow(unused_variables, unused_mut)]
   82     78   
        let mut builder = Self::builder();
   83     79   
        #[allow(
   84     80   
            unused_variables,
   85     81   
            unreachable_code,
   86     82   
            clippy::single_match,
   87     83   
            clippy::match_single_binding,
   88     84   
            clippy::diverging_sub_expression
   89     85   
        )]
   90         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_SCHEMA, (), |_, member, deser| {
          86  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHINITIALRESPONSEOUTPUT_SCHEMA, &mut |member, deser| {
   91     87   
            match member.member_index() {
   92     88   
                Some(0) => {
   93     89   
                    builder.response_data = Some(deser.read_string(member)?);
   94     90   
                }
   95     91   
                Some(1) => {
   96     92   
                    builder.events = Some({
   97     93   
                        let _ = member;
   98         -
                        todo!("deserialize aggregate")
          94  +
                        todo!("deserialize streaming union")
   99     95   
                    });
  100     96   
                }
  101     97   
                _ => {}
  102     98   
            }
  103     99   
            Ok(())
  104    100   
        })?;
         101  +
        builder.response_data = builder.response_data.or(Some(String::new()));
  105    102   
        builder
  106    103   
            .build()
  107    104   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  108    105   
    }
  109    106   
}
         107  +
impl StreamingOperationWithInitialResponseOutput {
         108  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         109  +
    pub fn deserialize_with_response(
         110  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         111  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         112  +
        _status: u16,
         113  +
        _body: &[u8],
         114  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         115  +
        Self::deserialize(deserializer)
         116  +
    }
         117  +
}
  110    118   
impl StreamingOperationWithInitialResponseOutput {
  111    119   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithInitialResponseOutput`](crate::operation::streaming_operation_with_initial_response::StreamingOperationWithInitialResponseOutput).
  112    120   
    pub fn builder() -> crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseOutputBuilder {
  113    121   
        crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseOutputBuilder::default()
  114    122   
    }
  115    123   
    #[allow(unused)]
  116    124   
    pub(crate) fn into_builder(
  117    125   
        self,
  118    126   
    ) -> crate::operation::streaming_operation_with_initial_response::builders::StreamingOperationWithInitialResponseOutputBuilder {
  119    127   
        Self::builder().response_data(self.response_data).events(self.events)

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_optional_data.rs

@@ -1,1 +40,46 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// Orchestration and serialization glue logic for `StreamingOperationWithOptionalData`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5      5   
pub struct StreamingOperationWithOptionalData;
    6      6   
impl StreamingOperationWithOptionalData {
    7      7   
    /// Creates a new `StreamingOperationWithOptionalData`
    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 =
          13  +
        crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema =
          16  +
        crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataOutput::SCHEMA;
   11     17   
    pub(crate) async fn orchestrate(
   12     18   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     19   
        input: crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput,
   14     20   
    ) -> ::std::result::Result<
   15     21   
        crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataOutput,
   16     22   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     23   
            crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataError,
   18     24   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     25   
        >,
   20     26   
    > {
@@ -125,131 +187,194 @@
  145    151   
  146    152   
        // If this is an error, defer to the non-streaming parser
  147    153   
        if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
  148    154   
            return ::std::option::Option::None;
  149    155   
        }
  150    156   
        ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
  151    157   
            crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data_http_response(response),
  152    158   
        ))
  153    159   
    }
  154    160   
  155         -
    fn deserialize_nonstreaming(
         161  +
    fn deserialize_nonstreaming_with_config(
  156    162   
        &self,
  157    163   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         164  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
  158    165   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  159    166   
        // For streaming operations, we only hit this case if its an error
  160    167   
        let body = response.body().bytes().expect("body loaded");
  161    168   
        crate::protocol_serde::type_erase_result(
  162    169   
            crate::protocol_serde::shape_streaming_operation_with_optional_data::de_streaming_operation_with_optional_data_http_error(
  163    170   
                response.status().as_u16(),
  164    171   
                response.headers(),
  165    172   
                body,
  166    173   
            ),
  167    174   
        )

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_optional_data/_streaming_operation_with_optional_data_input.rs

@@ -3,3 +137,144 @@
   23     23   
    "smithy.protocoltests.rpcv2Cbor.synthetic",
   24     24   
    "StreamingOperationWithOptionalDataInput",
   25     25   
);
   26     26   
static STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_OPTIONAL_DATA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithOptionalDataInput$optionalData",
   29     29   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   30     30   
        "StreamingOperationWithOptionalDataInput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "optional_data",
          33  +
    "optionalData",
   34     34   
    0,
   35     35   
);
   36     36   
static STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_EVENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithOptionalDataInput$events",
   39     39   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   40     40   
        "StreamingOperationWithOptionalDataInput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Union,
   43     43   
    "events",
   44     44   
    1,
   45     45   
);
   46     46   
static STREAMINGOPERATIONWITHOPTIONALDATAINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    STREAMINGOPERATIONWITHOPTIONALDATAINPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_OPTIONAL_DATA,
   51     51   
        &STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_EVENTS,
   52     52   
    ],
   53     53   
);
   54     54   
impl StreamingOperationWithOptionalDataInput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHOPTIONALDATAINPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithOptionalDataInput {
   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.optional_data {
   65     65   
            ser.write_string(&STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_OPTIONAL_DATA, val)?;
   66     66   
        }
   67         -
        {
   68         -
            let val = &self.events;
   69         -
            ser.write_null(&STREAMINGOPERATIONWITHOPTIONALDATAINPUT_MEMBER_EVENTS)?;
   70         -
        }
   71     67   
        Ok(())
   72     68   
    }
   73     69   
}
   74     70   
impl StreamingOperationWithOptionalDataInput {
   75     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   78     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79     75   
        #[allow(unused_variables, unused_mut)]
   80     76   
        let mut builder = Self::builder();
   81     77   
        #[allow(
   82     78   
            unused_variables,
   83     79   
            unreachable_code,
   84     80   
            clippy::single_match,
   85     81   
            clippy::match_single_binding,
   86     82   
            clippy::diverging_sub_expression
   87     83   
        )]
   88         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHOPTIONALDATAINPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHOPTIONALDATAINPUT_SCHEMA, &mut |member, deser| {
   89     85   
            match member.member_index() {
   90     86   
                Some(0) => {
   91     87   
                    builder.optional_data = Some(deser.read_string(member)?);
   92     88   
                }
   93     89   
                Some(1) => {
   94     90   
                    builder.events = Some({
   95     91   
                        let _ = member;
   96         -
                        todo!("deserialize aggregate")
          92  +
                        todo!("deserialize streaming union")
   97     93   
                    });
   98     94   
                }
   99     95   
                _ => {}
  100     96   
            }
  101     97   
            Ok(())
  102     98   
        })?;
  103     99   
        builder
  104    100   
            .build()
  105    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  106    102   
    }
  107    103   
}
         104  +
impl StreamingOperationWithOptionalDataInput {
         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  +
}
  108    115   
impl StreamingOperationWithOptionalDataInput {
  109    116   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithOptionalDataInput`](crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataInput).
  110    117   
    pub fn builder() -> crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataInputBuilder {
  111    118   
        crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataInputBuilder::default()
  112    119   
    }
  113    120   
    #[allow(unused)]
  114    121   
    pub(crate) fn into_builder(
  115    122   
        self,
  116    123   
    ) -> crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataInputBuilder {
  117    124   
        Self::builder().set_optional_data(self.optional_data).events(self.events)

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/operation/streaming_operation_with_optional_data/_streaming_operation_with_optional_data_output.rs

@@ -3,3 +137,144 @@
   23     23   
    "smithy.protocoltests.rpcv2Cbor.synthetic",
   24     24   
    "StreamingOperationWithOptionalDataOutput",
   25     25   
);
   26     26   
static STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_OPTIONAL_RESPONSE_DATA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   27     27   
    ::aws_smithy_schema::ShapeId::from_static(
   28     28   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithOptionalDataOutput$optionalResponseData",
   29     29   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   30     30   
        "StreamingOperationWithOptionalDataOutput",
   31     31   
    ),
   32     32   
    ::aws_smithy_schema::ShapeType::String,
   33         -
    "optional_response_data",
          33  +
    "optionalResponseData",
   34     34   
    0,
   35     35   
);
   36     36   
static STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_EVENTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   37     37   
    ::aws_smithy_schema::ShapeId::from_static(
   38     38   
        "smithy.protocoltests.rpcv2Cbor.synthetic#StreamingOperationWithOptionalDataOutput$events",
   39     39   
        "smithy.protocoltests.rpcv2Cbor.synthetic",
   40     40   
        "StreamingOperationWithOptionalDataOutput",
   41     41   
    ),
   42     42   
    ::aws_smithy_schema::ShapeType::Union,
   43     43   
    "events",
   44     44   
    1,
   45     45   
);
   46     46   
static STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
   47     47   
    STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_SCHEMA_ID,
   48     48   
    ::aws_smithy_schema::ShapeType::Structure,
   49     49   
    &[
   50     50   
        &STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_OPTIONAL_RESPONSE_DATA,
   51     51   
        &STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_EVENTS,
   52     52   
    ],
   53     53   
);
   54     54   
impl StreamingOperationWithOptionalDataOutput {
   55     55   
    /// The schema for this shape.
   56     56   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_SCHEMA;
   57     57   
}
   58     58   
impl ::aws_smithy_schema::serde::SerializableStruct for StreamingOperationWithOptionalDataOutput {
   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.optional_response_data {
   65     65   
            ser.write_string(&STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_OPTIONAL_RESPONSE_DATA, val)?;
   66     66   
        }
   67         -
        {
   68         -
            let val = &self.events;
   69         -
            ser.write_null(&STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_MEMBER_EVENTS)?;
   70         -
        }
   71     67   
        Ok(())
   72     68   
    }
   73     69   
}
   74     70   
impl StreamingOperationWithOptionalDataOutput {
   75     71   
    /// Deserializes this structure from a [`ShapeDeserializer`].
   76         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
   77         -
        deserializer: &mut D,
          72  +
    pub fn deserialize(
          73  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
   78     74   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
   79     75   
        #[allow(unused_variables, unused_mut)]
   80     76   
        let mut builder = Self::builder();
   81     77   
        #[allow(
   82     78   
            unused_variables,
   83     79   
            unreachable_code,
   84     80   
            clippy::single_match,
   85     81   
            clippy::match_single_binding,
   86     82   
            clippy::diverging_sub_expression
   87     83   
        )]
   88         -
        deserializer.read_struct(&STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_SCHEMA, (), |_, member, deser| {
          84  +
        deserializer.read_struct(&STREAMINGOPERATIONWITHOPTIONALDATAOUTPUT_SCHEMA, &mut |member, deser| {
   89     85   
            match member.member_index() {
   90     86   
                Some(0) => {
   91     87   
                    builder.optional_response_data = Some(deser.read_string(member)?);
   92     88   
                }
   93     89   
                Some(1) => {
   94     90   
                    builder.events = Some({
   95     91   
                        let _ = member;
   96         -
                        todo!("deserialize aggregate")
          92  +
                        todo!("deserialize streaming union")
   97     93   
                    });
   98     94   
                }
   99     95   
                _ => {}
  100     96   
            }
  101     97   
            Ok(())
  102     98   
        })?;
  103     99   
        builder
  104    100   
            .build()
  105    101   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  106    102   
    }
  107    103   
}
         104  +
impl StreamingOperationWithOptionalDataOutput {
         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  +
}
  108    115   
impl StreamingOperationWithOptionalDataOutput {
  109    116   
    /// Creates a new builder-style object to manufacture [`StreamingOperationWithOptionalDataOutput`](crate::operation::streaming_operation_with_optional_data::StreamingOperationWithOptionalDataOutput).
  110    117   
    pub fn builder() -> crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataOutputBuilder {
  111    118   
        crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataOutputBuilder::default()
  112    119   
    }
  113    120   
    #[allow(unused)]
  114    121   
    pub(crate) fn into_builder(
  115    122   
        self,
  116    123   
    ) -> crate::operation::streaming_operation_with_optional_data::builders::StreamingOperationWithOptionalDataOutputBuilder {
  117    124   
        Self::builder()

tmp-codegen-diff/codegen-client-test/rpcv2Cbor_extras/rust-client-codegen/src/types/_complex_struct.rs

@@ -67,67 +426,425 @@
   87     87   
    "structure",
   88     88   
    0,
   89     89   
);
   90     90   
static COMPLEXSTRUCT_MEMBER_EMPTY_STRUCTURE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
   91     91   
    ::aws_smithy_schema::ShapeId::from_static(
   92     92   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$emptyStructure",
   93     93   
        "smithy.protocoltests.rpcv2Cbor",
   94     94   
        "ComplexStruct",
   95     95   
    ),
   96     96   
    ::aws_smithy_schema::ShapeType::Structure,
   97         -
    "empty_structure",
          97  +
    "emptyStructure",
   98     98   
    1,
   99     99   
);
  100    100   
static COMPLEXSTRUCT_MEMBER_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  101    101   
    ::aws_smithy_schema::ShapeId::from_static(
  102    102   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$list",
  103    103   
        "smithy.protocoltests.rpcv2Cbor",
  104    104   
        "ComplexStruct",
  105    105   
    ),
  106    106   
    ::aws_smithy_schema::ShapeType::List,
  107    107   
    "list",
  108    108   
    2,
  109    109   
);
  110    110   
static COMPLEXSTRUCT_MEMBER_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  111    111   
    ::aws_smithy_schema::ShapeId::from_static(
  112    112   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$map",
  113    113   
        "smithy.protocoltests.rpcv2Cbor",
  114    114   
        "ComplexStruct",
  115    115   
    ),
  116    116   
    ::aws_smithy_schema::ShapeType::Map,
  117    117   
    "map",
  118    118   
    3,
  119    119   
);
  120    120   
static COMPLEXSTRUCT_MEMBER_UNION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  121    121   
    ::aws_smithy_schema::ShapeId::from_static(
  122    122   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$union",
  123    123   
        "smithy.protocoltests.rpcv2Cbor",
  124    124   
        "ComplexStruct",
  125    125   
    ),
  126    126   
    ::aws_smithy_schema::ShapeType::Union,
  127    127   
    "union",
  128    128   
    4,
  129    129   
);
  130    130   
static COMPLEXSTRUCT_MEMBER_UNIT_UNION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  131    131   
    ::aws_smithy_schema::ShapeId::from_static(
  132    132   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$unitUnion",
  133    133   
        "smithy.protocoltests.rpcv2Cbor",
  134    134   
        "ComplexStruct",
  135    135   
    ),
  136    136   
    ::aws_smithy_schema::ShapeType::Union,
  137         -
    "unit_union",
         137  +
    "unitUnion",
  138    138   
    5,
  139    139   
);
  140    140   
static COMPLEXSTRUCT_MEMBER_STRUCTURE_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  141    141   
    ::aws_smithy_schema::ShapeId::from_static(
  142    142   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$structureList",
  143    143   
        "smithy.protocoltests.rpcv2Cbor",
  144    144   
        "ComplexStruct",
  145    145   
    ),
  146    146   
    ::aws_smithy_schema::ShapeType::List,
  147         -
    "structure_list",
         147  +
    "structureList",
  148    148   
    6,
  149    149   
);
  150    150   
static COMPLEXSTRUCT_MEMBER_COMPLEX_LIST: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  151    151   
    ::aws_smithy_schema::ShapeId::from_static(
  152    152   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$complexList",
  153    153   
        "smithy.protocoltests.rpcv2Cbor",
  154    154   
        "ComplexStruct",
  155    155   
    ),
  156    156   
    ::aws_smithy_schema::ShapeType::List,
  157         -
    "complex_list",
         157  +
    "complexList",
  158    158   
    7,
  159    159   
);
  160    160   
static COMPLEXSTRUCT_MEMBER_COMPLEX_MAP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  161    161   
    ::aws_smithy_schema::ShapeId::from_static(
  162    162   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$complexMap",
  163    163   
        "smithy.protocoltests.rpcv2Cbor",
  164    164   
        "ComplexStruct",
  165    165   
    ),
  166    166   
    ::aws_smithy_schema::ShapeType::Map,
  167         -
    "complex_map",
         167  +
    "complexMap",
  168    168   
    8,
  169    169   
);
  170    170   
static COMPLEXSTRUCT_MEMBER_COMPLEX_UNION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
  171    171   
    ::aws_smithy_schema::ShapeId::from_static(
  172    172   
        "smithy.protocoltests.rpcv2Cbor#ComplexStruct$complexUnion",
  173    173   
        "smithy.protocoltests.rpcv2Cbor",
  174    174   
        "ComplexStruct",
  175    175   
    ),
  176    176   
    ::aws_smithy_schema::ShapeType::Union,
  177         -
    "complex_union",
         177  +
    "complexUnion",
  178    178   
    9,
  179    179   
);
  180    180   
static COMPLEXSTRUCT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
  181    181   
    COMPLEXSTRUCT_SCHEMA_ID,
  182    182   
    ::aws_smithy_schema::ShapeType::Structure,
  183    183   
    &[
  184    184   
        &COMPLEXSTRUCT_MEMBER_STRUCTURE,
  185    185   
        &COMPLEXSTRUCT_MEMBER_EMPTY_STRUCTURE,
  186    186   
        &COMPLEXSTRUCT_MEMBER_LIST,
  187    187   
        &COMPLEXSTRUCT_MEMBER_MAP,
  188    188   
        &COMPLEXSTRUCT_MEMBER_UNION,
  189    189   
        &COMPLEXSTRUCT_MEMBER_UNIT_UNION,
  190    190   
        &COMPLEXSTRUCT_MEMBER_STRUCTURE_LIST,
  191    191   
        &COMPLEXSTRUCT_MEMBER_COMPLEX_LIST,
  192    192   
        &COMPLEXSTRUCT_MEMBER_COMPLEX_MAP,
  193    193   
        &COMPLEXSTRUCT_MEMBER_COMPLEX_UNION,
  194    194   
    ],
  195    195   
);
  196    196   
impl ComplexStruct {
  197    197   
    /// The schema for this shape.
  198    198   
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &COMPLEXSTRUCT_SCHEMA;
  199    199   
}
  200    200   
impl ::aws_smithy_schema::serde::SerializableStruct for ComplexStruct {
  201    201   
    #[allow(unused_variables, clippy::diverging_sub_expression)]
  202    202   
    fn serialize_members(
  203    203   
        &self,
  204    204   
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
  205    205   
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
  206    206   
        if let Some(ref val) = self.structure {
  207    207   
            ser.write_struct(&COMPLEXSTRUCT_MEMBER_STRUCTURE, val)?;
  208    208   
        }
  209    209   
        if let Some(ref val) = self.empty_structure {
  210    210   
            ser.write_struct(&COMPLEXSTRUCT_MEMBER_EMPTY_STRUCTURE, val)?;
  211    211   
        }
  212    212   
        if let Some(ref val) = self.list {
  213    213   
            ser.write_list(
  214    214   
                &COMPLEXSTRUCT_MEMBER_LIST,
  215    215   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  216    216   
                    for item in val {
  217    217   
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
  218    218   
                    }
  219    219   
                    Ok(())
  220    220   
                },
  221    221   
            )?;
  222    222   
        }
  223    223   
        if let Some(ref val) = self.map {
  224    224   
            ser.write_map(&COMPLEXSTRUCT_MEMBER_MAP, &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  225    225   
                for (key, value) in val {
  226    226   
                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  227    227   
                    ser.write_integer(&::aws_smithy_schema::prelude::INTEGER, *value)?;
  228    228   
                }
  229    229   
                Ok(())
  230    230   
            })?;
  231    231   
        }
  232    232   
        if let Some(ref val) = self.union {
  233         -
            ser.write_null(&COMPLEXSTRUCT_MEMBER_UNION)?;
         233  +
            ser.write_struct(&COMPLEXSTRUCT_MEMBER_UNION, val)?;
  234    234   
        }
  235    235   
        if let Some(ref val) = self.unit_union {
  236         -
            ser.write_null(&COMPLEXSTRUCT_MEMBER_UNIT_UNION)?;
         236  +
            ser.write_struct(&COMPLEXSTRUCT_MEMBER_UNIT_UNION, val)?;
  237    237   
        }
  238    238   
        if let Some(ref val) = self.structure_list {
  239    239   
            ser.write_list(
  240    240   
                &COMPLEXSTRUCT_MEMBER_STRUCTURE_LIST,
  241    241   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  242    242   
                    for item in val {
  243    243   
                        ser.write_struct(crate::types::SimpleStruct::SCHEMA, item)?;
  244    244   
                    }
  245    245   
                    Ok(())
  246    246   
                },
  247    247   
            )?;
  248    248   
        }
  249    249   
        {
  250    250   
            let val = &self.complex_list;
  251    251   
  252    252   
            ser.write_list(
  253    253   
                &COMPLEXSTRUCT_MEMBER_COMPLEX_LIST,
  254    254   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  255    255   
                    for item in val {
  256         -
                        todo!("schema: unsupported list element type");
         256  +
                        ser.write_map(
         257  +
                            &::aws_smithy_schema::prelude::DOCUMENT,
         258  +
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
         259  +
                                for (key, value) in item {
         260  +
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
         261  +
                                    ser.write_struct(crate::types::ComplexUnion::SCHEMA, value)?;
         262  +
                                }
         263  +
                                Ok(())
         264  +
                            },
         265  +
                        )?;
  257    266   
                    }
  258    267   
                    Ok(())
  259    268   
                },
  260    269   
            )?;
  261    270   
        }
  262    271   
        {
  263    272   
            let val = &self.complex_map;
  264    273   
  265    274   
            ser.write_map(
  266    275   
                &COMPLEXSTRUCT_MEMBER_COMPLEX_MAP,
  267    276   
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
  268    277   
                    for (key, value) in val {
  269    278   
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
  270         -
                        todo!("schema: unsupported map value type");
         279  +
                        ser.write_struct(crate::types::ComplexUnion::SCHEMA, value)?;
  271    280   
                    }
  272    281   
                    Ok(())
  273    282   
                },
  274    283   
            )?;
  275    284   
        }
  276    285   
        {
  277    286   
            let val = &self.complex_union;
  278         -
            ser.write_null(&COMPLEXSTRUCT_MEMBER_COMPLEX_UNION)?;
         287  +
            ser.write_struct(&COMPLEXSTRUCT_MEMBER_COMPLEX_UNION, val)?;
  279    288   
        }
  280    289   
        Ok(())
  281    290   
    }
  282    291   
}
  283    292   
impl ComplexStruct {
  284    293   
    /// Deserializes this structure from a [`ShapeDeserializer`].
  285         -
    pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
  286         -
        deserializer: &mut D,
         294  +
    pub fn deserialize(
         295  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
  287    296   
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
  288    297   
        #[allow(unused_variables, unused_mut)]
  289    298   
        let mut builder = Self::builder();
  290    299   
        #[allow(
  291    300   
            unused_variables,
  292    301   
            unreachable_code,
  293    302   
            clippy::single_match,
  294    303   
            clippy::match_single_binding,
  295    304   
            clippy::diverging_sub_expression
  296    305   
        )]
  297         -
        deserializer.read_struct(&COMPLEXSTRUCT_SCHEMA, (), |_, member, deser| {
         306  +
        deserializer.read_struct(&COMPLEXSTRUCT_SCHEMA, &mut |member, deser| {
  298    307   
            match member.member_index() {
  299    308   
                Some(0) => {
  300    309   
                    builder.structure = Some(crate::types::SimpleStruct::deserialize(deser)?);
  301    310   
                }
  302    311   
                Some(1) => {
  303    312   
                    builder.empty_structure = Some(crate::types::EmptyStruct::deserialize(deser)?);
  304    313   
                }
  305    314   
                Some(2) => {
  306         -
                    builder.list = Some({
  307         -
                        let container = if let Some(cap) = deser.container_size() {
  308         -
                            Vec::with_capacity(cap)
  309         -
                        } else {
  310         -
                            Vec::new()
  311         -
                        };
  312         -
                        deser.read_list(member, container, |mut list, deser| {
  313         -
                            list.push(deser.read_string(member)?);
  314         -
                            Ok(list)
  315         -
                        })?
  316         -
                    });
         315  +
                    builder.list = Some(deser.read_string_list(member)?);
  317    316   
                }
  318    317   
                Some(3) => {
  319    318   
                    builder.map = Some({
  320         -
                        let container = if let Some(cap) = deser.container_size() {
  321         -
                            std::collections::HashMap::with_capacity(cap)
  322         -
                        } else {
  323         -
                            std::collections::HashMap::new()
  324         -
                        };
  325         -
                        deser.read_map(member, container, |mut map, key, deser| {
  326         -
                            map.insert(key, deser.read_integer(member)?);
  327         -
                            Ok(map)
  328         -
                        })?
         319  +
                        let mut container = std::collections::HashMap::new();
         320  +
                        deser.read_map(member, &mut |key, deser| {
         321  +
                            container.insert(key, deser.read_integer(member)?);
         322  +
                            Ok(())
         323  +
                        })?;
         324  +
                        container
  329    325   
                    });
  330    326   
                }
  331    327   
                Some(4) => {
  332         -
                    builder.union = Some({
  333         -
                        let _ = member;
  334         -
                        todo!("deserialize aggregate")
  335         -
                    });
         328  +
                    builder.union = Some(crate::types::SimpleUnion::deserialize(deser)?);
  336    329   
                }
  337    330   
                Some(5) => {
  338         -
                    builder.unit_union = Some({
  339         -
                        let _ = member;
  340         -
                        todo!("deserialize aggregate")
  341         -
                    });
         331  +
                    builder.unit_union = Some(crate::types::UnitUnion::deserialize(deser)?);
  342    332   
                }
  343    333   
                Some(6) => {
  344    334   
                    builder.structure_list = Some({
  345         -
                        let container = if let Some(cap) = deser.container_size() {
  346         -
                            Vec::with_capacity(cap)
  347         -
                        } else {
  348         -
                            Vec::new()
  349         -
                        };
  350         -
                        deser.read_list(member, container, |mut list, deser| {
  351         -
                            list.push(crate::types::SimpleStruct::deserialize(deser)?);
  352         -
                            Ok(list)
  353         -
                        })?
         335  +
                        let mut container = Vec::new();
         336  +
                        deser.read_list(member, &mut |deser| {
         337  +
                            container.push(crate::types::SimpleStruct::deserialize(deser)?);
         338  +
                            Ok(())
         339  +
                        })?;
         340  +
                        container
  354    341   
                    });
  355    342   
                }
  356    343   
                Some(7) => {
  357    344   
                    builder.complex_list = Some({
  358         -
                        let container = if let Some(cap) = deser.container_size() {
  359         -
                            Vec::with_capacity(cap)
  360         -
                        } else {
  361         -
                            Vec::new()
  362         -
                        };
  363         -
                        deser.read_list(member, container, |mut list, deser| {
  364         -
                            list.push(todo!("deserialize nested aggregate"));
  365         -
                            Ok(list)
  366         -
                        })?
         345  +
                        let mut container = Vec::new();
         346  +
                        deser.read_list(member, &mut |deser| {
         347  +
                            container.push({
         348  +
                                let mut map = ::std::collections::HashMap::new();
         349  +
                                deser.read_map(member, &mut |key, deser| {
         350  +
                                    let value = crate::types::ComplexUnion::deserialize(deser)?;
         351  +
                                    map.insert(key, value);
         352  +
                                    Ok(())
         353  +
                                })?;
         354  +
                                map
         355  +
                            });
         356  +
                            Ok(())
         357  +
                        })?;
         358  +
                        container
  367    359   
                    });
  368    360   
                }
  369    361   
                Some(8) => {
  370    362   
                    builder.complex_map = Some({
  371         -
                        let container = if let Some(cap) = deser.container_size() {
  372         -
                            std::collections::HashMap::with_capacity(cap)
  373         -
                        } else {
  374         -
                            std::collections::HashMap::new()
  375         -
                        };
  376         -
                        deser.read_map(member, container, |mut map, key, deser| {
  377         -
                            map.insert(key, todo!("deserialize nested aggregate"));
  378         -
                            Ok(map)
  379         -
                        })?
         363  +
                        let mut container = std::collections::HashMap::new();
         364  +
                        deser.read_map(member, &mut |key, deser| {
         365  +
                            container.insert(key, crate::types::ComplexUnion::deserialize(deser)?);
         366  +
                            Ok(())
         367  +
                        })?;
         368  +
                        container
  380    369   
                    });
  381    370   
                }
  382    371   
                Some(9) => {
  383         -
                    builder.complex_union = Some(Box::new({
  384         -
                        let _ = member;
  385         -
                        todo!("deserialize aggregate")
  386         -
                    }));
         372  +
                    builder.complex_union = Some(Box::new(crate::types::ComplexUnion::deserialize(deser)?));
  387    373   
                }
  388    374   
                _ => {}
  389    375   
            }
  390    376   
            Ok(())
  391    377   
        })?;
         378  +
        builder.complex_list = builder.complex_list.or(Some(Vec::new()));
         379  +
        builder.complex_map = builder.complex_map.or(Some(::std::collections::HashMap::new()));
  392    380   
        builder
  393    381   
            .build()
  394    382   
            .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
  395    383   
    }
  396    384   
}
         385  +
impl ComplexStruct {
         386  +
    /// Deserializes this structure from a body deserializer and HTTP response.
         387  +
    pub fn deserialize_with_response(
         388  +
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
         389  +
        _headers: &::aws_smithy_runtime_api::http::Headers,
         390  +
        _status: u16,
         391  +
        _body: &[u8],
         392  +
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
         393  +
        Self::deserialize(deserializer)
         394  +
    }
         395  +
}
  397    396   
impl ComplexStruct {
  398    397   
    /// Creates a new builder-style object to manufacture [`ComplexStruct`](crate::types::ComplexStruct).
  399    398   
    pub fn builder() -> crate::types::builders::ComplexStructBuilder {
  400    399   
        crate::types::builders::ComplexStructBuilder::default()
  401    400   
    }
  402    401   
}
  403    402   
  404    403   
/// A builder for [`ComplexStruct`](crate::types::ComplexStruct).
  405    404   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
  406    405   
#[non_exhaustive]