Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/nested_xml_maps/builders.rs

@@ -1,1 +174,198 @@
    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::nested_xml_maps::_nested_xml_maps_output::NestedXmlMapsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::nested_xml_maps::_nested_xml_maps_input::NestedXmlMapsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::nested_xml_maps::builders::NestedXmlMapsInputBuilder {
    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::nested_xml_maps::NestedXmlMapsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::nested_xml_maps::NestedXmlMapsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.nested_xml_maps();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NestedXmlMaps`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NestedXmlMaps`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct NestedXmlMapsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::nested_xml_maps::builders::NestedXmlMapsInputBuilder,
   29     34   
    config_override: ::std::option::Option<crate::config::Builder>,
   30     35   
}
          36  +
/* FluentBuilderGenerator.kt:381 */
   31     37   
impl
   32     38   
    crate::client::customize::internal::CustomizableSend<
   33     39   
        crate::operation::nested_xml_maps::NestedXmlMapsOutput,
   34     40   
        crate::operation::nested_xml_maps::NestedXmlMapsError,
   35     41   
    > for NestedXmlMapsFluentBuilder
   36     42   
{
   37     43   
    fn send(
   38     44   
        self,
   39     45   
        config_override: crate::config::Builder,
   40     46   
    ) -> crate::client::customize::internal::BoxFuture<
   41     47   
        crate::client::customize::internal::SendResult<
   42     48   
            crate::operation::nested_xml_maps::NestedXmlMapsOutput,
   43     49   
            crate::operation::nested_xml_maps::NestedXmlMapsError,
   44     50   
        >,
   45     51   
    > {
   46     52   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   47     53   
    }
   48     54   
}
          55  +
/* FluentBuilderGenerator.kt:282 */
   49     56   
impl NestedXmlMapsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `NestedXmlMapsFluentBuilder`.
   51     59   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   52     60   
        Self {
   53     61   
            handle,
   54     62   
            inner: ::std::default::Default::default(),
   55     63   
            config_override: ::std::option::Option::None,
   56     64   
        }
   57     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:301 */
   58     67   
    /// Access the NestedXmlMaps as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::nested_xml_maps::builders::NestedXmlMapsInputBuilder {
   60     69   
        &self.inner
   61     70   
    }
          71  +
    /* FluentBuilderGenerator.kt:145 */
   62     72   
    /// Sends the request and returns the response.
   63     73   
    ///
   64     74   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   65     75   
    /// can be matched against.
   66     76   
    ///
   67     77   
    /// By default, any retryable failures will be retried twice. Retry behavior
   68     78   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   69     79   
    /// set when configuring the client.
   70     80   
    pub async fn send(
   71     81   
        self,
   72     82   
    ) -> ::std::result::Result<
   73     83   
        crate::operation::nested_xml_maps::NestedXmlMapsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::nested_xml_maps::NestedXmlMapsError,
   76     86   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   77     87   
        >,
   78     88   
    > {
   79     89   
        let input = self
   80     90   
            .inner
   81     91   
            .build()
   82     92   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   83     93   
        let runtime_plugins = crate::operation::nested_xml_maps::NestedXmlMaps::operation_runtime_plugins(
   84     94   
            self.handle.runtime_plugins.clone(),
   85     95   
            &self.handle.conf,
   86     96   
            self.config_override,
   87     97   
        );
   88     98   
        crate::operation::nested_xml_maps::NestedXmlMaps::orchestrate(&runtime_plugins, input).await
   89     99   
    }
   90    100   
   91    101   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   92    102   
    pub fn customize(
   93    103   
        self,
   94    104   
    ) -> crate::client::customize::CustomizableOperation<
   95    105   
        crate::operation::nested_xml_maps::NestedXmlMapsOutput,
   96    106   
        crate::operation::nested_xml_maps::NestedXmlMapsError,
   97    107   
        Self,
   98    108   
    > {
   99    109   
        crate::client::customize::CustomizableOperation::new(self)
  100    110   
    }
         111  +
    /* FluentBuilderGenerator.kt:315 */
  101    112   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  102    113   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  103    114   
        self
  104    115   
    }
  105    116   
  106    117   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  107    118   
        self.config_override = config_override;
  108    119   
        self
  109    120   
    }
  110         -
    ///
         121  +
    /// /* FluentBuilderGenerator.kt:466 */
  111    122   
    /// Adds a key-value pair to `nestedMap`.
  112    123   
    ///
  113    124   
    /// To override the contents of this collection use [`set_nested_map`](Self::set_nested_map).
  114    125   
    ///
         126  +
    /* FluentBuilderGenerator.kt:473 */
  115    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* FluentBuilderGenerator.kt:475 */
  116    129   
    pub fn nested_map(
  117    130   
        mut self,
  118    131   
        k: impl ::std::convert::Into<::std::string::String>,
  119    132   
        v: ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>,
  120    133   
    ) -> Self {
  121    134   
        self.inner = self.inner.nested_map(k.into(), v);
  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_nested_map(
  126    141   
        mut self,
  127    142   
        input: ::std::option::Option<
  128    143   
            ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>>,
  129    144   
        >,
  130    145   
    ) -> Self {
  131    146   
        self.inner = self.inner.set_nested_map(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_nested_map(
  136    153   
        &self,
  137    154   
    ) -> &::std::option::Option<
  138    155   
        ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>>,
  139    156   
    > {
  140    157   
        self.inner.get_nested_map()
  141    158   
    }
  142         -
    ///
         159  +
    /// /* FluentBuilderGenerator.kt:466 */
  143    160   
    /// Adds a key-value pair to `flatNestedMap`.
  144    161   
    ///
  145    162   
    /// To override the contents of this collection use [`set_flat_nested_map`](Self::set_flat_nested_map).
  146    163   
    ///
         164  +
    /* FluentBuilderGenerator.kt:473 */
  147    165   
    #[allow(missing_docs)] // documentation missing in model
         166  +
                           /* FluentBuilderGenerator.kt:475 */
  148    167   
    pub fn flat_nested_map(
  149    168   
        mut self,
  150    169   
        k: impl ::std::convert::Into<::std::string::String>,
  151    170   
        v: ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>,
  152    171   
    ) -> Self {
  153    172   
        self.inner = self.inner.flat_nested_map(k.into(), v);
  154    173   
        self
  155    174   
    }
         175  +
    /* FluentBuilderGenerator.kt:498 */
  156    176   
    #[allow(missing_docs)] // documentation missing in model
         177  +
                           /* FluentBuilderGenerator.kt:500 */
  157    178   
    pub fn set_flat_nested_map(
  158    179   
        mut self,
  159    180   
        input: ::std::option::Option<
  160    181   
            ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>>,
  161    182   
        >,
  162    183   
    ) -> Self {
  163    184   
        self.inner = self.inner.set_flat_nested_map(input);
  164    185   
        self
  165    186   
    }
         187  +
    /* FluentBuilderGenerator.kt:518 */
  166    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* FluentBuilderGenerator.kt:520 */
  167    190   
    pub fn get_flat_nested_map(
  168    191   
        &self,
  169    192   
    ) -> &::std::option::Option<
  170    193   
        ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::FooEnum>>,
  171    194   
    > {
  172    195   
        self.inner.get_flat_nested_map()
  173    196   
    }
         197  +
    /* FluentBuilderGenerator.kt:282 */
  174    198   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_no_output.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 `NoInputAndNoOutput`.
           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 NoInputAndNoOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl NoInputAndNoOutput {
    7         -
    /// Creates a new `NoInputAndNoOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `NoInputAndNoOutput`
          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::no_input_and_no_output::NoInputAndNoOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +394,470 @@
   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 NoInputAndNoOutput {
   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("NoInputAndNoOutput");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            NoInputAndNoOutputRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            NoInputAndNoOutputResponseDeserializer,
  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   
            "NoInputAndNoOutput",
  111    122   
            "Rest Xml Protocol",
  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("NoInputAndNoOutput")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(NoInputAndNoOutputEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
  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 NoInputAndNoOutputResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NoInputAndNoOutputResponseDeserializer {
  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_no_input_and_no_output::de_no_input_and_no_output_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_no_input_and_no_output::de_no_input_and_no_output_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 NoInputAndNoOutputRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NoInputAndNoOutputRequestSerializer {
  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::no_input_and_no_output::NoInputAndNoOutputInput>()
  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::no_input_and_no_output::NoInputAndNoOutputInput,
  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, "/NoInputAndNoOutput").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::no_input_and_no_output::NoInputAndNoOutputInput,
  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
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct NoInputAndNoOutputEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NoInputAndNoOutputEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "NoInputAndNoOutputEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<NoInputAndNoOutputInput>()
  220    234   
            .ok_or("failed to downcast to NoInputAndNoOutputInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod no_input_and_no_output_test {
  237    254   
  238    255   
    /// No input serializes no payload
  239    256   
    /// Test ID: NoInputAndNoOutput
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn no_input_and_no_output_request() {
  243    260   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    261   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  245    262   
  246    263   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  247    264   
        let result = client.no_input_and_no_output().send().await;
  248    265   
        let _ = dbg!(result);
  249    266   
        let http_request = request_receiver.expect_request();
  250    267   
        let body = http_request.body().bytes().expect("body should be strict");
  251    268   
        // No body.
  252    269   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  253    270   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  254    271   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  255    272   
        ::pretty_assertions::assert_eq!(uri.path(), "/NoInputAndNoOutput", "path was incorrect");
  256    273   
    }
  257    274   
  258    275   
    /// No output serializes no payload
  259    276   
    /// Test ID: NoInputAndNoOutput
  260    277   
    #[::tokio::test]
  261    278   
    #[::tracing_test::traced_test]
  262    279   
    async fn no_input_and_no_output_response() {
  263    280   
        let expected_output = crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput::builder().build();
  264    281   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  265    282   
            ::http::response::Builder::new()
  266    283   
                .status(200)
  267    284   
                .body(::aws_smithy_types::body::SdkBody::from(""))
  268    285   
                .unwrap(),
  269    286   
        )
  270    287   
        .unwrap();
  271    288   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  272    289   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  273    290   
  274    291   
        let op = crate::operation::no_input_and_no_output::NoInputAndNoOutput::new();
  275    292   
        let config = op.config().expect("the operation has config");
  276    293   
        let de = config
  277    294   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  278    295   
            .expect("the config must have a deserializer");
  279    296   
  280    297   
        let parsed = de.deserialize_streaming(&mut http_response);
  281    298   
        let parsed = parsed.unwrap_or_else(|| {
  282    299   
            let http_response = http_response.map(|body| {
  283    300   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  284    301   
                    body.bytes().unwrap(),
  285    302   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  286    303   
                )))
  287    304   
            });
  288    305   
            de.deserialize_nonstreaming(&http_response)
  289    306   
        });
  290    307   
        let parsed = parsed
  291    308   
            .expect("should be successful response")
  292    309   
            .downcast::<crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput>()
  293    310   
            .unwrap();
  294    311   
    }
         312  +
         313  +
    /* ProtocolTestGenerator.kt:98 */
  295    314   
}
  296    315   
         316  +
/* OperationErrorGenerator.kt:79 */
  297    317   
/// Error type for the `NoInputAndNoOutputError` operation.
         318  +
/* RustType.kt:516 */
  298    319   
#[non_exhaustive]
         320  +
/* RustType.kt:516 */
  299    321   
#[derive(::std::fmt::Debug)]
  300         -
pub enum NoInputAndNoOutputError {
         322  +
pub /* OperationErrorGenerator.kt:81 */ enum NoInputAndNoOutputError {
         323  +
    /* OperationErrorGenerator.kt:88 */
  301    324   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  302    325   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  303    326   
    variable wildcard pattern and check `.code()`:
  304    327   
     \
  305    328   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  306    329   
     \
  307    330   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-NoInputAndNoOutputError) for what information is available for the error.")]
  308    331   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         332  +
    /* OperationErrorGenerator.kt:81 */
  309    333   
}
         334  +
/* OperationErrorGenerator.kt:218 */
  310    335   
impl NoInputAndNoOutputError {
         336  +
    /* OperationErrorGenerator.kt:219 */
  311    337   
    /// Creates the `NoInputAndNoOutputError::Unhandled` variant from any error type.
  312    338   
    pub fn unhandled(
  313    339   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  314    340   
    ) -> Self {
  315    341   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  316    342   
            source: err.into(),
  317    343   
            meta: ::std::default::Default::default(),
  318    344   
        })
  319    345   
    }
  320    346   
  321    347   
    /// Creates the `NoInputAndNoOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  322    348   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  323    349   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  324    350   
            source: err.clone().into(),
  325    351   
            meta: err,
  326    352   
        })
  327    353   
    }
  328         -
    ///
         354  +
    /// /* OperationErrorGenerator.kt:236 */
  329    355   
    /// Returns error metadata, which includes the error code, message,
  330    356   
    /// request ID, and potentially additional information.
  331    357   
    ///
         358  +
    /* OperationErrorGenerator.kt:242 */
  332    359   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         360  +
        /* OperationErrorGenerator.kt:243 */
  333    361   
        match self {
  334         -
            Self::Unhandled(e) => &e.meta,
         362  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         363  +
            /* OperationErrorGenerator.kt:243 */
  335    364   
        }
         365  +
        /* OperationErrorGenerator.kt:242 */
  336    366   
    }
         367  +
    /* OperationErrorGenerator.kt:218 */
  337    368   
}
         369  +
