Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/response_code_required_operation/builders.rs

@@ -1,1 +111,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::response_code_required_operation::_response_code_required_operation_output::ResponseCodeRequiredOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::response_code_required_operation::_response_code_required_operation_input::ResponseCodeRequiredOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.response_code_required_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ResponseCodeRequiredOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ResponseCodeRequiredOperation`.
   24     27   
///
   25         -
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ResponseCodeRequiredOperationFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput,
   35     41   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError,
   36     42   
    > for ResponseCodeRequiredOperationFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput,
   44     50   
            crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl ResponseCodeRequiredOperationFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ResponseCodeRequiredOperationFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the ResponseCodeRequiredOperation as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::response_code_required_operation::builders::ResponseCodeRequiredOperationInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::response_code_required_operation::ResponseCodeRequiredOperation::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperation::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationOutput,
   97    107   
        crate::operation::response_code_required_operation::ResponseCodeRequiredOperationError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:282 */
  111    123   
}

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `TypeComplexityOperation`.
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           6  +
/* RustType.kt:516 */
    4      7   
#[non_exhaustive]
           8  +
/* OperationGenerator.kt:84 */
    5      9   
pub struct TypeComplexityOperation;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl TypeComplexityOperation {
    7         -
    /// Creates a new `TypeComplexityOperation`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `TypeComplexityOperation`
          13  +
    /* OperationGenerator.kt:87 */
    8     14   
    pub fn new() -> Self {
          15  +
        /* OperationGenerator.kt:88 */
    9     16   
        Self
          17  +
        /* OperationGenerator.kt:87 */
   10     18   
    }
          19  +
    /* OperationGenerator.kt:138 */
   11     20   
    pub(crate) async fn orchestrate(
   12     21   
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
   13     22   
        input: crate::operation::type_complexity_operation::TypeComplexityOperationInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::type_complexity_operation::TypeComplexityOperationError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +337,408 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for TypeComplexityOperation {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("TypeComplexityOperation");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            TypeComplexityOperationRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            TypeComplexityOperationResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "TypeComplexityOperation",
  111    122   
            "MiscService",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("TypeComplexityOperation")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(TypeComplexityOperationEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::type_complexity_operation::TypeComplexityOperationError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::type_complexity_operation::TypeComplexityOperationError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct TypeComplexityOperationResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for TypeComplexityOperationResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct TypeComplexityOperationRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for TypeComplexityOperationRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::type_complexity_operation::TypeComplexityOperationInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::type_complexity_operation::TypeComplexityOperationInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/typeComplexityOperation").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::type_complexity_operation::TypeComplexityOperationInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_input(&input)?,
  197    210   
        );
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct TypeComplexityOperationEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for TypeComplexityOperationEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "TypeComplexityOperationEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<TypeComplexityOperationInput>()
  226    240   
            .ok_or("failed to downcast to TypeComplexityOperationInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* OperationErrorGenerator.kt:79 */
  240    255   
/// Error type for the `TypeComplexityOperationError` operation.
         256  +
/* RustType.kt:516 */
  241    257   
#[non_exhaustive]
         258  +
/* RustType.kt:516 */
  242    259   
#[derive(::std::fmt::Debug)]
  243         -
pub enum TypeComplexityOperationError {
         260  +
pub /* OperationErrorGenerator.kt:81 */ enum TypeComplexityOperationError {
         261  +
    /* OperationErrorGenerator.kt:88 */
  244    262   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  245    263   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  246    264   
    variable wildcard pattern and check `.code()`:
  247    265   
     \
  248    266   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  249    267   
     \
  250    268   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-TypeComplexityOperationError) for what information is available for the error.")]
  251    269   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         270  +
    /* OperationErrorGenerator.kt:81 */
  252    271   
}
         272  +
/* OperationErrorGenerator.kt:218 */
  253    273   
impl TypeComplexityOperationError {
         274  +
    /* OperationErrorGenerator.kt:219 */
  254    275   
    /// Creates the `TypeComplexityOperationError::Unhandled` variant from any error type.
  255    276   
    pub fn unhandled(
  256    277   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  257    278   
    ) -> Self {
  258    279   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  259    280   
            source: err.into(),
  260    281   
            meta: ::std::default::Default::default(),
  261    282   
        })
  262    283   
    }
  263    284   
  264    285   
    /// Creates the `TypeComplexityOperationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  265    286   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  266    287   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  267    288   
            source: err.clone().into(),
  268    289   
            meta: err,
  269    290   
        })
  270    291   
    }
  271         -
    ///
         292  +
    /// /* OperationErrorGenerator.kt:236 */
  272    293   
    /// Returns error metadata, which includes the error code, message,
  273    294   
    /// request ID, and potentially additional information.
  274    295   
    ///
         296  +
    /* OperationErrorGenerator.kt:242 */
  275    297   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         298  +
        /* OperationErrorGenerator.kt:243 */
  276    299   
        match self {
  277         -
            Self::Unhandled(e) => &e.meta,
         300  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         301  +
            /* OperationErrorGenerator.kt:243 */
  278    302   
        }
         303  +
        /* OperationErrorGenerator.kt:242 */
  279    304   
    }
         305  +
    /* OperationErrorGenerator.kt:218 */
  280    306   
}
         307  +
/* OperationErrorGenerator.kt:269 */
  281    308   
impl ::std::error::Error for TypeComplexityOperationError {
         309  +
    /* OperationErrorGenerator.kt:270 */
  282    310   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         311  +
        /* OperationErrorGenerator.kt:318 */
  283    312   
        match self {
  284         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         313  +
            /* OperationErrorGenerator.kt:326 */
         314  +
            Self::Unhandled(_inner) => {
         315  +
                /* OperationErrorGenerator.kt:279 */
         316  +
                ::std::option::Option::Some(&*_inner.source)
         317  +
                /* OperationErrorGenerator.kt:326 */
         318  +
            } /* OperationErrorGenerator.kt:318 */
  285    319   
        }
         320  +
        /* OperationErrorGenerator.kt:270 */
  286    321   
    }
         322  +
    /* OperationErrorGenerator.kt:269 */
  287    323   
}
         324  +
/* OperationErrorGenerator.kt:133 */
  288    325   
impl ::std::fmt::Display for TypeComplexityOperationError {
         326  +
    /* OperationErrorGenerator.kt:134 */
  289    327   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         328  +
        /* OperationErrorGenerator.kt:318 */
  290    329   
        match self {
         330  +
            /* OperationErrorGenerator.kt:326 */
  291    331   
            Self::Unhandled(_inner) => {
         332  +
                /* OperationErrorGenerator.kt:139 */
  292    333   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  293    334   
                    write!(f, "unhandled error ({code})")
  294    335   
                } else {
  295    336   
                    f.write_str("unhandled error")
  296    337   
                }
         338  +
                /* OperationErrorGenerator.kt:326 */
         339  +
            } /* OperationErrorGenerator.kt:318 */
  297    340   
        }
         341  +
        /* OperationErrorGenerator.kt:134 */
  298    342   
    }
  299         -
    }
         343  +
    /* OperationErrorGenerator.kt:133 */
  300    344   
}
         345  +
/* OperationErrorGenerator.kt:182 */
  301    346   
impl ::aws_smithy_types::retry::ProvideErrorKind for TypeComplexityOperationError {
         347  +
    /* OperationErrorGenerator.kt:186 */
  302    348   
    fn code(&self) -> ::std::option::Option<&str> {
         349  +
        /* OperationErrorGenerator.kt:187 */
  303    350   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         351  +
        /* OperationErrorGenerator.kt:186 */
  304    352   
    }
         353  +
    /* OperationErrorGenerator.kt:190 */
  305    354   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         355  +
        /* OperationErrorGenerator.kt:197 */
  306    356   
        ::std::option::Option::None
         357  +
        /* OperationErrorGenerator.kt:190 */
  307    358   
    }
         359  +
    /* OperationErrorGenerator.kt:182 */
  308    360   
}
         361  +
/* OperationErrorGenerator.kt:163 */
  309    362   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TypeComplexityOperationError {
         363  +
    /* OperationErrorGenerator.kt:164 */
  310    364   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         365  +
        /* OperationErrorGenerator.kt:318 */
  311    366   
        match self {
  312         -
            Self::Unhandled(_inner) => &_inner.meta,
         367  +
            /* OperationErrorGenerator.kt:326 */
         368  +
            Self::Unhandled(_inner) => {
         369  +
                /* OperationErrorGenerator.kt:168 */
         370  +
                &_inner.meta
         371  +
                /* OperationErrorGenerator.kt:326 */
         372  +
            } /* OperationErrorGenerator.kt:318 */
  313    373   
        }
         374  +
        /* OperationErrorGenerator.kt:164 */
  314    375   
    }
         376  +
    /* OperationErrorGenerator.kt:163 */
  315    377   
}
         378  +
