Client Test

Client Test

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,15 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`DuplexStreamWithDistinctStreams`](crate::operation::duplex_stream_with_distinct_streams::builders::DuplexStreamWithDistinctStreamsFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream_with_distinct_streams::builders::DuplexStreamWithDistinctStreamsFluentBuilder::stream) / [`set_stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream_with_distinct_streams::builders::DuplexStreamWithDistinctStreamsFluentBuilder::set_stream):<br>required: **false**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`DuplexStreamWithDistinctStreamsOutput`](crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsOutput) with field(s):
           8  +
    ///   - [`stream(Option<SingletonEventStream>)`](crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsOutput::stream): (undocumented)
           9  +
    /// - On failure, responds with [`SdkError<DuplexStreamWithDistinctStreamsError>`](crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError)
          10  +
    pub fn duplex_stream_with_distinct_streams(
          11  +
        &self,
          12  +
    ) -> crate::operation::duplex_stream_with_distinct_streams::builders::DuplexStreamWithDistinctStreamsFluentBuilder {
          13  +
        crate::operation::duplex_stream_with_distinct_streams::builders::DuplexStreamWithDistinctStreamsFluentBuilder::new(self.handle.clone())
          14  +
    }
          15  +
}

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

@@ -0,1 +0,17 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`DuplexStreamWithInitialMessages`](crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`initial_request_member(impl Into<String>)`](crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder::initial_request_member) / [`set_initial_request_member(Option<String>)`](crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder::set_initial_request_member):<br>required: **true**<br>(undocumented)<br>
           7  +
    ///   - [`stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder::stream) / [`set_stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder::set_stream):<br>required: **false**<br>(undocumented)<br>
           8  +
    /// - On success, responds with [`DuplexStreamWithInitialMessagesOutput`](crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesOutput) with field(s):
           9  +
    ///   - [`initial_response_member(String)`](crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesOutput::initial_response_member): (undocumented)
          10  +
    ///   - [`stream(EventReceiver<EventStream, EventStreamError>)`](crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesOutput::stream): (undocumented)
          11  +
    /// - On failure, responds with [`SdkError<DuplexStreamWithInitialMessagesError>`](crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError)
          12  +
    pub fn duplex_stream_with_initial_messages(
          13  +
        &self,
          14  +
    ) -> crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder {
          15  +
        crate::operation::duplex_stream_with_initial_messages::builders::DuplexStreamWithInitialMessagesFluentBuilder::new(self.handle.clone())
          16  +
    }
          17  +
}

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

@@ -0,1 +0,12 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`InputStream`](crate::operation::input_stream::builders::InputStreamFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::input_stream::builders::InputStreamFluentBuilder::stream) / [`set_stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::input_stream::builders::InputStreamFluentBuilder::set_stream):<br>required: **false**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`InputStreamOutput`](crate::operation::input_stream::InputStreamOutput)
           8  +
    /// - On failure, responds with [`SdkError<InputStreamError>`](crate::operation::input_stream::InputStreamError)
           9  +
    pub fn input_stream(&self) -> crate::operation::input_stream::builders::InputStreamFluentBuilder {
          10  +
        crate::operation::input_stream::builders::InputStreamFluentBuilder::new(self.handle.clone())
          11  +
    }
          12  +
}

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

@@ -0,1 +0,15 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`InputStreamWithInitialRequest`](crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`initial_request_member(impl Into<String>)`](crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder::initial_request_member) / [`set_initial_request_member(Option<String>)`](crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder::set_initial_request_member):<br>required: **true**<br>(undocumented)<br>
           7  +
    ///   - [`stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder::stream) / [`set_stream(EventStreamSender<EventStream, EventStreamError>)`](crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder::set_stream):<br>required: **false**<br>(undocumented)<br>
           8  +
    /// - On success, responds with [`InputStreamWithInitialRequestOutput`](crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestOutput)
           9  +
    /// - On failure, responds with [`SdkError<InputStreamWithInitialRequestError>`](crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError)
          10  +
    pub fn input_stream_with_initial_request(
          11  +
        &self,
          12  +
    ) -> crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder {
          13  +
        crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestFluentBuilder::new(self.handle.clone())
          14  +
    }
          15  +
}

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

@@ -0,1 +0,12 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`OutputStream`](crate::operation::output_stream::builders::OutputStreamFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder takes no input, just [`send`](crate::operation::output_stream::builders::OutputStreamFluentBuilder::send) it.
           6  +
    /// - On success, responds with [`OutputStreamOutput`](crate::operation::output_stream::OutputStreamOutput) with field(s):
           7  +
    ///   - [`stream(EventReceiver<EventStream, EventStreamError>)`](crate::operation::output_stream::OutputStreamOutput::stream): (undocumented)
           8  +
    /// - On failure, responds with [`SdkError<OutputStreamError>`](crate::operation::output_stream::OutputStreamError)
           9  +
    pub fn output_stream(&self) -> crate::operation::output_stream::builders::OutputStreamFluentBuilder {
          10  +
        crate::operation::output_stream::builders::OutputStreamFluentBuilder::new(self.handle.clone())
          11  +
    }
          12  +
}

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

@@ -0,1 +0,15 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`OutputStreamWithInitialResponse`](crate::operation::output_stream_with_initial_response::builders::OutputStreamWithInitialResponseFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder takes no input, just [`send`](crate::operation::output_stream_with_initial_response::builders::OutputStreamWithInitialResponseFluentBuilder::send) it.
           6  +
    /// - On success, responds with [`OutputStreamWithInitialResponseOutput`](crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseOutput) with field(s):
           7  +
    ///   - [`initial_response_member(String)`](crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseOutput::initial_response_member): (undocumented)
           8  +
    ///   - [`stream(EventReceiver<EventStream, EventStreamError>)`](crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseOutput::stream): (undocumented)
           9  +
    /// - On failure, responds with [`SdkError<OutputStreamWithInitialResponseError>`](crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError)
          10  +
    pub fn output_stream_with_initial_response(
          11  +
        &self,
          12  +
    ) -> crate::operation::output_stream_with_initial_response::builders::OutputStreamWithInitialResponseFluentBuilder {
          13  +
        crate::operation::output_stream_with_initial_response::builders::OutputStreamWithInitialResponseFluentBuilder::new(self.handle.clone())
          14  +
    }
          15  +
}

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

@@ -1,1 +80,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// All possible error types for this service.
    3      3   
#[non_exhaustive]
    4      4   
#[derive(::std::fmt::Debug)]
    5      5   
pub enum Error {
    6      6   
    /// This error is thrown when a request is invalid.
    7      7   
    ComplexError(crate::types::error::ComplexError),
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    ErrorEvent(crate::types::error::ErrorEvent),
    8     10   
    /// This error has test cases that test some of the dark corners of Amazon service framework history. It should only be implemented by clients.
    9     11   
    FooError(crate::types::error::FooError),
   10     12   
    /// This error is thrown when an invalid greeting value is provided.
   11     13   
    InvalidGreeting(crate::types::error::InvalidGreeting),
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    ServiceUnavailableError(crate::types::error::ServiceUnavailableError),
   12     16   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
   13     17   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
   14     18   
    variable wildcard pattern and check `.code()`:
   15     19   
     \
   16     20   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
   17     21   
     \
   18     22   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Error) for what information is available for the error.")]
   19     23   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
   20     24   
}
   21     25   