/* OperationErrorGenerator.kt:269 */
  338    370   
impl ::std::error::Error for NoInputAndNoOutputError {
         371  +
    /* OperationErrorGenerator.kt:270 */
  339    372   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         373  +
        /* OperationErrorGenerator.kt:318 */
  340    374   
        match self {
  341         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         375  +
            /* OperationErrorGenerator.kt:326 */
         376  +
            Self::Unhandled(_inner) => {
         377  +
                /* OperationErrorGenerator.kt:279 */
         378  +
                ::std::option::Option::Some(&*_inner.source)
         379  +
                /* OperationErrorGenerator.kt:326 */
         380  +
            } /* OperationErrorGenerator.kt:318 */
  342    381   
        }
         382  +
        /* OperationErrorGenerator.kt:270 */
  343    383   
    }
         384  +
    /* OperationErrorGenerator.kt:269 */
  344    385   
}
         386  +
/* OperationErrorGenerator.kt:133 */
  345    387   
impl ::std::fmt::Display for NoInputAndNoOutputError {
         388  +
    /* OperationErrorGenerator.kt:134 */
  346    389   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         390  +
        /* OperationErrorGenerator.kt:318 */
  347    391   
        match self {
         392  +
            /* OperationErrorGenerator.kt:326 */
  348    393   
            Self::Unhandled(_inner) => {
         394  +
                /* OperationErrorGenerator.kt:139 */
  349    395   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  350    396   
                    write!(f, "unhandled error ({code})")
  351    397   
                } else {
  352    398   
                    f.write_str("unhandled error")
  353    399   
                }
         400  +
                /* OperationErrorGenerator.kt:326 */
         401  +
            } /* OperationErrorGenerator.kt:318 */
  354    402   
        }
         403  +
        /* OperationErrorGenerator.kt:134 */
  355    404   
    }
  356         -
    }
         405  +
    /* OperationErrorGenerator.kt:133 */
  357    406   
}
         407  +
/* OperationErrorGenerator.kt:182 */
  358    408   
impl ::aws_smithy_types::retry::ProvideErrorKind for NoInputAndNoOutputError {
         409  +
    /* OperationErrorGenerator.kt:186 */
  359    410   
    fn code(&self) -> ::std::option::Option<&str> {
         411  +
        /* OperationErrorGenerator.kt:187 */
  360    412   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         413  +
        /* OperationErrorGenerator.kt:186 */
  361    414   
    }
         415  +
    /* OperationErrorGenerator.kt:190 */
  362    416   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         417  +
        /* OperationErrorGenerator.kt:197 */
  363    418   
        ::std::option::Option::None
         419  +
        /* OperationErrorGenerator.kt:190 */
  364    420   
    }
         421  +
    /* OperationErrorGenerator.kt:182 */
  365    422   
}
         423  +
/* OperationErrorGenerator.kt:163 */
  366    424   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for NoInputAndNoOutputError {
         425  +
    /* OperationErrorGenerator.kt:164 */
  367    426   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         427  +
        /* OperationErrorGenerator.kt:318 */
  368    428   
        match self {
  369         -
            Self::Unhandled(_inner) => &_inner.meta,
         429  +
            /* OperationErrorGenerator.kt:326 */
         430  +
            Self::Unhandled(_inner) => {
         431  +
                /* OperationErrorGenerator.kt:168 */
         432  +
                &_inner.meta
         433  +
                /* OperationErrorGenerator.kt:326 */
         434  +
            } /* OperationErrorGenerator.kt:318 */
  370    435   
        }
         436  +
        /* OperationErrorGenerator.kt:164 */
  371    437   
    }
         438  +
    /* OperationErrorGenerator.kt:163 */
  372    439   
}
         440  +
/* OperationErrorGenerator.kt:109 */
  373    441   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for NoInputAndNoOutputError {
         442  +
    /* OperationErrorGenerator.kt:110 */
  374    443   
    fn create_unhandled_error(
  375    444   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  376    445   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  377    446   
    ) -> Self {
         447  +
        /* OperationErrorGenerator.kt:121 */
  378    448   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  379    449   
            source,
  380    450   
            meta: meta.unwrap_or_default(),
  381    451   
        })
         452  +
        /* OperationErrorGenerator.kt:110 */
  382    453   
    }
         454  +
    /* OperationErrorGenerator.kt:109 */
  383    455   
}
  384    456   
         457  +
/* CodegenDelegator.kt:255 */
  385    458   
pub use crate::operation::no_input_and_no_output::_no_input_and_no_output_output::NoInputAndNoOutputOutput;
  386    459   
         460  +
/* CodegenDelegator.kt:255 */
  387    461   
pub use crate::operation::no_input_and_no_output::_no_input_and_no_output_input::NoInputAndNoOutputInput;
  388    462   
         463  +
/* RustModule.kt:172 */
  389    464   
mod _no_input_and_no_output_input;
  390    465   
         466  +
/* RustModule.kt:172 */
  391    467   
mod _no_input_and_no_output_output;
  392    468   
  393         -
/// Builders
         469  +
/// /* CodegenDelegator.kt:51 */Builders
  394    470   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_no_output/_no_input_and_no_output_input.rs

@@ -1,1 +25,45 @@
    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 NoInputAndNoOutputInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct NoInputAndNoOutputInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl NoInputAndNoOutputInput {
    7         -
    /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct NoInputAndNoOutputInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct NoInputAndNoOutputInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl NoInputAndNoOutputInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::no_input_and_no_output::NoInputAndNoOutputInput, ::aws_smithy_types::error::operation::BuildError>
   22     35   
    {
   23         -
        ::std::result::Result::Ok(crate::operation::no_input_and_no_output::NoInputAndNoOutputInput {})
          36  +
        /* BuilderGenerator.kt:254 */
          37  +
        ::std::result::Result::Ok(
          38  +
            /* BuilderGenerator.kt:477 */
          39  +
            crate::operation::no_input_and_no_output::NoInputAndNoOutputInput {
          40  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          41  +
        )
          42  +
        /* BuilderGenerator.kt:253 */
   24     43   
    }
          44  +
    /* BuilderGenerator.kt:355 */
   25     45   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_no_output/_no_input_and_no_output_output.rs

@@ -1,1 +22,39 @@
    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 NoInputAndNoOutputOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct NoInputAndNoOutputOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl NoInputAndNoOutputOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct NoInputAndNoOutputOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct NoInputAndNoOutputOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl NoInputAndNoOutputOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NoInputAndNoOutputOutput`](crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput {
   20         -
        crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::no_input_and_no_output::NoInputAndNoOutputOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_no_output/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::no_input_and_no_output::_no_input_and_no_output_output::NoInputAndNoOutputOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::no_input_and_no_output::_no_input_and_no_output_input::NoInputAndNoOutputInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputInputBuilder {
    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::no_input_and_no_output::NoInputAndNoOutputOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.no_input_and_no_output();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NoInputAndNoOutput`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NoInputAndNoOutput`.
   24     27   
///
   25         -
/// The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input or output. While this should be rare, code generators must support this.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct NoInputAndNoOutputFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputInputBuilder,
   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::no_input_and_no_output::NoInputAndNoOutputOutput,
   35     41   
        crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   36     42   
    > for NoInputAndNoOutputFluentBuilder
   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::no_input_and_no_output::NoInputAndNoOutputOutput,
   44     50   
            crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   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 NoInputAndNoOutputFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `NoInputAndNoOutputFluentBuilder`.
   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 NoInputAndNoOutput as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::no_input_and_no_output::builders::NoInputAndNoOutputInputBuilder {
   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::no_input_and_no_output::NoInputAndNoOutputOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   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::no_input_and_no_output::NoInputAndNoOutput::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::no_input_and_no_output::NoInputAndNoOutput::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::no_input_and_no_output::NoInputAndNoOutputOutput,
   97    107   
        crate::operation::no_input_and_no_output::NoInputAndNoOutputError,
   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/rest_xml/rust-client-codegen/src/operation/no_input_and_output.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 `NoInputAndOutput`.
           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 NoInputAndOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl NoInputAndOutput {
    7         -
    /// Creates a new `NoInputAndOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `NoInputAndOutput`
          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::no_input_and_output::NoInputAndOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::no_input_and_output::NoInputAndOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::no_input_and_output::NoInputAndOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +394,470 @@
   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 NoInputAndOutput {
   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("NoInputAndOutput");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            NoInputAndOutputRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            NoInputAndOutputResponseDeserializer,
  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   
            "NoInputAndOutput",
  111    122   
            "Rest Xml Protocol",
  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("NoInputAndOutput")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(NoInputAndOutputEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::no_input_and_output::NoInputAndOutputError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::no_input_and_output::NoInputAndOutputError,
  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 NoInputAndOutputResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NoInputAndOutputResponseDeserializer {
  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_no_input_and_output::de_no_input_and_output_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_no_input_and_output::de_no_input_and_output_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 NoInputAndOutputRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NoInputAndOutputRequestSerializer {
  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::no_input_and_output::NoInputAndOutputInput>()
  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::no_input_and_output::NoInputAndOutputInput,
  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, "/NoInputAndOutputOutput").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::no_input_and_output::NoInputAndOutputInput,
  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
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  195    208   
  196    209   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  197    210   
    }
  198    211   
}
         212  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  199    213   
#[derive(Debug)]
  200    214   
struct NoInputAndOutputEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NoInputAndOutputEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "NoInputAndOutputEndpointParamsInterceptor"
  205    219   
    }
  206    220   
  207    221   
    fn read_before_execution(
  208    222   
        &self,
  209    223   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  210    224   
            '_,
  211    225   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  214    228   
        >,
  215    229   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  216    230   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  217    231   
        let _input = context
  218    232   
            .input()
  219    233   
            .downcast_ref::<NoInputAndOutputInput>()
  220    234   
            .ok_or("failed to downcast to NoInputAndOutputInput")?;
  221    235   
  222    236   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  223    237   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  224    238   
        })?;
  225    239   
        cfg.interceptor_state()
  226    240   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  227    241   
        ::std::result::Result::Ok(())
  228    242   
    }
  229    243   
}
  230    244   
  231    245   