/* OperationErrorGenerator.kt:109 */
  316    379   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for TypeComplexityOperationError {
         380  +
    /* OperationErrorGenerator.kt:110 */
  317    381   
    fn create_unhandled_error(
  318    382   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  319    383   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  320    384   
    ) -> Self {
         385  +
        /* OperationErrorGenerator.kt:121 */
  321    386   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  322    387   
            source,
  323    388   
            meta: meta.unwrap_or_default(),
  324    389   
        })
         390  +
        /* OperationErrorGenerator.kt:110 */
  325    391   
    }
         392  +
    /* OperationErrorGenerator.kt:109 */
  326    393   
}
  327    394   
         395  +
/* CodegenDelegator.kt:255 */
  328    396   
pub use crate::operation::type_complexity_operation::_type_complexity_operation_output::TypeComplexityOperationOutput;
  329    397   
         398  +
/* CodegenDelegator.kt:255 */
  330    399   
pub use crate::operation::type_complexity_operation::_type_complexity_operation_input::TypeComplexityOperationInput;
  331    400   
         401  +
/* RustModule.kt:172 */
  332    402   
mod _type_complexity_operation_input;
  333    403   
         404  +
/* RustModule.kt:172 */
  334    405   
mod _type_complexity_operation_output;
  335    406   
  336         -
/// Builders
         407  +
/// /* CodegenDelegator.kt:51 */Builders
  337    408   
pub mod builders;

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/type_complexity_operation/_type_complexity_operation_input.rs

@@ -1,1 +75,123 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct TypeComplexityOperationInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TypeComplexityOperationInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub list: ::std::option::Option<
    8     12   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
    9     13   
    >,
          14  +
    /* StructureGenerator.kt:201 */
   10     15   
}
          16  +
/* StructureGenerator.kt:135 */
   11     17   
impl TypeComplexityOperationInput {
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13         -
    ///
   14         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          20  +
    /// /* StructureGenerator.kt:162 */
          21  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          22  +
    /* StructureGenerator.kt:166 */
   15     23   
    pub fn list(&self) -> &[::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>] {
   16         -
        self.list.as_deref().unwrap_or_default()
          24  +
        /* StructureGenerator.kt:169 */
          25  +
        self.list
          26  +
            .as_deref()
          27  +
            /* StructureGenerator.kt:175 */
          28  +
            .unwrap_or_default()
          29  +
        /* StructureGenerator.kt:166 */
   17     30   
    }
          31  +
    /* StructureGenerator.kt:135 */
   18     32   
}
          33  +
/* ClientCodegenVisitor.kt:237 */
   19     34   
impl TypeComplexityOperationInput {
   20         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
          35  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
          36  +
    /* BuilderGenerator.kt:175 */
   21     37   
    pub fn builder() -> crate::operation::type_complexity_operation::builders::TypeComplexityOperationInputBuilder {
          38  +
        /* BuilderGenerator.kt:176 */
   22     39   
        crate::operation::type_complexity_operation::builders::TypeComplexityOperationInputBuilder::default()
          40  +
        /* BuilderGenerator.kt:175 */
   23     41   
    }
          42  +
    /* ClientCodegenVisitor.kt:237 */
   24     43   
}
   25     44   
   26         -
/// A builder for [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
          45  +
/// /* BuilderGenerator.kt:342 */A builder for [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
          46  +
/* RustType.kt:516 */
   27     47   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          48  +
/* RustType.kt:516 */
   28     49   
#[non_exhaustive]
          50  +
/* BuilderGenerator.kt:345 */
   29     51   
pub struct TypeComplexityOperationInputBuilder {
          52  +
    /* BuilderGenerator.kt:275 */
   30     53   
    pub(crate) list: ::std::option::Option<
   31     54   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   32     55   
    >,
          56  +
    /* BuilderGenerator.kt:345 */
   33     57   
}
          58  +
/* BuilderGenerator.kt:355 */
   34     59   
impl TypeComplexityOperationInputBuilder {
   35         -
    /// Appends an item to `list`.
          60  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list`.
          61  +
    /* BuilderGenerator.kt:411 */
   36     62   
    ///
   37         -
    /// To override the contents of this collection use [`set_list`](Self::set_list).
          63  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list`](Self::set_list).
          64  +
    /* BuilderGenerator.kt:413 */
   38     65   
    ///
          66  +
    /* BuilderGenerator.kt:418 */
   39     67   
    pub fn list(
   40     68   
        mut self,
   41     69   
        input: ::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>,
   42     70   
    ) -> Self {
          71  +
        /* BuilderGenerator.kt:419 */
   43     72   
        let mut v = self.list.unwrap_or_default();
   44     73   
        v.push(input);
   45     74   
        self.list = ::std::option::Option::Some(v);
   46     75   
        self
          76  +
        /* BuilderGenerator.kt:418 */
   47     77   
    }
          78  +
    /* BuilderGenerator.kt:312 */
   48     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:314 */
   49     81   
    pub fn set_list(
   50     82   
        mut self,
   51     83   
        input: ::std::option::Option<
   52     84   
            ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   53     85   
        >,
   54     86   
    ) -> Self {
          87  +
        /* BuilderGenerator.kt:315 */
   55     88   
        self.list = input;
   56     89   
        self
          90  +
        /* BuilderGenerator.kt:314 */
   57     91   
    }
          92  +
    /* BuilderGenerator.kt:334 */
   58     93   
    #[allow(missing_docs)] // documentation missing in model
          94  +
                           /* BuilderGenerator.kt:336 */
   59     95   
    pub fn get_list(
   60     96   
        &self,
   61     97   
    ) -> &::std::option::Option<
   62     98   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   63     99   
    > {
         100  +
        /* BuilderGenerator.kt:337 */
   64    101   
        &self.list
         102  +
        /* BuilderGenerator.kt:336 */
   65    103   
    }
   66         -
    /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
         104  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::operation::type_complexity_operation::TypeComplexityOperationInput).
         105  +
    /* BuilderGenerator.kt:253 */
   67    106   
    pub fn build(
   68    107   
        self,
   69    108   
    ) -> ::std::result::Result<
   70    109   
        crate::operation::type_complexity_operation::TypeComplexityOperationInput,
   71    110   
        ::aws_smithy_types::error::operation::BuildError,
   72    111   
    > {
   73         -
        ::std::result::Result::Ok(crate::operation::type_complexity_operation::TypeComplexityOperationInput { list: self.list })
         112  +
        /* BuilderGenerator.kt:254 */
         113  +
        ::std::result::Result::Ok(
         114  +
            /* BuilderGenerator.kt:477 */
         115  +
            crate::operation::type_complexity_operation::TypeComplexityOperationInput {
         116  +
                /* BuilderGenerator.kt:481 */ list: self.list,
         117  +
                /* BuilderGenerator.kt:477 */
         118  +
            }, /* BuilderGenerator.kt:254 */
         119  +
        )
         120  +
        /* BuilderGenerator.kt:253 */
   74    121   
    }
         122  +
    /* BuilderGenerator.kt:355 */
   75    123   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/type_complexity_operation/_type_complexity_operation_output.rs

@@ -1,1 +70,115 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct TypeComplexityOperationOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct TypeComplexityOperationOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub list: ::std::option::Option<
    8     12   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
    9     13   
    >,
          14  +
    /* StructureGenerator.kt:201 */
   10     15   
}
          16  +
/* StructureGenerator.kt:135 */
   11     17   