impl ::std::fmt::Display for Error {
   22     26   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   23     27   
        match self {
   24     28   
            Error::ComplexError(inner) => inner.fmt(f),
          29  +
            Error::ErrorEvent(inner) => inner.fmt(f),
   25     30   
            Error::FooError(inner) => inner.fmt(f),
   26     31   
            Error::InvalidGreeting(inner) => inner.fmt(f),
          32  +
            Error::ServiceUnavailableError(inner) => inner.fmt(f),
   27     33   
            Error::Unhandled(_) => {
   28     34   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
   29     35   
                    write!(f, "unhandled error ({code})")
   30     36   
                } else {
   31     37   
                    f.write_str("unhandled error")
   32     38   
                }
   33     39   
            }
   34     40   
        }
   35     41   
    }
   36     42   
}
   37     43   
impl From<::aws_smithy_types::error::operation::BuildError> for Error {
   38     44   
    fn from(value: ::aws_smithy_types::error::operation::BuildError) -> Self {
   39     45   
        Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
   40     46   
            source: value.into(),
   41     47   
            meta: ::std::default::Default::default(),
   42     48   
        })
   43     49   
    }
   44     50   
}
   45     51   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Error {
   46     52   
    fn meta(&self) -> &::aws_smithy_types::error::metadata::ErrorMetadata {
   47     53   
        match self {
   48     54   
            Self::ComplexError(inner) => inner.meta(),
          55  +
            Self::ErrorEvent(inner) => inner.meta(),
   49     56   
            Self::FooError(inner) => inner.meta(),
   50     57   
            Self::InvalidGreeting(inner) => inner.meta(),
          58  +
            Self::ServiceUnavailableError(inner) => inner.meta(),
   51     59   
            Self::Unhandled(inner) => &inner.meta,
   52     60   
        }
   53     61   
    }
   54     62   
}
   55     63   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::all_query_string_types::AllQueryStringTypesError, R>> for Error
   56     64   
where
   57     65   
    R: Send + Sync + std::fmt::Debug + 'static,
   58     66   
{
   59     67   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::all_query_string_types::AllQueryStringTypesError, R>) -> Self {
   60     68   
        match err {
@@ -211,219 +270,373 @@
  231    239   
        }
  232    240   
    }
  233    241   
}
  234    242   
impl From<crate::operation::document_type_as_payload::DocumentTypeAsPayloadError> for Error {
  235    243   
    fn from(err: crate::operation::document_type_as_payload::DocumentTypeAsPayloadError) -> Self {
  236    244   
        match err {
  237    245   
            crate::operation::document_type_as_payload::DocumentTypeAsPayloadError::Unhandled(inner) => Error::Unhandled(inner),
  238    246   
        }
  239    247   
    }
  240    248   
}
         249  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::duplex_stream::DuplexStreamError, R>> for Error
         250  +
where
         251  +
    R: Send + Sync + std::fmt::Debug + 'static,
         252  +
{
         253  +
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::duplex_stream::DuplexStreamError, R>) -> Self {
         254  +
        match err {
         255  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         256  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         257  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         258  +
                source: err.into(),
         259  +
            }),
         260  +
        }
         261  +
    }
         262  +
}
         263  +
impl From<crate::operation::duplex_stream::DuplexStreamError> for Error {
         264  +
    fn from(err: crate::operation::duplex_stream::DuplexStreamError) -> Self {
         265  +
        match err {
         266  +
            crate::operation::duplex_stream::DuplexStreamError::ErrorEvent(inner) => Error::ErrorEvent(inner),
         267  +
            crate::operation::duplex_stream::DuplexStreamError::Unhandled(inner) => Error::Unhandled(inner),
         268  +
        }
         269  +
    }
         270  +
}
         271  +
impl<R>
         272  +
    From<
         273  +
        ::aws_smithy_runtime_api::client::result::SdkError<
         274  +
            crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError,
         275  +
            R,
         276  +
        >,
         277  +
    > for Error
         278  +
where
         279  +
    R: Send + Sync + std::fmt::Debug + 'static,
         280  +
{
         281  +
    fn from(
         282  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
         283  +
            crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError,
         284  +
            R,
         285  +
        >,
         286  +
    ) -> Self {
         287  +
        match err {
         288  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         289  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         290  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         291  +
                source: err.into(),
         292  +
            }),
         293  +
        }
         294  +
    }
         295  +
}
         296  +
impl From<crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError> for Error {
         297  +
    fn from(err: crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError) -> Self {
         298  +
        match err {
         299  +
            crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError::ErrorEvent(inner) => {
         300  +
                Error::ErrorEvent(inner)
         301  +
            }
         302  +
            crate::operation::duplex_stream_with_distinct_streams::DuplexStreamWithDistinctStreamsError::Unhandled(inner) => Error::Unhandled(inner),
         303  +
        }
         304  +
    }
         305  +
}
         306  +
impl<R>
         307  +
    From<
         308  +
        ::aws_smithy_runtime_api::client::result::SdkError<
         309  +
            crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError,
         310  +
            R,
         311  +
        >,
         312  +
    > for Error
         313  +
where
         314  +
    R: Send + Sync + std::fmt::Debug + 'static,
         315  +
{
         316  +
    fn from(
         317  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
         318  +
            crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError,
         319  +
            R,
         320  +
        >,
         321  +
    ) -> Self {
         322  +
        match err {
         323  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         324  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         325  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         326  +
                source: err.into(),
         327  +
            }),
         328  +
        }
         329  +
    }
         330  +
}
         331  +
impl From<crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError> for Error {
         332  +
    fn from(err: crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError) -> Self {
         333  +
        match err {
         334  +
            crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError::ServiceUnavailableError(inner) => {
         335  +
                Error::ServiceUnavailableError(inner)
         336  +
            }
         337  +
            crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError::ErrorEvent(inner) => {
         338  +
                Error::ErrorEvent(inner)
         339  +
            }
         340  +
            crate::operation::duplex_stream_with_initial_messages::DuplexStreamWithInitialMessagesError::Unhandled(inner) => Error::Unhandled(inner),
         341  +
        }
         342  +
    }
         343  +
}
  241    344   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>>
  242    345   
    for Error
  243    346   
where
  244    347   
    R: Send + Sync + std::fmt::Debug + 'static,
  245    348   
{
  246    349   
    fn from(
  247    350   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::empty_input_and_empty_output::EmptyInputAndEmptyOutputError, R>,
  248    351   
    ) -> Self {
  249    352   
        match err {
  250    353   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
@@ -571,674 +630,761 @@
  591    694   
        }
  592    695   
    }
  593    696   
}
  594    697   
impl From<crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError> for Error {
  595    698   
    fn from(err: crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError) -> Self {
  596    699   
        match err {
  597    700   
            crate::operation::http_prefix_headers_in_response::HttpPrefixHeadersInResponseError::Unhandled(inner) => Error::Unhandled(inner),
  598    701   
        }
  599    702   
    }
  600    703   
}
         704  +
impl<R>
         705  +
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError, R>>
         706  +
    for Error
         707  +