// The get_* functions below are generated from JMESPath expressions in the
  232    246   
// operationContextParams trait. They target the operation's input shape.
  233    247   
         248  +
/* RustType.kt:516 */
  234    249   
#[allow(unreachable_code, unused_variables)]
         250  +
/* RustType.kt:516 */
  235    251   
#[cfg(test)]
         252  +
/* ProtocolTestGenerator.kt:98 */
  236    253   
mod no_input_and_output_test {
  237    254   
  238    255   
    /// No input serializes no payload
  239    256   
    /// Test ID: NoInputAndOutput
  240    257   
    #[::tokio::test]
  241    258   
    #[::tracing_test::traced_test]
  242    259   
    async fn no_input_and_output_request() {
  243    260   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  244    261   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  245    262   
  246    263   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  247    264   
        let result = client.no_input_and_output().send().await;
  248    265   
        let _ = dbg!(result);
  249    266   
        let http_request = request_receiver.expect_request();
  250    267   
        let body = http_request.body().bytes().expect("body should be strict");
  251    268   
        // No body.
  252    269   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  253    270   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  254    271   
        ::pretty_assertions::assert_eq!(http_request.method(), "POST", "method was incorrect");
  255    272   
        ::pretty_assertions::assert_eq!(uri.path(), "/NoInputAndOutputOutput", "path was incorrect");
  256    273   
    }
  257    274   
  258    275   
    /// Empty output serializes no payload
  259    276   
    /// Test ID: NoInputAndOutput
  260    277   
    #[::tokio::test]
  261    278   
    #[::tracing_test::traced_test]
  262    279   
    async fn no_input_and_output_response() {
  263    280   
        let expected_output = crate::operation::no_input_and_output::NoInputAndOutputOutput::builder().build();
  264    281   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  265    282   
            ::http::response::Builder::new()
  266    283   
                .status(200)
  267    284   
                .body(::aws_smithy_types::body::SdkBody::from(""))
  268    285   
                .unwrap(),
  269    286   
        )
  270    287   
        .unwrap();
  271    288   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  272    289   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  273    290   
  274    291   
        let op = crate::operation::no_input_and_output::NoInputAndOutput::new();
  275    292   
        let config = op.config().expect("the operation has config");
  276    293   
        let de = config
  277    294   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  278    295   
            .expect("the config must have a deserializer");
  279    296   
  280    297   
        let parsed = de.deserialize_streaming(&mut http_response);
  281    298   
        let parsed = parsed.unwrap_or_else(|| {
  282    299   
            let http_response = http_response.map(|body| {
  283    300   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  284    301   
                    body.bytes().unwrap(),
  285    302   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  286    303   
                )))
  287    304   
            });
  288    305   
            de.deserialize_nonstreaming(&http_response)
  289    306   
        });
  290    307   
        let parsed = parsed
  291    308   
            .expect("should be successful response")
  292    309   
            .downcast::<crate::operation::no_input_and_output::NoInputAndOutputOutput>()
  293    310   
            .unwrap();
  294    311   
    }
         312  +
         313  +
    /* ProtocolTestGenerator.kt:98 */
  295    314   
}
  296    315   
         316  +
/* OperationErrorGenerator.kt:79 */
  297    317   
/// Error type for the `NoInputAndOutputError` operation.
         318  +
/* RustType.kt:516 */
  298    319   
#[non_exhaustive]
         320  +
/* RustType.kt:516 */
  299    321   
#[derive(::std::fmt::Debug)]
  300         -
pub enum NoInputAndOutputError {
         322  +
pub /* OperationErrorGenerator.kt:81 */ enum NoInputAndOutputError {
         323  +
    /* OperationErrorGenerator.kt:88 */
  301    324   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  302    325   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  303    326   
    variable wildcard pattern and check `.code()`:
  304    327   
     \
  305    328   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  306    329   
     \
  307    330   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-NoInputAndOutputError) for what information is available for the error.")]
  308    331   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         332  +
    /* OperationErrorGenerator.kt:81 */
  309    333   
}
         334  +
/* OperationErrorGenerator.kt:218 */
  310    335   
impl NoInputAndOutputError {
         336  +
    /* OperationErrorGenerator.kt:219 */
  311    337   
    /// Creates the `NoInputAndOutputError::Unhandled` variant from any error type.
  312    338   
    pub fn unhandled(
  313    339   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  314    340   
    ) -> Self {
  315    341   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  316    342   
            source: err.into(),
  317    343   
            meta: ::std::default::Default::default(),
  318    344   
        })
  319    345   
    }
  320    346   
  321    347   
    /// Creates the `NoInputAndOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  322    348   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  323    349   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  324    350   
            source: err.clone().into(),
  325    351   
            meta: err,
  326    352   
        })
  327    353   
    }
  328         -
    ///
         354  +
    /// /* OperationErrorGenerator.kt:236 */
  329    355   
    /// Returns error metadata, which includes the error code, message,
  330    356   
    /// request ID, and potentially additional information.
  331    357   
    ///
         358  +
    /* OperationErrorGenerator.kt:242 */
  332    359   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         360  +
        /* OperationErrorGenerator.kt:243 */
  333    361   
        match self {
  334         -
            Self::Unhandled(e) => &e.meta,
         362  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         363  +
            /* OperationErrorGenerator.kt:243 */
  335    364   
        }
         365  +
        /* OperationErrorGenerator.kt:242 */
  336    366   
    }
         367  +
    /* OperationErrorGenerator.kt:218 */
  337    368   
}
         369  +
/* OperationErrorGenerator.kt:269 */
  338    370   
impl ::std::error::Error for NoInputAndOutputError {
         371  +
    /* OperationErrorGenerator.kt:270 */
  339    372   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         373  +
        /* OperationErrorGenerator.kt:318 */
  340    374   
        match self {
  341         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         375  +
            /* OperationErrorGenerator.kt:326 */
         376  +
            Self::Unhandled(_inner) => {
         377  +
                /* OperationErrorGenerator.kt:279 */
         378  +
                ::std::option::Option::Some(&*_inner.source)
         379  +
                /* OperationErrorGenerator.kt:326 */
         380  +
            } /* OperationErrorGenerator.kt:318 */
  342    381   
        }
         382  +
        /* OperationErrorGenerator.kt:270 */
  343    383   
    }
         384  +
    /* OperationErrorGenerator.kt:269 */
  344    385   
}
         386  +
/* OperationErrorGenerator.kt:133 */
  345    387   
impl ::std::fmt::Display for NoInputAndOutputError {
         388  +
    /* OperationErrorGenerator.kt:134 */
  346    389   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         390  +
        /* OperationErrorGenerator.kt:318 */
  347    391   
        match self {
         392  +
            /* OperationErrorGenerator.kt:326 */
  348    393   
            Self::Unhandled(_inner) => {
         394  +
                /* OperationErrorGenerator.kt:139 */
  349    395   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  350    396   
                    write!(f, "unhandled error ({code})")
  351    397   
                } else {
  352    398   
                    f.write_str("unhandled error")
  353    399   
                }
         400  +
                /* OperationErrorGenerator.kt:326 */
         401  +
            } /* OperationErrorGenerator.kt:318 */
  354    402   
        }
         403  +
        /* OperationErrorGenerator.kt:134 */
  355    404   
    }
  356         -
    }
         405  +
    /* OperationErrorGenerator.kt:133 */
  357    406   
}
         407  +
/* OperationErrorGenerator.kt:182 */
  358    408   
impl ::aws_smithy_types::retry::ProvideErrorKind for NoInputAndOutputError {
         409  +
    /* OperationErrorGenerator.kt:186 */
  359    410   
    fn code(&self) -> ::std::option::Option<&str> {
         411  +
        /* OperationErrorGenerator.kt:187 */
  360    412   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         413  +
        /* OperationErrorGenerator.kt:186 */
  361    414   
    }
         415  +
    /* OperationErrorGenerator.kt:190 */
  362    416   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         417  +
        /* OperationErrorGenerator.kt:197 */
  363    418   
        ::std::option::Option::None
         419  +
        /* OperationErrorGenerator.kt:190 */
  364    420   
    }
         421  +
    /* OperationErrorGenerator.kt:182 */
  365    422   
}
         423  +
/* OperationErrorGenerator.kt:163 */
  366    424   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for NoInputAndOutputError {
         425  +
    /* OperationErrorGenerator.kt:164 */
  367    426   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         427  +
        /* OperationErrorGenerator.kt:318 */
  368    428   
        match self {
  369         -
            Self::Unhandled(_inner) => &_inner.meta,
         429  +
            /* OperationErrorGenerator.kt:326 */
         430  +
            Self::Unhandled(_inner) => {
         431  +
                /* OperationErrorGenerator.kt:168 */
         432  +
                &_inner.meta
         433  +
                /* OperationErrorGenerator.kt:326 */
         434  +
            } /* OperationErrorGenerator.kt:318 */
  370    435   
        }
         436  +
        /* OperationErrorGenerator.kt:164 */
  371    437   
    }
         438  +
    /* OperationErrorGenerator.kt:163 */
  372    439   
}
         440  +
/* OperationErrorGenerator.kt:109 */
  373    441   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for NoInputAndOutputError {
         442  +
    /* OperationErrorGenerator.kt:110 */
  374    443   
    fn create_unhandled_error(
  375    444   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  376    445   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  377    446   
    ) -> Self {
         447  +
        /* OperationErrorGenerator.kt:121 */
  378    448   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  379    449   
            source,
  380    450   
            meta: meta.unwrap_or_default(),
  381    451   
        })
         452  +
        /* OperationErrorGenerator.kt:110 */
  382    453   
    }
         454  +
    /* OperationErrorGenerator.kt:109 */
  383    455   
}
  384    456   
         457  +
/* CodegenDelegator.kt:255 */
  385    458   
pub use crate::operation::no_input_and_output::_no_input_and_output_output::NoInputAndOutputOutput;
  386    459   
         460  +
/* CodegenDelegator.kt:255 */
  387    461   