impl TypeComplexityOperationOutput {
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13         -
    ///
   14         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          20  +
    /// /* StructureGenerator.kt:162 */
          21  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.list.is_none()`.
          22  +
    /* StructureGenerator.kt:166 */
   15     23   
    pub fn list(&self) -> &[::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>] {
   16         -
        self.list.as_deref().unwrap_or_default()
          24  +
        /* StructureGenerator.kt:169 */
          25  +
        self.list
          26  +
            .as_deref()
          27  +
            /* StructureGenerator.kt:175 */
          28  +
            .unwrap_or_default()
          29  +
        /* StructureGenerator.kt:166 */
   17     30   
    }
          31  +
    /* StructureGenerator.kt:135 */
   18     32   
}
          33  +
/* ClientCodegenVisitor.kt:237 */
   19     34   
impl TypeComplexityOperationOutput {
   20         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
          35  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
          36  +
    /* BuilderGenerator.kt:175 */
   21     37   
    pub fn builder() -> crate::operation::type_complexity_operation::builders::TypeComplexityOperationOutputBuilder {
          38  +
        /* BuilderGenerator.kt:176 */
   22     39   
        crate::operation::type_complexity_operation::builders::TypeComplexityOperationOutputBuilder::default()
          40  +
        /* BuilderGenerator.kt:175 */
   23     41   
    }
          42  +
    /* ClientCodegenVisitor.kt:237 */
   24     43   
}
   25     44   
   26         -
/// A builder for [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
          45  +
/// /* BuilderGenerator.kt:342 */A builder for [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
          46  +
/* RustType.kt:516 */
   27     47   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          48  +
/* RustType.kt:516 */
   28     49   
#[non_exhaustive]
          50  +
/* BuilderGenerator.kt:345 */
   29     51   
pub struct TypeComplexityOperationOutputBuilder {
          52  +
    /* BuilderGenerator.kt:275 */
   30     53   
    pub(crate) list: ::std::option::Option<
   31     54   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   32     55   
    >,
          56  +
    /* BuilderGenerator.kt:345 */
   33     57   
}
          58  +
/* BuilderGenerator.kt:355 */
   34     59   
impl TypeComplexityOperationOutputBuilder {
   35         -
    /// Appends an item to `list`.
          60  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `list`.
          61  +
    /* BuilderGenerator.kt:411 */
   36     62   
    ///
   37         -
    /// To override the contents of this collection use [`set_list`](Self::set_list).
          63  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_list`](Self::set_list).
          64  +
    /* BuilderGenerator.kt:413 */
   38     65   
    ///
          66  +
    /* BuilderGenerator.kt:418 */
   39     67   
    pub fn list(
   40     68   
        mut self,
   41     69   
        input: ::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>,
   42     70   
    ) -> Self {
          71  +
        /* BuilderGenerator.kt:419 */
   43     72   
        let mut v = self.list.unwrap_or_default();
   44     73   
        v.push(input);
   45     74   
        self.list = ::std::option::Option::Some(v);
   46     75   
        self
          76  +
        /* BuilderGenerator.kt:418 */
   47     77   
    }
          78  +
    /* BuilderGenerator.kt:312 */
   48     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:314 */
   49     81   
    pub fn set_list(
   50     82   
        mut self,
   51     83   
        input: ::std::option::Option<
   52     84   
            ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   53     85   
        >,
   54     86   
    ) -> Self {
          87  +
        /* BuilderGenerator.kt:315 */
   55     88   
        self.list = input;
   56     89   
        self
          90  +
        /* BuilderGenerator.kt:314 */
   57     91   
    }
          92  +
    /* BuilderGenerator.kt:334 */
   58     93   
    #[allow(missing_docs)] // documentation missing in model
          94  +
                           /* BuilderGenerator.kt:336 */
   59     95   
    pub fn get_list(
   60     96   
        &self,
   61     97   
    ) -> &::std::option::Option<
   62     98   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
   63     99   
    > {
         100  +
        /* BuilderGenerator.kt:337 */
   64    101   
        &self.list
         102  +
        /* BuilderGenerator.kt:336 */
   65    103   
    }
   66         -
    /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
         104  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::operation::type_complexity_operation::TypeComplexityOperationOutput).
         105  +
    /* BuilderGenerator.kt:253 */
   67    106   
    pub fn build(self) -> crate::operation::type_complexity_operation::TypeComplexityOperationOutput {
   68         -
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput { list: self.list }
         107  +
        /* BuilderGenerator.kt:477 */
         108  +
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput {
         109  +
            /* BuilderGenerator.kt:481 */ list: self.list,
         110  +
            /* BuilderGenerator.kt:477 */
         111  +
        }
         112  +
        /* BuilderGenerator.kt:253 */
   69    113   
    }
         114  +
    /* BuilderGenerator.kt:355 */
   70    115   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/operation/type_complexity_operation/builders.rs