where
         708  +
    R: Send + Sync + std::fmt::Debug + 'static,
         709  +
{
         710  +
    fn from(
         711  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
         712  +
            crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError,
         713  +
            R,
         714  +
        >,
         715  +
    ) -> Self {
         716  +
        match err {
         717  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         718  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         719  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         720  +
                source: err.into(),
         721  +
            }),
         722  +
        }
         723  +
    }
         724  +
}
         725  +
impl From<crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError> for Error {
         726  +
    fn from(err: crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError) -> Self {
         727  +
        match err {
         728  +
            crate::operation::http_query_params_only_operation::HttpQueryParamsOnlyOperationError::Unhandled(inner) => Error::Unhandled(inner),
         729  +
        }
         730  +
    }
         731  +
}
  601    732   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError, R>>
  602    733   
    for Error
  603    734   
where
  604    735   
    R: Send + Sync + std::fmt::Debug + 'static,
  605    736   
{
  606    737   
    fn from(
  607    738   
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::http_request_with_float_labels::HttpRequestWithFloatLabelsError, R>,
  608    739   
    ) -> Self {
  609    740   
        match err {
  610    741   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
@@ -808,939 +867,1053 @@
  828    959   
        }
  829    960   
    }
  830    961   
}
  831    962   
impl From<crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError> for Error {
  832    963   
    fn from(err: crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError) -> Self {
  833    964   
        match err {
  834    965   
            crate::operation::input_and_output_with_headers::InputAndOutputWithHeadersError::Unhandled(inner) => Error::Unhandled(inner),
  835    966   
        }
  836    967   
    }
  837    968   
}
         969  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::input_stream::InputStreamError, R>> for Error
         970  +
where
         971  +
    R: Send + Sync + std::fmt::Debug + 'static,
         972  +
{
         973  +
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::input_stream::InputStreamError, R>) -> Self {
         974  +
        match err {
         975  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         976  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         977  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         978  +
                source: err.into(),
         979  +
            }),
         980  +
        }
         981  +
    }
         982  +
}
         983  +
impl From<crate::operation::input_stream::InputStreamError> for Error {
         984  +
    fn from(err: crate::operation::input_stream::InputStreamError) -> Self {
         985  +
        match err {
         986  +
            crate::operation::input_stream::InputStreamError::ErrorEvent(inner) => Error::ErrorEvent(inner),
         987  +
            crate::operation::input_stream::InputStreamError::Unhandled(inner) => Error::Unhandled(inner),
         988  +
        }
         989  +
    }
         990  +
}
         991  +
impl<R>
         992  +
    From<
         993  +
        ::aws_smithy_runtime_api::client::result::SdkError<
         994  +
            crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
         995  +
            R,
         996  +
        >,
         997  +
    > for Error
         998  +
where
         999  +
    R: Send + Sync + std::fmt::Debug + 'static,
        1000  +
{
        1001  +
    fn from(
        1002  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
        1003  +
            crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
        1004  +
            R,
        1005  +
        >,
        1006  +
    ) -> Self {
        1007  +
        match err {
        1008  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        1009  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        1010  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        1011  +
                source: err.into(),
        1012  +
            }),
        1013  +
        }
        1014  +
    }
        1015  +
}
        1016  +
impl From<crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError> for Error {
        1017  +
    fn from(err: crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError) -> Self {
        1018  +
        match err {
        1019  +
            crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError::ErrorEvent(inner) => Error::ErrorEvent(inner),
        1020  +
            crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError::Unhandled(inner) => Error::Unhandled(inner),
        1021  +
        }
        1022  +
    }
        1023  +
}
  838   1024   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_blobs::JsonBlobsError, R>> for Error
  839   1025   
where
  840   1026   
    R: Send + Sync + std::fmt::Debug + 'static,
  841   1027   
{
  842   1028   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::json_blobs::JsonBlobsError, R>) -> Self {
  843   1029   
        match err {
  844   1030   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  845   1031   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  846   1032   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  847   1033   
                source: err.into(),
@@ -2057,2243 +2116,2360 @@
 2077   2263   
        }
 2078   2264   
    }
 2079   2265   
}
 2080   2266   
impl From<crate::operation::operation_with_nested_structure::OperationWithNestedStructureError> for Error {
 2081   2267   
    fn from(err: crate::operation::operation_with_nested_structure::OperationWithNestedStructureError) -> Self {
 2082   2268   
        match err {
 2083   2269   
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::Unhandled(inner) => Error::Unhandled(inner),
 2084   2270   
        }
 2085   2271   
    }
 2086   2272   
}
        2273  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::output_stream::OutputStreamError, R>> for Error
        2274  +
where
        2275  +
    R: Send + Sync + std::fmt::Debug + 'static,
        2276  +
{
        2277  +
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::output_stream::OutputStreamError, R>) -> Self {
        2278  +
        match err {
        2279  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        2280  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        2281  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        2282  +
                source: err.into(),
        2283  +
            }),
        2284  +
        }
        2285  +
    }
        2286  +
}
        2287  +
impl From<crate::operation::output_stream::OutputStreamError> for Error {
        2288  +
    fn from(err: crate::operation::output_stream::OutputStreamError) -> Self {
        2289  +
        match err {
        2290  +
            crate::operation::output_stream::OutputStreamError::ServiceUnavailableError(inner) => Error::ServiceUnavailableError(inner),
        2291  +
            crate::operation::output_stream::OutputStreamError::ErrorEvent(inner) => Error::ErrorEvent(inner),
        2292  +
            crate::operation::output_stream::OutputStreamError::Unhandled(inner) => Error::Unhandled(inner),
        2293  +
        }
        2294  +
    }
        2295  +
}
        2296  +
impl<R>
        2297  +
    From<
        2298  +
        ::aws_smithy_runtime_api::client::result::SdkError<
        2299  +
            crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError,
        2300  +
            R,
        2301  +
        >,
        2302  +
    > for Error
        2303  +
where
        2304  +
    R: Send + Sync + std::fmt::Debug + 'static,
        2305  +
{
        2306  +
    fn from(
        2307  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
        2308  +
            crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError,
        2309  +
            R,
        2310  +
        >,
        2311  +
    ) -> Self {
        2312  +
        match err {
        2313  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        2314  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        2315  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        2316  +
                source: err.into(),
        2317  +
            }),
        2318  +
        }
        2319  +
    }
        2320  +
}
        2321  +
impl From<crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError> for Error {
        2322  +
    fn from(err: crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError) -> Self {
        2323  +
        match err {
        2324  +
            crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError::ErrorEvent(inner) => {
        2325  +
                Error::ErrorEvent(inner)
        2326  +
            }
        2327  +
            crate::operation::output_stream_with_initial_response::OutputStreamWithInitialResponseError::Unhandled(inner) => Error::Unhandled(inner),
        2328  +
        }
        2329  +
    }
        2330  +
}
 2087   2331   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::post_player_action::PostPlayerActionError, R>> for Error
 2088   2332   
where
 2089   2333   
    R: Send + Sync + std::fmt::Debug + 'static,
 2090   2334   
{
 2091   2335   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::post_player_action::PostPlayerActionError, R>) -> Self {
 2092   2336   
        match err {
 2093   2337   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2094   2338   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2095   2339   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2096   2340   
                source: err.into(),
@@ -2611,2855 +2650,2918 @@
 2631   2875   
        }
 2632   2876   
    }
 2633   2877   
}
 2634   2878   