pub use crate::operation::no_input_and_output::_no_input_and_output_input::NoInputAndOutputInput;
  388    462   
         463  +
/* RustModule.kt:172 */
  389    464   
mod _no_input_and_output_input;
  390    465   
         466  +
/* RustModule.kt:172 */
  391    467   
mod _no_input_and_output_output;
  392    468   
  393         -
/// Builders
         469  +
/// /* CodegenDelegator.kt:51 */Builders
  394    470   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_output/_no_input_and_output_input.rs

@@ -1,1 +24,44 @@
    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 NoInputAndOutputInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct NoInputAndOutputInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl NoInputAndOutputInput {
    7         -
    /// Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::no_input_and_output::builders::NoInputAndOutputInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::no_input_and_output::builders::NoInputAndOutputInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct NoInputAndOutputInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct NoInputAndOutputInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl NoInputAndOutputInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::operation::no_input_and_output::NoInputAndOutputInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::no_input_and_output::NoInputAndOutputInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::no_input_and_output::NoInputAndOutputInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::no_input_and_output::NoInputAndOutputInput {
          39  +
            /* BuilderGenerator.kt:477 */}, /* BuilderGenerator.kt:254 */
          40  +
        )
          41  +
        /* BuilderGenerator.kt:253 */
   23     42   
    }
          43  +
    /* BuilderGenerator.kt:355 */
   24     44   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_output/_no_input_and_output_output.rs

@@ -1,1 +22,39 @@
    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 NoInputAndOutputOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct NoInputAndOutputOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl NoInputAndOutputOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::no_input_and_output::builders::NoInputAndOutputOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::no_input_and_output::builders::NoInputAndOutputOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct NoInputAndOutputOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct NoInputAndOutputOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl NoInputAndOutputOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NoInputAndOutputOutput`](crate::operation::no_input_and_output::NoInputAndOutputOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::no_input_and_output::NoInputAndOutputOutput {
   20         -
        crate::operation::no_input_and_output::NoInputAndOutputOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::no_input_and_output::NoInputAndOutputOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/no_input_and_output/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::no_input_and_output::_no_input_and_output_output::NoInputAndOutputOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::no_input_and_output::_no_input_and_output_input::NoInputAndOutputInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::no_input_and_output::builders::NoInputAndOutputInputBuilder {
    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::no_input_and_output::NoInputAndOutputOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::no_input_and_output::NoInputAndOutputError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.no_input_and_output();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NoInputAndOutput`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NoInputAndOutput`.
   24     27   
///
   25         -
/// The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how requests and responses are serialized when there's no request or response payload because the operation has no input and the output is empty. While this should be rare, code generators must support this.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct NoInputAndOutputFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::no_input_and_output::builders::NoInputAndOutputInputBuilder,
   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::no_input_and_output::NoInputAndOutputOutput,
   35     41   
        crate::operation::no_input_and_output::NoInputAndOutputError,
   36     42   
    > for NoInputAndOutputFluentBuilder
   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::no_input_and_output::NoInputAndOutputOutput,
   44     50   
            crate::operation::no_input_and_output::NoInputAndOutputError,
   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 NoInputAndOutputFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `NoInputAndOutputFluentBuilder`.
   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 NoInputAndOutput as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::no_input_and_output::builders::NoInputAndOutputInputBuilder {
   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::no_input_and_output::NoInputAndOutputOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::no_input_and_output::NoInputAndOutputError,
   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::no_input_and_output::NoInputAndOutput::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::no_input_and_output::NoInputAndOutput::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::no_input_and_output::NoInputAndOutputOutput,
   97    107   
        crate::operation::no_input_and_output::NoInputAndOutputError,
   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/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_client.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 `NullAndEmptyHeadersClient`.
           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 NullAndEmptyHeadersClient;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl NullAndEmptyHeadersClient {
    7         -
    /// Creates a new `NullAndEmptyHeadersClient`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `NullAndEmptyHeadersClient`
          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::null_and_empty_headers_client::NullAndEmptyHeadersClientInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +367,443 @@
   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 NullAndEmptyHeadersClient {
   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("NullAndEmptyHeadersClient");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            NullAndEmptyHeadersClientRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            NullAndEmptyHeadersClientResponseDeserializer,
  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   
            "NullAndEmptyHeadersClient",
  111    122   
            "Rest Xml Protocol",
  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("NullAndEmptyHeadersClient")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(NullAndEmptyHeadersClientEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
  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 NullAndEmptyHeadersClientResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NullAndEmptyHeadersClientResponseDeserializer {
  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_null_and_empty_headers_client::de_null_and_empty_headers_client_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_null_and_empty_headers_client::de_null_and_empty_headers_client_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 NullAndEmptyHeadersClientRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NullAndEmptyHeadersClientRequestSerializer {
  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::null_and_empty_headers_client::NullAndEmptyHeadersClientInput>()
  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::null_and_empty_headers_client::NullAndEmptyHeadersClientInput,
  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, "/NullAndEmptyHeadersClient").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::null_and_empty_headers_client::NullAndEmptyHeadersClientInput,
  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   
                let builder = crate::protocol_serde::shape_null_and_empty_headers_client::ser_null_and_empty_headers_client_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct NullAndEmptyHeadersClientEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NullAndEmptyHeadersClientEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "NullAndEmptyHeadersClientEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<NullAndEmptyHeadersClientInput>()
  221    235   
            .ok_or("failed to downcast to NullAndEmptyHeadersClientInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* RustType.kt:516 */
  235    250   
#[allow(unreachable_code, unused_variables)]
         251  +
/* RustType.kt:516 */
  236    252   
#[cfg(test)]
         253  +
/* ProtocolTestGenerator.kt:98 */
  237    254   
mod null_and_empty_headers_client_test {
  238    255   
  239    256   
    /// Do not send null values, but do send empty strings and empty lists over the wire in headers
  240    257   
    /// Test ID: NullAndEmptyHeaders
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn null_and_empty_headers_request() {
  244    261   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  246    263   
  247    264   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  248    265   
        let result = client
  249    266   
            .null_and_empty_headers_client()
  250    267   
            .set_a(::std::option::Option::None)
  251    268   
            .set_b(::std::option::Option::Some("".to_owned()))
  252    269   
            .set_c(::std::option::Option::Some(vec![]))
  253    270   
            .send()
  254    271   
            .await;
  255    272   
        let _ = dbg!(result);
  256    273   
        let http_request = request_receiver.expect_request();
  257    274   
        let expected_headers = [("X-B", ""), ("X-C", "")];
  258    275   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(http_request.headers(), expected_headers));
  259    276   
        let forbidden_headers = &["X-A"];
  260    277   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_headers(http_request.headers(), forbidden_headers));
  261    278   
        let body = http_request.body().bytes().expect("body should be strict");
  262    279   
        // No body.
  263    280   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  264    281   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  265    282   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  266    283   
        ::pretty_assertions::assert_eq!(uri.path(), "/NullAndEmptyHeadersClient", "path was incorrect");
  267    284   
    }
         285  +
         286  +
    /* ProtocolTestGenerator.kt:98 */
  268    287   
}
  269    288   
         289  +
/* OperationErrorGenerator.kt:79 */
  270    290   
/// Error type for the `NullAndEmptyHeadersClientError` operation.
         291  +
/* RustType.kt:516 */
  271    292   
#[non_exhaustive]
         293  +
/* RustType.kt:516 */
  272    294   
#[derive(::std::fmt::Debug)]
  273         -
pub enum NullAndEmptyHeadersClientError {
         295  +
pub /* OperationErrorGenerator.kt:81 */ enum NullAndEmptyHeadersClientError {
         296  +
    /* OperationErrorGenerator.kt:88 */
  274    297   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  275    298   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  276    299   
    variable wildcard pattern and check `.code()`:
  277    300   
     \
  278    301   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  279    302   
     \
  280    303   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-NullAndEmptyHeadersClientError) for what information is available for the error.")]
  281    304   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         305  +
    /* OperationErrorGenerator.kt:81 */
  282    306   
}
         307  +
/* OperationErrorGenerator.kt:218 */
  283    308   
impl NullAndEmptyHeadersClientError {
         309  +
    /* OperationErrorGenerator.kt:219 */
  284    310   
    /// Creates the `NullAndEmptyHeadersClientError::Unhandled` variant from any error type.
  285    311   
    pub fn unhandled(
  286    312   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  287    313   
    ) -> Self {
  288    314   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  289    315   
            source: err.into(),
  290    316   
            meta: ::std::default::Default::default(),
  291    317   
        })
  292    318   
    }
  293    319   
  294    320   
    /// Creates the `NullAndEmptyHeadersClientError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  295    321   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  296    322   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  297    323   
            source: err.clone().into(),
  298    324   
            meta: err,
  299    325   
        })
  300    326   
    }
  301         -
    ///
         327  +
    /// /* OperationErrorGenerator.kt:236 */
  302    328   
    /// Returns error metadata, which includes the error code, message,
  303    329   
    /// request ID, and potentially additional information.
  304    330   
    ///
         331  +
    /* OperationErrorGenerator.kt:242 */
  305    332   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         333  +
        /* OperationErrorGenerator.kt:243 */
  306    334   
        match self {
  307         -
            Self::Unhandled(e) => &e.meta,
         335  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         336  +
            /* OperationErrorGenerator.kt:243 */
  308    337   
        }
         338  +
        /* OperationErrorGenerator.kt:242 */
  309    339   
    }
         340  +
    /* OperationErrorGenerator.kt:218 */
  310    341   
}
         342  +
/* OperationErrorGenerator.kt:269 */
  311    343   
impl ::std::error::Error for NullAndEmptyHeadersClientError {
         344  +
    /* OperationErrorGenerator.kt:270 */
  312    345   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         346  +
        /* OperationErrorGenerator.kt:318 */
  313    347   
        match self {
  314         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         348  +
            /* OperationErrorGenerator.kt:326 */
         349  +
            Self::Unhandled(_inner) => {
         350  +
                /* OperationErrorGenerator.kt:279 */
         351  +
                ::std::option::Option::Some(&*_inner.source)
         352  +
                /* OperationErrorGenerator.kt:326 */
         353  +
            } /* OperationErrorGenerator.kt:318 */
  315    354   
        }
         355  +
        /* OperationErrorGenerator.kt:270 */
  316    356   
    }
         357  +
    /* OperationErrorGenerator.kt:269 */
  317    358   
}
         359  +
/* OperationErrorGenerator.kt:133 */
  318    360   
impl ::std::fmt::Display for NullAndEmptyHeadersClientError {
         361  +
    /* OperationErrorGenerator.kt:134 */
  319    362   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         363  +
        /* OperationErrorGenerator.kt:318 */
  320    364   
        match self {
         365  +
            /* OperationErrorGenerator.kt:326 */
  321    366   
            Self::Unhandled(_inner) => {
         367  +
                /* OperationErrorGenerator.kt:139 */
  322    368   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  323    369   
                    write!(f, "unhandled error ({code})")
  324    370   
                } else {
  325    371   
                    f.write_str("unhandled error")
  326    372   
                }
         373  +
                /* OperationErrorGenerator.kt:326 */
         374  +
            } /* OperationErrorGenerator.kt:318 */
  327    375   
        }
         376  +
        /* OperationErrorGenerator.kt:134 */
  328    377   
    }
  329         -
    }
         378  +
    /* OperationErrorGenerator.kt:133 */
  330    379   
}
         380  +
