Client Test

Client Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,53 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct OperationWithNestedStructureInput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub top_level: ::std::option::Option<crate::types::TopLevel>,
           8  +
}
           9  +
impl OperationWithNestedStructureInput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn top_level(&self) -> ::std::option::Option<&crate::types::TopLevel> {
          12  +
        self.top_level.as_ref()
          13  +
    }
          14  +
}
          15  +
impl OperationWithNestedStructureInput {
          16  +
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput).
          17  +
    pub fn builder() -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder {
          18  +
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`OperationWithNestedStructureInput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput).
          23  +
#[non_exhaustive]
          24  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          25  +
pub struct OperationWithNestedStructureInputBuilder {
          26  +
    pub(crate) top_level: ::std::option::Option<crate::types::TopLevel>,
          27  +
}
          28  +
impl OperationWithNestedStructureInputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    /// This field is required.
          31  +
    pub fn top_level(mut self, input: crate::types::TopLevel) -> Self {
          32  +
        self.top_level = ::std::option::Option::Some(input);
          33  +
        self
          34  +
    }
          35  +
    #[allow(missing_docs)] // documentation missing in model
          36  +
    pub fn set_top_level(mut self, input: ::std::option::Option<crate::types::TopLevel>) -> Self {
          37  +
        self.top_level = input;
          38  +
        self
          39  +
    }
          40  +
    #[allow(missing_docs)] // documentation missing in model
          41  +
    pub fn get_top_level(&self) -> &::std::option::Option<crate::types::TopLevel> {
          42  +
        &self.top_level
          43  +
    }
          44  +
    /// Consumes the builder and constructs a [`OperationWithNestedStructureInput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput).
          45  +
    pub fn build(
          46  +
        self,
          47  +
    ) -> ::std::result::Result<
          48  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput,
          49  +
        ::aws_smithy_types::error::operation::BuildError,
          50  +
    > {
          51  +
        ::std::result::Result::Ok(crate::operation::operation_with_nested_structure::OperationWithNestedStructureInput { top_level: self.top_level })
          52  +
    }
          53  +
}

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

@@ -0,1 +0,117 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct OperationWithNestedStructureOutput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub dialog: crate::types::Dialog,
           8  +
    #[allow(missing_docs)] // documentation missing in model
           9  +
    pub dialog_list: ::std::vec::Vec<crate::types::Dialog>,
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::types::Dialog>,
          12  +
}
          13  +
impl OperationWithNestedStructureOutput {
          14  +
    #[allow(missing_docs)] // documentation missing in model
          15  +
    pub fn dialog(&self) -> &crate::types::Dialog {
          16  +
        &self.dialog
          17  +
    }
          18  +
    #[allow(missing_docs)] // documentation missing in model
          19  +
    pub fn dialog_list(&self) -> &[crate::types::Dialog] {
          20  +
        use std::ops::Deref;
          21  +
        self.dialog_list.deref()
          22  +
    }
          23  +
    #[allow(missing_docs)] // documentation missing in model
          24  +
    pub fn dialog_map(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::Dialog> {
          25  +
        &self.dialog_map
          26  +
    }
          27  +
}
          28  +
impl OperationWithNestedStructureOutput {
          29  +
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          30  +
    pub fn builder() -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder {
          31  +
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::default()
          32  +
    }
          33  +
}
          34  +
          35  +
/// A builder for [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          36  +
#[non_exhaustive]
          37  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          38  +
pub struct OperationWithNestedStructureOutputBuilder {
          39  +
    pub(crate) dialog: ::std::option::Option<crate::types::Dialog>,
          40  +
    pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>,
          41  +
    pub(crate) dialog_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>,
          42  +
}
          43  +
impl OperationWithNestedStructureOutputBuilder {
          44  +
    #[allow(missing_docs)] // documentation missing in model
          45  +
    /// This field is required.
          46  +
    pub fn dialog(mut self, input: crate::types::Dialog) -> Self {
          47  +
        self.dialog = ::std::option::Option::Some(input);
          48  +
        self
          49  +
    }
          50  +
    #[allow(missing_docs)] // documentation missing in model
          51  +
    pub fn set_dialog(mut self, input: ::std::option::Option<crate::types::Dialog>) -> Self {
          52  +
        self.dialog = input;
          53  +
        self
          54  +
    }
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    pub fn get_dialog(&self) -> &::std::option::Option<crate::types::Dialog> {
          57  +
        &self.dialog
          58  +
    }
          59  +
    /// Appends an item to `dialog_list`.
          60  +
    ///
          61  +
    /// To override the contents of this collection use [`set_dialog_list`](Self::set_dialog_list).
          62  +
    ///
          63  +
    pub fn dialog_list(mut self, input: crate::types::Dialog) -> Self {
          64  +
        let mut v = self.dialog_list.unwrap_or_default();
          65  +
        v.push(input);
          66  +
        self.dialog_list = ::std::option::Option::Some(v);
          67  +
        self
          68  +
    }
          69  +
    #[allow(missing_docs)] // documentation missing in model
          70  +
    pub fn set_dialog_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Dialog>>) -> Self {
          71  +
        self.dialog_list = input;
          72  +
        self
          73  +
    }
          74  +
    #[allow(missing_docs)] // documentation missing in model
          75  +
    pub fn get_dialog_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Dialog>> {
          76  +
        &self.dialog_list
          77  +
    }
          78  +
    /// Adds a key-value pair to `dialog_map`.
          79  +
    ///
          80  +
    /// To override the contents of this collection use [`set_dialog_map`](Self::set_dialog_map).
          81  +
    ///
          82  +
    pub fn dialog_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Dialog) -> Self {
          83  +
        let mut hash_map = self.dialog_map.unwrap_or_default();
          84  +
        hash_map.insert(k.into(), v);
          85  +
        self.dialog_map = ::std::option::Option::Some(hash_map);
          86  +
        self
          87  +
    }
          88  +
    #[allow(missing_docs)] // documentation missing in model
          89  +
    pub fn set_dialog_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>>) -> Self {
          90  +
        self.dialog_map = input;
          91  +
        self
          92  +
    }
          93  +
    #[allow(missing_docs)] // documentation missing in model
          94  +
    pub fn get_dialog_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Dialog>> {
          95  +
        &self.dialog_map
          96  +
    }
          97  +
    /// Consumes the builder and constructs a [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput).
          98  +
    /// This method will fail if any of the following fields are not set:
          99  +
    /// - [`dialog`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureOutputBuilder::dialog)
         100  +
    pub fn build(
         101  +
        self,
         102  +
    ) -> ::std::result::Result<
         103  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
         104  +
        ::aws_smithy_types::error::operation::BuildError,
         105  +
    > {
         106  +
        ::std::result::Result::Ok(crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput {
         107  +
            dialog: self.dialog.ok_or_else(|| {
         108  +
                ::aws_smithy_types::error::operation::BuildError::missing_field(
         109  +
                    "dialog",
         110  +
                    "dialog was not specified but it is required when building OperationWithNestedStructureOutput",
         111  +
                )
         112  +
            })?,
         113  +
            dialog_list: self.dialog_list.unwrap_or_default(),
         114  +
            dialog_map: self.dialog_map.unwrap_or_default(),
         115  +
        })
         116  +
    }
         117  +
}

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

Renamed from tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/http_payload_traits2/builders.rs

@@ -1,1 +139,124 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::http_payload_traits2::_http_payload_traits2_output::HttpPayloadTraits2OutputBuilder;
           2  +
pub use crate::operation::operation_with_nested_structure::_operation_with_nested_structure_output::OperationWithNestedStructureOutputBuilder;
    3      3   
    4         -
pub use crate::operation::http_payload_traits2::_http_payload_traits2_input::HttpPayloadTraits2InputBuilder;
           4  +
pub use crate::operation::operation_with_nested_structure::_operation_with_nested_structure_input::OperationWithNestedStructureInputBuilder;
    5      5   
    6         -