impl From<crate::operation::unit_input_and_output::UnitInputAndOutputError> for Error {
 2635   2879   
    fn from(err: crate::operation::unit_input_and_output::UnitInputAndOutputError) -> Self {
 2636   2880   
        match err {
 2637   2881   
            crate::operation::unit_input_and_output::UnitInputAndOutputError::Unhandled(inner) => Error::Unhandled(inner),
 2638   2882   
        }
 2639   2883   
    }
 2640   2884   
}
        2885  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::EventStreamError, R>> for Error
        2886  +
where
        2887  +
    R: Send + Sync + std::fmt::Debug + 'static,
        2888  +
{
        2889  +
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::types::error::EventStreamError, R>) -> Self {
        2890  +
        match err {
        2891  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        2892  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        2893  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        2894  +
                source: err.into(),
        2895  +
            }),
        2896  +
        }
        2897  +
    }
        2898  +
}
        2899  +
impl From<crate::types::error::EventStreamError> for Error {
        2900  +
    fn from(err: crate::types::error::EventStreamError) -> Self {
        2901  +
        match err {
        2902  +
            crate::types::error::EventStreamError::ErrorEvent(inner) => Error::ErrorEvent(inner),
        2903  +
            crate::types::error::EventStreamError::Unhandled(inner) => Error::Unhandled(inner),
        2904  +
        }
        2905  +
    }
        2906  +
}
 2641   2907   
impl ::std::error::Error for Error {
 2642   2908   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
 2643   2909   
        match self {
 2644   2910   
            Error::ComplexError(inner) => inner.source(),
        2911  +
            Error::ErrorEvent(inner) => inner.source(),
 2645   2912   
            Error::FooError(inner) => inner.source(),
 2646   2913   
            Error::InvalidGreeting(inner) => inner.source(),
        2914  +
            Error::ServiceUnavailableError(inner) => inner.source(),
 2647   2915   
            Error::Unhandled(inner) => ::std::option::Option::Some(&*inner.source),
 2648   2916   
        }
 2649   2917   
    }
 2650   2918   
}

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

@@ -0,1 +0,39 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 *  SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_smithy_http::event_stream::{InitialMessageType, Receiver};
           8  +
use aws_smithy_runtime_api::client::result::SdkError;
           9  +
use aws_smithy_types::event_stream::{Message, RawMessage};
          10  +
          11  +
#[derive(Debug)]
          12  +
/// Receives unmarshalled events at a time out of an Event Stream.
          13  +
pub struct EventReceiver<T, E> {
          14  +
    inner: Receiver<T, E>,
          15  +
}
          16  +
          17  +
impl<T, E> EventReceiver<T, E> {
          18  +
    pub(crate) fn new(inner: Receiver<T, E>) -> Self {
          19  +
        Self { inner }
          20  +
    }
          21  +
          22  +
    #[allow(dead_code)]
          23  +
    pub(crate) async fn try_recv_initial_request(&mut self) -> Result<Option<Message>, SdkError<E, RawMessage>> {
          24  +
        self.inner.try_recv_initial(InitialMessageType::Request).await
          25  +
    }
          26  +
          27  +
    #[allow(dead_code)]
          28  +
    pub(crate) async fn try_recv_initial_response(&mut self) -> Result<Option<Message>, SdkError<E, RawMessage>> {
          29  +
        self.inner.try_recv_initial(InitialMessageType::Response).await
          30  +
    }
          31  +
          32  +
    /// Asynchronously tries to receive an event from the stream. If the stream has ended, it
          33  +
    /// returns an `Ok(None)`. If there is a transport layer error, it will return
          34  +
    /// `Err(SdkError::DispatchFailure)`. Service-modeled errors will be a part of the returned
          35  +
    /// messages.
          36  +
    pub async fn recv(&mut self) -> Result<Option<T>, SdkError<E, RawMessage>> {
          37  +
        self.inner.recv().await
          38  +
    }
          39  +
}

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

@@ -0,1 +0,371 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[non_exhaustive]
           3  +
#[derive(Debug)]
           4  +
pub struct EventStreamErrorMarshaller;
           5  +
           6  +
impl EventStreamErrorMarshaller {
           7  +
    pub fn new() -> Self {
           8  +
        EventStreamErrorMarshaller
           9  +
    }
          10  +
}
          11  +
impl ::aws_smithy_eventstream::frame::MarshallMessage for EventStreamErrorMarshaller {
          12  +
    type Input = crate::types::error::EventStreamError;
          13  +
    fn marshall(
          14  +
        &self,
          15  +
        _input: Self::Input,
          16  +
    ) -> std::result::Result<::aws_smithy_types::event_stream::Message, ::aws_smithy_eventstream::error::Error> {
          17  +
        let mut headers = Vec::new();
          18  +
        headers.push(::aws_smithy_types::event_stream::Header::new(
          19  +
            ":message-type",
          20  +
            ::aws_smithy_types::event_stream::HeaderValue::String("exception".into()),
          21  +
        ));
          22  +
        let payload = match _input {
          23  +
            crate::types::error::EventStreamError::ErrorEvent(inner) =>  {
          24  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":exception-type", ::aws_smithy_types::event_stream::HeaderValue::String("error".into())));
          25  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
          26  +
                crate::protocol_serde::shape_error_event::ser_error_event_error(&inner)
          27  +
                                            .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
          28  +
            }
          29  +
            crate::types::error::EventStreamError::Unhandled(_inner) => return Err(
          30  +
                                                ::aws_smithy_eventstream::error::Error::marshalling("Cannot serialize `EventStream::Unknown` for the request. The `Unknown` variant is intended for responses only. It occurs when an outdated client is used after a new enum variant was added on the server side.".to_owned())
          31  +
                                            ),
          32  +
        }
          33  +
        ;
          34  +
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(headers, payload))
          35  +
    }
          36  +
}
          37  +
          38  +
#[non_exhaustive]
          39  +
#[derive(Debug)]
          40  +
pub struct EventStreamMarshaller;
          41  +
          42  +
impl EventStreamMarshaller {
          43  +
    pub fn new() -> Self {
          44  +
        EventStreamMarshaller
          45  +
    }
          46  +
}
          47  +