/* OperationErrorGenerator.kt:182 */
  331    381   
impl ::aws_smithy_types::retry::ProvideErrorKind for NullAndEmptyHeadersClientError {
         382  +
    /* OperationErrorGenerator.kt:186 */
  332    383   
    fn code(&self) -> ::std::option::Option<&str> {
         384  +
        /* OperationErrorGenerator.kt:187 */
  333    385   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         386  +
        /* OperationErrorGenerator.kt:186 */
  334    387   
    }
         388  +
    /* OperationErrorGenerator.kt:190 */
  335    389   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         390  +
        /* OperationErrorGenerator.kt:197 */
  336    391   
        ::std::option::Option::None
         392  +
        /* OperationErrorGenerator.kt:190 */
  337    393   
    }
         394  +
    /* OperationErrorGenerator.kt:182 */
  338    395   
}
         396  +
/* OperationErrorGenerator.kt:163 */
  339    397   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for NullAndEmptyHeadersClientError {
         398  +
    /* OperationErrorGenerator.kt:164 */
  340    399   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         400  +
        /* OperationErrorGenerator.kt:318 */
  341    401   
        match self {
  342         -
            Self::Unhandled(_inner) => &_inner.meta,
         402  +
            /* OperationErrorGenerator.kt:326 */
         403  +
            Self::Unhandled(_inner) => {
         404  +
                /* OperationErrorGenerator.kt:168 */
         405  +
                &_inner.meta
         406  +
                /* OperationErrorGenerator.kt:326 */
         407  +
            } /* OperationErrorGenerator.kt:318 */
  343    408   
        }
         409  +
        /* OperationErrorGenerator.kt:164 */
  344    410   
    }
         411  +
    /* OperationErrorGenerator.kt:163 */
  345    412   
}
         413  +
/* OperationErrorGenerator.kt:109 */
  346    414   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for NullAndEmptyHeadersClientError {
         415  +
    /* OperationErrorGenerator.kt:110 */
  347    416   
    fn create_unhandled_error(
  348    417   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  349    418   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  350    419   
    ) -> Self {
         420  +
        /* OperationErrorGenerator.kt:121 */
  351    421   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  352    422   
            source,
  353    423   
            meta: meta.unwrap_or_default(),
  354    424   
        })
         425  +
        /* OperationErrorGenerator.kt:110 */
  355    426   
    }
         427  +
    /* OperationErrorGenerator.kt:109 */
  356    428   
}
  357    429   
         430  +
/* CodegenDelegator.kt:255 */
  358    431   
pub use crate::operation::null_and_empty_headers_client::_null_and_empty_headers_client_output::NullAndEmptyHeadersClientOutput;
  359    432   
         433  +
/* CodegenDelegator.kt:255 */
  360    434   
pub use crate::operation::null_and_empty_headers_client::_null_and_empty_headers_client_input::NullAndEmptyHeadersClientInput;
  361    435   
         436  +
/* RustModule.kt:172 */
  362    437   
mod _null_and_empty_headers_client_input;
  363    438   
         439  +
/* RustModule.kt:172 */
  364    440   
mod _null_and_empty_headers_client_output;
  365    441   
  366         -
/// Builders
         442  +
/// /* CodegenDelegator.kt:51 */Builders
  367    443   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_client/_null_and_empty_headers_client_input.rs

@@ -1,1 +105,189 @@
    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 NullAndEmptyHeadersClientInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct NullAndEmptyHeadersClientInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:201 */
   12     19   
}
          20  +
/* StructureGenerator.kt:135 */
   13     21   
impl NullAndEmptyHeadersClientInput {
          22  +
    /* StructureGenerator.kt:231 */
   14     23   
    #[allow(missing_docs)] // documentation missing in model
          24  +
                           /* StructureGenerator.kt:166 */
   15     25   
    pub fn a(&self) -> ::std::option::Option<&str> {
          26  +
        /* StructureGenerator.kt:169 */
   16     27   
        self.a.as_deref()
          28  +
        /* StructureGenerator.kt:166 */
   17     29   
    }
          30  +
    /* StructureGenerator.kt:231 */
   18     31   
    #[allow(missing_docs)] // documentation missing in model
          32  +
                           /* StructureGenerator.kt:166 */
   19     33   
    pub fn b(&self) -> ::std::option::Option<&str> {
          34  +
        /* StructureGenerator.kt:169 */
   20     35   
        self.b.as_deref()
          36  +
        /* StructureGenerator.kt:166 */
   21     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   22     39   
    #[allow(missing_docs)] // documentation missing in model
   23         -
    ///
   24         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.c.is_none()`.
          40  +
    /// /* StructureGenerator.kt:162 */
          41  +
    /// /* 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 `.c.is_none()`.
          42  +
    /* StructureGenerator.kt:166 */
   25     43   
    pub fn c(&self) -> &[::std::string::String] {
   26         -
        self.c.as_deref().unwrap_or_default()
          44  +
        /* StructureGenerator.kt:169 */
          45  +
        self.c
          46  +
            .as_deref()
          47  +
            /* StructureGenerator.kt:175 */
          48  +
            .unwrap_or_default()
          49  +
        /* StructureGenerator.kt:166 */
   27     50   
    }
          51  +
    /* StructureGenerator.kt:135 */
   28     52   
}
          53  +
/* ClientCodegenVisitor.kt:237 */
   29     54   
impl NullAndEmptyHeadersClientInput {
   30         -
    /// Creates a new builder-style object to manufacture [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
          55  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
          56  +
    /* BuilderGenerator.kt:175 */
   31     57   
    pub fn builder() -> crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientInputBuilder {
          58  +
        /* BuilderGenerator.kt:176 */
   32     59   
        crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientInputBuilder::default()
          60  +
        /* BuilderGenerator.kt:175 */
   33     61   
    }
          62  +
    /* ClientCodegenVisitor.kt:237 */
   34     63   
}
   35     64   
   36         -
/// A builder for [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
          65  +
/// /* BuilderGenerator.kt:342 */A builder for [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
          66  +
/* RustType.kt:516 */
   37     67   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          68  +
/* RustType.kt:516 */
   38     69   
#[non_exhaustive]
          70  +
/* BuilderGenerator.kt:345 */
   39     71   
pub struct NullAndEmptyHeadersClientInputBuilder {
   40         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   41         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:275 */
   42     75   
    pub(crate) c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          76  +
    /* BuilderGenerator.kt:345 */
   43     77   
}
          78  +
/* BuilderGenerator.kt:355 */
   44     79   
impl NullAndEmptyHeadersClientInputBuilder {
          80  +
    /* BuilderGenerator.kt:286 */
   45     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* BuilderGenerator.kt:291 */
   46     83   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          84  +
        /* BuilderGenerator.kt:292 */
   47     85   
        self.a = ::std::option::Option::Some(input.into());
          86  +
        /* BuilderGenerator.kt:293 */
   48     87   
        self
          88  +
        /* BuilderGenerator.kt:291 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:312 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:314 */
   51     93   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:315 */
   52     95   
        self.a = input;
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:314 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:334 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:336 */
   56    102   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
         103  +
        /* BuilderGenerator.kt:337 */
   57    104   
        &self.a
         105  +
        /* BuilderGenerator.kt:336 */
   58    106   
    }
         107  +
    /* BuilderGenerator.kt:286 */
   59    108   
    #[allow(missing_docs)] // documentation missing in model
         109  +
                           /* BuilderGenerator.kt:291 */
   60    110   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        /* BuilderGenerator.kt:292 */
   61    112   
        self.b = ::std::option::Option::Some(input.into());
         113  +
        /* BuilderGenerator.kt:293 */
   62    114   
        self
         115  +
        /* BuilderGenerator.kt:291 */
   63    116   
    }
         117  +
    /* BuilderGenerator.kt:312 */
   64    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:314 */
   65    120   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   66    122   
        self.b = input;
   67    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   68    125   
    }
         126  +
    /* BuilderGenerator.kt:334 */
   69    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* BuilderGenerator.kt:336 */
   70    129   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         130  +
        /* BuilderGenerator.kt:337 */
   71    131   
        &self.b
         132  +
        /* BuilderGenerator.kt:336 */
   72    133   
    }
   73         -
    /// Appends an item to `c`.
         134  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `c`.
         135  +
    /* BuilderGenerator.kt:411 */
   74    136   
    ///
   75         -
    /// To override the contents of this collection use [`set_c`](Self::set_c).
         137  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_c`](Self::set_c).
         138  +
    /* BuilderGenerator.kt:413 */
   76    139   
    ///
         140  +
    /* BuilderGenerator.kt:418 */
   77    141   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        /* BuilderGenerator.kt:419 */
   78    143   
        let mut v = self.c.unwrap_or_default();
   79    144   
        v.push(input.into());
   80    145   
        self.c = ::std::option::Option::Some(v);
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:418 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.c = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.c
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
   92         -
    /// Consumes the builder and constructs a [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
         166  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NullAndEmptyHeadersClientInput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput).
         167  +
    /* BuilderGenerator.kt:253 */
   93    168   
    pub fn build(
   94    169   
        self,
   95    170   
    ) -> ::std::result::Result<
   96    171   
        crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput,
   97    172   
        ::aws_smithy_types::error::operation::BuildError,
   98    173   
    > {
   99         -
        ::std::result::Result::Ok(crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput {
  100         -
            a: self.a,
         174  +
        /* BuilderGenerator.kt:254 */
         175  +
        ::std::result::Result::Ok(
         176  +
            /* BuilderGenerator.kt:477 */
         177  +
            crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientInput {
         178  +
                /* BuilderGenerator.kt:481 */ a: self.a,
         179  +
                /* BuilderGenerator.kt:481 */
  101    180   
                b: self.b,
         181  +
                /* BuilderGenerator.kt:481 */
  102    182   
                c: self.c,
  103         -
        })
         183  +
                /* BuilderGenerator.kt:477 */
         184  +
            }, /* BuilderGenerator.kt:254 */
         185  +
        )
         186  +
        /* BuilderGenerator.kt:253 */
  104    187   
    }
         188  +
    /* BuilderGenerator.kt:355 */
  105    189   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_client/_null_and_empty_headers_client_output.rs

@@ -1,1 +100,181 @@
    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 NullAndEmptyHeadersClientOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct NullAndEmptyHeadersClientOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:201 */
   12     19   
}
          20  +
/* StructureGenerator.kt:135 */
   13     21   
