Client Test

Client Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,50 @@
           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 ContentTypeParametersInput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub value: ::std::option::Option<i32>,
           8  +
}
           9  +
impl ContentTypeParametersInput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn value(&self) -> ::std::option::Option<i32> {
          12  +
        self.value
          13  +
    }
          14  +
}
          15  +
impl ContentTypeParametersInput {
          16  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          17  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          18  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          23  +
#[non_exhaustive]
          24  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          25  +
pub struct ContentTypeParametersInputBuilder {
          26  +
    pub(crate) value: ::std::option::Option<i32>,
          27  +
}
          28  +
impl ContentTypeParametersInputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn value(mut self, input: i32) -> Self {
          31  +
        self.value = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
          36  +
        self.value = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_value(&self) -> &::std::option::Option<i32> {
          41  +
        &self.value
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          44  +
    pub fn build(
          45  +
        self,
          46  +
    ) -> ::std::result::Result<crate::operation::content_type_parameters::ContentTypeParametersInput, ::aws_smithy_types::error::operation::BuildError>
          47  +
    {
          48  +
        ::std::result::Result::Ok(crate::operation::content_type_parameters::ContentTypeParametersInput { value: self.value })
          49  +
    }
          50  +
}

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

@@ -0,1 +0,22 @@
           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 ContentTypeParametersOutput {}
           6  +
impl ContentTypeParametersOutput {
           7  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
           8  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
           9  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          10  +
    }
          11  +
}
          12  +
          13  +
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          14  +
#[non_exhaustive]
          15  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          16  +
pub struct ContentTypeParametersOutputBuilder {}
          17  +
impl ContentTypeParametersOutputBuilder {
          18  +
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          19  +
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
          20  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          21  +
    }
          22  +
}

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

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

@@ -1,1 +124,125 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
pub use crate::operation::http_string_payload2::_http_string_payload2_output::HttpStringPayload2OutputBuilder;
           2  +
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutputBuilder;
    3      3   
    4         -
pub use crate::operation::http_string_payload2::_http_string_payload2_input::HttpStringPayload2InputBuilder;
           4  +
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInputBuilder;
    5      5   
    6         -
impl crate::operation::http_string_payload2::builders::HttpStringPayload2InputBuilder {
           6  +
impl crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
    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_string_payload2::HttpStringPayload2Output,
          12  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   13     13   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14         -
            crate::operation::http_string_payload2::HttpStringPayload2Error,
          14  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
   15     15   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     16   
        >,
   17     17   
    > {
   18         -
        let mut fluent_builder = client.http_string_payload2();
          18  +
        let mut fluent_builder = client.content_type_parameters();
   19     19   
        fluent_builder.inner = self;
   20     20   
        fluent_builder.send().await
   21     21   
    }
   22     22   
}
   23         -
/// Fluent builder constructing a request to `HttpStringPayload2`.
          23  +
/// Fluent builder constructing a request to `ContentTypeParameters`.
   24     24   
///
          25  +
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
   25     26   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
   26         -
pub struct HttpStringPayload2FluentBuilder {
          27  +
pub struct ContentTypeParametersFluentBuilder {
   27     28   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28         -
    inner: crate::operation::http_string_payload2::builders::HttpStringPayload2InputBuilder,
          29  +
    inner: crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder,
   29     30   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     31   
}
   31     32   
impl
   32     33   
    crate::client::customize::internal::CustomizableSend<
   33         -
        crate::operation::http_string_payload2::HttpStringPayload2Output,
   34         -
        crate::operation::http_string_payload2::HttpStringPayload2Error,
   35         -
    > for HttpStringPayload2FluentBuilder
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          35  +
        crate::operation::content_type_parameters::ContentTypeParametersError,
          36  +
    > for ContentTypeParametersFluentBuilder
   36     37   
{
   37     38   
    fn send(
   38     39   
        self,
   39     40   
        config_override: crate::config::Builder,
   40     41   
    ) -> crate::client::customize::internal::BoxFuture<
   41     42   
        crate::client::customize::internal::SendResult<
   42         -
            crate::operation::http_string_payload2::HttpStringPayload2Output,
   43         -
            crate::operation::http_string_payload2::HttpStringPayload2Error,
          43  +
            crate::operation::content_type_parameters::ContentTypeParametersOutput,
          44  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
   44     45   
        >,
   45     46   
    > {
   46     47   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   47     48   
    }
   48     49   
}
   49         -
impl HttpStringPayload2FluentBuilder {
   50         -
    /// Creates a new `HttpStringPayload2FluentBuilder`.
          50  +
impl ContentTypeParametersFluentBuilder {
          51  +
    /// Creates a new `ContentTypeParametersFluentBuilder`.
   51     52   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   52     53   
        Self {
   53     54   
            handle,
   54     55   
            inner: ::std::default::Default::default(),
   55     56   
            config_override: ::std::option::Option::None,
   56     57   
        }
   57     58   
    }
   58         -
    /// Access the HttpStringPayload2 as a reference.
   59         -
    pub fn as_input(&self) -> &crate::operation::http_string_payload2::builders::HttpStringPayload2InputBuilder {
          59  +
    /// Access the ContentTypeParameters as a reference.
          60  +
    pub fn as_input(&self) -> &crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
   60     61   
        &self.inner
   61     62   
    }
   62     63   
    /// Sends the request and returns the response.
   63     64   
    ///
   64     65   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     66   
    /// can be matched against.
   66     67   
    ///
   67     68   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     69   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     70   
    /// set when configuring the client.
   70     71   
    pub async fn send(
   71     72   
        self,
   72     73   
    ) -> ::std::result::Result<
   73         -
        crate::operation::http_string_payload2::HttpStringPayload2Output,
          74  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   74     75   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75         -
            crate::operation::http_string_payload2::HttpStringPayload2Error,
          76  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
   76     77   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     78   
        >,
   78     79   
    > {
   79     80   
        let input = self
   80     81   
            .inner
   81     82   
            .build()
   82     83   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83         -
        let runtime_plugins = crate::operation::http_string_payload2::HttpStringPayload2::operation_runtime_plugins(
          84  +
        let runtime_plugins = crate::operation::content_type_parameters::ContentTypeParameters::operation_runtime_plugins(
   84     85   
            self.handle.runtime_plugins.clone(),
   85     86   
            &self.handle.conf,
   86     87   
            self.config_override,
   87     88   
        );
   88         -
        crate::operation::http_string_payload2::HttpStringPayload2::orchestrate(&runtime_plugins, input).await
          89  +
        crate::operation::content_type_parameters::ContentTypeParameters::orchestrate(&runtime_plugins, input).await
   89     90   
    }
   90     91   
   91     92   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92     93   
    pub fn customize(
   93     94   
        self,
   94     95   
    ) -> crate::client::customize::CustomizableOperation<
   95         -
        crate::operation::http_string_payload2::HttpStringPayload2Output,
   96         -
        crate::operation::http_string_payload2::HttpStringPayload2Error,
          96  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
          97  +
        crate::operation::content_type_parameters::ContentTypeParametersError,
   97     98   
        Self,
   98     99   
    > {
   99    100   
        crate::client::customize::CustomizableOperation::new(self)
  100    101   
    }
  101    102   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    103   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    104   
        self
  104    105   
    }
  105    106   
  106    107   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    108   
        self.config_override = config_override;
  108    109   
        self
  109    110   
    }
  110    111   
    #[allow(missing_docs)] // documentation missing in model
  111         -
    pub fn payload(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  112         -
        self.inner = self.inner.payload(input.into());
         112  +
    pub fn value(mut self, input: i32) -> Self {
         113  +
        self.inner = self.inner.value(input);
  113    114   
        self
  114    115   
    }
  115    116   
    #[allow(missing_docs)] // documentation missing in model
  116         -
    pub fn set_payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  117         -
        self.inner = self.inner.set_payload(input);
         117  +
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
         118  +
        self.inner = self.inner.set_value(input);
  118    119   
        self
  119    120   
    }
  120    121   
    #[allow(missing_docs)] // documentation missing in model
  121         -
    pub fn get_payload(&self) -> &::std::option::Option<::std::string::String> {
  122         -
        self.inner.get_payload()
         122  +
    pub fn get_value(&self) -> &::std::option::Option<i32> {
         123  +
        self.inner.get_value()
  123    124   
    }
  124    125   
}

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

@@ -1,1 +97,101 @@
   16     16   
}
   17     17   
   18     18   