impl crate::operation::http_payload_traits2::builders::HttpPayloadTraits2InputBuilder {
           6  +
impl crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder {
    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         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
          12  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
          14  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     16   
        >,
   17     17   
    > {
   18         -
        let mut fluent_builder = client.http_payload_traits2();
          18  +
        let mut fluent_builder = client.operation_with_nested_structure();
   19     19   
        fluent_builder.inner = self;
   20     20   
        fluent_builder.send().await
   21     21   
    }
   22     22   
}
   23         -
/// Fluent builder constructing a request to `HttpPayloadTraits2`.
          23  +
/// Fluent builder constructing a request to `OperationWithNestedStructure`.
   24     24   
///
   25         -
/// This example serializes a blob shape in the payload. In this example, no JSON document is synthesized because the payload is not a structure or a union type.
   26     25   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   27         -
pub struct HttpPayloadTraits2FluentBuilder {
          26  +
pub struct OperationWithNestedStructureFluentBuilder {
   28     27   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29         -
    inner: crate::operation::http_payload_traits2::builders::HttpPayloadTraits2InputBuilder,
          28  +
    inner: crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder,
   30     29   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     30   
}
   32     31   
impl
   33     32   
    crate::client::customize::internal::CustomizableSend<
   34         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
   35         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
   36         -
    > for HttpPayloadTraits2FluentBuilder
          33  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
          34  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
          35  +
    > for OperationWithNestedStructureFluentBuilder
   37     36   
{
   38     37   
    fn send(
   39     38   
        self,
   40     39   
        config_override: crate::config::Builder,
   41     40   
    ) -> crate::client::customize::internal::BoxFuture<
   42     41   
        crate::client::customize::internal::SendResult<
   43         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
   44         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
          42  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
          43  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   45     44   
        >,
   46     45   
    > {
   47     46   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     47   
    }
   49     48   
}
   50         -
impl HttpPayloadTraits2FluentBuilder {
   51         -
    /// Creates a new `HttpPayloadTraits2FluentBuilder`.
          49  +
impl OperationWithNestedStructureFluentBuilder {
          50  +
    /// Creates a new `OperationWithNestedStructureFluentBuilder`.
   52     51   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     52   
        Self {
   54     53   
            handle,
   55     54   
            inner: ::std::default::Default::default(),
   56     55   
            config_override: ::std::option::Option::None,
   57     56   
        }
   58     57   
    }
   59         -
    /// Access the HttpPayloadTraits2 as a reference.
   60         -
    pub fn as_input(&self) -> &crate::operation::http_payload_traits2::builders::HttpPayloadTraits2InputBuilder {
          58  +
    /// Access the OperationWithNestedStructure as a reference.
          59  +
    pub fn as_input(&self) -> &crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureInputBuilder {
   61     60   
        &self.inner
   62     61   
    }
   63     62   
    /// Sends the request and returns the response.
   64     63   
    ///
   65     64   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     65   
    /// can be matched against.
   67     66   
    ///
   68     67   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     68   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     69   
    /// set when configuring the client.
   71     70   
    pub async fn send(
   72     71   
        self,
   73     72   
    ) -> ::std::result::Result<
   74         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
          73  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
   75     74   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
          75  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   77     76   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     77   
        >,
   79     78   
    > {
   80     79   
        let input = self
   81     80   
            .inner
   82     81   
            .build()
   83     82   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84         -
        let runtime_plugins = crate::operation::http_payload_traits2::HttpPayloadTraits2::operation_runtime_plugins(
          83  +
        let runtime_plugins = crate::operation::operation_with_nested_structure::OperationWithNestedStructure::operation_runtime_plugins(
   85     84   
            self.handle.runtime_plugins.clone(),
   86     85   
            &self.handle.conf,
   87     86   
            self.config_override,
   88     87   
        );
   89         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2::orchestrate(&runtime_plugins, input).await
          88  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructure::orchestrate(&runtime_plugins, input).await
   90     89   
    }
   91     90   
   92     91   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93     92   
    pub fn customize(
   94     93   
        self,
   95     94   
    ) -> crate::client::customize::CustomizableOperation<
   96         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
   97         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
          95  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput,
          96  +
        crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
   98     97   
        Self,
   99     98   
    > {
  100     99   
        crate::client::customize::CustomizableOperation::new(self)
  101    100   
    }
  102    101   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    102   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    103   
        self
  105    104   
    }
  106    105   
  107    106   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    107   
        self.config_override = config_override;
  109    108   
        self
  110    109   
    }
  111    110   
    #[allow(missing_docs)] // documentation missing in model
  112         -
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113         -
        self.inner = self.inner.foo(input.into());
         111  +
    pub fn top_level(mut self, input: crate::types::TopLevel) -> Self {
         112  +
        self.inner = self.inner.top_level(input);
  114    113   
        self
  115    114   
    }
  116    115   
    #[allow(missing_docs)] // documentation missing in model
  117         -
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118         -
        self.inner = self.inner.set_foo(input);
         116  +
    pub fn set_top_level(mut self, input: ::std::option::Option<crate::types::TopLevel>) -> Self {
         117  +
        self.inner = self.inner.set_top_level(input);
  119    118   
        self
  120    119   
    }
  121    120   
    #[allow(missing_docs)] // documentation missing in model
  122         -
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
  123         -
        self.inner.get_foo()
  124         -
    }
  125         -
    #[allow(missing_docs)] // documentation missing in model
  126         -
    pub fn blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
  127         -
        self.inner = self.inner.blob(input);
  128         -
        self
  129         -
    }
  130         -
    #[allow(missing_docs)] // documentation missing in model
  131         -
    pub fn set_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
  132         -
        self.inner = self.inner.set_blob(input);
  133         -
        self
  134         -
    }
  135         -
    #[allow(missing_docs)] // documentation missing in model
  136         -
    pub fn get_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
  137         -
        self.inner.get_blob()
         121  +
    pub fn get_top_level(&self) -> &::std::option::Option<crate::types::TopLevel> {
         122  +
        self.inner.get_top_level()
  138    123   
    }
  139    124   
}

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

Renamed from tmp-codegen-diff/codegen-client-test/rest_json_extras/rust-client-codegen/src/operation/http_string_payload2.rs

@@ -1,1 +443,345 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Orchestration and serialization glue logic for `HttpStringPayload2`.
           2  +
/// Orchestration and serialization glue logic for `TestNoInputNoPayload`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5         -
pub struct HttpStringPayload2;
    6         -