impl NullAndEmptyHeadersClientOutput {
          22  +
    /* StructureGenerator.kt:231 */
   14     23   
    #[allow(missing_docs)] // documentation missing in model
          24  +
                           /* StructureGenerator.kt:166 */
   15     25   
    pub fn a(&self) -> ::std::option::Option<&str> {
          26  +
        /* StructureGenerator.kt:169 */
   16     27   
        self.a.as_deref()
          28  +
        /* StructureGenerator.kt:166 */
   17     29   
    }
          30  +
    /* StructureGenerator.kt:231 */
   18     31   
    #[allow(missing_docs)] // documentation missing in model
          32  +
                           /* StructureGenerator.kt:166 */
   19     33   
    pub fn b(&self) -> ::std::option::Option<&str> {
          34  +
        /* StructureGenerator.kt:169 */
   20     35   
        self.b.as_deref()
          36  +
        /* StructureGenerator.kt:166 */
   21     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   22     39   
    #[allow(missing_docs)] // documentation missing in model
   23         -
    ///
   24         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.c.is_none()`.
          40  +
    /// /* StructureGenerator.kt:162 */
          41  +
    /// /* 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 `.c.is_none()`.
          42  +
    /* StructureGenerator.kt:166 */
   25     43   
    pub fn c(&self) -> &[::std::string::String] {
   26         -
        self.c.as_deref().unwrap_or_default()
          44  +
        /* StructureGenerator.kt:169 */
          45  +
        self.c
          46  +
            .as_deref()
          47  +
            /* StructureGenerator.kt:175 */
          48  +
            .unwrap_or_default()
          49  +
        /* StructureGenerator.kt:166 */
   27     50   
    }
          51  +
    /* StructureGenerator.kt:135 */
   28     52   
}
          53  +
/* ClientCodegenVisitor.kt:237 */
   29     54   
impl NullAndEmptyHeadersClientOutput {
   30         -
    /// Creates a new builder-style object to manufacture [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
          55  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
          56  +
    /* BuilderGenerator.kt:175 */
   31     57   
    pub fn builder() -> crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientOutputBuilder {
          58  +
        /* BuilderGenerator.kt:176 */
   32     59   
        crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientOutputBuilder::default()
          60  +
        /* BuilderGenerator.kt:175 */
   33     61   
    }
          62  +
    /* ClientCodegenVisitor.kt:237 */
   34     63   
}
   35     64   
   36         -
/// A builder for [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
          65  +
/// /* BuilderGenerator.kt:342 */A builder for [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
          66  +
/* RustType.kt:516 */
   37     67   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          68  +
/* RustType.kt:516 */
   38     69   
#[non_exhaustive]
          70  +
/* BuilderGenerator.kt:345 */
   39     71   
pub struct NullAndEmptyHeadersClientOutputBuilder {
   40         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   41         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:275 */
   42     75   
    pub(crate) c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          76  +
    /* BuilderGenerator.kt:345 */
   43     77   
}
          78  +
/* BuilderGenerator.kt:355 */
   44     79   
impl NullAndEmptyHeadersClientOutputBuilder {
          80  +
    /* BuilderGenerator.kt:286 */
   45     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* BuilderGenerator.kt:291 */
   46     83   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          84  +
        /* BuilderGenerator.kt:292 */
   47     85   
        self.a = ::std::option::Option::Some(input.into());
          86  +
        /* BuilderGenerator.kt:293 */
   48     87   
        self
          88  +
        /* BuilderGenerator.kt:291 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:312 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:314 */
   51     93   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:315 */
   52     95   
        self.a = input;
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:314 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:334 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:336 */
   56    102   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
         103  +
        /* BuilderGenerator.kt:337 */
   57    104   
        &self.a
         105  +
        /* BuilderGenerator.kt:336 */
   58    106   
    }
         107  +
    /* BuilderGenerator.kt:286 */
   59    108   
    #[allow(missing_docs)] // documentation missing in model
         109  +
                           /* BuilderGenerator.kt:291 */
   60    110   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        /* BuilderGenerator.kt:292 */
   61    112   
        self.b = ::std::option::Option::Some(input.into());
         113  +
        /* BuilderGenerator.kt:293 */
   62    114   
        self
         115  +
        /* BuilderGenerator.kt:291 */
   63    116   
    }
         117  +
    /* BuilderGenerator.kt:312 */
   64    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:314 */
   65    120   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   66    122   
        self.b = input;
   67    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   68    125   
    }
         126  +
    /* BuilderGenerator.kt:334 */
   69    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* BuilderGenerator.kt:336 */
   70    129   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         130  +
        /* BuilderGenerator.kt:337 */
   71    131   
        &self.b
         132  +
        /* BuilderGenerator.kt:336 */
   72    133   
    }
   73         -
    /// Appends an item to `c`.
         134  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `c`.
         135  +
    /* BuilderGenerator.kt:411 */
   74    136   
    ///
   75         -
    /// To override the contents of this collection use [`set_c`](Self::set_c).
         137  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_c`](Self::set_c).
         138  +
    /* BuilderGenerator.kt:413 */
   76    139   
    ///
         140  +
    /* BuilderGenerator.kt:418 */
   77    141   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        /* BuilderGenerator.kt:419 */
   78    143   
        let mut v = self.c.unwrap_or_default();
   79    144   
        v.push(input.into());
   80    145   
        self.c = ::std::option::Option::Some(v);
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:418 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.c = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.c
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
   92         -
    /// Consumes the builder and constructs a [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
         166  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NullAndEmptyHeadersClientOutput`](crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput).
         167  +
    /* BuilderGenerator.kt:253 */
   93    168   
    pub fn build(self) -> crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput {
         169  +
        /* BuilderGenerator.kt:477 */
   94    170   
        crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput {
   95         -
            a: self.a,
         171  +
            /* BuilderGenerator.kt:481 */ a: self.a,
         172  +
            /* BuilderGenerator.kt:481 */
   96    173   
            b: self.b,
         174  +
            /* BuilderGenerator.kt:481 */
   97    175   
            c: self.c,
         176  +
            /* BuilderGenerator.kt:477 */
   98    177   
        }
         178  +
        /* BuilderGenerator.kt:253 */
   99    179   
    }
         180  +
    /* BuilderGenerator.kt:355 */
  100    181   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_client/builders.rs

@@ -1,1 +158,188 @@
    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::null_and_empty_headers_client::_null_and_empty_headers_client_output::NullAndEmptyHeadersClientOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::null_and_empty_headers_client::_null_and_empty_headers_client_input::NullAndEmptyHeadersClientInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientInputBuilder {
    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::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.null_and_empty_headers_client();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `NullAndEmptyHeadersClient`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `NullAndEmptyHeadersClient`.
   24     27   
///
   25         -
/// Null and empty headers are not sent over the wire.
          28  +
/// /* FluentBuilderGenerator.kt:130 */Null and empty headers are not sent over the wire.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct NullAndEmptyHeadersClientFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientInputBuilder,
   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::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   35     41   
        crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   36     42   
    > for NullAndEmptyHeadersClientFluentBuilder
   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::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   44     50   
            crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   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 NullAndEmptyHeadersClientFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `NullAndEmptyHeadersClientFluentBuilder`.
   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 NullAndEmptyHeadersClient as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::null_and_empty_headers_client::builders::NullAndEmptyHeadersClientInputBuilder {
   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::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   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::null_and_empty_headers_client::NullAndEmptyHeadersClient::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::null_and_empty_headers_client::NullAndEmptyHeadersClient::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::null_and_empty_headers_client::NullAndEmptyHeadersClientOutput,
   97    107   
        crate::operation::null_and_empty_headers_client::NullAndEmptyHeadersClientError,
   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:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.a(input.into());
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_a(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_a()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.b(input.into());
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_b(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_b()
  138    161   
    }
  139         -
    ///
         162  +
    /// /* FluentBuilderGenerator.kt:436 */
  140    163   
    /// Appends an item to `c`.
  141    164   
    ///
  142    165   
    /// To override the contents of this collection use [`set_c`](Self::set_c).
  143    166   
    ///
         167  +
    /* FluentBuilderGenerator.kt:443 */
  144    168   
    #[allow(missing_docs)] // documentation missing in model
         169  +
                           /* FluentBuilderGenerator.kt:446 */
  145    170   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  146    171   
        self.inner = self.inner.c(input.into());
  147    172   
        self
  148    173   
    }
         174  +
    /* FluentBuilderGenerator.kt:498 */
  149    175   
    #[allow(missing_docs)] // documentation missing in model
         176  +
                           /* FluentBuilderGenerator.kt:500 */
  150    177   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
  151    178   
        self.inner = self.inner.set_c(input);
  152    179   
        self
  153    180   
    }
         181  +
    /* FluentBuilderGenerator.kt:518 */
  154    182   
    #[allow(missing_docs)] // documentation missing in model
         183  +
                           /* FluentBuilderGenerator.kt:520 */
  155    184   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
  156    185   
        self.inner.get_c()
  157    186   
    }
         187  +
    /* FluentBuilderGenerator.kt:282 */
  158    188   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_server.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 `NullAndEmptyHeadersServer`.
           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 NullAndEmptyHeadersServer;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl NullAndEmptyHeadersServer {
    7         -
    /// Creates a new `NullAndEmptyHeadersServer`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `NullAndEmptyHeadersServer`
          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::null_and_empty_headers_server::NullAndEmptyHeadersServerInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +332,403 @@
   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 NullAndEmptyHeadersServer {
   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("NullAndEmptyHeadersServer");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            NullAndEmptyHeadersServerRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            NullAndEmptyHeadersServerResponseDeserializer,
  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   
            "NullAndEmptyHeadersServer",
  111    122   
            "Rest Xml Protocol",
  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("NullAndEmptyHeadersServer")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(NullAndEmptyHeadersServerEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerError,
  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 NullAndEmptyHeadersServerResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for NullAndEmptyHeadersServerResponseDeserializer {
  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_null_and_empty_headers_server::de_null_and_empty_headers_server_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_null_and_empty_headers_server::de_null_and_empty_headers_server_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 NullAndEmptyHeadersServerRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for NullAndEmptyHeadersServerRequestSerializer {
  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::null_and_empty_headers_server::NullAndEmptyHeadersServerInput>()
  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::null_and_empty_headers_server::NullAndEmptyHeadersServerInput,
  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, "/NullAndEmptyHeadersServer").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::null_and_empty_headers_server::NullAndEmptyHeadersServerInput,
  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   
                let builder = crate::protocol_serde::shape_null_and_empty_headers_server::ser_null_and_empty_headers_server_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct NullAndEmptyHeadersServerEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for NullAndEmptyHeadersServerEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "NullAndEmptyHeadersServerEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<NullAndEmptyHeadersServerInput>()
  221    235   
            .ok_or("failed to downcast to NullAndEmptyHeadersServerInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* OperationErrorGenerator.kt:79 */
  235    250   
/// Error type for the `NullAndEmptyHeadersServerError` operation.
         251  +
/* RustType.kt:516 */
  236    252   
#[non_exhaustive]
         253  +
/* RustType.kt:516 */
  237    254   
#[derive(::std::fmt::Debug)]
  238         -
pub enum NullAndEmptyHeadersServerError {
         255  +
pub /* OperationErrorGenerator.kt:81 */ enum NullAndEmptyHeadersServerError {
         256  +
    /* OperationErrorGenerator.kt:88 */
  239    257   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  240    258   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  241    259   
    variable wildcard pattern and check `.code()`:
  242    260   
     \
  243    261   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  244    262   
     \
  245    263   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-NullAndEmptyHeadersServerError) for what information is available for the error.")]
  246    264   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         265  +
    /* OperationErrorGenerator.kt:81 */
  247    266   
}
         267  +
/* OperationErrorGenerator.kt:218 */
  248    268   
impl NullAndEmptyHeadersServerError {
         269  +
    /* OperationErrorGenerator.kt:219 */
  249    270   
    /// Creates the `NullAndEmptyHeadersServerError::Unhandled` variant from any error type.
  250    271   
    pub fn unhandled(
  251    272   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  252    273   
    ) -> Self {
  253    274   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  254    275   
            source: err.into(),
  255    276   
            meta: ::std::default::Default::default(),
  256    277   
        })
  257    278   
    }
  258    279   
  259    280   
    /// Creates the `NullAndEmptyHeadersServerError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  260    281   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  261    282   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  262    283   
            source: err.clone().into(),
  263    284   
            meta: err,
  264    285   
        })
  265    286   
    }
  266         -
    ///
         287  +
    /// /* OperationErrorGenerator.kt:236 */
  267    288   
    /// Returns error metadata, which includes the error code, message,
  268    289   
    /// request ID, and potentially additional information.
  269    290   
    ///
         291  +
    /* OperationErrorGenerator.kt:242 */
  270    292   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         293  +
        /* OperationErrorGenerator.kt:243 */
  271    294   
        match self {
  272         -
            Self::Unhandled(e) => &e.meta,
         295  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         296  +
            /* OperationErrorGenerator.kt:243 */
  273    297   
        }
         298  +
        /* OperationErrorGenerator.kt:242 */
  274    299   
    }
         300  +
    /* OperationErrorGenerator.kt:218 */
  275    301   
}
         302  +