pub fn parse_http_error_metadata(
   19     19   
    _response_status: u16,
   20     20   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21     21   
    response_body: &[u8],
   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  +
pub(crate) mod shape_content_type_parameters;
          27  +
   26     28   
pub(crate) mod shape_datetime_offsets;
   27     29   
   28     30   
pub(crate) mod shape_empty_operation;
   29     31   
   30     32   
pub(crate) mod shape_endpoint_operation;
   31     33   
   32     34   
pub(crate) mod shape_endpoint_with_host_label_operation;
   33     35   
   34     36   
pub(crate) mod shape_fractional_seconds;
   35     37   
   36     38   
pub(crate) mod shape_greeting_with_errors;
   37     39   
   38     40   
pub(crate) mod shape_host_with_path_operation;
   39     41   
   40     42   
pub(crate) mod shape_json_enums;
   41     43   
   42     44   
pub(crate) mod shape_json_unions;
   43     45   
   44     46   
pub(crate) mod shape_kitchen_sink_operation;
   45     47   
   46     48   
pub(crate) mod shape_null_operation;
   47     49   
   48     50   
pub(crate) mod shape_operation_with_optional_input_output;
   49     51   
   50     52   
pub(crate) mod shape_put_and_get_inline_documents;
   51     53   
   52     54   
pub(crate) mod shape_put_with_content_encoding;
   53     55   
   54     56   
pub(crate) mod shape_simple_scalar_properties;
   55     57   
   56     58   
pub(crate) mod shape_sparse_nulls_operation;
   57     59   
   58     60   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   59     61   
    if data.is_empty() {
   60     62   
        b"{}"
   61     63   
    } else {
   62     64   
        data
   63     65   
    }
   64     66   
}
   65     67   
   66     68   
pub(crate) mod shape_complex_error;
   67     69   
          70  +
pub(crate) mod shape_content_type_parameters_input;
          71  +
   68     72   
pub(crate) mod shape_endpoint_with_host_label_operation_input;
   69     73   
   70     74   
pub(crate) mod shape_error_with_members;
   71     75   
   72     76   
pub(crate) mod shape_error_without_members;
   73     77   
   74     78   
pub(crate) mod shape_foo_error;
   75     79   
   76     80   
pub(crate) mod shape_invalid_greeting;
   77     81   

tmp-codegen-diff/codegen-client-test/json_rpc11/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/json_rpc11/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/client.rs

@@ -83,83 +142,144 @@
  103    103   
        Ok(())
  104    104   
    }
  105    105   
}
  106    106   
  107    107   
mod all_query_string_types;
  108    108   
  109    109   
mod constant_and_variable_query_string;
  110    110   
  111    111   
mod constant_query_string;
  112    112   
         113  +
mod content_type_parameters;
         114  +
  113    115   
/// Operation customization and supporting types.
  114    116   
///
  115    117   
/// The underlying HTTP requests made during an operation can be customized
  116    118   
/// by calling the `customize()` method on the builder returned from a client
  117    119   
/// operation call. For example, this can be used to add an additional HTTP header:
  118    120   
///
  119    121   
/// ```ignore
  120    122   
/// # async fn wrapper() -> ::std::result::Result<(), rest_json::Error> {
  121    123   