impl HttpStringPayload2 {
    7         -
    /// Creates a new `HttpStringPayload2`
           5  +
pub struct TestNoInputNoPayload;
           6  +
impl TestNoInputNoPayload {
           7  +
    /// Creates a new `TestNoInputNoPayload`
    8      8   
    pub fn new() -> Self {
    9      9   
        Self
   10     10   
    }
   11     11   
    pub(crate) async fn orchestrate(
   12     12   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13         -
        input: crate::operation::http_string_payload2::HttpStringPayload2Input,
          13  +
        input: crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput,
   14     14   
    ) -> ::std::result::Result<
   15         -
        crate::operation::http_string_payload2::HttpStringPayload2Output,
          15  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
   16     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17         -
            crate::operation::http_string_payload2::HttpStringPayload2Error,
          17  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
   18     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     19   
        >,
   20     20   
    > {
   21     21   
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
   22     22   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   23     23   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   24     24   
        >| {
   25     25   
            err.map_service_error(|err| {
   26         -
                err.downcast::<crate::operation::http_string_payload2::HttpStringPayload2Error>()
          26  +
                err.downcast::<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError>()
   27     27   
                    .expect("correct error type")
   28     28   
            })
   29     29   
        };
   30     30   
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
   31     31   
            .await
   32     32   
            .map_err(map_err)?;
   33     33   
        let output = context.finalize().map_err(map_err)?;
   34     34   
        ::std::result::Result::Ok(
   35     35   
            output
   36         -
                .downcast::<crate::operation::http_string_payload2::HttpStringPayload2Output>()
          36  +
                .downcast::<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput>()
   37     37   
                .expect("correct output type"),
   38     38   
        )
   39     39   
    }
   40     40   
   41     41   
    pub(crate) async fn orchestrate_with_stop_point(
   42     42   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   43         -
        input: crate::operation::http_string_payload2::HttpStringPayload2Input,
          43  +
        input: crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput,
   44     44   
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
   45     45   
    ) -> ::std::result::Result<
   46     46   
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
   47     47   
        ::aws_smithy_runtime_api::client::result::SdkError<
   48     48   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
   49     49   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   50     50   
        >,
   51     51   
    > {
   52     52   
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
   53     53   
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point(
   54     54   
            "restjsonprotocol",
   55         -
            "HttpStringPayload2",
          55  +
            "TestNoInputNoPayload",
   56     56   
            input,
   57     57   
            runtime_plugins,
   58     58   
            stop_point,
   59     59   
        )
   60     60   
        .await
   61     61   
    }
   62     62   
   63     63   
    pub(crate) fn operation_runtime_plugins(
   64     64   
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   65     65   
        client_config: &crate::config::Config,
   66     66   
        config_override: ::std::option::Option<crate::config::Builder>,
   67     67   
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
   68     68   
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
   69     69   
        runtime_plugins = runtime_plugins.with_client_plugin(crate::auth_plugin::DefaultAuthOptionsPlugin::new(vec![
   70     70   
            ::aws_smithy_runtime::client::auth::no_auth::NO_AUTH_SCHEME_ID,
   71     71   
        ]));
   72     72   
        if let ::std::option::Option::Some(config_override) = config_override {
   73     73   
            for plugin in config_override.runtime_plugins.iter().cloned() {
   74     74   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   75     75   
            }
   76     76   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   77     77   
                config_override,
   78     78   
                client_config.config.clone(),
   79     79   
                &client_config.runtime_components,
   80     80   
            ));
   81     81   
        }
   82     82   
        runtime_plugins
   83     83   
    }
   84     84   
}
   85         -
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for HttpStringPayload2 {
          85  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for TestNoInputNoPayload {
   86     86   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   87         -
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("HttpStringPayload2");
          87  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("TestNoInputNoPayload");
   88     88   
   89     89   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   90         -
            HttpStringPayload2RequestSerializer,
          90  +
            TestNoInputNoPayloadRequestSerializer,
   91     91   
        ));
   92     92   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   93         -
            HttpStringPayload2ResponseDeserializer,
          93  +
            TestNoInputNoPayloadResponseDeserializer,
   94     94   
        ));
   95     95   
   96     96   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   97     97   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   98     98   
        ));
   99     99   
  100    100   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  101         -
            "HttpStringPayload2",
         101  +
            "TestNoInputNoPayload",
  102    102   
            "restjsonprotocol",
  103    103   
        ));
  104    104   
  105    105   
        ::std::option::Option::Some(cfg.freeze())
  106    106   
    }
  107    107   
  108    108   
    fn runtime_components(
  109    109   
        &self,
  110    110   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  111    111   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  112    112   
        #[allow(unused_mut)]
  113         -
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("HttpStringPayload2")
         113  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("TestNoInputNoPayload")
  114    114   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  115         -
            .with_interceptor(HttpStringPayload2EndpointParamsInterceptor)
         115  +
            .with_interceptor(TestNoInputNoPayloadEndpointParamsInterceptor)
  116    116   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  117         -
                crate::operation::http_string_payload2::HttpStringPayload2Error,
         117  +
                crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
  118    118   
            >::new())
  119    119   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  120         -
                crate::operation::http_string_payload2::HttpStringPayload2Error,
         120  +
                crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
  121    121   
            >::new());
  122    122   
  123    123   
        ::std::borrow::Cow::Owned(rcb)
  124    124   
    }
  125    125   
}
  126    126   
  127    127   
#[derive(Debug)]
  128         -
struct HttpStringPayload2ResponseDeserializer;
  129         -
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpStringPayload2ResponseDeserializer {
         128  +
struct TestNoInputNoPayloadResponseDeserializer;
         129  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TestNoInputNoPayloadResponseDeserializer {
  130    130   
    fn deserialize_nonstreaming(
  131    131   
        &self,
  132    132   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  133    133   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  134    134   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  135    135   
        let headers = response.headers();
  136    136   
        let body = response.body().bytes().expect("body loaded");
  137    137   
        #[allow(unused_mut)]
  138    138   
        let mut force_error = false;
  139    139   
  140    140   
        let parse_result = if !success && status != 200 || force_error {
  141         -
            crate::protocol_serde::shape_http_string_payload2::de_http_string_payload2_http_error(status, headers, body)
         141  +
            crate::protocol_serde::shape_test_no_input_no_payload::de_test_no_input_no_payload_http_error(status, headers, body)
  142    142   
        } else {
  143         -
            crate::protocol_serde::shape_http_string_payload2::de_http_string_payload2_http_response(status, headers, body)
         143  +
            crate::protocol_serde::shape_test_no_input_no_payload::de_test_no_input_no_payload_http_response(status, headers, body)
  144    144   
        };
  145    145   
        crate::protocol_serde::type_erase_result(parse_result)
  146    146   
    }
  147    147   
}
  148    148   
#[derive(Debug)]
  149         -
struct HttpStringPayload2RequestSerializer;
  150         -
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpStringPayload2RequestSerializer {
         149  +
struct TestNoInputNoPayloadRequestSerializer;
         150  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TestNoInputNoPayloadRequestSerializer {
  151    151   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  152    152   
    fn serialize_input(
  153    153   
        &self,
  154    154   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  155    155   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  156    156   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  157    157   
        let input = input
  158         -
            .downcast::<crate::operation::http_string_payload2::HttpStringPayload2Input>()
         158  +
            .downcast::<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput>()
  159    159   
            .expect("correct type");
  160    160   
        let _header_serialization_settings = _cfg
  161    161   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  162    162   
            .cloned()
  163    163   
            .unwrap_or_default();
  164    164   
        let mut request_builder = {
  165    165   
            fn uri_base(
  166         -
                _input: &crate::operation::http_string_payload2::HttpStringPayload2Input,
         166  +
                _input: &crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput,
  167    167   
                output: &mut ::std::string::String,
  168    168   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  169    169   
                use ::std::fmt::Write as _;
  170         -
                ::std::write!(output, "/StringPayload2").expect("formatting should succeed");
         170  +
                ::std::write!(output, "/no_input_no_payload").expect("formatting should succeed");
  171    171   
                ::std::result::Result::Ok(())
  172    172   
            }
  173    173   
            #[allow(clippy::unnecessary_wraps)]
  174    174   
            fn update_http_builder(
  175         -
                input: &crate::operation::http_string_payload2::HttpStringPayload2Input,
         175  +
                input: &crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput,
  176    176   
                builder: ::http::request::Builder,
  177    177   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  178    178   
                let mut uri = ::std::string::String::new();
  179    179   
                uri_base(input, &mut uri)?;
  180         -
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
         180  +
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  181    181   
            }
  182    182   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  183         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "text/plain");
  184    183   
            builder
  185    184   
        };
  186         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_http_string_payload2_input::ser_payload_http_payload(
  187         -
            input.payload,
  188         -
        )?);
  189         -
        if let Some(content_length) = body.content_length() {
  190         -
            let content_length = content_length.to_string();
  191         -
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  192         -
        }
         185  +
        let body = ::aws_smithy_types::body::SdkBody::from("");
         186  +
  193    187   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    188   
    }
  195    189   
}
  196    190   
#[derive(Debug)]
  197         -
struct HttpStringPayload2EndpointParamsInterceptor;
         191  +