impl ::aws_smithy_eventstream::frame::MarshallMessage for EventStreamMarshaller {
          48  +
    type Input = crate::types::EventStream;
          49  +
    fn marshall(&self, input: Self::Input) -> std::result::Result<::aws_smithy_types::event_stream::Message, ::aws_smithy_eventstream::error::Error> {
          50  +
        let mut headers = Vec::new();
          51  +
        headers.push(::aws_smithy_types::event_stream::Header::new(
          52  +
            ":message-type",
          53  +
            ::aws_smithy_types::event_stream::HeaderValue::String("event".into()),
          54  +
        ));
          55  +
        let payload = match input {
          56  +
            Self::Input::Headers(inner) =>  {
          57  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("headers".into())));
          58  +
                if let Some(value) = inner.boolean_header {
          59  +
                    headers.push(
          60  +
                        ::aws_smithy_types::event_stream::Header::new("booleanHeader", ::aws_smithy_types::event_stream::HeaderValue::Bool(value))
          61  +
                    );
          62  +
                }
          63  +
                if let Some(value) = inner.byte_header {
          64  +
                    headers.push(
          65  +
                        ::aws_smithy_types::event_stream::Header::new("byteHeader", ::aws_smithy_types::event_stream::HeaderValue::Byte(value))
          66  +
                    );
          67  +
                }
          68  +
                if let Some(value) = inner.short_header {
          69  +
                    headers.push(
          70  +
                        ::aws_smithy_types::event_stream::Header::new("shortHeader", ::aws_smithy_types::event_stream::HeaderValue::Int16(value))
          71  +
                    );
          72  +
                }
          73  +
                if let Some(value) = inner.int_header {
          74  +
                    headers.push(
          75  +
                        ::aws_smithy_types::event_stream::Header::new("intHeader", ::aws_smithy_types::event_stream::HeaderValue::Int32(value))
          76  +
                    );
          77  +
                }
          78  +
                if let Some(value) = inner.long_header {
          79  +
                    headers.push(
          80  +
                        ::aws_smithy_types::event_stream::Header::new("longHeader", ::aws_smithy_types::event_stream::HeaderValue::Int64(value))
          81  +
                    );
          82  +
                }
          83  +
                if let Some(value) = inner.blob_header {
          84  +
                    headers.push(
          85  +
                        ::aws_smithy_types::event_stream::Header::new("blobHeader", ::aws_smithy_types::event_stream::HeaderValue::ByteArray(value.into_inner().into()))
          86  +
                    );
          87  +
                }
          88  +
                if let Some(value) = inner.string_header {
          89  +
                    headers.push(
          90  +
                        ::aws_smithy_types::event_stream::Header::new("stringHeader", ::aws_smithy_types::event_stream::HeaderValue::String(value.into()))
          91  +
                    );
          92  +
                }
          93  +
                if let Some(value) = inner.timestamp_header {
          94  +
                    headers.push(
          95  +
                        ::aws_smithy_types::event_stream::Header::new("timestampHeader", ::aws_smithy_types::event_stream::HeaderValue::Timestamp(value.into()))
          96  +
                    );
          97  +
                }
          98  +
                Vec::new()
          99  +
            }
         100  +
            Self::Input::BlobPayload(inner) =>  {
         101  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("blobPayload".into())));
         102  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/octet-stream".into())));
         103  +
                if let Some(inner_payload) = inner.payload {
         104  +
                    inner_payload.into_inner()
         105  +
                }
         106  +
                 else  {
         107  +
                    Vec::new()
         108  +
                }
         109  +
            }
         110  +
            Self::Input::StringPayload(inner) =>  {
         111  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("stringPayload".into())));
         112  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("text/plain".into())));
         113  +
                if let Some(inner_payload) = inner.payload {
         114  +
                    inner_payload.into_bytes()
         115  +
                }
         116  +
                 else  {
         117  +
                    Vec::new()
         118  +
                }
         119  +
            }
         120  +
            Self::Input::StructurePayload(inner) =>  {
         121  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("structurePayload".into())));
         122  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
         123  +
                if let Some(inner_payload) = inner.payload {
         124  +
                    crate::protocol_serde::shape_structure_payload_event::ser_payload_payload(&inner_payload)
         125  +
                                                .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
         126  +
                }
         127  +
                 else  {
         128  +
                    unimplemented!("TODO(EventStream): Figure out what to do when there's no payload")
         129  +
                }
         130  +
            }
         131  +
            Self::Input::UnionPayload(inner) =>  {
         132  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("unionPayload".into())));
         133  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
         134  +
                if let Some(inner_payload) = inner.payload {
         135  +
                    crate::protocol_serde::shape_union_payload_event::ser_payload_payload(&inner_payload)
         136  +
                                                .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
         137  +
                }
         138  +
                 else  {
         139  +
                    unimplemented!("TODO(EventStream): Figure out what to do when there's no payload")
         140  +
                }
         141  +
            }
         142  +
            Self::Input::HeadersAndExplicitPayload(inner) =>  {
         143  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("headersAndExplicitPayload".into())));
         144  +
                if let Some(value) = inner.header {
         145  +
                    headers.push(
         146  +
                        ::aws_smithy_types::event_stream::Header::new("header", ::aws_smithy_types::event_stream::HeaderValue::String(value.into()))
         147  +
                    );
         148  +
                }
         149  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":content-type", ::aws_smithy_types::event_stream::HeaderValue::String("application/json".into())));
         150  +
                if let Some(inner_payload) = inner.payload {
         151  +
                    crate::protocol_serde::shape_headers_and_explicit_payload_event::ser_payload_payload(&inner_payload)
         152  +
                                                .map_err(|err| ::aws_smithy_eventstream::error::Error::marshalling(format!("{err}")))?
         153  +
                }
         154  +
                 else  {
         155  +
                    unimplemented!("TODO(EventStream): Figure out what to do when there's no payload")
         156  +
                }
         157  +
            }
         158  +
            Self::Input::HeadersAndImplicitPayload(inner) =>  {
         159  +
                headers.push(::aws_smithy_types::event_stream::Header::new(":event-type", ::aws_smithy_types::event_stream::HeaderValue::String("headersAndImplicitPayload".into())));
         160  +
                if let Some(value) = inner.header {
         161  +
                    headers.push(
         162  +
                        ::aws_smithy_types::event_stream::Header::new("header", ::aws_smithy_types::event_stream::HeaderValue::String(value.into()))
         163  +
                    );
         164  +
                }
         165  +
                Vec::new()
         166  +
            }
         167  +
            Self::Input::Unknown => return Err(
         168  +
                                            ::aws_smithy_eventstream::error::Error::marshalling("Cannot serialize `EventStream::Unknown` for the request. The `Unknown` variant is intended for responses only. It occurs when an outdated client is used after a new enum variant was added on the server side.".to_owned())
         169  +
                                        )
         170  +
        }
         171  +
        ;
         172  +
        Ok(::aws_smithy_types::event_stream::Message::new_from_parts(headers, payload))
         173  +
    }
         174  +
}
         175  +
         176  +
#[non_exhaustive]
         177  +
#[derive(Debug)]
         178  +
pub struct EventStreamUnmarshaller;
         179  +
         180  +
impl EventStreamUnmarshaller {
         181  +
    pub fn new() -> Self {
         182  +
        EventStreamUnmarshaller
         183  +
    }
         184  +
}
         185  +