/// # let client: rest_json::Client = unimplemented!();
  122    124   
/// use ::http::header::{HeaderName, HeaderValue};
@@ -256,258 +322,330 @@
  276    278   
mod no_input_and_output;
  277    279   
  278    280   
mod null_and_empty_headers_client;
  279    281   
  280    282   
mod null_and_empty_headers_server;
  281    283   
  282    284   
mod omits_null_serializes_empty_string;
  283    285   
  284    286   
mod omits_serializing_empty_lists;
  285    287   
         288  +
mod operation_with_defaults;
         289  +
         290  +
mod operation_with_nested_structure;
         291  +
  286    292   
mod post_player_action;
  287    293   
  288    294   
mod post_union_with_json_name;
  289    295   
  290    296   
mod put_with_content_encoding;
  291    297   
  292    298   
mod query_idempotency_token_auto_fill;
  293    299   
  294    300   
mod query_params_as_string_list_map;
  295    301   
  296    302   
mod query_precedence;
  297    303   
  298    304   
mod recursive_shapes;
  299    305   
  300    306   
mod simple_scalar_properties;
  301    307   
  302    308   
mod sparse_json_lists;
  303    309   
  304    310   
mod sparse_json_maps;
  305    311   
  306    312   
mod streaming_traits;
  307    313   
  308    314   
mod streaming_traits_require_length;
  309    315   
  310    316   
mod streaming_traits_with_media_type;
  311    317   
  312    318   
mod test_body_structure;
  313    319   
         320  +
mod test_no_input_no_payload;
         321  +
  314    322   
mod test_no_payload;
  315    323   
  316    324   
mod test_payload_blob;
  317    325   
  318    326   
mod test_payload_structure;
  319    327   
  320    328   
mod timestamp_format_headers;
  321    329   
  322    330   
mod unit_input_and_output;

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

@@ -0,1 +0,12 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`ContentTypeParameters`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`value(i32)`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::value) / [`set_value(Option<i32>)`](crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::set_value):<br>required: **false**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput)
           8  +
    /// - On failure, responds with [`SdkError<ContentTypeParametersError>`](crate::operation::content_type_parameters::ContentTypeParametersError)
           9  +
    pub fn content_type_parameters(&self) -> crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder {
          10  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersFluentBuilder::new(self.handle.clone())
          11  +
    }
          12  +
}

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

@@ -0,1 +0,43 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`OperationWithDefaults`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`defaults(Defaults)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::defaults) / [`set_defaults(Option<Defaults>)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::set_defaults):<br>required: **false**<br>(undocumented)<br>
           7  +
    ///   - [`client_optional_defaults(ClientOptionalDefaults)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::client_optional_defaults) / [`set_client_optional_defaults(Option<ClientOptionalDefaults>)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::set_client_optional_defaults):<br>required: **false**<br>(undocumented)<br>
           8  +
    ///   - [`top_level_default(impl Into<String>)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::top_level_default) / [`set_top_level_default(Option<String>)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::set_top_level_default):<br>required: **false**<br>(undocumented)<br>
           9  +
    ///   - [`other_top_level_default(i32)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::other_top_level_default) / [`set_other_top_level_default(Option<i32>)`](crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::set_other_top_level_default):<br>required: **false**<br>(undocumented)<br>
          10  +
    /// - On success, responds with [`OperationWithDefaultsOutput`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput) with field(s):
          11  +
    ///   - [`default_string(String)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_string): (undocumented)
          12  +
    ///   - [`default_boolean(bool)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_boolean): (undocumented)
          13  +
    ///   - [`default_list(Vec::<String>)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_list): (undocumented)
          14  +
    ///   - [`default_document_map(Document)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_document_map): (undocumented)
          15  +
    ///   - [`default_document_string(Document)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_document_string): (undocumented)
          16  +
    ///   - [`default_document_boolean(Document)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_document_boolean): (undocumented)
          17  +
    ///   - [`default_document_list(Document)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_document_list): (undocumented)
          18  +
    ///   - [`default_null_document(Option<Document>)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_null_document): (undocumented)
          19  +
    ///   - [`default_timestamp(DateTime)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_timestamp): (undocumented)
          20  +
    ///   - [`default_blob(Blob)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_blob): (undocumented)
          21  +
    ///   - [`default_byte(i8)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_byte): (undocumented)
          22  +
    ///   - [`default_short(i16)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_short): (undocumented)
          23  +
    ///   - [`default_integer(i32)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_integer): (undocumented)
          24  +
    ///   - [`default_long(i64)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_long): (undocumented)
          25  +
    ///   - [`default_float(f32)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_float): (undocumented)
          26  +
    ///   - [`default_double(f64)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_double): (undocumented)
          27  +
    ///   - [`default_map(HashMap::<String, String>)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_map): (undocumented)
          28  +
    ///   - [`default_enum(TestEnum)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_enum): (undocumented)
          29  +
    ///   - [`default_int_enum(i32)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::default_int_enum): (undocumented)
          30  +
    ///   - [`empty_string(String)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::empty_string): (undocumented)
          31  +
    ///   - [`false_boolean(bool)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::false_boolean): (undocumented)
          32  +
    ///   - [`empty_blob(Blob)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::empty_blob): (undocumented)
          33  +
    ///   - [`zero_byte(i8)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_byte): (undocumented)
          34  +
    ///   - [`zero_short(i16)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_short): (undocumented)
          35  +
    ///   - [`zero_integer(i32)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_integer): (undocumented)
          36  +
    ///   - [`zero_long(i64)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_long): (undocumented)
          37  +
    ///   - [`zero_float(f32)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_float): (undocumented)
          38  +
    ///   - [`zero_double(f64)`](crate::operation::operation_with_defaults::OperationWithDefaultsOutput::zero_double): (undocumented)
          39  +
    /// - On failure, responds with [`SdkError<OperationWithDefaultsError>`](crate::operation::operation_with_defaults::OperationWithDefaultsError)
          40  +
    pub fn operation_with_defaults(&self) -> crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder {
          41  +
        crate::operation::operation_with_defaults::builders::OperationWithDefaultsFluentBuilder::new(self.handle.clone())
          42  +
    }
          43  +
}

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