struct TestNoInputNoPayloadEndpointParamsInterceptor;
  198    192   
  199         -
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpStringPayload2EndpointParamsInterceptor {
         193  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TestNoInputNoPayloadEndpointParamsInterceptor {
  200    194   
    fn name(&self) -> &'static str {
  201         -
        "HttpStringPayload2EndpointParamsInterceptor"
         195  +
        "TestNoInputNoPayloadEndpointParamsInterceptor"
  202    196   
    }
  203    197   
  204    198   
    fn read_before_execution(
  205    199   
        &self,
  206    200   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    201   
            '_,
  208    202   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    203   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    204   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    205   
        >,
  212    206   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    207   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    208   
        let _input = context
  215    209   
            .input()
  216         -
            .downcast_ref::<HttpStringPayload2Input>()
  217         -
            .ok_or("failed to downcast to HttpStringPayload2Input")?;
         210  +
            .downcast_ref::<TestNoInputNoPayloadInput>()
         211  +
            .ok_or("failed to downcast to TestNoInputNoPayloadInput")?;
  218    212   
  219    213   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    214   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    215   
        })?;
  222    216   
        cfg.interceptor_state()
  223    217   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    218   
        ::std::result::Result::Ok(())
  225    219   
    }
  226    220   
}
  227    221   
#[allow(unreachable_code, unused_variables)]
  228    222   
#[cfg(test)]
  229         -
mod http_string_payload2_test {
         223  +
mod test_no_input_no_payload_test {
  230    224   
  231         -
    /// Test ID: RestJsonStringPayloadRequest2
         225  +
    /// Serializes a GET request for an operation with no input, and therefore no modeled body
         226  +
    /// Test ID: RestJsonHttpWithNoInput
  232    227   
    #[::tokio::test]
  233    228   
    #[::tracing_test::traced_test]
  234         -
    async fn rest_json_string_payload_request2_request() {
         229  +
    async fn rest_json_http_with_no_input_request() {
  235    230   
        let (http_client, request_receiver) = ::aws_smithy_runtime::client::http::test_util::capture_request(None);
  236    231   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  237    232   
  238    233   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  239         -
        let result = client
  240         -
            .http_string_payload2()
  241         -
            .set_payload(::std::option::Option::Some("rawstring".to_owned()))
  242         -
            .send()
  243         -
            .await;
         234  +
        let result = client.test_no_input_no_payload().send().await;
  244    235   
        let _ = dbg!(result);
  245    236   
        let http_request = request_receiver.expect_request();
  246         -
        let expected_headers = [("Content-Type", "text/plain")];
  247         -
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  248         -
        let required_headers = &["Content-Length"];
  249         -
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::require_headers(http_request.headers(), required_headers));
         237  +
        let forbidden_headers = &["Content-Length", "Content-Type"];
         238  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_headers(http_request.headers(), forbidden_headers));
  250    239   
        let body = http_request.body().bytes().expect("body should be strict");
  251         -
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  252         -
            body,
  253         -
            "rawstring",
  254         -
            ::aws_smithy_protocol_test::MediaType::from("text/plain"),
  255         -
        ));
         240  +
        // No body
         241  +
        ::pretty_assertions::assert_eq!(::std::str::from_utf8(body).unwrap(), "");
  256    242   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  257         -
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  258         -
        ::pretty_assertions::assert_eq!(uri.path(), "/StringPayload2", "path was incorrect");
  259         -
    }
  260         -
    /// Test ID: RestJsonStringPayloadResponse2
  261         -
    #[::tokio::test]
  262         -
    #[::tracing_test::traced_test]
  263         -
    async fn rest_json_string_payload_response2_response() {
  264         -
        let expected_output = crate::operation::http_string_payload2::HttpStringPayload2Output::builder()
  265         -
            .set_payload(::std::option::Option::Some("rawstring".to_owned()))
  266         -
            .build();
  267         -
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  268         -
            ::http::response::Builder::new()
  269         -
                .header("Content-Type", "text/plain")
  270         -
                .status(200)
  271         -
                .body(::aws_smithy_types::body::SdkBody::from("rawstring"))
  272         -
                .unwrap(),
  273         -
        )
  274         -
        .unwrap();
  275         -
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  276         -
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  277         -
  278         -
        let op = crate::operation::http_string_payload2::HttpStringPayload2::new();
  279         -
        let config = op.config().expect("the operation has config");
  280         -
        let de = config
  281         -
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  282         -
            .expect("the config must have a deserializer");
  283         -
  284         -
        let parsed = de.deserialize_streaming(&mut http_response);
  285         -
        let parsed = parsed.unwrap_or_else(|| {
  286         -
            let http_response =
  287         -
                http_response.map(|body| ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(body.bytes().unwrap())));
  288         -
            de.deserialize_nonstreaming(&http_response)
  289         -
        });
  290         -
        let parsed = parsed
  291         -
            .expect("should be successful response")
  292         -
            .downcast::<crate::operation::http_string_payload2::HttpStringPayload2Output>()
  293         -
            .unwrap();
  294         -
        ::pretty_assertions::assert_eq!(parsed.payload, expected_output.payload, "Unexpected value for `payload`");
  295         -
    }
  296         -
    /// Upper case error modeled lower case
  297         -
    /// Test ID: ServiceLevelErrorClient
  298         -
    #[::tokio::test]
  299         -
    #[::tracing_test::traced_test]
  300         -
    async fn service_level_error_client_response() {
  301         -
        let expected_output = crate::types::error::ExtraError::builder().build();
  302         -
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  303         -
            ::http::response::Builder::new()
  304         -
                .header("X-Amzn-Errortype", "ExtraError")
  305         -
                .status(500)
  306         -
                .body(::aws_smithy_types::body::SdkBody::from(""))
  307         -
                .unwrap(),
  308         -
        )
  309         -
        .unwrap();
  310         -
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  311         -
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  312         -
  313         -
        let op = crate::operation::http_string_payload2::HttpStringPayload2::new();
  314         -
        let config = op.config().expect("the operation has config");
  315         -
        let de = config
  316         -
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  317         -
            .expect("the config must have a deserializer");
  318         -
  319         -
        let parsed = de.deserialize_streaming(&mut http_response);
  320         -
        let parsed = parsed.unwrap_or_else(|| {
  321         -
            let http_response =
  322         -
                http_response.map(|body| ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(body.bytes().unwrap())));
  323         -
            de.deserialize_nonstreaming(&http_response)
  324         -
        });
  325         -
        let parsed = parsed.expect_err("should be error response");
  326         -
        let parsed: &crate::operation::http_string_payload2::HttpStringPayload2Error =
  327         -
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  328         -
        if let crate::operation::http_string_payload2::HttpStringPayload2Error::ExtraError(parsed) = parsed {
  329         -
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  330         -
        } else {
  331         -
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  332         -
        }
         243  +
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
         244  +
        ::pretty_assertions::assert_eq!(uri.path(), "/no_input_no_payload", "path was incorrect");
  333    245   
    }
  334    246   
}
  335    247   
  336         -
/// Error type for the `HttpStringPayload2Error` operation.
         248  +
/// Error type for the `TestNoInputNoPayloadError` operation.
  337    249   
#[non_exhaustive]
  338    250   
#[derive(::std::fmt::Debug)]
  339         -
pub enum HttpStringPayload2Error {
  340         -
    #[allow(missing_docs)] // documentation missing in model
  341         -
    ExtraError(crate::types::error::ExtraError),
         251  +
pub enum TestNoInputNoPayloadError {
  342    252   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  343    253   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  344    254   
    variable wildcard pattern and check `.code()`:
  345    255   
     \
  346    256   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  347    257   
     \
  348         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpStringPayload2Error) for what information is available for the error.")]
         258  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TestNoInputNoPayloadError) for what information is available for the error.")]
  349    259   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  350    260   
}
  351         -