/* OperationErrorGenerator.kt:269 */
  276    303   
impl ::std::error::Error for NullAndEmptyHeadersServerError {
         304  +
    /* OperationErrorGenerator.kt:270 */
  277    305   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         306  +
        /* OperationErrorGenerator.kt:318 */
  278    307   
        match self {
  279         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         308  +
            /* OperationErrorGenerator.kt:326 */
         309  +
            Self::Unhandled(_inner) => {
         310  +
                /* OperationErrorGenerator.kt:279 */
         311  +
                ::std::option::Option::Some(&*_inner.source)
         312  +
                /* OperationErrorGenerator.kt:326 */
         313  +
            } /* OperationErrorGenerator.kt:318 */
  280    314   
        }
         315  +
        /* OperationErrorGenerator.kt:270 */
  281    316   
    }
         317  +
    /* OperationErrorGenerator.kt:269 */
  282    318   
}
         319  +
/* OperationErrorGenerator.kt:133 */
  283    320   
impl ::std::fmt::Display for NullAndEmptyHeadersServerError {
         321  +
    /* OperationErrorGenerator.kt:134 */
  284    322   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         323  +
        /* OperationErrorGenerator.kt:318 */
  285    324   
        match self {
         325  +
            /* OperationErrorGenerator.kt:326 */
  286    326   
            Self::Unhandled(_inner) => {
         327  +
                /* OperationErrorGenerator.kt:139 */
  287    328   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  288    329   
                    write!(f, "unhandled error ({code})")
  289    330   
                } else {
  290    331   
                    f.write_str("unhandled error")
  291    332   
                }
         333  +
                /* OperationErrorGenerator.kt:326 */
         334  +
            } /* OperationErrorGenerator.kt:318 */
  292    335   
        }
         336  +
        /* OperationErrorGenerator.kt:134 */
  293    337   
    }
  294         -
    }
         338  +
    /* OperationErrorGenerator.kt:133 */
  295    339   
}
         340  +
/* OperationErrorGenerator.kt:182 */
  296    341   
impl ::aws_smithy_types::retry::ProvideErrorKind for NullAndEmptyHeadersServerError {
         342  +
    /* OperationErrorGenerator.kt:186 */
  297    343   
    fn code(&self) -> ::std::option::Option<&str> {
         344  +
        /* OperationErrorGenerator.kt:187 */
  298    345   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         346  +
        /* OperationErrorGenerator.kt:186 */
  299    347   
    }
         348  +
    /* OperationErrorGenerator.kt:190 */
  300    349   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         350  +
        /* OperationErrorGenerator.kt:197 */
  301    351   
        ::std::option::Option::None
         352  +
        /* OperationErrorGenerator.kt:190 */
  302    353   
    }
         354  +
    /* OperationErrorGenerator.kt:182 */
  303    355   
}
         356  +
/* OperationErrorGenerator.kt:163 */
  304    357   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for NullAndEmptyHeadersServerError {
         358  +
    /* OperationErrorGenerator.kt:164 */
  305    359   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         360  +
        /* OperationErrorGenerator.kt:318 */
  306    361   
        match self {
  307         -
            Self::Unhandled(_inner) => &_inner.meta,
         362  +
            /* OperationErrorGenerator.kt:326 */
         363  +
            Self::Unhandled(_inner) => {
         364  +
                /* OperationErrorGenerator.kt:168 */
         365  +
                &_inner.meta
         366  +
                /* OperationErrorGenerator.kt:326 */
         367  +
            } /* OperationErrorGenerator.kt:318 */
  308    368   
        }
         369  +
        /* OperationErrorGenerator.kt:164 */
  309    370   
    }
         371  +
    /* OperationErrorGenerator.kt:163 */
  310    372   
}
         373  +
/* OperationErrorGenerator.kt:109 */
  311    374   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for NullAndEmptyHeadersServerError {
         375  +
    /* OperationErrorGenerator.kt:110 */
  312    376   
    fn create_unhandled_error(
  313    377   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  314    378   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  315    379   
    ) -> Self {
         380  +
        /* OperationErrorGenerator.kt:121 */
  316    381   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  317    382   
            source,
  318    383   
            meta: meta.unwrap_or_default(),
  319    384   
        })
         385  +
        /* OperationErrorGenerator.kt:110 */
  320    386   
    }
         387  +
    /* OperationErrorGenerator.kt:109 */
  321    388   
}
  322    389   
         390  +
/* CodegenDelegator.kt:255 */
  323    391   
pub use crate::operation::null_and_empty_headers_server::_null_and_empty_headers_server_output::NullAndEmptyHeadersServerOutput;
  324    392   
         393  +
/* CodegenDelegator.kt:255 */
  325    394   
pub use crate::operation::null_and_empty_headers_server::_null_and_empty_headers_server_input::NullAndEmptyHeadersServerInput;
  326    395   
         396  +
/* RustModule.kt:172 */
  327    397   
mod _null_and_empty_headers_server_input;
  328    398   
         399  +
/* RustModule.kt:172 */
  329    400   
mod _null_and_empty_headers_server_output;
  330    401   
  331         -
/// Builders
         402  +
/// /* CodegenDelegator.kt:51 */Builders
  332    403   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_server/_null_and_empty_headers_server_input.rs

@@ -1,1 +105,189 @@
    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 NullAndEmptyHeadersServerInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct NullAndEmptyHeadersServerInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:201 */
   12     19   
}
          20  +
/* StructureGenerator.kt:135 */
   13     21   
impl NullAndEmptyHeadersServerInput {
          22  +
    /* StructureGenerator.kt:231 */
   14     23   
    #[allow(missing_docs)] // documentation missing in model
          24  +
                           /* StructureGenerator.kt:166 */
   15     25   
    pub fn a(&self) -> ::std::option::Option<&str> {
          26  +
        /* StructureGenerator.kt:169 */
   16     27   
        self.a.as_deref()
          28  +
        /* StructureGenerator.kt:166 */
   17     29   
    }
          30  +
    /* StructureGenerator.kt:231 */
   18     31   
    #[allow(missing_docs)] // documentation missing in model
          32  +
                           /* StructureGenerator.kt:166 */
   19     33   
    pub fn b(&self) -> ::std::option::Option<&str> {
          34  +
        /* StructureGenerator.kt:169 */
   20     35   
        self.b.as_deref()
          36  +
        /* StructureGenerator.kt:166 */
   21     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   22     39   
    #[allow(missing_docs)] // documentation missing in model
   23         -
    ///
   24         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.c.is_none()`.
          40  +
    /// /* StructureGenerator.kt:162 */
          41  +
    /// /* 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 `.c.is_none()`.
          42  +
    /* StructureGenerator.kt:166 */
   25     43   
    pub fn c(&self) -> &[::std::string::String] {
   26         -
        self.c.as_deref().unwrap_or_default()
          44  +
        /* StructureGenerator.kt:169 */
          45  +
        self.c
          46  +
            .as_deref()
          47  +
            /* StructureGenerator.kt:175 */
          48  +
            .unwrap_or_default()
          49  +
        /* StructureGenerator.kt:166 */
   27     50   
    }
          51  +
    /* StructureGenerator.kt:135 */
   28     52   
}
          53  +
/* ClientCodegenVisitor.kt:237 */
   29     54   
impl NullAndEmptyHeadersServerInput {
   30         -
    /// Creates a new builder-style object to manufacture [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
          55  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
          56  +
    /* BuilderGenerator.kt:175 */
   31     57   
    pub fn builder() -> crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerInputBuilder {
          58  +
        /* BuilderGenerator.kt:176 */
   32     59   
        crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerInputBuilder::default()
          60  +
        /* BuilderGenerator.kt:175 */
   33     61   
    }
          62  +
    /* ClientCodegenVisitor.kt:237 */
   34     63   
}
   35     64   
   36         -
/// A builder for [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
          65  +
/// /* BuilderGenerator.kt:342 */A builder for [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
          66  +
/* RustType.kt:516 */
   37     67   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          68  +
/* RustType.kt:516 */
   38     69   
#[non_exhaustive]
          70  +
/* BuilderGenerator.kt:345 */
   39     71   
pub struct NullAndEmptyHeadersServerInputBuilder {
   40         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   41         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:275 */
   42     75   
    pub(crate) c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          76  +
    /* BuilderGenerator.kt:345 */
   43     77   
}
          78  +
/* BuilderGenerator.kt:355 */
   44     79   
impl NullAndEmptyHeadersServerInputBuilder {
          80  +
    /* BuilderGenerator.kt:286 */
   45     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* BuilderGenerator.kt:291 */
   46     83   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          84  +
        /* BuilderGenerator.kt:292 */
   47     85   
        self.a = ::std::option::Option::Some(input.into());
          86  +
        /* BuilderGenerator.kt:293 */
   48     87   
        self
          88  +
        /* BuilderGenerator.kt:291 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:312 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:314 */
   51     93   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:315 */
   52     95   
        self.a = input;
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:314 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:334 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:336 */
   56    102   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
         103  +
        /* BuilderGenerator.kt:337 */
   57    104   
        &self.a
         105  +
        /* BuilderGenerator.kt:336 */
   58    106   
    }
         107  +
    /* BuilderGenerator.kt:286 */
   59    108   
    #[allow(missing_docs)] // documentation missing in model
         109  +
                           /* BuilderGenerator.kt:291 */
   60    110   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        /* BuilderGenerator.kt:292 */
   61    112   
        self.b = ::std::option::Option::Some(input.into());
         113  +
        /* BuilderGenerator.kt:293 */
   62    114   
        self
         115  +
        /* BuilderGenerator.kt:291 */
   63    116   
    }
         117  +
    /* BuilderGenerator.kt:312 */
   64    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:314 */
   65    120   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   66    122   
        self.b = input;
   67    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   68    125   
    }
         126  +
    /* BuilderGenerator.kt:334 */
   69    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* BuilderGenerator.kt:336 */
   70    129   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         130  +
        /* BuilderGenerator.kt:337 */
   71    131   
        &self.b
         132  +
        /* BuilderGenerator.kt:336 */
   72    133   
    }
   73         -
    /// Appends an item to `c`.
         134  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `c`.
         135  +
    /* BuilderGenerator.kt:411 */
   74    136   
    ///
   75         -
    /// To override the contents of this collection use [`set_c`](Self::set_c).
         137  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_c`](Self::set_c).
         138  +
    /* BuilderGenerator.kt:413 */
   76    139   
    ///
         140  +
    /* BuilderGenerator.kt:418 */
   77    141   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        /* BuilderGenerator.kt:419 */
   78    143   
        let mut v = self.c.unwrap_or_default();
   79    144   
        v.push(input.into());
   80    145   
        self.c = ::std::option::Option::Some(v);
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:418 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.c = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.c
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
   92         -
    /// Consumes the builder and constructs a [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
         166  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NullAndEmptyHeadersServerInput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput).
         167  +
    /* BuilderGenerator.kt:253 */
   93    168   
    pub fn build(
   94    169   
        self,
   95    170   
    ) -> ::std::result::Result<
   96    171   
        crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput,
   97    172   
        ::aws_smithy_types::error::operation::BuildError,
   98    173   
    > {
   99         -
        ::std::result::Result::Ok(crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput {
  100         -
            a: self.a,
         174  +
        /* BuilderGenerator.kt:254 */
         175  +
        ::std::result::Result::Ok(
         176  +
            /* BuilderGenerator.kt:477 */
         177  +
            crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerInput {
         178  +
                /* BuilderGenerator.kt:481 */ a: self.a,
         179  +
                /* BuilderGenerator.kt:481 */
  101    180   
                b: self.b,
         181  +
                /* BuilderGenerator.kt:481 */
  102    182   
                c: self.c,
  103         -
        })
         183  +
                /* BuilderGenerator.kt:477 */
         184  +
            }, /* BuilderGenerator.kt:254 */
         185  +
        )
         186  +
        /* BuilderGenerator.kt:253 */
  104    187   
    }
         188  +
    /* BuilderGenerator.kt:355 */
  105    189   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/null_and_empty_headers_server/_null_and_empty_headers_server_output.rs