@@ -0,1 +0,17 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
impl super::Client {
           3  +
    /// Constructs a fluent builder for the [`OperationWithNestedStructure`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureFluentBuilder) operation.
           4  +
    ///
           5  +
    /// - The fluent builder is configurable:
           6  +
    ///   - [`top_level(TopLevel)`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureFluentBuilder::top_level) / [`set_top_level(Option<TopLevel>)`](crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureFluentBuilder::set_top_level):<br>required: **true**<br>(undocumented)<br>
           7  +
    /// - On success, responds with [`OperationWithNestedStructureOutput`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput) with field(s):
           8  +
    ///   - [`dialog(Dialog)`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput::dialog): (undocumented)
           9  +
    ///   - [`dialog_list(Vec::<Dialog>)`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput::dialog_list): (undocumented)
          10  +
    ///   - [`dialog_map(HashMap::<String, Dialog>)`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureOutput::dialog_map): (undocumented)
          11  +
    /// - On failure, responds with [`SdkError<OperationWithNestedStructureError>`](crate::operation::operation_with_nested_structure::OperationWithNestedStructureError)
          12  +
    pub fn operation_with_nested_structure(
          13  +
        &self,
          14  +
    ) -> crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureFluentBuilder {
          15  +
        crate::operation::operation_with_nested_structure::builders::OperationWithNestedStructureFluentBuilder::new(self.handle.clone())
          16  +
    }
          17  +
}

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

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

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

@@ -99,99 +158,181 @@
  119    119   
        }
  120    120   
    }
  121    121   
}
  122    122   
impl From<crate::operation::constant_query_string::ConstantQueryStringError> for Error {
  123    123   
    fn from(err: crate::operation::constant_query_string::ConstantQueryStringError) -> Self {
  124    124   
        match err {
  125    125   
            crate::operation::constant_query_string::ConstantQueryStringError::Unhandled(inner) => Error::Unhandled(inner),
  126    126   
        }
  127    127   
    }
  128    128   
}
         129  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>> for Error
         130  +
where
         131  +
    R: Send + Sync + std::fmt::Debug + 'static,
         132  +
{
         133  +
    fn from(
         134  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::content_type_parameters::ContentTypeParametersError, R>,
         135  +
    ) -> Self {
         136  +
        match err {
         137  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
         138  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
         139  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
         140  +
                source: err.into(),
         141  +
            }),
         142  +
        }
         143  +
    }
         144  +
}
         145  +
impl From<crate::operation::content_type_parameters::ContentTypeParametersError> for Error {
         146  +
    fn from(err: crate::operation::content_type_parameters::ContentTypeParametersError) -> Self {
         147  +
        match err {
         148  +
            crate::operation::content_type_parameters::ContentTypeParametersError::Unhandled(inner) => Error::Unhandled(inner),
         149  +
        }
         150  +
    }
         151  +
}
  129    152   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>> for Error
  130    153   
where
  131    154   
    R: Send + Sync + std::fmt::Debug + 'static,
  132    155   
{
  133    156   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::datetime_offsets::DatetimeOffsetsError, R>) -> Self {
  134    157   
        match err {
  135    158   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
  136    159   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
  137    160   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
  138    161   
                source: err.into(),
@@ -1925,1948 +1984,2058 @@
 1945   1968   
        }
 1946   1969   
    }
 1947   1970   
}
 1948   1971   
impl From<crate::operation::omits_serializing_empty_lists::OmitsSerializingEmptyListsError> for Error {
 1949   1972   
    fn from(err: crate::operation::omits_serializing_empty_lists::OmitsSerializingEmptyListsError) -> Self {
 1950   1973   
        match err {
 1951   1974   
            crate::operation::omits_serializing_empty_lists::OmitsSerializingEmptyListsError::Unhandled(inner) => Error::Unhandled(inner),
 1952   1975   
        }
 1953   1976   
    }
 1954   1977   
}
        1978  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_defaults::OperationWithDefaultsError, R>> for Error
        1979  +
where
        1980  +
    R: Send + Sync + std::fmt::Debug + 'static,
        1981  +
{
        1982  +
    fn from(
        1983  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_defaults::OperationWithDefaultsError, R>,
        1984  +
    ) -> Self {
        1985  +
        match err {
        1986  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        1987  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        1988  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        1989  +
                source: err.into(),
        1990  +
            }),
        1991  +
        }
        1992  +
    }
        1993  +
}
        1994  +
impl From<crate::operation::operation_with_defaults::OperationWithDefaultsError> for Error {
        1995  +
    fn from(err: crate::operation::operation_with_defaults::OperationWithDefaultsError) -> Self {
        1996  +
        match err {
        1997  +
            crate::operation::operation_with_defaults::OperationWithDefaultsError::Unhandled(inner) => Error::Unhandled(inner),
        1998  +
        }
        1999  +
    }
        2000  +
}
        2001  +
impl<R>
        2002  +
    From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::operation_with_nested_structure::OperationWithNestedStructureError, R>>
        2003  +
    for Error
        2004  +
where
        2005  +
    R: Send + Sync + std::fmt::Debug + 'static,
        2006  +
{
        2007  +
    fn from(
        2008  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<
        2009  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError,
        2010  +
            R,
        2011  +
        >,
        2012  +
    ) -> Self {
        2013  +
        match err {
        2014  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        2015  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        2016  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        2017  +
                source: err.into(),
        2018  +
            }),
        2019  +
        }
        2020  +
    }
        2021  +
}
        2022  +