impl HttpStringPayload2Error {
  352         -
    /// Creates the `HttpStringPayload2Error::Unhandled` variant from any error type.
         261  +
impl TestNoInputNoPayloadError {
         262  +
    /// Creates the `TestNoInputNoPayloadError::Unhandled` variant from any error type.
  353    263   
    pub fn unhandled(
  354    264   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  355    265   
    ) -> Self {
  356    266   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  357    267   
            source: err.into(),
  358    268   
            meta: ::std::default::Default::default(),
  359    269   
        })
  360    270   
    }
  361    271   
  362         -
    /// Creates the `HttpStringPayload2Error::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         272  +
    /// Creates the `TestNoInputNoPayloadError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  363    273   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  364    274   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  365    275   
            source: err.clone().into(),
  366    276   
            meta: err,
  367    277   
        })
  368    278   
    }
  369    279   
    ///
  370    280   
    /// Returns error metadata, which includes the error code, message,
  371    281   
    /// request ID, and potentially additional information.
  372    282   
    ///
  373    283   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  374    284   
        match self {
  375         -
            Self::ExtraError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  376    285   
            Self::Unhandled(e) => &e.meta,
  377    286   
        }
  378    287   
    }
  379         -
    /// Returns `true` if the error kind is `HttpStringPayload2Error::ExtraError`.
  380         -
    pub fn is_extra_error(&self) -> bool {
  381         -
        matches!(self, Self::ExtraError(_))
  382         -
    }
  383    288   
}
  384         -
impl ::std::error::Error for HttpStringPayload2Error {
         289  +
impl ::std::error::Error for TestNoInputNoPayloadError {
  385    290   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  386    291   
        match self {
  387         -
            Self::ExtraError(_inner) => ::std::option::Option::Some(_inner),
  388    292   
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  389    293   
        }
  390    294   
    }
  391    295   
}
  392         -
impl ::std::fmt::Display for HttpStringPayload2Error {
         296  +
impl ::std::fmt::Display for TestNoInputNoPayloadError {
  393    297   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  394    298   
        match self {
  395         -
            Self::ExtraError(_inner) => _inner.fmt(f),
  396    299   
            Self::Unhandled(_inner) => {
  397    300   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  398    301   
                    write!(f, "unhandled error ({code})")
  399    302   
                } else {
  400    303   
                    f.write_str("unhandled error")
  401    304   
                }
  402    305   
            }
  403    306   
        }
  404    307   
    }
  405    308   
}
  406         -
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpStringPayload2Error {
         309  +
impl ::aws_smithy_types::retry::ProvideErrorKind for TestNoInputNoPayloadError {
  407    310   
    fn code(&self) -> ::std::option::Option<&str> {
  408    311   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  409    312   
    }
  410    313   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  411    314   
        ::std::option::Option::None
  412    315   
    }
  413    316   
}
  414         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpStringPayload2Error {
         317  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TestNoInputNoPayloadError {
  415    318   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  416    319   
        match self {
  417         -
            Self::ExtraError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  418    320   
            Self::Unhandled(_inner) => &_inner.meta,
  419    321   
        }
  420    322   
    }
  421    323   
}
  422         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpStringPayload2Error {
         324  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TestNoInputNoPayloadError {
  423    325   
    fn create_unhandled_error(
  424    326   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  425    327   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  426    328   
    ) -> Self {
  427    329   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  428    330   
            source,
  429    331   
            meta: meta.unwrap_or_default(),
  430    332   
        })
  431    333   
    }
  432    334   
}
  433    335   
  434         -
pub use crate::operation::http_string_payload2::_http_string_payload2_output::HttpStringPayload2Output;
         336  +
pub use crate::operation::test_no_input_no_payload::_test_no_input_no_payload_output::TestNoInputNoPayloadOutput;
  435    337   
  436         -
pub use crate::operation::http_string_payload2::_http_string_payload2_input::HttpStringPayload2Input;
         338  +
pub use crate::operation::test_no_input_no_payload::_test_no_input_no_payload_input::TestNoInputNoPayloadInput;
  437    339   
  438         -
mod _http_string_payload2_input;
         340  +
mod _test_no_input_no_payload_input;
  439    341   
  440         -
mod _http_string_payload2_output;
         342  +
mod _test_no_input_no_payload_output;
  441    343   
  442    344   
/// Builders
  443    345   
pub mod builders;

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

@@ -0,1 +0,25 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct TestNoInputNoPayloadInput {}
           6  +
impl TestNoInputNoPayloadInput {
           7  +
    /// Creates a new builder-style object to manufacture [`TestNoInputNoPayloadInput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput).
           8  +
    pub fn builder() -> crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadInputBuilder {
           9  +
        crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadInputBuilder::default()
          10  +
    }
          11  +
}
          12  +
          13  +
/// A builder for [`TestNoInputNoPayloadInput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput).
          14  +
#[non_exhaustive]
          15  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          16  +
pub struct TestNoInputNoPayloadInputBuilder {}
          17  +
impl TestNoInputNoPayloadInputBuilder {
          18  +
    /// Consumes the builder and constructs a [`TestNoInputNoPayloadInput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput).
          19  +
    pub fn build(
          20  +
        self,
          21  +
    ) -> ::std::result::Result<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput, ::aws_smithy_types::error::operation::BuildError>
          22  +
    {
          23  +
        ::std::result::Result::Ok(crate::operation::test_no_input_no_payload::TestNoInputNoPayloadInput {})
          24  +
    }
          25  +
}

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

@@ -0,1 +0,47 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[non_exhaustive]
           4  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           5  +
pub struct TestNoInputNoPayloadOutput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub test_id: ::std::option::Option<::std::string::String>,
           8  +
}
           9  +
impl TestNoInputNoPayloadOutput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn test_id(&self) -> ::std::option::Option<&str> {
          12  +
        self.test_id.as_deref()
          13  +
    }
          14  +
}
          15  +