impl ::aws_smithy_eventstream::frame::UnmarshallMessage for EventStreamUnmarshaller {
         186  +
    type Output = crate::types::EventStream;
         187  +
    type Error = crate::types::error::EventStreamError;
         188  +
    fn unmarshall(
         189  +
        &self,
         190  +
        message: &::aws_smithy_types::event_stream::Message,
         191  +
    ) -> std::result::Result<::aws_smithy_eventstream::frame::UnmarshalledMessage<Self::Output, Self::Error>, ::aws_smithy_eventstream::error::Error>
         192  +
    {
         193  +
        let response_headers = ::aws_smithy_eventstream::smithy::parse_response_headers(message)?;
         194  +
        match response_headers.message_type.as_str() {
         195  +
            "event" => {
         196  +
                match response_headers.smithy_type.as_str() {
         197  +
                    "headers" => {
         198  +
                        let mut builder = crate::types::builders::HeadersEventBuilder::default();
         199  +
                        for header in message.headers() {
         200  +
                            match header.name().as_str() {
         201  +
                                "booleanHeader" => {
         202  +
                                    builder = builder.set_boolean_header(Some(::aws_smithy_eventstream::smithy::expect_bool(header)?));
         203  +
                                }
         204  +
                                "byteHeader" => {
         205  +
                                    builder = builder.set_byte_header(Some(::aws_smithy_eventstream::smithy::expect_byte(header)?));
         206  +
                                }
         207  +
                                "shortHeader" => {
         208  +
                                    builder = builder.set_short_header(Some(::aws_smithy_eventstream::smithy::expect_int16(header)?));
         209  +
                                }
         210  +
                                "intHeader" => {
         211  +
                                    builder = builder.set_int_header(Some(::aws_smithy_eventstream::smithy::expect_int32(header)?));
         212  +
                                }
         213  +
                                "longHeader" => {
         214  +
                                    builder = builder.set_long_header(Some(::aws_smithy_eventstream::smithy::expect_int64(header)?));
         215  +
                                }
         216  +
                                "blobHeader" => {
         217  +
                                    builder = builder.set_blob_header(Some(::aws_smithy_eventstream::smithy::expect_byte_array(header)?));
         218  +
                                }
         219  +
                                "stringHeader" => {
         220  +
                                    builder = builder.set_string_header(Some(::aws_smithy_eventstream::smithy::expect_string(header)?));
         221  +
                                }
         222  +
                                "timestampHeader" => {
         223  +
                                    builder = builder.set_timestamp_header(Some(::aws_smithy_eventstream::smithy::expect_timestamp(header)?));
         224  +
                                }
         225  +
                                // Event stream protocol headers start with ':'
         226  +
                                name => {
         227  +
                                    if !name.starts_with(':') {
         228  +
                                        ::tracing::trace!("Unrecognized event stream message header: {}", name);
         229  +
                                    }
         230  +
                                }
         231  +
                            }
         232  +
                        }
         233  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         234  +
                            crate::types::EventStream::Headers(builder.build()),
         235  +
                        ))
         236  +
                    }
         237  +
                    "blobPayload" => {
         238  +
                        let mut builder = crate::types::builders::BlobPayloadEventBuilder::default();
         239  +
                        let content_type = response_headers.content_type().unwrap_or_default();
         240  +
                        if content_type != "application/octet-stream" {
         241  +
                            return Err(::aws_smithy_eventstream::error::Error::unmarshalling(format!(
         242  +
                                "expected :content-type to be 'application/octet-stream', but was '{content_type}'"
         243  +
                            )));
         244  +
                        }
         245  +
                        builder = builder.set_payload(Some(::aws_smithy_types::Blob::new(message.payload().as_ref())));
         246  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         247  +
                            crate::types::EventStream::BlobPayload(builder.build()),
         248  +
                        ))
         249  +
                    }
         250  +
                    "stringPayload" => {
         251  +
                        let mut builder = crate::types::builders::StringPayloadEventBuilder::default();
         252  +
                        let content_type = response_headers.content_type().unwrap_or_default();
         253  +
                        if content_type != "text/plain" {
         254  +
                            return Err(::aws_smithy_eventstream::error::Error::unmarshalling(format!(
         255  +
                                "expected :content-type to be 'text/plain', but was '{content_type}'"
         256  +
                            )));
         257  +
                        }
         258  +
                        builder = builder.set_payload(Some(
         259  +
                            ::std::str::from_utf8(message.payload())
         260  +
                                .map_err(|_| ::aws_smithy_eventstream::error::Error::unmarshalling("message payload is not valid UTF-8"))?
         261  +
                                .to_owned(),
         262  +
                        ));
         263  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         264  +
                            crate::types::EventStream::StringPayload(builder.build()),
         265  +
                        ))
         266  +
                    }
         267  +
                    "structurePayload" => {
         268  +
                        let mut builder = crate::types::builders::StructurePayloadEventBuilder::default();
         269  +
                        builder = builder.set_payload(Some(
         270  +
                            crate::protocol_serde::shape_payload_structure::de_payload_structure_payload(&message.payload()[..]).map_err(|err| {
         271  +
                                ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall payload: {err}"))
         272  +
                            })?,
         273  +
                        ));
         274  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         275  +
                            crate::types::EventStream::StructurePayload(builder.build()),
         276  +
                        ))
         277  +
                    }
         278  +
                    "unionPayload" => {
         279  +
                        let mut builder = crate::types::builders::UnionPayloadEventBuilder::default();
         280  +
                        builder = builder.set_payload(Some(
         281  +
                            crate::protocol_serde::shape_payload_union::de_payload_union_payload(&message.payload()[..]).map_err(|err| {
         282  +
                                ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall payload: {err}"))
         283  +
                            })?,
         284  +
                        ));
         285  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         286  +
                            crate::types::EventStream::UnionPayload(builder.build()),
         287  +
                        ))
         288  +
                    }
         289  +
                    "headersAndExplicitPayload" => {
         290  +
                        let mut builder = crate::types::builders::HeadersAndExplicitPayloadEventBuilder::default();
         291  +
                        builder = builder.set_payload(Some(
         292  +
                            crate::protocol_serde::shape_payload_structure::de_payload_structure_payload(&message.payload()[..]).map_err(|err| {
         293  +
                                ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall payload: {err}"))
         294  +
                            })?,
         295  +
                        ));
         296  +
                        for header in message.headers() {
         297  +
                            match header.name().as_str() {
         298  +
                                "header" => {
         299  +
                                    builder = builder.set_header(Some(::aws_smithy_eventstream::smithy::expect_string(header)?));
         300  +
                                }
         301  +
                                // Event stream protocol headers start with ':'
         302  +
                                name => {
         303  +
                                    if !name.starts_with(':') {
         304  +
                                        ::tracing::trace!("Unrecognized event stream message header: {}", name);
         305  +
                                    }
         306  +
                                }
         307  +
                            }
         308  +
                        }
         309  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         310  +
                            crate::types::EventStream::HeadersAndExplicitPayload(builder.build()),
         311  +
                        ))
         312  +
                    }
         313  +
                    "headersAndImplicitPayload" => {
         314  +
                        let mut builder = crate::types::builders::HeadersAndImplicitPayloadEventBuilder::default();
         315  +
                        for header in message.headers() {
         316  +
                            match header.name().as_str() {
         317  +
                                "header" => {
         318  +
                                    builder = builder.set_header(Some(::aws_smithy_eventstream::smithy::expect_string(header)?));
         319  +
                                }
         320  +
                                // Event stream protocol headers start with ':'
         321  +
                                name => {
         322  +
                                    if !name.starts_with(':') {
         323  +
                                        ::tracing::trace!("Unrecognized event stream message header: {}", name);
         324  +
                                    }
         325  +
                                }
         326  +
                            }
         327  +
                        }
         328  +
                        builder = crate::protocol_serde::shape_headers_and_implicit_payload_event::de_headers_and_implicit_payload_event_json_err(
         329  +
                            &message.payload()[..],
         330  +
                            builder,
         331  +
                        )
         332  +
                        .map_err(|err| ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall: {err}")))?;
         333  +
                        Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         334  +
                            crate::types::EventStream::HeadersAndImplicitPayload(builder.build()),
         335  +
                        ))
         336  +
                    }
         337  +
                    _unknown_variant => Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Event(
         338  +
                        crate::types::EventStream::Unknown,
         339  +
                    )),
         340  +
                }
         341  +
            }
         342  +
            "exception" => {
         343  +
                let generic = match crate::protocol_serde::parse_event_stream_error_metadata(message.payload()) {
         344  +
                    Ok(builder) => builder.build(),
         345  +
                    Err(err) => {
         346  +
                        return Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         347  +
                            crate::types::error::EventStreamError::unhandled(err),
         348  +
                        ))
         349  +
                    }
         350  +
                };
         351  +
                if response_headers.smithy_type.as_str() == "error" {
         352  +
                    let mut builder = crate::types::error::builders::ErrorEventBuilder::default();
         353  +
                    builder = crate::protocol_serde::shape_error_event::de_error_event_json_err(&message.payload()[..], builder)
         354  +
                        .map_err(|err| ::aws_smithy_eventstream::error::Error::unmarshalling(format!("failed to unmarshall error: {err}")))?;
         355  +
                    builder.set_meta(Some(generic));
         356  +
                    return Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         357  +
                        crate::types::error::EventStreamError::ErrorEvent(builder.build()),
         358  +
                    ));
         359  +
                }
         360  +
                Ok(::aws_smithy_eventstream::frame::UnmarshalledMessage::Error(
         361  +
                    crate::types::error::EventStreamError::generic(generic),
         362  +
                ))
         363  +
            }
         364  +
            value => {
         365  +
                return Err(::aws_smithy_eventstream::error::Error::unmarshalling(format!(
         366  +
                    "unrecognized :message-type: {value}"
         367  +
                )));
         368  +
            }
         369  +
        }
         370  +
    }
         371  +
}

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