impl From<crate::operation::operation_with_nested_structure::OperationWithNestedStructureError> for Error {
        2023  +
    fn from(err: crate::operation::operation_with_nested_structure::OperationWithNestedStructureError) -> Self {
        2024  +
        match err {
        2025  +
            crate::operation::operation_with_nested_structure::OperationWithNestedStructureError::Unhandled(inner) => Error::Unhandled(inner),
        2026  +
        }
        2027  +
    }
        2028  +
}
 1955   2029   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::post_player_action::PostPlayerActionError, R>> for Error
 1956   2030   
where
 1957   2031   
    R: Send + Sync + std::fmt::Debug + 'static,
 1958   2032   
{
 1959   2033   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::post_player_action::PostPlayerActionError, R>) -> Self {
 1960   2034   
        match err {
 1961   2035   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 1962   2036   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 1963   2037   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 1964   2038   
                source: err.into(),
@@ -2258,2332 +2317,2414 @@
 2278   2352   
        }
 2279   2353   
    }
 2280   2354   
}
 2281   2355   
impl From<crate::operation::test_body_structure::TestBodyStructureError> for Error {
 2282   2356   
    fn from(err: crate::operation::test_body_structure::TestBodyStructureError) -> Self {
 2283   2357   
        match err {
 2284   2358   
            crate::operation::test_body_structure::TestBodyStructureError::Unhandled(inner) => Error::Unhandled(inner),
 2285   2359   
        }
 2286   2360   
    }
 2287   2361   
}
        2362  +
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError, R>> for Error
        2363  +
where
        2364  +
    R: Send + Sync + std::fmt::Debug + 'static,
        2365  +
{
        2366  +
    fn from(
        2367  +
        err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError, R>,
        2368  +
    ) -> Self {
        2369  +
        match err {
        2370  +
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
        2371  +
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
        2372  +
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
        2373  +
                source: err.into(),
        2374  +
            }),
        2375  +
        }
        2376  +
    }
        2377  +
}
        2378  +
impl From<crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError> for Error {
        2379  +
    fn from(err: crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError) -> Self {
        2380  +
        match err {
        2381  +
            crate::operation::test_no_input_no_payload::TestNoInputNoPayloadError::Unhandled(inner) => Error::Unhandled(inner),
        2382  +
        }
        2383  +
    }
        2384  +
}
 2288   2385   
impl<R> From<::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_no_payload::TestNoPayloadError, R>> for Error
 2289   2386   