@@ -1,1 +142,160 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::operation::type_complexity_operation::_type_complexity_operation_output::TypeComplexityOperationOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::type_complexity_operation::_type_complexity_operation_input::TypeComplexityOperationInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::type_complexity_operation::builders::TypeComplexityOperationInputBuilder {
    7     10   
    /// Sends a request with this input using the given client.
    8     11   
    pub async fn send_with(
    9     12   
        self,
   10     13   
        client: &crate::Client,
   11     14   
    ) -> ::std::result::Result<
   12     15   
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::type_complexity_operation::TypeComplexityOperationError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.type_complexity_operation();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `TypeComplexityOperation`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `TypeComplexityOperation`.
   24     27   
///
   25         -
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
          28  +
/// /* FluentBuilderGenerator.kt:130 */An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct TypeComplexityOperationFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::type_complexity_operation::builders::TypeComplexityOperationInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   35     41   
        crate::operation::type_complexity_operation::TypeComplexityOperationError,
   36     42   
    > for TypeComplexityOperationFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   44     50   
            crate::operation::type_complexity_operation::TypeComplexityOperationError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl TypeComplexityOperationFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `TypeComplexityOperationFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the TypeComplexityOperation as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::type_complexity_operation::builders::TypeComplexityOperationInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::type_complexity_operation::TypeComplexityOperationError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::type_complexity_operation::TypeComplexityOperation::operation_runtime_plugins(
   85     95   
            self.handle.runtime_plugins.clone(),
   86     96   
            &self.handle.conf,
   87     97   
            self.config_override,
   88     98   
        );
   89     99   
        crate::operation::type_complexity_operation::TypeComplexityOperation::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::type_complexity_operation::TypeComplexityOperationOutput,
   97    107   
        crate::operation::type_complexity_operation::TypeComplexityOperationError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
  111         -
    ///
         122  +
    /// /* FluentBuilderGenerator.kt:436 */
  112    123   
    /// Appends an item to `list`.
  113    124   
    ///
  114    125   
    /// To override the contents of this collection use [`set_list`](Self::set_list).
  115    126   
    ///
         127  +
    /* FluentBuilderGenerator.kt:443 */
  116    128   
    #[allow(missing_docs)] // documentation missing in model
         129  +
                           /* FluentBuilderGenerator.kt:446 */
  117    130   
    pub fn list(
  118    131   
        mut self,
  119    132   
        input: ::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>,
  120    133   
    ) -> Self {
  121    134   
        self.inner = self.inner.list(input);
  122    135   
        self
  123    136   
    }
         137  +
    /* FluentBuilderGenerator.kt:498 */
  124    138   
    #[allow(missing_docs)] // documentation missing in model
         139  +
                           /* FluentBuilderGenerator.kt:500 */
  125    140   
    pub fn set_list(
  126    141   
        mut self,
  127    142   
        input: ::std::option::Option<
  128    143   
            ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
  129    144   
        >,
  130    145   
    ) -> Self {
  131    146   
        self.inner = self.inner.set_list(input);
  132    147   
        self
  133    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:518 */
  134    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:520 */
  135    152   
    pub fn get_list(
  136    153   
        &self,
  137    154   
    ) -> &::std::option::Option<
  138    155   
        ::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
  139    156   
    > {
  140    157   
        self.inner.get_list()
  141    158   
    }
         159  +
    /* FluentBuilderGenerator.kt:282 */
  142    160   
}

tmp-codegen-diff/codegen-client-test/misc/rust-client-codegen/src/primitives.rs

@@ -1,1 +7,8 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
    3      4   
pub use ::aws_smithy_types::Blob;
    4         -
pub use ::aws_smithy_types::DateTime;
           5  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;
    5      6   
    6         -
/// Event stream related primitives such as `Message` or `Header`.
           7  +
/// /* ClientRustModule.kt:121 */Event stream related primitives such as `Message` or `Header`.
    7      8   
pub mod event_stream;

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

@@ -1,1 +69,72 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResponseDeserializerGenerator.kt:170 */
    2      3   
pub(crate) fn type_erase_result<O, E>(
    3      4   
    result: ::std::result::Result<O, E>,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6      7   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7      8   
>
    8      9   
where
    9     10   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     11   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     12   
{
   12     13   
    result
   13     14   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     15   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     16   
        .map_err(::std::convert::Into::into)
   16     17   
}
   17     18   
          19  +
/* RestJson.kt:122 */
   18     20   
pub fn parse_http_error_metadata(
   19     21   
    _response_status: u16,
   20     22   
    response_headers: &::aws_smithy_runtime_api::http::Headers,
   21     23   
    response_body: &[u8],
   22     24   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
   23     25   
    crate::json_errors::parse_error_metadata(response_body, response_headers)
   24     26   
}
   25     27   
   26     28   
pub(crate) mod shape_required_header_collection_operation;
   27     29   
   28     30   
pub(crate) mod shape_required_inner_shape_operation;
   29     31   
   30     32   
pub(crate) mod shape_response_code_default_operation;
   31     33   
   32     34   
pub(crate) mod shape_response_code_http_fallback_operation;
   33     35   
   34     36   
pub(crate) mod shape_response_code_required_operation;
   35     37   
   36     38   
pub(crate) mod shape_type_complexity_operation;
   37     39   
   38     40   
pub(crate) mod shape_required_header_collection_operation_output;
   39     41   
          42  +
/* JsonParserGenerator.kt:227 */
   40     43   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   41     44   
    if data.is_empty() {
   42     45   
        b"{}"
   43     46   
    } else {
   44     47   
        data
   45     48   
    }
   46     49   
}
   47     50   
   48     51   
pub(crate) mod shape_required_inner_shape_operation_input;
   49     52   

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

@@ -1,1 +42,64 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:460 */
    2      3   
pub(crate) fn de_a_map<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   10     11   
{
          12  +
    /* JsonParserGenerator.kt:712 */
   11     13   
    match tokens.next().transpose()? {
   12         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          14  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   13     15   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          16  +
            /* JsonParserGenerator.kt:469 */
   14     17   
            let mut map = ::std::collections::HashMap::new();
          18  +
            /* JsonParserGenerator.kt:684 */
   15     19   
            loop {
          20  +
                /* JsonParserGenerator.kt:685 */
   16     21   
                match tokens.next().transpose()? {
   17         -
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          22  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   18     23   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   19         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
   20         -
                        let value = ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   21         -
                            tokens.next(),
   22         -
                            ::aws_smithy_types::date_time::Format::EpochSeconds,
   23         -
                        )?;
          24  +
                        /* JsonParserGenerator.kt:471 */
          25  +
                        let key =
          26  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          27  +
                                /* JsonParserGenerator.kt:348 */u.into_owned()
          28  +
                            /* JsonParserGenerator.kt:339 */)
          29  +
                        /* JsonParserGenerator.kt:471 */?;
          30  +
                        /* JsonParserGenerator.kt:474 */
          31  +
                        let value =
          32  +
                            /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          33  +
                        /* JsonParserGenerator.kt:474 */;
          34  +
                        /* JsonParserGenerator.kt:491 */
   24     35   
                        if let Some(value) = value {
   25     36   
                            map.insert(key, value);
   26     37   
                        }
          38  +
                        /* JsonParserGenerator.kt:686 */
   27     39   
                    }
          40  +
                    /* JsonParserGenerator.kt:695 */
   28     41   
                    other => {
   29     42   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   30     43   
                            "expected object key or end object, found: {:?}",
   31     44   
                            other
   32     45   
                        )))
          46  +
                    } /* JsonParserGenerator.kt:685 */
   33     47   
                }
          48  +
                /* JsonParserGenerator.kt:684 */
   34     49   
            }
   35         -
            }
          50  +
            /* JsonParserGenerator.kt:504 */
   36     51   
            Ok(Some(map))
          52  +
            /* JsonParserGenerator.kt:713 */
   37     53   
        }
   38         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          54  +
        /* JsonParserGenerator.kt:722 */
          55  +
        _ => {
          56  +
            /* JsonParserGenerator.kt:723 */
          57  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     58   
                "expected start object or null",
   40         -
        )),
          59  +
            ))
          60  +
            /* JsonParserGenerator.kt:722 */
          61  +
        } /* JsonParserGenerator.kt:712 */
   41     62   
    }
          63  +
    /* JsonParserGenerator.kt:460 */
   42     64   
}

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

@@ -1,1 +34,59 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:712 */
    8     10   
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          11  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10     12   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          13  +
            /* JsonParserGenerator.kt:407 */
   11     14   
            let mut items = Vec::new();
          15  +
            /* JsonParserGenerator.kt:408 */
   12     16   
            loop {
          17  +
                /* JsonParserGenerator.kt:409 */
   13     18   
                match tokens.peek() {
          19  +
                    /* JsonParserGenerator.kt:410 */
   14     20   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          21  +
                        /* JsonParserGenerator.kt:411 */
   15     22   
                        tokens.next().transpose().unwrap();
   16     23   
                        break;
          24  +
                        /* JsonParserGenerator.kt:410 */
   17     25   
                    }
          26  +
                    /* JsonParserGenerator.kt:413 */
   18     27   
                    _ => {
   19         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                            .transpose()?;
          28  +
                        /* JsonParserGenerator.kt:419 */
          29  +
                        let value =
          30  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          31  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          32  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          33  +
                                /* JsonParserGenerator.kt:339 */)
          34  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          35  +
                        /* JsonParserGenerator.kt:419 */;
          36  +
                        /* JsonParserGenerator.kt:422 */
   22     37   
                        if let Some(value) = value {
   23     38   
                            items.push(value);
   24     39   
                        }
          40  +
                        /* JsonParserGenerator.kt:413 */
          41  +
                    } /* JsonParserGenerator.kt:409 */
   25     42   
                }
          43  +
                /* JsonParserGenerator.kt:408 */
   26     44   
            }
   27         -
            }
          45  +
            /* JsonParserGenerator.kt:446 */
   28     46   
            Ok(Some(items))
          47  +
            /* JsonParserGenerator.kt:713 */
   29     48   
        }
   30         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
        /* JsonParserGenerator.kt:722 */
          50  +
        _ => {
          51  +
            /* JsonParserGenerator.kt:723 */
          52  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31     53   
                "expected start array or null",
   32         -
        )),
          54  +
            ))
          55  +
            /* JsonParserGenerator.kt:722 */
          56  +
        } /* JsonParserGenerator.kt:712 */
   33     57   
    }
          58  +
    /* JsonParserGenerator.kt:398 */
   34     59   
}

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

@@ -1,1 +34,59 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_set<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<::std::vec::Vec<::std::string::String>>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:712 */
    8     10   
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          11  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10     12   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          13  +
            /* JsonParserGenerator.kt:407 */
   11     14   
            let mut items = Vec::new();
          15  +
            /* JsonParserGenerator.kt:408 */
   12     16   
            loop {
          17  +
                /* JsonParserGenerator.kt:409 */
   13     18   
                match tokens.peek() {
          19  +
                    /* JsonParserGenerator.kt:410 */
   14     20   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          21  +
                        /* JsonParserGenerator.kt:411 */
   15     22   
                        tokens.next().transpose().unwrap();
   16     23   
                        break;
          24  +
                        /* JsonParserGenerator.kt:410 */
   17     25   
                    }
          26  +
                    /* JsonParserGenerator.kt:413 */
   18     27   
                    _ => {
   19         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                            .transpose()?;
          28  +
                        /* JsonParserGenerator.kt:419 */
          29  +
                        let value =
          30  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          31  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          32  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          33  +
                                /* JsonParserGenerator.kt:339 */)
          34  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          35  +
                        /* JsonParserGenerator.kt:419 */;
          36  +
                        /* JsonParserGenerator.kt:422 */
   22     37   
                        if let Some(value) = value {
   23     38   
                            items.push(value);
   24     39   
                        }
          40  +
                        /* JsonParserGenerator.kt:413 */
          41  +
                    } /* JsonParserGenerator.kt:409 */
   25     42   
                }
          43  +
                /* JsonParserGenerator.kt:408 */
   26     44   
            }
   27         -
            }
          45  +
            /* JsonParserGenerator.kt:446 */
   28     46   
            Ok(Some(items))
          47  +
            /* JsonParserGenerator.kt:713 */
   29     48   
        }
   30         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          49  +
        /* JsonParserGenerator.kt:722 */
          50  +
        _ => {
          51  +
            /* JsonParserGenerator.kt:723 */
          52  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   31     53   
                "expected start array or null",
   32         -
        )),
          54  +
            ))
          55  +
            /* JsonParserGenerator.kt:722 */
          56  +
        } /* JsonParserGenerator.kt:712 */
   33     57   
    }
          58  +
    /* JsonParserGenerator.kt:398 */
   34     59   
}

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

@@ -1,1 +103,176 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:551 */
    2      3   
pub(crate) fn de_a_union<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<crate::types::AUnion>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:565 */
    8     10   
    let mut variant = None;
          11  +
    /* JsonParserGenerator.kt:567 */
    9     12   
    match tokens.next().transpose()? {
   10         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   11         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
          13  +
        /* JsonParserGenerator.kt:568 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
          14  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          15  +
            /* JsonParserGenerator.kt:684 */
          16  +
            loop {
          17  +
                /* JsonParserGenerator.kt:685 */
   12     18   
                match tokens.next().transpose()? {
   13         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          19  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   14     20   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          21  +
                        /* JsonParserGenerator.kt:576 */
   15     22   
                        if let ::std::option::Option::Some(::std::result::Result::Ok(::aws_smithy_json::deserialize::Token::ValueNull { .. })) =
   16     23   
                            tokens.peek()
   17     24   
                        {
   18     25   
                            let _ = tokens.next().expect("peek returned a token")?;
   19     26   
                            continue;
   20     27   
                        }
          28  +
                        /* JsonParserGenerator.kt:585 */
   21     29   
                        let key = key.to_unescaped()?;
   22     30   
                        if key == "__type" {
   23     31   
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   24     32   
                            continue;
   25     33   
                        }
   26     34   
                        if variant.is_some() {
   27     35   
                            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   28     36   
                                "encountered mixed variants in union",
   29     37   
                            ));
   30     38   
                        }
          39  +
                        /* JsonParserGenerator.kt:598 */
   31     40   
                        variant = match key.as_ref() {
   32         -
                        "i32" => Some(crate::types::AUnion::I32(
          41  +
                            /* JsonParserGenerator.kt:601 */
          42  +
                            "i32" => {
          43  +
                                /* JsonParserGenerator.kt:611 */
          44  +
                                Some(crate::types::AUnion::I32(
          45  +
                                    /* JsonParserGenerator.kt:365 */
   33     46   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   34     47   
                                        .map(i32::try_from)
   35     48   
                                        .transpose()?
   36         -
                                .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'i32' cannot be null"))?,
   37         -
                        )),
   38         -
                        "string" => Some(crate::types::AUnion::String(
          49  +
                                        /* JsonParserGenerator.kt:670 */
          50  +
                                        .ok_or_else(|| {
          51  +
                                            ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'i32' cannot be null")
          52  +
                                        })?, /* JsonParserGenerator.kt:611 */
          53  +
                                ))
          54  +
                                /* JsonParserGenerator.kt:601 */
          55  +
                            }
          56  +
                            /* JsonParserGenerator.kt:601 */
          57  +
                            "string" => {
          58  +
                                /* JsonParserGenerator.kt:611 */
          59  +
                                Some(crate::types::AUnion::String(
          60  +
                                    /* JsonParserGenerator.kt:354 */
   39     61   
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   40         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
          62  +
                                        .map(|s|
          63  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          64  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          65  +
                                        /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
   41     66   
                                        .transpose()?
          67  +
                                        /* JsonParserGenerator.kt:670 */
   42     68   
                                        .ok_or_else(|| {
   43     69   
                                            ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'string' cannot be null")
   44         -
                                })?,
   45         -
                        )),
   46         -
                        "time" => Some(crate::types::AUnion::Time(
          70  +
                                        })?, /* JsonParserGenerator.kt:611 */
          71  +
                                ))
          72  +
                                /* JsonParserGenerator.kt:601 */
          73  +
                            }
          74  +
                            /* JsonParserGenerator.kt:601 */
          75  +
                            "time" => {
          76  +
                                /* JsonParserGenerator.kt:611 */
          77  +
                                Some(crate::types::AUnion::Time(
          78  +
                                    /* JsonParserGenerator.kt:384 */
   47     79   
                                    ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   48     80   
                                        tokens.next(),
   49     81   
                                        ::aws_smithy_types::date_time::Format::EpochSeconds,
   50     82   
                                    )?
   51         -
                            .ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'time' cannot be null"))?,
   52         -
                        )),
          83  +
                                    /* JsonParserGenerator.kt:670 */
          84  +
                                    .ok_or_else(|| {
          85  +
                                        ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'time' cannot be null")
          86  +
                                    })?, /* JsonParserGenerator.kt:611 */
          87  +
                                ))
          88  +
                                /* JsonParserGenerator.kt:601 */
          89  +
                            }
          90  +
                            /* JsonParserGenerator.kt:621 */
   53     91   
                            _ => {
   54     92   
                                ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   55     93   
                                Some(crate::types::AUnion::Unknown)
   56         -
                        }
          94  +
                            } /* JsonParserGenerator.kt:598 */
   57     95   
                        };
          96  +
                        /* JsonParserGenerator.kt:686 */
   58     97   
                    }
          98  +
                    /* JsonParserGenerator.kt:695 */
   59     99   
                    other => {
   60    100   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   61    101   
                            "expected object key or end object, found: {:?}",
   62    102   
                            other
   63    103   
                        )))
         104  +
                    } /* JsonParserGenerator.kt:685 */
   64    105   
                }
         106  +
                /* JsonParserGenerator.kt:684 */
   65    107   
            }
   66         -
        },
         108  +
            /* JsonParserGenerator.kt:568 */
         109  +
        }
         110  +
        /* JsonParserGenerator.kt:642 */
   67    111   
        _ => {
   68    112   
            return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   69    113   
                "expected start object or null",
   70    114   
            ))
         115  +
        } /* JsonParserGenerator.kt:567 */
   71    116   
    }
   72         -
    }
         117  +
    /* JsonParserGenerator.kt:649 */
   73    118   
    if variant.is_none() {
   74    119   
        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   75    120   
            "Union did not contain a valid variant.",
   76    121   
        ));
   77    122   
    }
         123  +
    /* JsonParserGenerator.kt:657 */
   78    124   
    Ok(variant)
         125  +
    /* JsonParserGenerator.kt:551 */
   79    126   
}
   80    127   
         128  +
/* JsonSerializerGenerator.kt:547 */
   81    129   
pub fn ser_a_union(
   82    130   
    object_8: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   83    131   
    input: &crate::types::AUnion,
   84    132   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         133  +
    /* JsonSerializerGenerator.kt:556 */
   85    134   
    match input {
         135  +
        /* JsonSerializerGenerator.kt:564 */
   86    136   
        crate::types::AUnion::I32(inner) => {
         137  +
            /* SerializerUtil.kt:42 */
         138  +
            {
         139  +
                /* JsonSerializerGenerator.kt:432 */
   87    140   
                object_8.key("i32").number(
   88    141   
                    #[allow(clippy::useless_conversion)]
   89    142   
                    ::aws_smithy_types::Number::NegInt((*inner).into()),
   90    143   
                );
         144  +
                /* SerializerUtil.kt:42 */
         145  +
            }
         146  +
            /* JsonSerializerGenerator.kt:564 */
   91    147   
        }
         148  +
        /* JsonSerializerGenerator.kt:564 */
   92    149   
        crate::types::AUnion::String(inner) => {
         150  +
            /* SerializerUtil.kt:42 */
         151  +
            {
         152  +
                /* JsonSerializerGenerator.kt:423 */
   93    153   
                object_8.key("string").string(inner.as_str());
         154  +
                /* SerializerUtil.kt:42 */
         155  +
            }
         156  +
            /* JsonSerializerGenerator.kt:564 */
   94    157   
        }
         158  +
        /* JsonSerializerGenerator.kt:564 */
   95    159   
        crate::types::AUnion::Time(inner) => {
         160  +
            /* SerializerUtil.kt:42 */
         161  +
            {
         162  +
                /* JsonSerializerGenerator.kt:448 */
   96    163   
                object_8
   97    164   
                    .key("time")
   98    165   
                    .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         166  +
                /* SerializerUtil.kt:42 */
         167  +
            }
         168  +
            /* JsonSerializerGenerator.kt:564 */
   99    169   
        }
  100         -
        crate::types::AUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("AUnion")),
         170  +
        /* JsonSerializerGenerator.kt:569 */
         171  +
        crate::types::AUnion::Unknown => return Err(::aws_smithy_types::error::operation::SerializationError::unknown_variant("AUnion")), /* JsonSerializerGenerator.kt:556 */
  101    172   
    }
         173  +
    /* JsonSerializerGenerator.kt:576 */
  102    174   
    Ok(())
         175  +
    /* JsonSerializerGenerator.kt:547 */
  103    176   
}

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

@@ -1,1 +27,43 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_empty_structure(
    3      4   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    #[allow(unused_variables)] input: &crate::types::EmptyStructure,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:372 */
    6      8   
    Ok(())
           9  +
    /* JsonSerializerGenerator.kt:358 */
    7     10   
}
    8     11   
          12  +
/* JsonParserGenerator.kt:516 */
    9     13   
pub(crate) fn de_empty_structure<'a, I>(
   10     14   
    tokens: &mut ::std::iter::Peekable<I>,
   11     15   
) -> ::std::result::Result<Option<crate::types::EmptyStructure>, ::aws_smithy_json::deserialize::error::DeserializeError>
   12     16   
where
   13     17   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   14     18   
{
          19  +
    /* JsonParserGenerator.kt:712 */
   15     20   
    match tokens.next().transpose()? {
   16         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          21  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   17     22   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          23  +
            /* RustType.kt:516 */
   18     24   
            #[allow(unused_mut)]
          25  +
            /* JsonParserGenerator.kt:526 */
   19     26   
            let mut builder = crate::types::builders::EmptyStructureBuilder::default();
          27  +
            /* JsonParserGenerator.kt:682 */
   20     28   
            ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
          29  +
            /* JsonParserGenerator.kt:540 */
   21     30   
            Ok(Some(builder.build()))
          31  +
            /* JsonParserGenerator.kt:713 */
   22     32   
        }
   23         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          33  +
        /* JsonParserGenerator.kt:722 */
          34  +
        _ => {
          35  +
            /* JsonParserGenerator.kt:723 */
          36  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   24     37   
                "expected start object or null",
   25         -
        )),
          38  +
            ))
          39  +
            /* JsonParserGenerator.kt:722 */
          40  +
        } /* JsonParserGenerator.kt:712 */
   26     41   
    }
          42  +
    /* JsonParserGenerator.kt:516 */
   27     43   
}

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

@@ -1,1 +52,87 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_inner_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<crate::types::InnerShape>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:712 */
    8     10   
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          11  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10     12   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          13  +
            /* RustType.kt:516 */
   11     14   
            #[allow(unused_mut)]
          15  +
            /* JsonParserGenerator.kt:526 */
   12     16   
            let mut builder = crate::types::builders::InnerShapeBuilder::default();
          17  +
            /* JsonParserGenerator.kt:684 */
   13     18   
            loop {
          19  +
                /* JsonParserGenerator.kt:685 */
   14     20   
                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() {
          21  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          22  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          23  +
                        /* JsonParserGenerator.kt:260 */
          24  +
                        match key.to_unescaped()?.as_ref() {
          25  +
                            /* JsonParserGenerator.kt:262 */
   17     26   
                            "requiredInnerMostShape" => {
   18         -
                            builder =
   19         -
                                builder.set_required_inner_most_shape(crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?);
          27  +
                                /* JsonParserGenerator.kt:265 */
          28  +
                                builder = builder.set_required_inner_most_shape(
          29  +
                                    /* JsonParserGenerator.kt:544 */
          30  +
                                    crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?, /* JsonParserGenerator.kt:265 */
          31  +
                                );
          32  +
                                /* JsonParserGenerator.kt:262 */
   20     33   
                            }
   21         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   22         -
                    },
          34  +
                            /* JsonParserGenerator.kt:290 */
          35  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
          36  +
                        }
          37  +
                        /* JsonParserGenerator.kt:686 */
          38  +
                    }
          39  +
                    /* JsonParserGenerator.kt:695 */
   23     40   
                    other => {
   24     41   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   25     42   
                            "expected object key or end object, found: {:?}",
   26     43   
                            other
   27     44   
                        )))
          45  +
                    } /* JsonParserGenerator.kt:685 */
   28     46   
                }
          47  +
                /* JsonParserGenerator.kt:684 */
   29     48   
            }
   30         -
            }
          49  +
            /* JsonParserGenerator.kt:540 */
   31     50   
            Ok(Some(crate::serde_util::inner_shape_correct_errors(builder).build().map_err(|err| {
   32     51   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err)
   33     52   
            })?))
          53  +
            /* JsonParserGenerator.kt:713 */
   34     54   
        }
   35         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          55  +
        /* JsonParserGenerator.kt:722 */
          56  +
        _ => {
          57  +
            /* JsonParserGenerator.kt:723 */
          58  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   36     59   
                "expected start object or null",
   37         -
        )),
          60  +
            ))
          61  +
            /* JsonParserGenerator.kt:722 */
          62  +
        } /* JsonParserGenerator.kt:712 */
   38     63   
    }
          64  +
    /* JsonParserGenerator.kt:516 */
   39     65   
}
   40     66   
          67  +
/* JsonSerializerGenerator.kt:358 */
   41     68   
pub fn ser_inner_shape(
   42     69   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   43     70   
    input: &crate::types::InnerShape,
   44     71   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          72  +
    /* SerializerUtil.kt:42 */
   45     73   
    {
          74  +
        /* JsonSerializerGenerator.kt:495 */
   46     75   
        #[allow(unused_mut)]
          76  +
        /* JsonSerializerGenerator.kt:496 */
   47     77   
        let mut object_1 = object.key("requiredInnerMostShape").start_object();
          78  +
        /* JsonSerializerGenerator.kt:375 */
   48     79   
        crate::protocol_serde::shape_innermost_shape::ser_innermost_shape(&mut object_1, &input.required_inner_most_shape)?;
          80  +
        /* JsonSerializerGenerator.kt:515 */
   49     81   
        object_1.finish();
          82  +
        /* SerializerUtil.kt:42 */
   50     83   
    }
          84  +
    /* JsonSerializerGenerator.kt:372 */
   51     85   
    Ok(())
          86  +
    /* JsonSerializerGenerator.kt:358 */
   52     87   
}

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

@@ -1,1 +206,376 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_innermost_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<Option<crate::types::InnermostShape>, ::aws_smithy_json::deserialize::error::DeserializeError>
    5      6   
where
    6      7   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
    7      8   
{
           9  +
    /* JsonParserGenerator.kt:712 */
    8     10   
    match tokens.next().transpose()? {
    9         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          11  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   10     12   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          13  +
            /* RustType.kt:516 */
   11     14   
            #[allow(unused_mut)]
          15  +
            /* JsonParserGenerator.kt:526 */
   12     16   
            let mut builder = crate::types::builders::InnermostShapeBuilder::default();
          17  +
            /* JsonParserGenerator.kt:684 */
   13     18   
            loop {
          19  +
                /* JsonParserGenerator.kt:685 */
   14     20   
                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() {
          21  +
                    /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          22  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          23  +
                        /* JsonParserGenerator.kt:260 */
          24  +
                        match key.to_unescaped()?.as_ref() {
          25  +
                            /* JsonParserGenerator.kt:262 */
   17     26   
                            "aString" => {
          27  +
                                /* JsonParserGenerator.kt:265 */
   18     28   
                                builder = builder.set_a_string(
          29  +
                                    /* JsonParserGenerator.kt:354 */
   19     30   
                                    ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
   20         -
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   21         -
                                    .transpose()?,
          31  +
                                        .map(|s|
          32  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          33  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          34  +
                                        /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
          35  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
   22     36   
                                );
          37  +
                                /* JsonParserGenerator.kt:262 */
   23     38   
                            }
          39  +
                            /* JsonParserGenerator.kt:262 */
   24     40   
                            "aBoolean" => {
   25         -
                            builder = builder.set_a_boolean(::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?);
          41  +
                                /* JsonParserGenerator.kt:265 */
          42  +
                                builder = builder.set_a_boolean(
          43  +
                                    /* JsonParserGenerator.kt:298 */
          44  +
                                    ::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?, /* JsonParserGenerator.kt:265 */
          45  +
                                );
          46  +
                                /* JsonParserGenerator.kt:262 */
   26     47   
                            }
          48  +
                            /* JsonParserGenerator.kt:262 */
   27     49   
                            "aByte" => {
          50  +
                                /* JsonParserGenerator.kt:265 */
   28     51   
                                builder = builder.set_a_byte(
          52  +
                                    /* JsonParserGenerator.kt:365 */
   29     53   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   30     54   
                                        .map(i8::try_from)
   31         -
                                    .transpose()?,
          55  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
   32     56   
                                );
          57  +
                                /* JsonParserGenerator.kt:262 */
   33     58   
                            }
          59  +
                            /* JsonParserGenerator.kt:262 */
   34     60   
                            "aShort" => {
          61  +
                                /* JsonParserGenerator.kt:265 */
   35     62   
                                builder = builder.set_a_short(
          63  +
                                    /* JsonParserGenerator.kt:365 */
   36     64   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   37     65   
                                        .map(i16::try_from)
   38         -
                                    .transpose()?,
          66  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
   39     67   
                                );
          68  +
                                /* JsonParserGenerator.kt:262 */
   40     69   
                            }
          70  +
                            /* JsonParserGenerator.kt:262 */
   41     71   
                            "anInt" => {
          72  +
                                /* JsonParserGenerator.kt:265 */
   42     73   
                                builder = builder.set_an_int(
          74  +
                                    /* JsonParserGenerator.kt:365 */
   43     75   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   44     76   
                                        .map(i32::try_from)
   45         -
                                    .transpose()?,
          77  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
   46     78   
                                );
          79  +
                                /* JsonParserGenerator.kt:262 */
   47     80   
                            }
          81  +
                            /* JsonParserGenerator.kt:262 */
   48     82   
                            "aLong" => {
          83  +
                                /* JsonParserGenerator.kt:265 */
   49     84   
                                builder = builder.set_a_long(
          85  +
                                    /* JsonParserGenerator.kt:365 */
   50     86   
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
   51     87   
                                        .map(i64::try_from)
   52         -
                                    .transpose()?,
          88  +
                                        .transpose()?, /* JsonParserGenerator.kt:265 */
   53     89   
                                );
          90  +
                                /* JsonParserGenerator.kt:262 */
   54     91   
                            }
          92  +
                            /* JsonParserGenerator.kt:262 */
   55     93   
                            "aFloat" => {
   56         -
                            builder = builder
   57         -
                                .set_a_float(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy()));
          94  +
                                /* JsonParserGenerator.kt:265 */
          95  +
                                builder = builder.set_a_float(
          96  +
                                    /* JsonParserGenerator.kt:361 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy())
          97  +
                                /* JsonParserGenerator.kt:265 */);
          98  +
                                /* JsonParserGenerator.kt:262 */
   58     99   
                            }
         100  +
                            /* JsonParserGenerator.kt:262 */
   59    101   
                            "aDouble" => {
   60         -
                            builder = builder
   61         -
                                .set_a_double(::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy()));
         102  +
                                /* JsonParserGenerator.kt:265 */
         103  +
                                builder = builder.set_a_double(
         104  +
                                    /* JsonParserGenerator.kt:363 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())
         105  +
                                /* JsonParserGenerator.kt:265 */);
         106  +
                                /* JsonParserGenerator.kt:262 */
   62    107   
                            }
         108  +
                            /* JsonParserGenerator.kt:262 */
   63    109   
                            "aTimestamp" => {
   64         -
                            builder = builder.set_a_timestamp(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
         110  +
                                /* JsonParserGenerator.kt:265 */
         111  +
                                builder = builder.set_a_timestamp(
         112  +
                                    /* JsonParserGenerator.kt:384 */
         113  +
                                    ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   65    114   
                                        tokens.next(),
   66    115   
                                        ::aws_smithy_types::date_time::Format::EpochSeconds,
   67         -
                            )?);
         116  +
                                    )?, /* JsonParserGenerator.kt:265 */
         117  +
                                );
         118  +
                                /* JsonParserGenerator.kt:262 */
   68    119   
                            }
         120  +
                            /* JsonParserGenerator.kt:262 */
   69    121   
                            "aDocument" => {
   70         -
                            builder = builder.set_a_document(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
         122  +
                                /* JsonParserGenerator.kt:265 */
         123  +
                                builder = builder.set_a_document(
         124  +
                                    /* JsonParserGenerator.kt:384 */
         125  +
                                    ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   71    126   
                                        tokens.next(),
   72    127   
                                        ::aws_smithy_types::date_time::Format::EpochSeconds,
   73         -
                            )?);
         128  +
                                    )?, /* JsonParserGenerator.kt:265 */
         129  +
                                );
         130  +
                                /* JsonParserGenerator.kt:262 */
   74    131   
                            }
         132  +
                            /* JsonParserGenerator.kt:262 */
   75    133   
                            "aStringList" => {
   76         -
                            builder = builder.set_a_string_list(crate::protocol_serde::shape_a_string_list::de_a_string_list(tokens)?);
         134  +
                                /* JsonParserGenerator.kt:265 */
         135  +
                                builder = builder.set_a_string_list(
         136  +
                                    /* JsonParserGenerator.kt:451 */
         137  +
                                    crate::protocol_serde::shape_a_string_list::de_a_string_list(tokens)?, /* JsonParserGenerator.kt:265 */
         138  +
                                );
         139  +
                                /* JsonParserGenerator.kt:262 */
   77    140   
                            }
         141  +
                            /* JsonParserGenerator.kt:262 */
   78    142   
                            "aStringMap" => {
   79         -
                            builder = builder.set_a_string_map(crate::protocol_serde::shape_a_map::de_a_map(tokens)?);
         143  +
                                /* JsonParserGenerator.kt:265 */
         144  +
                                builder = builder.set_a_string_map(
         145  +
                                    /* JsonParserGenerator.kt:509 */
         146  +
                                    crate::protocol_serde::shape_a_map::de_a_map(tokens)?, /* JsonParserGenerator.kt:265 */
         147  +
                                );
         148  +
                                /* JsonParserGenerator.kt:262 */
   80    149   
                            }
         150  +
                            /* JsonParserGenerator.kt:262 */
   81    151   
                            "aStringSet" => {
   82         -
                            builder = builder.set_a_string_set(crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?);
         152  +
                                /* JsonParserGenerator.kt:265 */
         153  +
                                builder = builder.set_a_string_set(
         154  +
                                    /* JsonParserGenerator.kt:451 */
         155  +
                                    crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?, /* JsonParserGenerator.kt:265 */
         156  +
                                );
         157  +
                                /* JsonParserGenerator.kt:262 */
   83    158   
                            }
         159  +
                            /* JsonParserGenerator.kt:262 */
   84    160   
                            "aBlob" => {
   85         -
                            builder = builder.set_a_blob(::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?);
         161  +
                                /* JsonParserGenerator.kt:265 */
         162  +
                                builder = builder.set_a_blob(
         163  +
                                    /* JsonParserGenerator.kt:326 */
         164  +
                                    ::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?, /* JsonParserGenerator.kt:265 */
         165  +
                                );
         166  +
                                /* JsonParserGenerator.kt:262 */
   86    167   
                            }
         168  +
                            /* JsonParserGenerator.kt:262 */
   87    169   
                            "aUnion" => {
   88         -
                            builder = builder.set_a_union(crate::protocol_serde::shape_a_union::de_a_union(tokens)?);
         170  +
                                /* JsonParserGenerator.kt:265 */
         171  +
                                builder = builder.set_a_union(
         172  +
                                    /* JsonParserGenerator.kt:660 */
         173  +
                                    crate::protocol_serde::shape_a_union::de_a_union(tokens)?, /* JsonParserGenerator.kt:265 */
         174  +
                                );
         175  +
                                /* JsonParserGenerator.kt:262 */
         176  +
                            }
         177  +
                            /* JsonParserGenerator.kt:290 */
         178  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   89    179   
                        }
   90         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
   91         -
                    },
         180  +
                        /* JsonParserGenerator.kt:686 */
         181  +
                    }
         182  +
                    /* JsonParserGenerator.kt:695 */
   92    183   
                    other => {
   93    184   
                        return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   94    185   
                            "expected object key or end object, found: {:?}",
   95    186   
                            other
   96    187   
                        )))
         188  +
                    } /* JsonParserGenerator.kt:685 */
   97    189   
                }
         190  +
                /* JsonParserGenerator.kt:684 */
   98    191   
            }
   99         -
            }
         192  +
            /* JsonParserGenerator.kt:540 */
  100    193   
            Ok(Some(crate::serde_util::innermost_shape_correct_errors(builder).build().map_err(
  101    194   
                |err| ::aws_smithy_json::deserialize::error::DeserializeError::custom_source("Response was invalid", err),
  102    195   
            )?))
         196  +
            /* JsonParserGenerator.kt:713 */
  103    197   
        }
  104         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
         198  +
        /* JsonParserGenerator.kt:722 */
         199  +
        _ => {
         200  +
            /* JsonParserGenerator.kt:723 */
         201  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
  105    202   
                "expected start object or null",
  106         -
        )),
         203  +
            ))
         204  +
            /* JsonParserGenerator.kt:722 */
         205  +
        } /* JsonParserGenerator.kt:712 */
  107    206   
    }
         207  +
    /* JsonParserGenerator.kt:516 */
  108    208   
}
  109    209   
         210  +
/* JsonSerializerGenerator.kt:358 */
  110    211   
pub fn ser_innermost_shape(
  111    212   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  112    213   
    input: &crate::types::InnermostShape,
  113    214   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         215  +
    /* SerializerUtil.kt:42 */
  114    216   
    {
         217  +
        /* JsonSerializerGenerator.kt:423 */
  115    218   
        object.key("aString").string(input.a_string.as_str());
         219  +
        /* SerializerUtil.kt:42 */
  116    220   
    }
         221  +
    /* SerializerUtil.kt:42 */
  117    222   
    {
         223  +
        /* JsonSerializerGenerator.kt:424 */
  118    224   
        object.key("aBoolean").boolean(input.a_boolean);
         225  +
        /* SerializerUtil.kt:42 */
  119    226   
    }
         227  +
    /* SerializerUtil.kt:42 */
  120    228   
    {
         229  +
        /* JsonSerializerGenerator.kt:432 */
  121    230   
        object.key("aByte").number(
  122    231   
            #[allow(clippy::useless_conversion)]
  123    232   
            ::aws_smithy_types::Number::NegInt((input.a_byte).into()),
  124    233   
        );
         234  +
        /* SerializerUtil.kt:42 */
  125    235   
    }
         236  +
    /* SerializerUtil.kt:42 */
  126    237   
    {
         238  +
        /* JsonSerializerGenerator.kt:432 */
  127    239   
        object.key("aShort").number(
  128    240   
            #[allow(clippy::useless_conversion)]
  129    241   
            ::aws_smithy_types::Number::NegInt((input.a_short).into()),
  130    242   
        );
         243  +
        /* SerializerUtil.kt:42 */
  131    244   
    }
         245  +
    /* SerializerUtil.kt:42 */
  132    246   
    {
         247  +
        /* JsonSerializerGenerator.kt:432 */
  133    248   
        object.key("anInt").number(
  134    249   
            #[allow(clippy::useless_conversion)]
  135    250   
            ::aws_smithy_types::Number::NegInt((input.an_int).into()),
  136    251   
        );
         252  +
        /* SerializerUtil.kt:42 */
  137    253   
    }
         254  +
    /* SerializerUtil.kt:42 */
  138    255   
    {
         256  +
        /* JsonSerializerGenerator.kt:432 */
  139    257   
        object.key("aLong").number(
  140    258   
            #[allow(clippy::useless_conversion)]
  141    259   
            ::aws_smithy_types::Number::NegInt((input.a_long).into()),
  142    260   
        );
         261  +
        /* SerializerUtil.kt:42 */
  143    262   
    }
         263  +
    /* SerializerUtil.kt:42 */
  144    264   
    {
         265  +
        /* JsonSerializerGenerator.kt:432 */
  145    266   
        object.key("aFloat").number(
  146    267   
            #[allow(clippy::useless_conversion)]
  147    268   
            ::aws_smithy_types::Number::Float((input.a_float).into()),
  148    269   
        );
         270  +
        /* SerializerUtil.kt:42 */
  149    271   
    }
         272  +
    /* SerializerUtil.kt:42 */
  150    273   
    {
         274  +
        /* JsonSerializerGenerator.kt:432 */
  151    275   
        object.key("aDouble").number(
  152    276   
            #[allow(clippy::useless_conversion)]
  153    277   
            ::aws_smithy_types::Number::Float((input.a_double).into()),
  154    278   
        );
         279  +
        /* SerializerUtil.kt:42 */
  155    280   
    }
         281  +
    /* SerializerUtil.kt:42 */
  156    282   
    {
         283  +
        /* JsonSerializerGenerator.kt:448 */
  157    284   
        object
  158    285   
            .key("aTimestamp")
  159    286   
            .date_time(&input.a_timestamp, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         287  +
        /* SerializerUtil.kt:42 */
  160    288   
    }
         289  +
    /* SerializerUtil.kt:42 */
  161    290   
    {
         291  +
        /* JsonSerializerGenerator.kt:448 */
  162    292   
        object
  163    293   
            .key("aDocument")
  164    294   
            .date_time(&input.a_document, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         295  +
        /* SerializerUtil.kt:42 */
  165    296   
    }
         297  +
    /* SerializerUtil.kt:42 */
  166    298   
    {
         299  +
        /* JsonSerializerGenerator.kt:484 */
  167    300   
        let mut array_1 = object.key("aStringList").start_array();
         301  +
        /* JsonSerializerGenerator.kt:524 */
  168    302   
        for item_2 in &input.a_string_list {
         303  +
            /* SerializerUtil.kt:42 */
  169    304   
            {
         305  +
                /* JsonSerializerGenerator.kt:423 */
  170    306   
                array_1.value().string(item_2.as_str());
         307  +
                /* SerializerUtil.kt:42 */
  171    308   
            }
         309  +
            /* JsonSerializerGenerator.kt:524 */
  172    310   
        }
         311  +
        /* JsonSerializerGenerator.kt:486 */
  173    312   
        array_1.finish();
         313  +
        /* SerializerUtil.kt:42 */
  174    314   
    }
         315  +
    /* SerializerUtil.kt:42 */
  175    316   
    {
         317  +
        /* JsonSerializerGenerator.kt:495 */
  176    318   
        #[allow(unused_mut)]
         319  +
        /* JsonSerializerGenerator.kt:496 */
  177    320   
        let mut object_3 = object.key("aStringMap").start_object();
         321  +
        /* JsonSerializerGenerator.kt:537 */
  178    322   
        for (key_4, value_5) in &input.a_string_map {
         323  +
            /* SerializerUtil.kt:42 */
  179    324   
            {
         325  +
                /* JsonSerializerGenerator.kt:448 */
  180    326   
                object_3
  181    327   
                    .key(key_4.as_str())
  182    328   
                    .date_time(value_5, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         329  +
                /* SerializerUtil.kt:42 */
  183    330   
            }
         331  +
            /* JsonSerializerGenerator.kt:537 */
  184    332   
        }
         333  +
        /* JsonSerializerGenerator.kt:515 */
  185    334   
        object_3.finish();
         335  +
        /* SerializerUtil.kt:42 */
  186    336   
    }
         337  +
    /* SerializerUtil.kt:42 */
  187    338   
    {
         339  +
        /* JsonSerializerGenerator.kt:484 */
  188    340   
        let mut array_6 = object.key("aStringSet").start_array();
         341  +
        /* JsonSerializerGenerator.kt:524 */
  189    342   
        for item_7 in &input.a_string_set {
         343  +
            /* SerializerUtil.kt:42 */
  190    344   
            {
         345  +
                /* JsonSerializerGenerator.kt:423 */
  191    346   
                array_6.value().string(item_7.as_str());
         347  +
                /* SerializerUtil.kt:42 */
  192    348   
            }
         349  +
            /* JsonSerializerGenerator.kt:524 */
  193    350   
        }
         351  +
        /* JsonSerializerGenerator.kt:486 */
  194    352   
        array_6.finish();
         353  +
        /* SerializerUtil.kt:42 */
  195    354   
    }
         355  +
    /* SerializerUtil.kt:42 */
  196    356   
    {
         357  +
        /* JsonSerializerGenerator.kt:439 */
  197    358   
        object.key("aBlob").string_unchecked(&::aws_smithy_types::base64::encode(&input.a_blob));
         359  +
        /* SerializerUtil.kt:42 */
  198    360   
    }
         361  +
    /* SerializerUtil.kt:42 */
  199    362   
    {
         363  +
        /* JsonSerializerGenerator.kt:495 */
  200    364   
        #[allow(unused_mut)]
         365  +
        /* JsonSerializerGenerator.kt:496 */
  201    366   
        let mut object_8 = object.key("aUnion").start_object();
         367  +
        /* JsonSerializerGenerator.kt:579 */
  202    368   
        crate::protocol_serde::shape_a_union::ser_a_union(&mut object_8, &input.a_union)?;
         369  +
        /* JsonSerializerGenerator.kt:515 */
  203    370   
        object_8.finish();
         371  +
        /* SerializerUtil.kt:42 */
  204    372   
    }
         373  +
    /* JsonSerializerGenerator.kt:372 */
  205    374   
    Ok(())
         375  +
    /* JsonSerializerGenerator.kt:358 */
  206    376   
}

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

@@ -1,1 +35,58 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_list_a<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   10     11   
{
          12  +
    /* JsonParserGenerator.kt:712 */
   11     13   
    match tokens.next().transpose()? {
   12         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          14  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   13     15   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          16  +
            /* JsonParserGenerator.kt:407 */
   14     17   
            let mut items = Vec::new();
          18  +
            /* JsonParserGenerator.kt:408 */
   15     19   
            loop {
          20  +
                /* JsonParserGenerator.kt:409 */
   16     21   
                match tokens.peek() {
          22  +
                    /* JsonParserGenerator.kt:410 */
   17     23   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          24  +
                        /* JsonParserGenerator.kt:411 */
   18     25   
                        tokens.next().transpose().unwrap();
   19     26   
                        break;
          27  +
                        /* JsonParserGenerator.kt:410 */
   20     28   
                    }
          29  +
                    /* JsonParserGenerator.kt:413 */
   21     30   
                    _ => {
   22         -
                        let value = crate::protocol_serde::shape_list_b::de_list_b(tokens)?;
          31  +
                        /* JsonParserGenerator.kt:419 */
          32  +
                        let value =
          33  +
                            /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_list_b::de_list_b(tokens)?
          34  +
                        /* JsonParserGenerator.kt:419 */;
          35  +
                        /* JsonParserGenerator.kt:422 */
   23     36   
                        if let Some(value) = value {
   24     37   
                            items.push(value);
   25     38   
                        }
          39  +
                        /* JsonParserGenerator.kt:413 */
          40  +
                    } /* JsonParserGenerator.kt:409 */
   26     41   
                }
          42  +
                /* JsonParserGenerator.kt:408 */
   27     43   
            }
   28         -
            }
          44  +
            /* JsonParserGenerator.kt:446 */
   29     45   
            Ok(Some(items))
          46  +
            /* JsonParserGenerator.kt:713 */
   30     47   
        }
   31         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
        /* JsonParserGenerator.kt:722 */
          49  +
        _ => {
          50  +
            /* JsonParserGenerator.kt:723 */
          51  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32     52   
                "expected start array or null",
   33         -
        )),
          53  +
            ))
          54  +
            /* JsonParserGenerator.kt:722 */
          55  +
        } /* JsonParserGenerator.kt:712 */
   34     56   
    }
          57  +
    /* JsonParserGenerator.kt:398 */
   35     58   
}

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

@@ -1,1 +35,58 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_list_b<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::EmptyStructure>>>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<Item = Result<::aws_smithy_json::deserialize::Token<'a>, ::aws_smithy_json::deserialize::error::DeserializeError>>,
   10     11   
{
          12  +
    /* JsonParserGenerator.kt:712 */
   11     13   
    match tokens.next().transpose()? {
   12         -
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          14  +
        /* JsonParserGenerator.kt:713 */ Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   13     15   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          16  +
            /* JsonParserGenerator.kt:407 */
   14     17   
            let mut items = Vec::new();
          18  +
            /* JsonParserGenerator.kt:408 */
   15     19   
            loop {
          20  +
                /* JsonParserGenerator.kt:409 */
   16     21   
                match tokens.peek() {
          22  +
                    /* JsonParserGenerator.kt:410 */
   17     23   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          24  +
                        /* JsonParserGenerator.kt:411 */
   18     25   
                        tokens.next().transpose().unwrap();
   19     26   
                        break;
          27  +
                        /* JsonParserGenerator.kt:410 */
   20     28   
                    }
          29  +
                    /* JsonParserGenerator.kt:413 */
   21     30   
                    _ => {
   22         -
                        let value = crate::protocol_serde::shape_list_c::de_list_c(tokens)?;
          31  +
                        /* JsonParserGenerator.kt:419 */
          32  +
                        let value =
          33  +
                            /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_list_c::de_list_c(tokens)?
          34  +
                        /* JsonParserGenerator.kt:419 */;
          35  +
                        /* JsonParserGenerator.kt:422 */
   23     36   
                        if let Some(value) = value {
   24     37   
                            items.push(value);
   25     38   
                        }
          39  +
                        /* JsonParserGenerator.kt:413 */
          40  +
                    } /* JsonParserGenerator.kt:409 */
   26     41   
                }
          42  +
                /* JsonParserGenerator.kt:408 */
   27     43   
            }
   28         -
            }
          44  +
            /* JsonParserGenerator.kt:446 */
   29     45   
            Ok(Some(items))
          46  +
            /* JsonParserGenerator.kt:713 */
   30     47   
        }
   31         -
        _ => Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
          48  +
        /* JsonParserGenerator.kt:722 */
          49  +
        _ => {
          50  +
            /* JsonParserGenerator.kt:723 */
          51  +
            Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
   32     52   
                "expected start array or null",
   33         -
        )),
          53  +
            ))
          54  +
            /* JsonParserGenerator.kt:722 */
          55  +
        } /* JsonParserGenerator.kt:712 */
   34     56   
    }
          57  +
    /* JsonParserGenerator.kt:398 */
   35     58   
}