@@ -1,1 +53,54 @@
    5      5   
#![allow(clippy::large_enum_variant)]
    6      6   
#![allow(clippy::wrong_self_convention)]
    7      7   
#![allow(clippy::should_implement_trait)]
    8      8   
#![allow(clippy::disallowed_names)]
    9      9   
#![allow(clippy::vec_init_then_push)]
   10     10   
#![allow(clippy::type_complexity)]
   11     11   
#![allow(clippy::needless_return)]
   12     12   
#![allow(clippy::derive_partial_eq_without_eq)]
   13     13   
#![allow(clippy::result_large_err)]
   14     14   
#![allow(clippy::unnecessary_map_on_constructor)]
          15  +
#![allow(clippy::useless_conversion)]
   15     16   
#![allow(clippy::deprecated_semver)]
   16     17   
#![allow(rustdoc::bare_urls)]
   17     18   
#![allow(rustdoc::redundant_explicit_links)]
   18     19   
#![allow(rustdoc::broken_intra_doc_links)]
   19     20   
#![allow(rustdoc::invalid_html_tags)]
   20     21   
#![forbid(unsafe_code)]
   21     22   
#![warn(missing_docs)]
   22     23   
#![cfg_attr(docsrs, feature(doc_cfg))]
   23         -
//! A REST JSON service that sends JSON requests and responses.
          24  +
//! rest_json
   24     25   
//!
   25     26   
//! # Crate Organization
   26     27   
//!
   27     28   
//! The entry point for most customers will be [`Client`], which exposes one method for each API
   28     29   
//! offered by Sample Rest Json Protocol Service. The return value of each of these methods is a "fluent builder",
   29     30   
//! where the different inputs for that API are added by builder-style function call chaining,
   30     31   
//! followed by calling `send()` to get a [`Future`](std::future::Future) that will result in
   31     32   
//! either a successful output or a [`SdkError`](crate::error::SdkError).
   32     33   
//!
   33     34   
//! Some of these API inputs may be structs or enums to provide more complex structured information.
@@ -95,96 +140,145 @@
  115    116   
  116    117   
/// Data structures used by operation inputs/outputs.
  117    118   
pub mod types;
  118    119   
  119    120   
pub(crate) mod client_http_checksum_required;
  120    121   
  121    122   
pub(crate) mod client_idempotency_token;
  122    123   
  123    124   
mod client_request_compression;
  124    125   
         126  +
mod event_receiver;
         127  +
         128  +
mod event_stream_serde;
         129  +
  125    130   
mod idempotency_token;
  126    131   
  127    132   
/// All operations that this crate can perform.
  128    133   
pub mod operation;
  129    134   
  130    135   
pub(crate) mod protocol_serde;
  131    136   
  132    137   
mod sdk_feature_tracker;
  133    138   
  134    139   
mod serialization_settings;

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

@@ -1,1 +128,146 @@
   17     17   
   18     18   
/// Types for the `DocumentType` operation.
   19     19   
pub mod document_type;
   20     20   
   21     21   
/// Types for the `DocumentTypeAsMapValue` operation.
   22     22   
pub mod document_type_as_map_value;
   23     23   
   24     24   
/// Types for the `DocumentTypeAsPayload` operation.
   25     25   
pub mod document_type_as_payload;
   26     26   
          27  +
/// Types for the `DuplexStream` operation.
          28  +
pub mod duplex_stream;
          29  +
          30  +
/// Types for the `DuplexStreamWithDistinctStreams` operation.
          31  +
pub mod duplex_stream_with_distinct_streams;
          32  +
          33  +
/// Types for the `DuplexStreamWithInitialMessages` operation.
          34  +
pub mod duplex_stream_with_initial_messages;
          35  +
   27     36   
/// Types for the `EmptyInputAndEmptyOutput` operation.
   28     37   
pub mod empty_input_and_empty_output;
   29     38   
   30     39   
/// Types for the `EndpointOperation` operation.
   31     40   
pub mod endpoint_operation;
   32     41   
   33     42   
/// Types for the `EndpointWithHostLabelOperation` operation.
   34     43   
pub mod endpoint_with_host_label_operation;
   35     44   
   36     45   
/// Types for the `FractionalSeconds` operation.
   37     46   
pub mod fractional_seconds;
   38     47   
   39     48   
/// Types for the `GreetingWithErrors` operation.
   40     49   
pub mod greeting_with_errors;
   41     50   
   42     51   
/// Types for the `HostWithPathOperation` operation.
   43     52   
pub mod host_with_path_operation;
   44     53   
   45     54   
/// Types for the `HttpChecksumRequired` operation.
   46     55   
pub mod http_checksum_required;
   47     56   
   48     57   
/// Types for the `HttpEmptyPrefixHeaders` operation.
   49     58   
pub mod http_empty_prefix_headers;
   50     59   
   51     60   
/// Types for the `HttpEnumPayload` operation.
   52     61   
pub mod http_enum_payload;
   53     62   
   54     63   
/// Types for the `HttpPayloadTraits` operation.
   55     64   
pub mod http_payload_traits;
   56     65   
   57     66   
/// Types for the `HttpPayloadTraitsWithMediaType` operation.
   58     67   
pub mod http_payload_traits_with_media_type;
   59     68   
   60     69   
/// Types for the `HttpPayloadWithStructure` operation.
   61     70   
pub mod http_payload_with_structure;
   62     71   
   63     72   