impl TestNoInputNoPayloadOutput {
          16  +
    /// Creates a new builder-style object to manufacture [`TestNoInputNoPayloadOutput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput).
          17  +
    pub fn builder() -> crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadOutputBuilder {
          18  +
        crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadOutputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`TestNoInputNoPayloadOutput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput).
          23  +
#[non_exhaustive]
          24  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          25  +
pub struct TestNoInputNoPayloadOutputBuilder {
          26  +
    pub(crate) test_id: ::std::option::Option<::std::string::String>,
          27  +
}
          28  +
impl TestNoInputNoPayloadOutputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn test_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          31  +
        self.test_id = ::std::option::Option::Some(input.into());
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          36  +
        self.test_id = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_test_id(&self) -> &::std::option::Option<::std::string::String> {
          41  +
        &self.test_id
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`TestNoInputNoPayloadOutput`](crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput).
          44  +
    pub fn build(self) -> crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput {
          45  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput { test_id: self.test_id }
          46  +
    }
          47  +
}

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

@@ -0,1 +0,111 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::test_no_input_no_payload::_test_no_input_no_payload_output::TestNoInputNoPayloadOutputBuilder;
           3  +
           4  +
pub use crate::operation::test_no_input_no_payload::_test_no_input_no_payload_input::TestNoInputNoPayloadInputBuilder;
           5  +
           6  +
impl crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadInputBuilder {
           7  +
    /// Sends a request with this input using the given client.
           8  +
    pub async fn send_with(
           9  +
        self,
          10  +
        client: &crate::Client,
          11  +
    ) -> ::std::result::Result<
          12  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.test_no_input_no_payload();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `TestNoInputNoPayload`.
          24  +
///
          25  +
/// This example operation has no input and serializes a request without an HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.
          26  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          27  +
pub struct TestNoInputNoPayloadFluentBuilder {
          28  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          29  +
    inner: crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadInputBuilder,
          30  +
    config_override: ::std::option::Option<crate::config::Builder>,
          31  +
}
          32  +
impl
          33  +
    crate::client::customize::internal::CustomizableSend<
          34  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          35  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          36  +
    > for TestNoInputNoPayloadFluentBuilder
          37  +
{
          38  +
    fn send(
          39  +
        self,
          40  +
        config_override: crate::config::Builder,
          41  +
    ) -> crate::client::customize::internal::BoxFuture<
          42  +
        crate::client::customize::internal::SendResult<
          43  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          44  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          45  +
        >,
          46  +
    > {
          47  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          48  +
    }
          49  +
}
          50  +
impl TestNoInputNoPayloadFluentBuilder {
          51  +
    /// Creates a new `TestNoInputNoPayloadFluentBuilder`.
          52  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          53  +
        Self {
          54  +
            handle,
          55  +
            inner: ::std::default::Default::default(),
          56  +
            config_override: ::std::option::Option::None,
          57  +
        }
          58  +
    }
          59  +
    /// Access the TestNoInputNoPayload as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::test_no_input_no_payload::builders::TestNoInputNoPayloadInputBuilder {
          61  +
        &self.inner
          62  +
    }
          63  +
    /// Sends the request and returns the response.
          64  +
    ///
          65  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          66  +
    /// can be matched against.
          67  +
    ///
          68  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          69  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          70  +
    /// set when configuring the client.
          71  +
    pub async fn send(
          72  +
        self,
          73  +
    ) -> ::std::result::Result<
          74  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          75  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          76  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          77  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          78  +
        >,
          79  +
    > {
          80  +
        let input = self
          81  +
            .inner
          82  +
            .build()
          83  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          84  +
        let runtime_plugins = crate::operation::test_no_input_no_payload::TestNoInputNoPayload::operation_runtime_plugins(
          85  +
            self.handle.runtime_plugins.clone(),
          86  +
            &self.handle.conf,
          87  +
            self.config_override,
          88  +
        );
          89  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayload::orchestrate(&runtime_plugins, input).await
          90  +
    }
          91  +
          92  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          93  +
    pub fn customize(
          94  +
        self,
          95  +
    ) -> crate::client::customize::CustomizableOperation<
          96  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadOutput,
          97  +
        crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError,
          98  +
        Self,
          99  +
    > {
         100  +
        crate::client::customize::CustomizableOperation::new(self)
         101  +
    }
         102  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         103  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         104  +
        self
         105  +
    }
         106  +
         107  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         108  +
        self.config_override = config_override;
         109  +
        self
         110  +
    }
         111  +
}

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

@@ -2,2 +61,63 @@
   22     22   
) -> Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23     23   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24     24   
}
   25     25   
   26     26   
pub(crate) mod shape_all_query_string_types;
   27     27   
   28     28   
pub(crate) mod shape_constant_and_variable_query_string;
   29     29   
   30     30   
pub(crate) mod shape_constant_query_string;
   31     31   
          32  +
pub(crate) mod shape_content_type_parameters;
          33  +
   32     34   
pub(crate) mod shape_datetime_offsets;
   33     35   
   34     36   
pub(crate) mod shape_document_type;
   35     37   
   36     38   
pub(crate) mod shape_document_type_as_map_value;
   37     39   
   38     40   
pub(crate) mod shape_document_type_as_payload;
   39     41   
   40     42   
pub fn serialize_document(input: &::aws_smithy_types::Document) -> ::std::vec::Vec<u8> {
   41     43   
    let mut out = String::new();
@@ -180,182 +297,307 @@
  200    202   
pub(crate) mod shape_no_input_and_output;
  201    203   
  202    204   
pub(crate) mod shape_null_and_empty_headers_client;
  203    205   
  204    206   
pub(crate) mod shape_null_and_empty_headers_server;
  205    207   
  206    208   
pub(crate) mod shape_omits_null_serializes_empty_string;
  207    209   
  208    210   
pub(crate) mod shape_omits_serializing_empty_lists;
  209    211   
         212  +
pub(crate) mod shape_operation_with_defaults;
         213  +
         214  +
pub(crate) mod shape_operation_with_nested_structure;
         215  +
  210    216   
pub(crate) mod shape_post_player_action;
  211    217   
  212    218   
pub(crate) mod shape_post_union_with_json_name;
  213    219   
  214    220   
pub(crate) mod shape_put_with_content_encoding;
  215    221   
  216    222   
pub(crate) mod shape_query_idempotency_token_auto_fill;
  217    223   
  218    224   
pub(crate) mod shape_query_params_as_string_list_map;
  219    225   
  220    226   
pub(crate) mod shape_query_precedence;
  221    227   
  222    228   
pub(crate) mod shape_recursive_shapes;
  223    229   
  224    230   
pub(crate) mod shape_simple_scalar_properties;
  225    231   
  226    232   
pub(crate) mod shape_sparse_json_lists;
  227    233   
  228    234   
pub(crate) mod shape_sparse_json_maps;
  229    235   
  230    236   
pub(crate) mod shape_streaming_traits;
  231    237   
  232    238   
pub(crate) mod shape_streaming_traits_input;
  233    239   
  234    240   
pub(crate) mod shape_streaming_traits_require_length;
  235    241   
  236    242   
pub(crate) mod shape_streaming_traits_require_length_input;
  237    243   
  238    244   
pub(crate) mod shape_streaming_traits_with_media_type;
  239    245   
  240    246   
pub(crate) mod shape_streaming_traits_with_media_type_input;
  241    247   
  242    248   
pub(crate) mod shape_test_body_structure;
  243    249   
         250  +
pub(crate) mod shape_test_no_input_no_payload;
         251  +
  244    252   
pub(crate) mod shape_test_no_payload;
  245    253   
  246    254   
pub(crate) mod shape_test_payload_blob;
  247    255   
  248    256   
pub(crate) mod shape_test_payload_blob_input;
  249    257   
  250    258   
pub(crate) mod shape_test_payload_structure;
  251    259   
  252    260   
pub(crate) mod shape_test_payload_structure_input;
  253    261   
  254    262   
pub(crate) mod shape_timestamp_format_headers;
  255    263   
  256    264   
pub(crate) mod shape_unit_input_and_output;
  257    265   
  258    266   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
  259    267   
    if data.is_empty() {
  260    268   
        b"{}"
  261    269   
    } else {
  262    270   
        data
  263    271   
    }
  264    272   
}
  265    273   
  266    274   
pub(crate) mod shape_complex_error;
  267    275   
         276  +
pub(crate) mod shape_content_type_parameters_input;
         277  +
  268    278   
pub(crate) mod shape_document_type_as_map_value_input;
  269    279   
  270    280   
pub(crate) mod shape_document_type_as_payload_output;
  271    281   
  272    282   
pub(crate) mod shape_document_type_input;
  273    283   
  274    284   
pub(crate) mod shape_endpoint_with_host_label_operation_input;
  275    285   
  276    286   
pub(crate) mod shape_foo_error;
  277    287   
@@ -328,338 +470,504 @@
  348    358   
pub(crate) mod shape_malformed_timestamp_body_http_date_input;
  349    359   
  350    360   
pub(crate) mod shape_malformed_union_input;
  351    361   
  352    362   
pub(crate) mod shape_media_type_header_output;
  353    363   
  354    364   
pub(crate) mod shape_null_and_empty_headers_client_output;
  355    365   
  356    366   
pub(crate) mod shape_null_and_empty_headers_server_output;
  357    367   
         368  +
pub(crate) mod shape_operation_with_defaults_input;
         369  +
         370  +
pub(crate) mod shape_operation_with_nested_structure_input;
         371  +
  358    372   
pub(crate) mod shape_post_player_action_input;
  359    373   
  360    374   
pub(crate) mod shape_post_union_with_json_name_input;
  361    375   
  362    376   
pub(crate) mod shape_put_with_content_encoding_input;
  363    377   
  364    378   
pub(crate) mod shape_recursive_shapes_input;
  365    379   
  366    380   
pub(crate) mod shape_simple_scalar_properties_input;
  367    381   
  368    382   
pub(crate) mod shape_simple_scalar_properties_output;
  369    383   
  370    384   
pub(crate) mod shape_sparse_json_lists_input;
  371    385   
  372    386   
pub(crate) mod shape_sparse_json_maps_input;
  373    387   
  374    388   
pub(crate) mod shape_streaming_traits_output;
  375    389   
  376    390   
pub(crate) mod shape_streaming_traits_with_media_type_output;
  377    391   
  378    392   
pub(crate) mod shape_test_body_structure_input;
  379    393   
  380    394   
pub(crate) mod shape_test_body_structure_output;
  381    395   
         396  +
pub(crate) mod shape_test_no_input_no_payload_output;
         397  +
  382    398   
pub(crate) mod shape_test_no_payload_output;
  383    399   
  384    400   
pub(crate) mod shape_test_payload_blob_output;
  385    401   
  386    402   
pub(crate) mod shape_test_payload_structure_output;
  387    403   
  388    404   
pub(crate) mod shape_timestamp_format_headers_output;
  389    405   
  390    406   
pub(crate) mod shape_boolean_list;
  391    407   
         408  +
pub(crate) mod shape_client_optional_defaults;
         409  +
  392    410   
pub(crate) mod shape_complex_nested_error_data;
  393    411   
         412  +
pub(crate) mod shape_defaults;
         413  +
  394    414   
pub(crate) mod shape_dense_boolean_map;
  395    415   
  396    416   
pub(crate) mod shape_dense_number_map;
  397    417   
  398    418   
pub(crate) mod shape_dense_set_map;
  399    419   
  400    420   
pub(crate) mod shape_dense_string_map;
  401    421   
  402    422   
pub(crate) mod shape_dense_struct_map;
  403    423   
         424  +
pub(crate) mod shape_dialog;
         425  +
         426  +
pub(crate) mod shape_dialog_list;
         427  +
         428  +
pub(crate) mod shape_dialog_map;
         429  +
  404    430   
pub(crate) mod shape_document;
  405    431   
  406    432   
pub(crate) mod shape_document_valued_map;
  407    433   
  408    434   
pub(crate) mod shape_foo_enum_list;
  409    435   
  410    436   
pub(crate) mod shape_foo_enum_map;
  411    437   
  412    438   
pub(crate) mod shape_foo_enum_set;
  413    439   
  414    440   
pub(crate) mod shape_greeting_struct;
  415    441   
  416    442   
pub(crate) mod shape_integer_enum_list;
  417    443   
  418    444   
pub(crate) mod shape_integer_enum_map;
  419    445   
  420    446   
pub(crate) mod shape_integer_enum_set;
  421    447   
  422    448   
pub(crate) mod shape_integer_list;
  423    449   
  424    450   
pub(crate) mod shape_my_union;
  425    451   
  426    452   
pub(crate) mod shape_nested_payload;
  427    453   
  428    454   
pub(crate) mod shape_nested_string_list;
  429    455   
  430    456   
pub(crate) mod shape_payload_config;
  431    457   
  432    458   
pub(crate) mod shape_player_action;
  433    459   
  434    460   
pub(crate) mod shape_recursive_shapes_input_output_nested1;
  435    461   
  436    462   
pub(crate) mod shape_simple_union;
  437    463   
  438    464   
pub(crate) mod shape_sparse_boolean_map;
  439    465   
  440    466   
pub(crate) mod shape_sparse_number_map;
  441    467   
  442    468   
pub(crate) mod shape_sparse_set_map;
  443    469   
  444    470   
pub(crate) mod shape_sparse_string_list;
  445    471   
  446    472   
pub(crate) mod shape_sparse_string_map;
  447    473   
  448    474   
pub(crate) mod shape_sparse_struct_map;
  449    475   
  450    476   
pub(crate) mod shape_string_list;
  451    477   
  452    478   
pub(crate) mod shape_string_set;
  453    479   
  454    480   
pub(crate) mod shape_structure_list;
  455    481   
  456    482   
pub(crate) mod shape_structure_list_member;
  457    483   
  458    484   
pub(crate) mod shape_test_config;
  459    485   
         486  +
pub(crate) mod shape_test_string_list;
         487  +
         488  +
pub(crate) mod shape_test_string_map;
         489  +
  460    490   
pub(crate) mod shape_timestamp_list;
  461    491   
         492  +
pub(crate) mod shape_top_level;
         493  +
  462    494   
pub(crate) mod shape_union_payload;
  463    495   
  464    496   
pub(crate) mod shape_union_with_json_name;
  465    497   
         498  +
pub(crate) mod shape_farewell;
         499  +
  466    500   
pub(crate) mod shape_recursive_shapes_input_output_nested2;
  467    501   
  468    502   
pub(crate) mod shape_renamed_greeting;
  469    503   
  470    504   
pub(crate) mod shape_string_map;

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

@@ -0,1 +0,13 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_client_optional_defaults(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::types::ClientOptionalDefaults,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    if let Some(var_1) = &input.member {
           7  +
        object.key("member").number(
           8  +
            #[allow(clippy::useless_conversion)]
           9  +
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
          10  +
        );
          11  +
    }
          12  +
    Ok(())
          13  +
}

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

@@ -0,1 +0,42 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub fn de_content_type_parameters_http_error(
           4  +
    _response_status: u16,
           5  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
           6  +
    _response_body: &[u8],
           7  +
) -> std::result::Result<
           8  +
    crate::operation::content_type_parameters::ContentTypeParametersOutput,
           9  +
    crate::operation::content_type_parameters::ContentTypeParametersError,
          10  +
> {
          11  +
    #[allow(unused_mut)]
          12  +
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
          13  +
        .map_err(crate::operation::content_type_parameters::ContentTypeParametersError::unhandled)?;
          14  +
    let generic = generic_builder.build();
          15  +
    Err(crate::operation::content_type_parameters::ContentTypeParametersError::generic(generic))
          16  +
}
          17  +
          18  +
#[allow(clippy::unnecessary_wraps)]
          19  +
pub fn de_content_type_parameters_http_response(
          20  +
    _response_status: u16,
          21  +
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
          22  +
    _response_body: &[u8],
          23  +
) -> std::result::Result<
          24  +
    crate::operation::content_type_parameters::ContentTypeParametersOutput,
          25  +
    crate::operation::content_type_parameters::ContentTypeParametersError,
          26  +
> {
          27  +
    Ok({
          28  +
        #[allow(unused_mut)]
          29  +
        let mut output = crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default();
          30  +
        output.build()
          31  +
    })
          32  +
}
          33  +
          34  +
pub fn ser_content_type_parameters_input(
          35  +
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
          36  +
) -> Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          37  +
    let mut out = String::new();
          38  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
          39  +
    crate::protocol_serde::shape_content_type_parameters_input::ser_content_type_parameters_input_input(&mut object, input)?;
          40  +
    object.finish();
          41  +
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          42  +
}

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

@@ -0,1 +0,13 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_content_type_parameters_input_input(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    if let Some(var_1) = &input.value {
           7  +
        object.key("value").number(
           8  +
            #[allow(clippy::useless_conversion)]
           9  +
            ::aws_smithy_types::Number::NegInt((*var_1).into()),
          10  +
        );
          11  +
    }
          12  +
    Ok(())
          13  +
}

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

@@ -0,1 +0,149 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_defaults(
           3  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
           4  +
    input: &crate::types::Defaults,
           5  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           6  +
    {
           7  +
        object.key("defaultString").string(input.default_string.as_str());
           8  +
    }
           9  +
    if !input.default_boolean {
          10  +
        object.key("defaultBoolean").boolean(input.default_boolean);
          11  +
    }
          12  +
    {
          13  +
        let mut array_1 = object.key("defaultList").start_array();
          14  +
        for item_2 in &input.default_list {
          15  +
            {
          16  +
                array_1.value().string(item_2.as_str());
          17  +
            }
          18  +
        }
          19  +
        array_1.finish();
          20  +
    }
          21  +
    {
          22  +
        object.key("defaultDocumentMap").document(&input.default_document_map);
          23  +
    }
          24  +
    {
          25  +
        object.key("defaultDocumentString").document(&input.default_document_string);
          26  +
    }
          27  +
    {
          28  +
        object.key("defaultDocumentBoolean").document(&input.default_document_boolean);
          29  +
    }
          30  +
    {
          31  +
        object.key("defaultDocumentList").document(&input.default_document_list);
          32  +
    }
          33  +
    if let Some(var_3) = &input.default_null_document {
          34  +
        object.key("defaultNullDocument").document(var_3);
          35  +
    }
          36  +
    {
          37  +
        object
          38  +
            .key("defaultTimestamp")
          39  +
            .date_time(&input.default_timestamp, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
          40  +
    }
          41  +
    {
          42  +
        object
          43  +
            .key("defaultBlob")
          44  +
            .string_unchecked(&::aws_smithy_types::base64::encode(&input.default_blob));
          45  +
    }
          46  +
    if input.default_byte != 1 {
          47  +
        object.key("defaultByte").number(
          48  +
            #[allow(clippy::useless_conversion)]
          49  +
            ::aws_smithy_types::Number::NegInt((input.default_byte).into()),
          50  +
        );
          51  +
    }
          52  +
    if input.default_short != 1 {
          53  +
        object.key("defaultShort").number(
          54  +
            #[allow(clippy::useless_conversion)]
          55  +
            ::aws_smithy_types::Number::NegInt((input.default_short).into()),
          56  +
        );
          57  +
    }
          58  +
    if input.default_integer != 10 {
          59  +
        object.key("defaultInteger").number(
          60  +
            #[allow(clippy::useless_conversion)]
          61  +
            ::aws_smithy_types::Number::NegInt((input.default_integer).into()),
          62  +
        );
          63  +
    }
          64  +
    if input.default_long != 100 {
          65  +
        object.key("defaultLong").number(
          66  +
            #[allow(clippy::useless_conversion)]
          67  +
            ::aws_smithy_types::Number::NegInt((input.default_long).into()),
          68  +
        );
          69  +
    }
          70  +
    if input.default_float != 1.0 {
          71  +
        object.key("defaultFloat").number(
          72  +
            #[allow(clippy::useless_conversion)]
          73  +
            ::aws_smithy_types::Number::Float((input.default_float).into()),
          74  +
        );
          75  +
    }
          76  +
    if input.default_double != 1.0 {
          77  +
        object.key("defaultDouble").number(
          78  +
            #[allow(clippy::useless_conversion)]
          79  +
            ::aws_smithy_types::Number::Float((input.default_double).into()),
          80  +
        );
          81  +
    }
          82  +
    {
          83  +
        #[allow(unused_mut)]
          84  +
        let mut object_4 = object.key("defaultMap").start_object();
          85  +
        for (key_5, value_6) in &input.default_map {
          86  +
            {
          87  +
                object_4.key(key_5.as_str()).string(value_6.as_str());
          88  +
            }
          89  +
        }
          90  +
        object_4.finish();
          91  +
    }
          92  +
    {
          93  +
        object.key("defaultEnum").string(input.default_enum.as_str());
          94  +
    }
          95  +
    if input.default_int_enum != 1 {
          96  +
        object.key("defaultIntEnum").number(
          97  +
            #[allow(clippy::useless_conversion)]
          98  +
            ::aws_smithy_types::Number::NegInt((input.default_int_enum).into()),
          99  +
        );
         100  +
    }
         101  +
    {
         102  +
        object.key("emptyString").string(input.empty_string.as_str());
         103  +
    }
         104  +
    if input.false_boolean {
         105  +
        object.key("falseBoolean").boolean(input.false_boolean);
         106  +
    }
         107  +
    {
         108  +
        object
         109  +
            .key("emptyBlob")
         110  +
            .string_unchecked(&::aws_smithy_types::base64::encode(&input.empty_blob));
         111  +
    }
         112  +
    if input.zero_byte != 0 {
         113  +
        object.key("zeroByte").number(
         114  +
            #[allow(clippy::useless_conversion)]
         115  +
            ::aws_smithy_types::Number::NegInt((input.zero_byte).into()),
         116  +
        );
         117  +
    }
         118  +
    if input.zero_short != 0 {
         119  +
        object.key("zeroShort").number(
         120  +
            #[allow(clippy::useless_conversion)]
         121  +
            ::aws_smithy_types::Number::NegInt((input.zero_short).into()),
         122  +
        );
         123  +
    }
         124  +
    if input.zero_integer != 0 {
         125  +
        object.key("zeroInteger").number(
         126  +
            #[allow(clippy::useless_conversion)]
         127  +
            ::aws_smithy_types::Number::NegInt((input.zero_integer).into()),
         128  +
        );
         129  +
    }
         130  +
    if input.zero_long != 0 {
         131  +
        object.key("zeroLong").number(
         132  +
            #[allow(clippy::useless_conversion)]
         133  +
            ::aws_smithy_types::Number::NegInt((input.zero_long).into()),
         134  +
        );
         135  +
    }
         136  +
    if input.zero_float != 0.0 {
         137  +
        object.key("zeroFloat").number(
         138  +
            #[allow(clippy::useless_conversion)]
         139  +
            ::aws_smithy_types::Number::Float((input.zero_float).into()),
         140  +
        );
         141  +
    }
         142  +
    if input.zero_double != 0.0 {
         143  +
        object.key("zeroDouble").number(
         144  +
            #[allow(clippy::useless_conversion)]
         145  +
            ::aws_smithy_types::Number::Float((input.zero_double).into()),
         146  +
        );
         147  +
    }
         148  +
    Ok(())
         149  +
}

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

@@ -0,1 +0,69 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_dialog<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<crate::types::Dialog>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          11  +
            #[allow(unused_mut)]
          12  +
            let mut builder = crate::types::builders::DialogBuilder::default();
          13  +
            loop {
          14  +
                match tokens.next().transpose()? {
          15  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          16  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
          17  +
                        "language" => {
          18  +
                            builder = builder.set_language(
          19  +
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          20  +
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          21  +
                                    .transpose()?,
          22  +
                            );
          23  +
                        }
          24  +
                        "greeting" => {
          25  +
                            builder = builder.set_greeting(
          26  +
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
          27  +
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          28  +
                                    .transpose()?,
          29  +
                            );
          30  +
                        }
          31  +
                        "farewell" => {
          32  +
                            builder = builder.set_farewell(crate::protocol_serde::shape_farewell::de_farewell(tokens)?);
          33  +
                        }
          34  +
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          35  +
                    },
          36  +
                    other => {
          37  +
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          38  +
                            "expected object key or end object, found: {:?}",
          39  +
                            other
          40  +
                        )))
          41  +
                    }
          42  +
                }
          43  +
            }
          44  +
            Ok(Some(builder.build()))
          45  +
        }
          46  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          47  +
            "expected start object or null",
          48  +
        )),
          49  +
    }
          50  +
}
          51  +
          52  +
pub fn ser_dialog(
          53  +
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          54  +
    input: &crate::types::Dialog,
          55  +
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          56  +
    if let Some(var_1) = &input.language {
          57  +
        object.key("language").string(var_1.as_str());
          58  +
    }
          59  +
    {
          60  +
        object.key("greeting").string(input.greeting.as_str());
          61  +
    }
          62  +
    if let Some(var_2) = &input.farewell {
          63  +
        #[allow(unused_mut)]
          64  +
        let mut object_3 = object.key("farewell").start_object();
          65  +
        crate::protocol_serde::shape_farewell::ser_farewell(&mut object_3, var_2)?;
          66  +
        object_3.finish();
          67  +
    }
          68  +
    Ok(())
          69  +
}

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

@@ -0,1 +0,32 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_dialog_list<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<Option<::std::vec::Vec<crate::types::Dialog>>, ::aws_smithy_json::deserialize::error::DeserializeError>
           5  +
where
           6  +
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
           7  +
{
           8  +
    match tokens.next().transpose()? {
           9  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          10  +
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          11  +
            let mut items = Vec::new();
          12  +
            loop {
          13  +
                match tokens.peek() {
          14  +
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          15  +
                        tokens.next().transpose().unwrap();
          16  +
                        break;
          17  +
                    }
          18  +
                    _ => {
          19  +
                        let value = crate::protocol_serde::shape_dialog::de_dialog(tokens)?;
          20  +
                        if let Some(value) = value {
          21  +
                            items.push(value);
          22  +
                        }
          23  +
                    }
          24  +
                }
          25  +
            }
          26  +
            Ok(Some(items))
          27  +
        }
          28  +
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          29  +
            "expected start array or null",
          30  +
        )),
          31  +
    }
          32  +
}