where
 2290   2387   
    R: Send + Sync + std::fmt::Debug + 'static,
 2291   2388   
{
 2292   2389   
    fn from(err: ::aws_smithy_runtime_api::client::result::SdkError<crate::operation::test_no_payload::TestNoPayloadError, R>) -> Self {
 2293   2390   
        match err {
 2294   2391   
            ::aws_smithy_runtime_api::client::result::SdkError::ServiceError(context) => Self::from(context.into_err()),
 2295   2392   
            _ => Error::Unhandled(crate::error::sealed_unhandled::Unhandled {
 2296   2393   
                meta: ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(&err).clone(),
 2297   2394   
                source: err.into(),

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

@@ -1,1 +41,44 @@
    2      2   
    3      3   
/// Types for the `AllQueryStringTypes` operation.
    4      4   
pub mod all_query_string_types;
    5      5   
    6      6   
/// Types for the `ConstantAndVariableQueryString` operation.
    7      7   
pub mod constant_and_variable_query_string;
    8      8   
    9      9   
/// Types for the `ConstantQueryString` operation.
   10     10   
pub mod constant_query_string;
   11     11   
          12  +
/// Types for the `ContentTypeParameters` operation.
          13  +
pub mod content_type_parameters;
          14  +
   12     15   
/// Types for the `DatetimeOffsets` operation.
   13     16   
pub mod datetime_offsets;
   14     17   
   15     18   
/// Types for the `DocumentType` operation.
   16     19   
pub mod document_type;
   17     20   
   18     21   
/// Types for the `DocumentTypeAsMapValue` operation.
   19     22   
pub mod document_type_as_map_value;
   20     23   
   21     24   
/// Types for the `DocumentTypeAsPayload` operation.
@@ -201,204 +286,298 @@
  221    224   
  222    225   
/// Types for the `NullAndEmptyHeadersServer` operation.
  223    226   
pub mod null_and_empty_headers_server;
  224    227   
  225    228   
/// Types for the `OmitsNullSerializesEmptyString` operation.
  226    229   
pub mod omits_null_serializes_empty_string;
  227    230   
  228    231   
/// Types for the `OmitsSerializingEmptyLists` operation.
  229    232   
pub mod omits_serializing_empty_lists;
  230    233   
         234  +
/// Types for the `OperationWithDefaults` operation.
         235  +
pub mod operation_with_defaults;
         236  +
         237  +
/// Types for the `OperationWithNestedStructure` operation.
         238  +
pub mod operation_with_nested_structure;
         239  +
  231    240   
/// Types for the `PostPlayerAction` operation.
  232    241   
pub mod post_player_action;
  233    242   
  234    243   
/// Types for the `PostUnionWithJsonName` operation.
  235    244   
pub mod post_union_with_json_name;
  236    245   
  237    246   
/// Types for the `PutWithContentEncoding` operation.
  238    247   
pub mod put_with_content_encoding;
  239    248   
  240    249   
/// Types for the `QueryIdempotencyTokenAutoFill` operation.
  241    250   
pub mod query_idempotency_token_auto_fill;
  242    251   
  243    252   
/// Types for the `QueryParamsAsStringListMap` operation.
  244    253   
pub mod query_params_as_string_list_map;
  245    254   
  246    255   
/// Types for the `QueryPrecedence` operation.
  247    256   
pub mod query_precedence;
  248    257   
  249    258   
/// Types for the `RecursiveShapes` operation.
  250    259   
pub mod recursive_shapes;
  251    260   
  252    261   
/// Types for the `SimpleScalarProperties` operation.
  253    262   
pub mod simple_scalar_properties;
  254    263   
  255    264   
/// Types for the `SparseJsonLists` operation.
  256    265   
pub mod sparse_json_lists;
  257    266   
  258    267   
/// Types for the `SparseJsonMaps` operation.
  259    268   
pub mod sparse_json_maps;
  260    269   
  261    270   
/// Types for the `StreamingTraits` operation.
  262    271   
pub mod streaming_traits;
  263    272   
  264    273   
/// Types for the `StreamingTraitsRequireLength` operation.
  265    274   
pub mod streaming_traits_require_length;
  266    275   
  267    276   
/// Types for the `StreamingTraitsWithMediaType` operation.
  268    277   
pub mod streaming_traits_with_media_type;
  269    278   
  270    279   
/// Types for the `TestBodyStructure` operation.
  271    280   
pub mod test_body_structure;
  272    281   
         282  +
/// Types for the `TestNoInputNoPayload` operation.
         283  +
pub mod test_no_input_no_payload;
         284  +
  273    285   
/// Types for the `TestNoPayload` operation.
  274    286   
pub mod test_no_payload;
  275    287   
  276    288   
/// Types for the `TestPayloadBlob` operation.
  277    289   
pub mod test_payload_blob;
  278    290   
  279    291   
/// Types for the `TestPayloadStructure` operation.
  280    292   
pub mod test_payload_structure;
  281    293   
  282    294   
/// Types for the `TimestampFormatHeaders` operation.

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

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

@@ -1,1 +379,325 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Orchestration and serialization glue logic for `HttpPayloadTraits2`.
           2  +
/// Orchestration and serialization glue logic for `ContentTypeParameters`.
    3      3   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
    4      4   
#[non_exhaustive]
    5         -
pub struct HttpPayloadTraits2;
    6         -
impl HttpPayloadTraits2 {
    7         -
    /// Creates a new `HttpPayloadTraits2`
           5  +
pub struct ContentTypeParameters;
           6  +
impl ContentTypeParameters {
           7  +
    /// Creates a new `ContentTypeParameters`
    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_payload_traits2::HttpPayloadTraits2Input,
          13  +
        input: crate::operation::content_type_parameters::ContentTypeParametersInput,
   14     14   
    ) -> ::std::result::Result<
   15         -
        crate::operation::http_payload_traits2::HttpPayloadTraits2Output,
          15  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput,
   16     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17         -
            crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
          17  +
            crate::operation::content_type_parameters::ContentTypeParametersError,
   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_payload_traits2::HttpPayloadTraits2Error>()
          26  +
                err.downcast::<crate::operation::content_type_parameters::ContentTypeParametersError>()
   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_payload_traits2::HttpPayloadTraits2Output>()
          36  +
                .downcast::<crate::operation::content_type_parameters::ContentTypeParametersOutput>()
   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_payload_traits2::HttpPayloadTraits2Input,
          43  +
        input: crate::operation::content_type_parameters::ContentTypeParametersInput,
   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         -
            "HttpPayloadTraits2",
          55  +
            "ContentTypeParameters",
   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 HttpPayloadTraits2 {
          85  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ContentTypeParameters {
   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("HttpPayloadTraits2");
          87  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ContentTypeParameters");
   88     88   
   89     89   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   90         -
            HttpPayloadTraits2RequestSerializer,
          90  +
            ContentTypeParametersRequestSerializer,
   91     91   
        ));
   92     92   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   93         -
            HttpPayloadTraits2ResponseDeserializer,
          93  +
            ContentTypeParametersResponseDeserializer,
   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         -
            "HttpPayloadTraits2",
         101  +
            "ContentTypeParameters",
  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("HttpPayloadTraits2")
         113  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ContentTypeParameters")
  114    114   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  115         -
            .with_interceptor(HttpPayloadTraits2EndpointParamsInterceptor)
         115  +
            .with_interceptor(ContentTypeParametersEndpointParamsInterceptor)
  116    116   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  117         -
                crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
         117  +
                crate::operation::content_type_parameters::ContentTypeParametersError,
  118    118   
            >::new())
  119    119   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  120         -
                crate::operation::http_payload_traits2::HttpPayloadTraits2Error,
         120  +
                crate::operation::content_type_parameters::ContentTypeParametersError,
  121    121   
            >::new());
  122    122   
  123    123   
        ::std::borrow::Cow::Owned(rcb)
  124    124   
    }
  125    125   
}
  126    126   
  127    127   
#[derive(Debug)]
  128         -
struct HttpPayloadTraits2ResponseDeserializer;
  129         -
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPayloadTraits2ResponseDeserializer {
         128  +
struct ContentTypeParametersResponseDeserializer;
         129  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ContentTypeParametersResponseDeserializer {
  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_payload_traits2::de_http_payload_traits2_http_error(status, headers, body)
         141  +
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_http_error(status, headers, body)
  142    142   
        } else {
  143         -
            crate::protocol_serde::shape_http_payload_traits2::de_http_payload_traits2_http_response(status, headers, body)
         143  +
            crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters_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 HttpPayloadTraits2RequestSerializer;
  150         -
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPayloadTraits2RequestSerializer {
         149  +
struct ContentTypeParametersRequestSerializer;
         150  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ContentTypeParametersRequestSerializer {
  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_payload_traits2::HttpPayloadTraits2Input>()
         158  +
            .downcast::<crate::operation::content_type_parameters::ContentTypeParametersInput>()
  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_payload_traits2::HttpPayloadTraits2Input,
         166  +
                _input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
  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, "/HttpPayloadTraits").expect("formatting should succeed");
         170  +
                ::std::write!(output, "/ContentTypeParameters").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_payload_traits2::HttpPayloadTraits2Input,
         175  +
                input: &crate::operation::content_type_parameters::ContentTypeParametersInput,
  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         -
                let builder = crate::protocol_serde::shape_http_payload_traits2::ser_http_payload_traits2_headers(input, builder)?;
  181    180   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  182    181   
            }
  183    182   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  184         -
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/octet-stream");
         183  +
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  185    184   
            builder
  186    185   
        };
  187         -
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_http_payload_traits2_input::ser_blob_http_payload(
  188         -
            input.blob,
         186  +
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_content_type_parameters::ser_content_type_parameters_input(
         187  +
            &input,
  189    188   
        )?);
  190    189   
        if let Some(content_length) = body.content_length() {
  191    190   
            let content_length = content_length.to_string();
  192    191   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  193    192   
        }
  194    193   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  195    194   
    }
  196    195   
}
  197    196   
#[derive(Debug)]
  198         -
struct HttpPayloadTraits2EndpointParamsInterceptor;
         197  +
struct ContentTypeParametersEndpointParamsInterceptor;
  199    198   
  200         -
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPayloadTraits2EndpointParamsInterceptor {
         199  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ContentTypeParametersEndpointParamsInterceptor {
  201    200   
    fn name(&self) -> &'static str {
  202         -
        "HttpPayloadTraits2EndpointParamsInterceptor"
         201  +
        "ContentTypeParametersEndpointParamsInterceptor"
  203    202   
    }
  204    203   
  205    204   
    fn read_before_execution(
  206    205   
        &self,
  207    206   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  208    207   
            '_,
  209    208   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  210    209   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  211    210   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  212    211   
        >,
  213    212   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  214    213   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  215    214   
        let _input = context
  216    215   
            .input()
  217         -
            .downcast_ref::<HttpPayloadTraits2Input>()
  218         -
            .ok_or("failed to downcast to HttpPayloadTraits2Input")?;
         216  +
            .downcast_ref::<ContentTypeParametersInput>()
         217  +
            .ok_or("failed to downcast to ContentTypeParametersInput")?;
  219    218   
  220    219   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  221    220   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  222    221   
        })?;
  223    222   
        cfg.interceptor_state()
  224    223   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  225    224   
        ::std::result::Result::Ok(())
  226    225   
    }
  227    226   
}
  228         -