/// Types for the `HttpPayloadWithUnion` operation.
   64     73   
pub mod http_payload_with_union;
   65     74   
   66     75   
/// Types for the `HttpPrefixHeaders` operation.
   67     76   
pub mod http_prefix_headers;
   68     77   
   69     78   
/// Types for the `HttpPrefixHeadersInResponse` operation.
   70     79   
pub mod http_prefix_headers_in_response;
   71     80   
          81  +
/// Types for the `HttpQueryParamsOnlyOperation` operation.
          82  +
pub mod http_query_params_only_operation;
          83  +
   72     84   
/// Types for the `HttpRequestWithFloatLabels` operation.
   73     85   
pub mod http_request_with_float_labels;
   74     86   
   75     87   
/// Types for the `HttpRequestWithGreedyLabelInPath` operation.
   76     88   
pub mod http_request_with_greedy_label_in_path;
   77     89   
   78     90   
/// Types for the `HttpRequestWithLabels` operation.
   79     91   
pub mod http_request_with_labels;
   80     92   
   81     93   
/// Types for the `HttpRequestWithLabelsAndTimestampFormat` operation.
   82     94   
pub mod http_request_with_labels_and_timestamp_format;
   83     95   
   84     96   
/// Types for the `HttpRequestWithRegexLiteral` operation.
   85     97   
pub mod http_request_with_regex_literal;
   86     98   
   87     99   
/// Types for the `HttpResponseCode` operation.
   88    100   
pub mod http_response_code;
   89    101   
   90    102   
/// Types for the `HttpStringPayload` operation.
   91    103   
pub mod http_string_payload;
   92    104   
   93    105   
/// Types for the `IgnoreQueryParamsInResponse` operation.
   94    106   
pub mod ignore_query_params_in_response;
   95    107   
   96    108   
/// Types for the `InputAndOutputWithHeaders` operation.
   97    109   
pub mod input_and_output_with_headers;
   98    110   
         111  +
/// Types for the `InputStream` operation.
         112  +
pub mod input_stream;
         113  +
         114  +
/// Types for the `InputStreamWithInitialRequest` operation.
         115  +
pub mod input_stream_with_initial_request;
         116  +
   99    117   
/// Types for the `JsonBlobs` operation.
  100    118   
pub mod json_blobs;
  101    119   
  102    120   
/// Types for the `JsonEnums` operation.
  103    121   
pub mod json_enums;
  104    122   
  105    123   
/// Types for the `JsonIntEnums` operation.
  106    124   
pub mod json_int_enums;
  107    125   
  108    126   
/// Types for the `JsonLists` operation.
@@ -216,234 +275,299 @@
  236    254   
  237    255   
/// Types for the `OmitsSerializingEmptyLists` operation.
  238    256   
pub mod omits_serializing_empty_lists;
  239    257   
  240    258   
/// Types for the `OperationWithDefaults` operation.
  241    259   
pub mod operation_with_defaults;
  242    260   
  243    261   
/// Types for the `OperationWithNestedStructure` operation.
  244    262   
pub mod operation_with_nested_structure;
  245    263   
         264  +
/// Types for the `OutputStream` operation.
         265  +
pub mod output_stream;
         266  +
         267  +
/// Types for the `OutputStreamWithInitialResponse` operation.
         268  +
pub mod output_stream_with_initial_response;
         269  +
  246    270   
/// Types for the `PostPlayerAction` operation.
  247    271   
pub mod post_player_action;
  248    272   
  249    273   
/// Types for the `PostUnionWithJsonName` operation.
  250    274   
pub mod post_union_with_json_name;
  251    275   
  252    276   
/// Types for the `PutWithContentEncoding` operation.
  253    277   
pub mod put_with_content_encoding;
  254    278   
  255    279   
/// Types for the `QueryIdempotencyTokenAutoFill` operation.

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/all_query_string_types.rs

@@ -830,830 +869,869 @@
  850    850   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  851    851   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  852    852   
    ) -> Self {
  853    853   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  854    854   
            source,
  855    855   
            meta: meta.unwrap_or_default(),
  856    856   
        })
  857    857   
    }
  858    858   
}
  859    859   
  860         -
pub use crate::operation::all_query_string_types::_all_query_string_types_output::AllQueryStringTypesOutput;
  861         -
  862    860   
pub use crate::operation::all_query_string_types::_all_query_string_types_input::AllQueryStringTypesInput;
  863    861   
         862  +
pub use crate::operation::all_query_string_types::_all_query_string_types_output::AllQueryStringTypesOutput;
         863  +
  864    864   
mod _all_query_string_types_input;
  865    865   
  866    866   
mod _all_query_string_types_output;
  867    867   
  868    868   
/// Builders
  869    869   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/all_query_string_types/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::all_query_string_types::_all_query_string_types_output::AllQueryStringTypesOutputBuilder;
    3         -
    4      2   
pub use crate::operation::all_query_string_types::_all_query_string_types_input::AllQueryStringTypesInputBuilder;
    5      3   
           4  +
pub use crate::operation::all_query_string_types::_all_query_string_types_output::AllQueryStringTypesOutputBuilder;
           5  +
    6      6   
impl crate::operation::all_query_string_types::builders::AllQueryStringTypesInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::all_query_string_types::AllQueryStringTypesOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::all_query_string_types::AllQueryStringTypesError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_and_variable_query_string.rs

@@ -385,385 +424,424 @@
  405    405   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  406    406   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  407    407   
    ) -> Self {
  408    408   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  409    409   
            source,
  410    410   
            meta: meta.unwrap_or_default(),
  411    411   
        })
  412    412   
    }
  413    413   
}
  414    414   
  415         -
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutput;
  416         -
  417    415   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInput;
  418    416   
         417  +
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutput;
         418  +
  419    419   
mod _constant_and_variable_query_string_input;
  420    420   
  421    421   
mod _constant_and_variable_query_string_output;
  422    422   
  423    423   
/// Builders
  424    424   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_and_variable_query_string/builders.rs

@@ -1,1 +35,35 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutputBuilder;
    3         -
    4      2   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInputBuilder;
    5      3   
           4  +
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutputBuilder;
           5  +
    6      6   
impl crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
    7      7   
    /// Sends a request with this input using the given client.
    8      8   
    pub async fn send_with(
    9      9   
        self,
   10     10   
        client: &crate::Client,
   11     11   
    ) -> ::std::result::Result<
   12     12   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     14   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/constant_query_string.rs

@@ -351,351 +390,390 @@
  371    371   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  372    372   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  373    373   
    ) -> Self {
  374    374   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  375    375   
            source,
  376    376   
            meta: meta.unwrap_or_default(),
  377    377   
        })
  378    378   
    }
  379    379   
}
  380    380   
  381         -
pub use crate::operation::constant_query_string::_constant_query_string_output::ConstantQueryStringOutput;
  382         -
  383    381   
pub use crate::operation::constant_query_string::_constant_query_string_input::ConstantQueryStringInput;
  384    382   
         383  +
pub use crate::operation::constant_query_string::_constant_query_string_output::ConstantQueryStringOutput;
         384  +
  385    385   
mod _constant_query_string_input;
  386    386   
  387    387   
mod _constant_query_string_output;
  388    388   
  389    389   
/// Builders
  390    390   
pub mod builders;