@@ -1,1 +100,181 @@
    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 NullAndEmptyHeadersServerOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct NullAndEmptyHeadersServerOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub a: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub b: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          18  +
    /* StructureGenerator.kt:201 */
   12     19   
}
          20  +
/* StructureGenerator.kt:135 */
   13     21   
impl NullAndEmptyHeadersServerOutput {
          22  +
    /* StructureGenerator.kt:231 */
   14     23   
    #[allow(missing_docs)] // documentation missing in model
          24  +
                           /* StructureGenerator.kt:166 */
   15     25   
    pub fn a(&self) -> ::std::option::Option<&str> {
          26  +
        /* StructureGenerator.kt:169 */
   16     27   
        self.a.as_deref()
          28  +
        /* StructureGenerator.kt:166 */
   17     29   
    }
          30  +
    /* StructureGenerator.kt:231 */
   18     31   
    #[allow(missing_docs)] // documentation missing in model
          32  +
                           /* StructureGenerator.kt:166 */
   19     33   
    pub fn b(&self) -> ::std::option::Option<&str> {
          34  +
        /* StructureGenerator.kt:169 */
   20     35   
        self.b.as_deref()
          36  +
        /* StructureGenerator.kt:166 */
   21     37   
    }
          38  +
    /* StructureGenerator.kt:231 */
   22     39   
    #[allow(missing_docs)] // documentation missing in model
   23         -
    ///
   24         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.c.is_none()`.
          40  +
    /// /* StructureGenerator.kt:162 */
          41  +
    /// /* 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 `.c.is_none()`.
          42  +
    /* StructureGenerator.kt:166 */
   25     43   
    pub fn c(&self) -> &[::std::string::String] {
   26         -
        self.c.as_deref().unwrap_or_default()
          44  +
        /* StructureGenerator.kt:169 */
          45  +
        self.c
          46  +
            .as_deref()
          47  +
            /* StructureGenerator.kt:175 */
          48  +
            .unwrap_or_default()
          49  +
        /* StructureGenerator.kt:166 */
   27     50   
    }
          51  +
    /* StructureGenerator.kt:135 */
   28     52   
}
          53  +
/* ClientCodegenVisitor.kt:237 */
   29     54   
impl NullAndEmptyHeadersServerOutput {
   30         -
    /// Creates a new builder-style object to manufacture [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
          55  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
          56  +
    /* BuilderGenerator.kt:175 */
   31     57   
    pub fn builder() -> crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerOutputBuilder {
          58  +
        /* BuilderGenerator.kt:176 */
   32     59   
        crate::operation::null_and_empty_headers_server::builders::NullAndEmptyHeadersServerOutputBuilder::default()
          60  +
        /* BuilderGenerator.kt:175 */
   33     61   
    }
          62  +
    /* ClientCodegenVisitor.kt:237 */
   34     63   
}
   35     64   
   36         -
/// A builder for [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
          65  +
/// /* BuilderGenerator.kt:342 */A builder for [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
          66  +
/* RustType.kt:516 */
   37     67   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          68  +
/* RustType.kt:516 */
   38     69   
#[non_exhaustive]
          70  +
/* BuilderGenerator.kt:345 */
   39     71   
pub struct NullAndEmptyHeadersServerOutputBuilder {
   40         -
    pub(crate) a: ::std::option::Option<::std::string::String>,
   41         -
    pub(crate) b: ::std::option::Option<::std::string::String>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) a: ::std::option::Option<::std::string::String>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) b: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:275 */
   42     75   
    pub(crate) c: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          76  +
    /* BuilderGenerator.kt:345 */
   43     77   
}
          78  +
/* BuilderGenerator.kt:355 */
   44     79   
impl NullAndEmptyHeadersServerOutputBuilder {
          80  +
    /* BuilderGenerator.kt:286 */
   45     81   
    #[allow(missing_docs)] // documentation missing in model
          82  +
                           /* BuilderGenerator.kt:291 */
   46     83   
    pub fn a(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          84  +
        /* BuilderGenerator.kt:292 */
   47     85   
        self.a = ::std::option::Option::Some(input.into());
          86  +
        /* BuilderGenerator.kt:293 */
   48     87   
        self
          88  +
        /* BuilderGenerator.kt:291 */
   49     89   
    }
          90  +
    /* BuilderGenerator.kt:312 */
   50     91   
    #[allow(missing_docs)] // documentation missing in model
          92  +
                           /* BuilderGenerator.kt:314 */
   51     93   
    pub fn set_a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:315 */
   52     95   
        self.a = input;
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:314 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:334 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:336 */
   56    102   
    pub fn get_a(&self) -> &::std::option::Option<::std::string::String> {
         103  +
        /* BuilderGenerator.kt:337 */
   57    104   
        &self.a
         105  +
        /* BuilderGenerator.kt:336 */
   58    106   
    }
         107  +
    /* BuilderGenerator.kt:286 */
   59    108   
    #[allow(missing_docs)] // documentation missing in model
         109  +
                           /* BuilderGenerator.kt:291 */
   60    110   
    pub fn b(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         111  +
        /* BuilderGenerator.kt:292 */
   61    112   
        self.b = ::std::option::Option::Some(input.into());
         113  +
        /* BuilderGenerator.kt:293 */
   62    114   
        self
         115  +
        /* BuilderGenerator.kt:291 */
   63    116   
    }
         117  +
    /* BuilderGenerator.kt:312 */
   64    118   
    #[allow(missing_docs)] // documentation missing in model
         119  +
                           /* BuilderGenerator.kt:314 */
   65    120   
    pub fn set_b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         121  +
        /* BuilderGenerator.kt:315 */
   66    122   
        self.b = input;
   67    123   
        self
         124  +
        /* BuilderGenerator.kt:314 */
   68    125   
    }
         126  +
    /* BuilderGenerator.kt:334 */
   69    127   
    #[allow(missing_docs)] // documentation missing in model
         128  +
                           /* BuilderGenerator.kt:336 */
   70    129   
    pub fn get_b(&self) -> &::std::option::Option<::std::string::String> {
         130  +
        /* BuilderGenerator.kt:337 */
   71    131   
        &self.b
         132  +
        /* BuilderGenerator.kt:336 */
   72    133   
    }
   73         -
    /// Appends an item to `c`.
         134  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `c`.
         135  +
    /* BuilderGenerator.kt:411 */
   74    136   
    ///
   75         -
    /// To override the contents of this collection use [`set_c`](Self::set_c).
         137  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_c`](Self::set_c).
         138  +
    /* BuilderGenerator.kt:413 */
   76    139   
    ///
         140  +
    /* BuilderGenerator.kt:418 */
   77    141   
    pub fn c(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         142  +
        /* BuilderGenerator.kt:419 */
   78    143   
        let mut v = self.c.unwrap_or_default();
   79    144   
        v.push(input.into());
   80    145   
        self.c = ::std::option::Option::Some(v);
   81    146   
        self
         147  +
        /* BuilderGenerator.kt:418 */
   82    148   
    }
         149  +
    /* BuilderGenerator.kt:312 */
   83    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* BuilderGenerator.kt:314 */
   84    152   
    pub fn set_c(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         153  +
        /* BuilderGenerator.kt:315 */
   85    154   
        self.c = input;
   86    155   
        self
         156  +
        /* BuilderGenerator.kt:314 */
   87    157   
    }
         158  +
    /* BuilderGenerator.kt:334 */
   88    159   
    #[allow(missing_docs)] // documentation missing in model
         160  +
                           /* BuilderGenerator.kt:336 */
   89    161   
    pub fn get_c(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         162  +
        /* BuilderGenerator.kt:337 */
   90    163   
        &self.c
         164  +
        /* BuilderGenerator.kt:336 */
   91    165   
    }
   92         -
    /// Consumes the builder and constructs a [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
         166  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`NullAndEmptyHeadersServerOutput`](crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput).
         167  +
    /* BuilderGenerator.kt:253 */
   93    168   
    pub fn build(self) -> crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput {
         169  +
        /* BuilderGenerator.kt:477 */
   94    170   
        crate::operation::null_and_empty_headers_server::NullAndEmptyHeadersServerOutput {
   95         -
            a: self.a,
         171  +
            /* BuilderGenerator.kt:481 */ a: self.a,
         172  +
            /* BuilderGenerator.kt:481 */
   96    173   
            b: self.b,
         174  +
            /* BuilderGenerator.kt:481 */
   97    175   
            c: self.c,
         176  +
            /* BuilderGenerator.kt:477 */
   98    177   
        }
         178  +
        /* BuilderGenerator.kt:253 */
   99    179   
    }
         180  +
    /* BuilderGenerator.kt:355 */
  100    181   
}