#[allow(unreachable_code, unused_variables)]
  229         -
#[cfg(test)]
  230         -
mod http_payload_traits2_test {
  231    227   
  232         -
    /// Upper case error modeled lower case
  233         -
    /// Test ID: ServiceLevelErrorClient
  234         -
    #[::tokio::test]
  235         -
    #[::tracing_test::traced_test]
  236         -
    async fn service_level_error_client_response() {
  237         -
        let expected_output = crate::types::error::ExtraError::builder().build();
  238         -
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  239         -
            ::http::response::Builder::new()
  240         -
                .header("X-Amzn-Errortype", "ExtraError")
  241         -
                .status(500)
  242         -
                .body(::aws_smithy_types::body::SdkBody::from(""))
  243         -
                .unwrap(),
  244         -
        )
  245         -
        .unwrap();
  246         -
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  247         -
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  248         -
  249         -
        let op = crate::operation::http_payload_traits2::HttpPayloadTraits2::new();
  250         -
        let config = op.config().expect("the operation has config");
  251         -
        let de = config
  252         -
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  253         -
            .expect("the config must have a deserializer");
  254         -
  255         -
        let parsed = de.deserialize_streaming(&mut http_response);
  256         -
        let parsed = parsed.unwrap_or_else(|| {
  257         -
            let http_response =
  258         -
                http_response.map(|body| ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(body.bytes().unwrap())));
  259         -
            de.deserialize_nonstreaming(&http_response)
  260         -
        });
  261         -
        let parsed = parsed.expect_err("should be error response");
  262         -
        let parsed: &crate::operation::http_payload_traits2::HttpPayloadTraits2Error =
  263         -
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  264         -
        if let crate::operation::http_payload_traits2::HttpPayloadTraits2Error::ExtraError(parsed) = parsed {
  265         -
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  266         -
        } else {
  267         -
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  268         -
        }
  269         -
    }
  270         -
}
  271         -
  272         -
/// Error type for the `HttpPayloadTraits2Error` operation.
         228  +
/// Error type for the `ContentTypeParametersError` operation.
  273    229   
#[non_exhaustive]
  274    230   
#[derive(::std::fmt::Debug)]
  275         -
pub enum HttpPayloadTraits2Error {
  276         -
    #[allow(missing_docs)] // documentation missing in model
  277         -
    ExtraError(crate::types::error::ExtraError),
         231  +
pub enum ContentTypeParametersError {
  278    232   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  279    233   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  280    234   
    variable wildcard pattern and check `.code()`:
  281    235   
     \
  282    236   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  283    237   
     \
  284         -
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPayloadTraits2Error) for what information is available for the error.")]
         238  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ContentTypeParametersError) for what information is available for the error.")]
  285    239   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
  286    240   
}
  287         -
impl HttpPayloadTraits2Error {
  288         -
    /// Creates the `HttpPayloadTraits2Error::Unhandled` variant from any error type.
         241  +
impl ContentTypeParametersError {
         242  +
    /// Creates the `ContentTypeParametersError::Unhandled` variant from any error type.
  289    243   
    pub fn unhandled(
  290    244   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  291    245   
    ) -> Self {
  292    246   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  293    247   
            source: err.into(),
  294    248   
            meta: ::std::default::Default::default(),
  295    249   
        })
  296    250   
    }
  297    251   
  298         -
    /// Creates the `HttpPayloadTraits2Error::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         252  +
    /// Creates the `ContentTypeParametersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  299    253   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  300    254   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  301    255   
            source: err.clone().into(),
  302    256   
            meta: err,
  303    257   
        })
  304    258   
    }
  305    259   
    ///
  306    260   
    /// Returns error metadata, which includes the error code, message,
  307    261   
    /// request ID, and potentially additional information.
  308    262   
    ///
  309    263   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  310    264   
        match self {
  311         -
            Self::ExtraError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  312    265   
            Self::Unhandled(e) => &e.meta,
  313    266   
        }
  314    267   
    }
  315         -
    /// Returns `true` if the error kind is `HttpPayloadTraits2Error::ExtraError`.
  316         -
    pub fn is_extra_error(&self) -> bool {
  317         -
        matches!(self, Self::ExtraError(_))
  318         -
    }
  319    268   
}
  320         -
impl ::std::error::Error for HttpPayloadTraits2Error {
         269  +
impl ::std::error::Error for ContentTypeParametersError {
  321    270   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
  322    271   
        match self {
  323         -
            Self::ExtraError(_inner) => ::std::option::Option::Some(_inner),
  324    272   
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
  325    273   
        }
  326    274   
    }
  327    275   
}
  328         -
impl ::std::fmt::Display for HttpPayloadTraits2Error {
         276  +
impl ::std::fmt::Display for ContentTypeParametersError {
  329    277   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
  330    278   
        match self {
  331         -
            Self::ExtraError(_inner) => _inner.fmt(f),
  332    279   
            Self::Unhandled(_inner) => {
  333    280   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  334    281   
                    write!(f, "unhandled error ({code})")
  335    282   
                } else {
  336    283   
                    f.write_str("unhandled error")
  337    284   
                }
  338    285   
            }
  339    286   
        }
  340    287   
    }
  341    288   
}
  342         -
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPayloadTraits2Error {
         289  +
impl ::aws_smithy_types::retry::ProvideErrorKind for ContentTypeParametersError {
  343    290   
    fn code(&self) -> ::std::option::Option<&str> {
  344    291   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
  345    292   
    }
  346    293   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
  347    294   
        ::std::option::Option::None
  348    295   
    }
  349    296   
}
  350         -
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPayloadTraits2Error {
         297  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ContentTypeParametersError {
  351    298   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
  352    299   
        match self {
  353         -
            Self::ExtraError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  354    300   
            Self::Unhandled(_inner) => &_inner.meta,
  355    301   
        }
  356    302   
    }
  357    303   
}
  358         -
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPayloadTraits2Error {
         304  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ContentTypeParametersError {
  359    305   
    fn create_unhandled_error(
  360    306   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  361    307   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  362    308   
    ) -> Self {
  363    309   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  364    310   
            source,
  365    311   
            meta: meta.unwrap_or_default(),
  366    312   
        })
  367    313   
    }
  368    314   
}
  369    315   
  370         -
pub use crate::operation::http_payload_traits2::_http_payload_traits2_output::HttpPayloadTraits2Output;
         316  +
pub use crate::operation::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutput;
  371    317   
  372         -
pub use crate::operation::http_payload_traits2::_http_payload_traits2_input::HttpPayloadTraits2Input;
         318  +
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInput;
  373    319   
  374         -
mod _http_payload_traits2_input;
         320  +
mod _content_type_parameters_input;
  375    321   
  376         -
mod _http_payload_traits2_output;
         322  +
mod _content_type_parameters_output;
  377    323   
  378    324   
/// Builders
  379    325   
pub mod builders;

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

@@ -0,1 +0,50 @@
           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 ContentTypeParametersInput {
           6  +
    #[allow(missing_docs)] // documentation missing in model
           7  +
    pub value: ::std::option::Option<i32>,
           8  +
}
           9  +
impl ContentTypeParametersInput {
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub fn value(&self) -> ::std::option::Option<i32> {
          12  +
        self.value
          13  +
    }
          14  +
}
          15  +
impl ContentTypeParametersInput {
          16  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          17  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
          18  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder::default()
          19  +
    }
          20  +
}
          21  +
          22  +
/// A builder for [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          23  +
#[non_exhaustive]
          24  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          25  +
pub struct ContentTypeParametersInputBuilder {
          26  +
    pub(crate) value: ::std::option::Option<i32>,
          27  +
}
          28  +
impl ContentTypeParametersInputBuilder {
          29  +
    #[allow(missing_docs)] // documentation missing in model
          30  +
    pub fn value(mut self, input: i32) -> Self {
          31  +
        self.value = ::std::option::Option::Some(input);
          32  +
        self
          33  +
    }
          34  +
    #[allow(missing_docs)] // documentation missing in model
          35  +
    pub fn set_value(mut self, input: ::std::option::Option<i32>) -> Self {
          36  +
        self.value = input;
          37  +
        self
          38  +
    }
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub fn get_value(&self) -> &::std::option::Option<i32> {
          41  +
        &self.value
          42  +
    }
          43  +
    /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::operation::content_type_parameters::ContentTypeParametersInput).
          44  +
    pub fn build(
          45  +
        self,
          46  +
    ) -> ::std::result::Result<crate::operation::content_type_parameters::ContentTypeParametersInput, ::aws_smithy_types::error::operation::BuildError>
          47  +
    {
          48  +
        ::std::result::Result::Ok(crate::operation::content_type_parameters::ContentTypeParametersInput { value: self.value })
          49  +
    }
          50  +
}

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

@@ -0,1 +0,22 @@
           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 ContentTypeParametersOutput {}
           6  +
impl ContentTypeParametersOutput {
           7  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
           8  +
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
           9  +
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          10  +
    }
          11  +
}
          12  +
          13  +
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          14  +
#[non_exhaustive]
          15  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          16  +
pub struct ContentTypeParametersOutputBuilder {}
          17  +
impl ContentTypeParametersOutputBuilder {
          18  +
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          19  +
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
          20  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          21  +
    }
          22  +
}