Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_lists/builders.rs

@@ -1,1 +102,114 @@
    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::xml_lists::_xml_lists_output::XmlListsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_lists::_xml_lists_input::XmlListsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_lists::builders::XmlListsInputBuilder {
    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::xml_lists::XmlListsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_lists::XmlListsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_lists();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlLists`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlLists`.
   24     27   
///
   25         -
/// This test case serializes XML lists for the following cases for both input and output: 1. Normal XML lists. 2. Normal XML sets. 3. XML lists of lists. 4. XML lists with @xmlName on its members 5. Flattened XML lists. 6. Flattened XML lists with @xmlName. 7. Lists of structures.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This test case serializes XML lists for the following cases for both input and output: 1. Normal XML lists. 2. Normal XML sets. 3. XML lists of lists. 4. XML lists with @xmlName on its members 5. Flattened XML lists. 6. Flattened XML lists with @xmlName. 7. Lists of structures.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct XmlListsFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::xml_lists::builders::XmlListsInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl crate::client::customize::internal::CustomizableSend<crate::operation::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError>
   33     39   
    for XmlListsFluentBuilder
   34     40   
{
   35     41   
    fn send(
   36     42   
        self,
   37     43   
        config_override: crate::config::Builder,
   38     44   
    ) -> crate::client::customize::internal::BoxFuture<
   39     45   
        crate::client::customize::internal::SendResult<crate::operation::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError>,
   40     46   
    > {
   41     47   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   42     48   
    }
   43     49   
}
          50  +
/* FluentBuilderGenerator.kt:282 */
   44     51   
impl XmlListsFluentBuilder {
          52  +
    /* FluentBuilderGenerator.kt:288 */
   45     53   
    /// Creates a new `XmlListsFluentBuilder`.
   46     54   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   47     55   
        Self {
   48     56   
            handle,
   49     57   
            inner: ::std::default::Default::default(),
   50     58   
            config_override: ::std::option::Option::None,
   51     59   
        }
   52     60   
    }
          61  +
    /* FluentBuilderGenerator.kt:301 */
   53     62   
    /// Access the XmlLists as a reference.
   54     63   
    pub fn as_input(&self) -> &crate::operation::xml_lists::builders::XmlListsInputBuilder {
   55     64   
        &self.inner
   56     65   
    }
          66  +
    /* FluentBuilderGenerator.kt:145 */
   57     67   
    /// Sends the request and returns the response.
   58     68   
    ///
   59     69   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   60     70   
    /// can be matched against.
   61     71   
    ///
   62     72   
    /// By default, any retryable failures will be retried twice. Retry behavior
   63     73   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   64     74   
    /// set when configuring the client.
   65     75   
    pub async fn send(
   66     76   
        self,
   67     77   
    ) -> ::std::result::Result<
   68     78   
        crate::operation::xml_lists::XmlListsOutput,
   69     79   
        ::aws_smithy_runtime_api::client::result::SdkError<
   70     80   
            crate::operation::xml_lists::XmlListsError,
   71     81   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   72     82   
        >,
   73     83   
    > {
   74     84   
        let input = self
   75     85   
            .inner
   76     86   
            .build()
   77     87   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   78     88   
        let runtime_plugins = crate::operation::xml_lists::XmlLists::operation_runtime_plugins(
   79     89   
            self.handle.runtime_plugins.clone(),
   80     90   
            &self.handle.conf,
   81     91   
            self.config_override,
   82     92   
        );
   83     93   
        crate::operation::xml_lists::XmlLists::orchestrate(&runtime_plugins, input).await
   84     94   
    }
   85     95   
   86     96   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   87     97   
    pub fn customize(
   88     98   
        self,
   89     99   
    ) -> crate::client::customize::CustomizableOperation<crate::operation::xml_lists::XmlListsOutput, crate::operation::xml_lists::XmlListsError, Self>
   90    100   
    {
   91    101   
        crate::client::customize::CustomizableOperation::new(self)
   92    102   
    }
         103  +
    /* FluentBuilderGenerator.kt:315 */
   93    104   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
   94    105   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
   95    106   
        self
   96    107   
    }
   97    108   
   98    109   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
   99    110   
        self.config_override = config_override;
  100    111   
        self
  101    112   
    }
         113  +
    /* FluentBuilderGenerator.kt:282 */
  102    114   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps.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 `XmlMaps`.
           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 XmlMaps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlMaps {
    7         -
    /// Creates a new `XmlMaps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlMaps`
          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::xml_maps::XmlMapsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_maps::XmlMapsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_maps::XmlMapsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -53,62 +377,453 @@
   73     82   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   74     83   
            }
   75     84   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   76     85   
                config_override,
   77     86   
                client_config.config.clone(),
   78     87   
                &client_config.runtime_components,
   79     88   
            ));
   80     89   
        }
   81     90   
        runtime_plugins
   82     91   
    }
          92  +
    /* OperationGenerator.kt:85 */
   83     93   
}
          94  +
/* OperationRuntimePluginGenerator.kt:55 */
   84     95   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlMaps {
   85     96   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   86     97   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlMaps");
   87     98   
   88     99   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   89    100   
            XmlMapsRequestSerializer,
   90    101   
        ));
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   92    103   
            XmlMapsResponseDeserializer,
   93    104   
        ));
   94    105   
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   96    107   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("XmlMaps", "Query Protocol"));
  100    111   
  101    112   
        ::std::option::Option::Some(cfg.freeze())
  102    113   
    }
  103    114   
  104    115   
    fn runtime_components(
  105    116   
        &self,
  106    117   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  107    118   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  108    119   
        #[allow(unused_mut)]
  109    120   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlMaps")
  110    121   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  111    122   
            .with_interceptor(XmlMapsEndpointParamsInterceptor)
  112    123   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  113    124   
                crate::operation::xml_maps::XmlMapsError,
  114    125   
            >::new())
  115    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  116    127   
                crate::operation::xml_maps::XmlMapsError,
  117    128   
            >::new());
  118    129   
  119    130   
        ::std::borrow::Cow::Owned(rcb)
  120    131   
    }
  121    132   
}
  122    133   
         134  +
/* ResponseDeserializerGenerator.kt:64 */
  123    135   
#[derive(Debug)]
  124    136   
struct XmlMapsResponseDeserializer;
  125    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlMapsResponseDeserializer {
  126    138   
    fn deserialize_nonstreaming(
  127    139   
        &self,
  128    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  129    141   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  130    142   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  131    143   
        let headers = response.headers();
  132    144   
        let body = response.body().bytes().expect("body loaded");
  133    145   
        #[allow(unused_mut)]
  134    146   
        let mut force_error = false;
  135    147   
  136    148   
        let parse_result = if !success && status != 200 || force_error {
  137    149   
            crate::protocol_serde::shape_xml_maps::de_xml_maps_http_error(status, headers, body)
  138    150   
        } else {
  139    151   
            crate::protocol_serde::shape_xml_maps::de_xml_maps_http_response(status, headers, body)
  140    152   
        };
  141    153   
        crate::protocol_serde::type_erase_result(parse_result)
  142    154   
    }
  143    155   
}
         156  +
/* RequestSerializerGenerator.kt:67 */
  144    157   
#[derive(Debug)]
  145    158   
struct XmlMapsRequestSerializer;
  146    159   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlMapsRequestSerializer {
  147    160   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  148    161   
    fn serialize_input(
  149    162   
        &self,
  150    163   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  151    164   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  152    165   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  153    166   
        let input = input.downcast::<crate::operation::xml_maps::XmlMapsInput>().expect("correct type");
  154    167   
        let _header_serialization_settings = _cfg
  155    168   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  156    169   
            .cloned()
  157    170   
            .unwrap_or_default();
  158    171   
        let mut request_builder = {
  159    172   
            fn uri_base(
  160    173   
                _input: &crate::operation::xml_maps::XmlMapsInput,
  161    174   
                output: &mut ::std::string::String,
  162    175   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  163    176   
                use ::std::fmt::Write as _;
  164    177   
                ::std::write!(output, "/").expect("formatting should succeed");
  165    178   
                ::std::result::Result::Ok(())
  166    179   
            }
  167    180   
            #[allow(clippy::unnecessary_wraps)]
  168    181   
            fn update_http_builder(
  169    182   
                input: &crate::operation::xml_maps::XmlMapsInput,
  170    183   
                builder: ::http::request::Builder,
  171    184   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                let mut uri = ::std::string::String::new();
  173    186   
                uri_base(input, &mut uri)?;
  174    187   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  175    188   
            }
  176    189   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  177    190   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  178    191   
            builder
  179    192   
        };
  180    193   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_maps_input::ser_xml_maps_input_input_input(&input)?);
  181    194   
  182    195   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  183    196   
    }
  184    197   
}
         198  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  185    199   
#[derive(Debug)]
  186    200   
struct XmlMapsEndpointParamsInterceptor;
  187    201   
  188    202   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlMapsEndpointParamsInterceptor {
  189    203   
    fn name(&self) -> &'static str {
  190    204   
        "XmlMapsEndpointParamsInterceptor"
  191    205   
    }
  192    206   
  193    207   
    fn read_before_execution(
  194    208   
        &self,
  195    209   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  196    210   
            '_,
  197    211   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  198    212   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  199    213   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  200    214   
        >,
  201    215   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  202    216   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  203    217   
        let _input = context
  204    218   
            .input()
  205    219   
            .downcast_ref::<XmlMapsInput>()
  206    220   
            .ok_or("failed to downcast to XmlMapsInput")?;
  207    221   
  208    222   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  210    224   
        })?;
  211    225   
        cfg.interceptor_state()
  212    226   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  213    227   
        ::std::result::Result::Ok(())
  214    228   
    }
  215    229   
}
  216    230   
  217    231   
// The get_* functions below are generated from JMESPath expressions in the
  218    232   
// operationContextParams trait. They target the operation's input shape.
  219    233   
         234  +
/* RustType.kt:516 */
  220    235   
#[allow(unreachable_code, unused_variables)]
         236  +
/* RustType.kt:516 */
  221    237   
#[cfg(test)]
         238  +
/* ProtocolTestGenerator.kt:98 */
  222    239   
mod xml_maps_test {
  223    240   
  224    241   
    /// Tests for XML map serialization
  225    242   
    /// Test ID: QueryXmlMaps
  226    243   
    #[::tokio::test]
  227    244   
    #[::tracing_test::traced_test]
  228    245   
    async fn query_xml_maps_response() {
  229    246   
        let expected_output = crate::operation::xml_maps::XmlMapsOutput::builder()
  230    247   
            .set_my_map(::std::option::Option::Some({
  231    248   
                let mut ret = ::std::collections::HashMap::new();
  232    249   
                ret.insert(
  233    250   
                    "foo".to_owned(),
  234    251   
                    crate::types::GreetingStruct::builder()
  235    252   
                        .set_hi(::std::option::Option::Some("there".to_owned()))
  236    253   
                        .build(),
  237    254   
                );
  238    255   
                ret.insert(
  239    256   
                    "baz".to_owned(),
  240    257   
                    crate::types::GreetingStruct::builder()
  241    258   
                        .set_hi(::std::option::Option::Some("bye".to_owned()))
  242    259   
                        .build(),
  243    260   
                );
  244    261   
                ret
  245    262   
            }))
  246    263   
            .build();
  247    264   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  248    265   
        .header("Content-Type", "text/xml")
  249    266   
        .status(200)
  250    267   
                    .body(::aws_smithy_types::body::SdkBody::from("<XmlMapsResponse xmlns=\"https://example.com/\">\n    <XmlMapsResult>\n        <myMap>\n            <entry>\n                <key>foo</key>\n                <value>\n                    <hi>there</hi>\n                </value>\n            </entry>\n            <entry>\n                <key>baz</key>\n                <value>\n                    <hi>bye</hi>\n                </value>\n            </entry>\n        </myMap>\n    </XmlMapsResult>\n</XmlMapsResponse>\n"))
  251    268   
                    .unwrap()
  252    269   
                    ).unwrap();
  253    270   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  254    271   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  255    272   
  256    273   
        let op = crate::operation::xml_maps::XmlMaps::new();
  257    274   
        let config = op.config().expect("the operation has config");
  258    275   
        let de = config
  259    276   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  260    277   
            .expect("the config must have a deserializer");
  261    278   
  262    279   
        let parsed = de.deserialize_streaming(&mut http_response);
  263    280   
        let parsed = parsed.unwrap_or_else(|| {
  264    281   
            let http_response = http_response.map(|body| {
  265    282   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  266    283   
                    body.bytes().unwrap(),
  267    284   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  268    285   
                )))
  269    286   
            });
  270    287   
            de.deserialize_nonstreaming(&http_response)
  271    288   
        });
  272    289   
        let parsed = parsed
  273    290   
            .expect("should be successful response")
  274    291   
            .downcast::<crate::operation::xml_maps::XmlMapsOutput>()
  275    292   
            .unwrap();
  276    293   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  277    294   
    }
         295  +
         296  +
    /* ProtocolTestGenerator.kt:98 */
  278    297   
}
  279    298   
         299  +
/* OperationErrorGenerator.kt:79 */
  280    300   
/// Error type for the `XmlMapsError` operation.
         301  +
/* RustType.kt:516 */
  281    302   
#[non_exhaustive]
         303  +
/* RustType.kt:516 */
  282    304   
#[derive(::std::fmt::Debug)]
  283         -
pub enum XmlMapsError {
         305  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlMapsError {
         306  +
    /* OperationErrorGenerator.kt:88 */
  284    307   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  285    308   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  286    309   
    variable wildcard pattern and check `.code()`:
  287    310   
     \
  288    311   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  289    312   
     \
  290    313   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlMapsError) for what information is available for the error.")]
  291    314   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         315  +
    /* OperationErrorGenerator.kt:81 */
  292    316   
}
         317  +
/* OperationErrorGenerator.kt:218 */
  293    318   
impl XmlMapsError {
         319  +
    /* OperationErrorGenerator.kt:219 */
  294    320   
    /// Creates the `XmlMapsError::Unhandled` variant from any error type.
  295    321   
    pub fn unhandled(
  296    322   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  297    323   
    ) -> Self {
  298    324   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  299    325   
            source: err.into(),
  300    326   
            meta: ::std::default::Default::default(),
  301    327   
        })
  302    328   
    }
  303    329   
  304    330   
    /// Creates the `XmlMapsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  305    331   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  306    332   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  307    333   
            source: err.clone().into(),
  308    334   
            meta: err,
  309    335   
        })
  310    336   
    }
  311         -
    ///
         337  +
    /// /* OperationErrorGenerator.kt:236 */
  312    338   
    /// Returns error metadata, which includes the error code, message,
  313    339   
    /// request ID, and potentially additional information.
  314    340   
    ///
         341  +
    /* OperationErrorGenerator.kt:242 */
  315    342   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         343  +
        /* OperationErrorGenerator.kt:243 */
  316    344   
        match self {
  317         -
            Self::Unhandled(e) => &e.meta,
         345  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         346  +
            /* OperationErrorGenerator.kt:243 */
  318    347   
        }
         348  +
        /* OperationErrorGenerator.kt:242 */
  319    349   
    }
         350  +
    /* OperationErrorGenerator.kt:218 */
  320    351   
}
         352  +
/* OperationErrorGenerator.kt:269 */
  321    353   
impl ::std::error::Error for XmlMapsError {
         354  +
    /* OperationErrorGenerator.kt:270 */
  322    355   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         356  +
        /* OperationErrorGenerator.kt:318 */
  323    357   
        match self {
  324         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         358  +
            /* OperationErrorGenerator.kt:326 */
         359  +
            Self::Unhandled(_inner) => {
         360  +
                /* OperationErrorGenerator.kt:279 */
         361  +
                ::std::option::Option::Some(&*_inner.source)
         362  +
                /* OperationErrorGenerator.kt:326 */
         363  +
            } /* OperationErrorGenerator.kt:318 */
  325    364   
        }
         365  +
        /* OperationErrorGenerator.kt:270 */
  326    366   
    }
         367  +
    /* OperationErrorGenerator.kt:269 */
  327    368   
}
         369  +
/* OperationErrorGenerator.kt:133 */
  328    370   
impl ::std::fmt::Display for XmlMapsError {
         371  +
    /* OperationErrorGenerator.kt:134 */
  329    372   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         373  +
        /* OperationErrorGenerator.kt:318 */
  330    374   
        match self {
         375  +
            /* OperationErrorGenerator.kt:326 */
  331    376   
            Self::Unhandled(_inner) => {
         377  +
                /* OperationErrorGenerator.kt:139 */
  332    378   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  333    379   
                    write!(f, "unhandled error ({code})")
  334    380   
                } else {
  335    381   
                    f.write_str("unhandled error")
  336    382   
                }
  337         -
            }
         383  +
                /* OperationErrorGenerator.kt:326 */
         384  +
            } /* OperationErrorGenerator.kt:318 */
  338    385   
        }
         386  +
        /* OperationErrorGenerator.kt:134 */
  339    387   
    }
         388  +
    /* OperationErrorGenerator.kt:133 */
  340    389   
}
         390  +
/* OperationErrorGenerator.kt:182 */
  341    391   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlMapsError {
         392  +
    /* OperationErrorGenerator.kt:186 */
  342    393   
    fn code(&self) -> ::std::option::Option<&str> {
         394  +
        /* OperationErrorGenerator.kt:187 */
  343    395   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         396  +
        /* OperationErrorGenerator.kt:186 */
  344    397   
    }
         398  +
    /* OperationErrorGenerator.kt:190 */
  345    399   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         400  +
        /* OperationErrorGenerator.kt:197 */
  346    401   
        ::std::option::Option::None
         402  +
        /* OperationErrorGenerator.kt:190 */
  347    403   
    }
         404  +
    /* OperationErrorGenerator.kt:182 */
  348    405   
}
         406  +
/* OperationErrorGenerator.kt:163 */
  349    407   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlMapsError {
         408  +
    /* OperationErrorGenerator.kt:164 */
  350    409   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         410  +
        /* OperationErrorGenerator.kt:318 */
  351    411   
        match self {
  352         -
            Self::Unhandled(_inner) => &_inner.meta,
         412  +
            /* OperationErrorGenerator.kt:326 */
         413  +
            Self::Unhandled(_inner) => {
         414  +
                /* OperationErrorGenerator.kt:168 */
         415  +
                &_inner.meta
         416  +
                /* OperationErrorGenerator.kt:326 */
         417  +
            } /* OperationErrorGenerator.kt:318 */
  353    418   
        }
         419  +
        /* OperationErrorGenerator.kt:164 */
  354    420   
    }
         421  +
    /* OperationErrorGenerator.kt:163 */
  355    422   
}
         423  +
/* OperationErrorGenerator.kt:109 */
  356    424   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlMapsError {
         425  +
    /* OperationErrorGenerator.kt:110 */
  357    426   
    fn create_unhandled_error(
  358    427   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  359    428   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  360    429   
    ) -> Self {
         430  +
        /* OperationErrorGenerator.kt:121 */
  361    431   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  362    432   
            source,
  363    433   
            meta: meta.unwrap_or_default(),
  364    434   
        })
         435  +
        /* OperationErrorGenerator.kt:110 */
  365    436   
    }
         437  +
    /* OperationErrorGenerator.kt:109 */
  366    438   
}
  367    439   
         440  +
/* CodegenDelegator.kt:255 */
  368    441   
pub use crate::operation::xml_maps::_xml_maps_output::XmlMapsOutput;
  369    442   
         443  +
/* CodegenDelegator.kt:255 */
  370    444   
pub use crate::operation::xml_maps::_xml_maps_input::XmlMapsInput;
  371    445   
         446  +
/* RustModule.kt:172 */
  372    447   
mod _xml_maps_input;
  373    448   
         449  +
/* RustModule.kt:172 */
  374    450   
mod _xml_maps_output;
  375    451   
  376         -
/// Builders
         452  +
/// /* CodegenDelegator.kt:51 */Builders
  377    453   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps/_xml_maps_input.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps/_xml_maps_output.rs

@@ -1,1 +55,97 @@
    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 XmlMapsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps::builders::XmlMapsOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps::builders::XmlMapsOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsOutputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsOutput`](crate::operation::xml_maps::XmlMapsOutput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(self) -> crate::operation::xml_maps::XmlMapsOutput {
   53         -
        crate::operation::xml_maps::XmlMapsOutput { my_map: self.my_map }
          89  +
        /* BuilderGenerator.kt:477 */
          90  +
        crate::operation::xml_maps::XmlMapsOutput {
          91  +
            /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          92  +
            /* BuilderGenerator.kt:477 */
          93  +
        }
          94  +
        /* BuilderGenerator.kt:253 */
   54     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   55     97   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps/builders.rs

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

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps_xml_name.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 `XmlMapsXmlName`.
           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 XmlMapsXmlName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlMapsXmlName {
    7         -
    /// Creates a new `XmlMapsXmlName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlMapsXmlName`
          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::xml_maps_xml_name::XmlMapsXmlNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +388,464 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlMapsXmlName {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlMapsXmlName");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlMapsXmlNameRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlMapsXmlNameResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "XmlMapsXmlName",
  105    116   
            "Query Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlMapsXmlName")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlMapsXmlNameEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct XmlMapsXmlNameResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlMapsXmlNameResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_xml_maps_xml_name::de_xml_maps_xml_name_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_maps_xml_name::de_xml_maps_xml_name_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct XmlMapsXmlNameRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlMapsXmlNameRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(
  190    203   
            crate::protocol_serde::shape_xml_maps_xml_name_input::ser_xml_maps_xml_name_input_input_input(&input)?,
  191    204   
        );
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct XmlMapsXmlNameEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlMapsXmlNameEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "XmlMapsXmlNameEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<XmlMapsXmlNameInput>()
  217    231   
            .ok_or("failed to downcast to XmlMapsXmlNameInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod xml_maps_xml_name_test {
  234    251   
  235    252   
    /// Serializes XML lists
  236    253   
    /// Test ID: QueryQueryXmlMapsXmlName
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn query_query_xml_maps_xml_name_response() {
  240    257   
        let expected_output = crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput::builder()
  241    258   
            .set_my_map(::std::option::Option::Some({
  242    259   
                let mut ret = ::std::collections::HashMap::new();
  243    260   
                ret.insert(
  244    261   
                    "foo".to_owned(),
  245    262   
                    crate::types::GreetingStruct::builder()
  246    263   
                        .set_hi(::std::option::Option::Some("there".to_owned()))
  247    264   
                        .build(),
  248    265   
                );
  249    266   
                ret.insert(
  250    267   
                    "baz".to_owned(),
  251    268   
                    crate::types::GreetingStruct::builder()
  252    269   
                        .set_hi(::std::option::Option::Some("bye".to_owned()))
  253    270   
                        .build(),
  254    271   
                );
  255    272   
                ret
  256    273   
            }))
  257    274   
            .build();
  258    275   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  259    276   
        .header("Content-Type", "text/xml")
  260    277   
        .status(200)
  261    278   
                    .body(::aws_smithy_types::body::SdkBody::from("<XmlMapsXmlNameResponse xmlns=\"https://example.com/\">\n    <XmlMapsXmlNameResult>\n        <myMap>\n            <entry>\n                <Attribute>foo</Attribute>\n                <Setting>\n                    <hi>there</hi>\n                </Setting>\n            </entry>\n            <entry>\n                <Attribute>baz</Attribute>\n                <Setting>\n                    <hi>bye</hi>\n                </Setting>\n            </entry>\n        </myMap>\n    </XmlMapsXmlNameResult>\n</XmlMapsXmlNameResponse>\n"))
  262    279   
                    .unwrap()
  263    280   
                    ).unwrap();
  264    281   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  265    282   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  266    283   
  267    284   
        let op = crate::operation::xml_maps_xml_name::XmlMapsXmlName::new();
  268    285   
        let config = op.config().expect("the operation has config");
  269    286   
        let de = config
  270    287   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  271    288   
            .expect("the config must have a deserializer");
  272    289   
  273    290   
        let parsed = de.deserialize_streaming(&mut http_response);
  274    291   
        let parsed = parsed.unwrap_or_else(|| {
  275    292   
            let http_response = http_response.map(|body| {
  276    293   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  277    294   
                    body.bytes().unwrap(),
  278    295   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  279    296   
                )))
  280    297   
            });
  281    298   
            de.deserialize_nonstreaming(&http_response)
  282    299   
        });
  283    300   
        let parsed = parsed
  284    301   
            .expect("should be successful response")
  285    302   
            .downcast::<crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput>()
  286    303   
            .unwrap();
  287    304   
        ::pretty_assertions::assert_eq!(parsed.my_map, expected_output.my_map, "Unexpected value for `my_map`");
  288    305   
    }
         306  +
         307  +
    /* ProtocolTestGenerator.kt:98 */
  289    308   
}
  290    309   
         310  +
/* OperationErrorGenerator.kt:79 */
  291    311   
/// Error type for the `XmlMapsXmlNameError` operation.
         312  +
/* RustType.kt:516 */
  292    313   
#[non_exhaustive]
         314  +
/* RustType.kt:516 */
  293    315   
#[derive(::std::fmt::Debug)]
  294         -
pub enum XmlMapsXmlNameError {
         316  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlMapsXmlNameError {
         317  +
    /* OperationErrorGenerator.kt:88 */
  295    318   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  296    319   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  297    320   
    variable wildcard pattern and check `.code()`:
  298    321   
     \
  299    322   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  300    323   
     \
  301    324   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlMapsXmlNameError) for what information is available for the error.")]
  302    325   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         326  +
    /* OperationErrorGenerator.kt:81 */
  303    327   
}
         328  +
/* OperationErrorGenerator.kt:218 */
  304    329   
impl XmlMapsXmlNameError {
         330  +
    /* OperationErrorGenerator.kt:219 */
  305    331   
    /// Creates the `XmlMapsXmlNameError::Unhandled` variant from any error type.
  306    332   
    pub fn unhandled(
  307    333   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  308    334   
    ) -> Self {
  309    335   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  310    336   
            source: err.into(),
  311    337   
            meta: ::std::default::Default::default(),
  312    338   
        })
  313    339   
    }
  314    340   
  315    341   
    /// Creates the `XmlMapsXmlNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  316    342   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  317    343   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  318    344   
            source: err.clone().into(),
  319    345   
            meta: err,
  320    346   
        })
  321    347   
    }
  322         -
    ///
         348  +
    /// /* OperationErrorGenerator.kt:236 */
  323    349   
    /// Returns error metadata, which includes the error code, message,
  324    350   
    /// request ID, and potentially additional information.
  325    351   
    ///
         352  +
    /* OperationErrorGenerator.kt:242 */
  326    353   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         354  +
        /* OperationErrorGenerator.kt:243 */
  327    355   
        match self {
  328         -
            Self::Unhandled(e) => &e.meta,
         356  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         357  +
            /* OperationErrorGenerator.kt:243 */
  329    358   
        }
         359  +
        /* OperationErrorGenerator.kt:242 */
  330    360   
    }
         361  +
    /* OperationErrorGenerator.kt:218 */
  331    362   
}
         363  +
/* OperationErrorGenerator.kt:269 */
  332    364   
impl ::std::error::Error for XmlMapsXmlNameError {
         365  +
    /* OperationErrorGenerator.kt:270 */
  333    366   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         367  +
        /* OperationErrorGenerator.kt:318 */
  334    368   
        match self {
  335         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         369  +
            /* OperationErrorGenerator.kt:326 */
         370  +
            Self::Unhandled(_inner) => {
         371  +
                /* OperationErrorGenerator.kt:279 */
         372  +
                ::std::option::Option::Some(&*_inner.source)
         373  +
                /* OperationErrorGenerator.kt:326 */
         374  +
            } /* OperationErrorGenerator.kt:318 */
  336    375   
        }
         376  +
        /* OperationErrorGenerator.kt:270 */
  337    377   
    }
         378  +
    /* OperationErrorGenerator.kt:269 */
  338    379   
}
         380  +
/* OperationErrorGenerator.kt:133 */
  339    381   
impl ::std::fmt::Display for XmlMapsXmlNameError {
         382  +
    /* OperationErrorGenerator.kt:134 */
  340    383   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         384  +
        /* OperationErrorGenerator.kt:318 */
  341    385   
        match self {
         386  +
            /* OperationErrorGenerator.kt:326 */
  342    387   
            Self::Unhandled(_inner) => {
         388  +
                /* OperationErrorGenerator.kt:139 */
  343    389   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  344    390   
                    write!(f, "unhandled error ({code})")
  345    391   
                } else {
  346    392   
                    f.write_str("unhandled error")
  347    393   
                }
  348         -
            }
         394  +
                /* OperationErrorGenerator.kt:326 */
         395  +
            } /* OperationErrorGenerator.kt:318 */
  349    396   
        }
         397  +
        /* OperationErrorGenerator.kt:134 */
  350    398   
    }
         399  +
    /* OperationErrorGenerator.kt:133 */
  351    400   
}
         401  +
/* OperationErrorGenerator.kt:182 */
  352    402   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlMapsXmlNameError {
         403  +
    /* OperationErrorGenerator.kt:186 */
  353    404   
    fn code(&self) -> ::std::option::Option<&str> {
         405  +
        /* OperationErrorGenerator.kt:187 */
  354    406   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         407  +
        /* OperationErrorGenerator.kt:186 */
  355    408   
    }
         409  +
    /* OperationErrorGenerator.kt:190 */
  356    410   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         411  +
        /* OperationErrorGenerator.kt:197 */
  357    412   
        ::std::option::Option::None
         413  +
        /* OperationErrorGenerator.kt:190 */
  358    414   
    }
         415  +
    /* OperationErrorGenerator.kt:182 */
  359    416   
}
         417  +
/* OperationErrorGenerator.kt:163 */
  360    418   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlMapsXmlNameError {
         419  +
    /* OperationErrorGenerator.kt:164 */
  361    420   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         421  +
        /* OperationErrorGenerator.kt:318 */
  362    422   
        match self {
  363         -
            Self::Unhandled(_inner) => &_inner.meta,
         423  +
            /* OperationErrorGenerator.kt:326 */
         424  +
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:168 */
         426  +
                &_inner.meta
         427  +
                /* OperationErrorGenerator.kt:326 */
         428  +
            } /* OperationErrorGenerator.kt:318 */
  364    429   
        }
         430  +
        /* OperationErrorGenerator.kt:164 */
  365    431   
    }
         432  +
    /* OperationErrorGenerator.kt:163 */
  366    433   
}
         434  +
/* OperationErrorGenerator.kt:109 */
  367    435   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlMapsXmlNameError {
         436  +
    /* OperationErrorGenerator.kt:110 */
  368    437   
    fn create_unhandled_error(
  369    438   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  370    439   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  371    440   
    ) -> Self {
         441  +
        /* OperationErrorGenerator.kt:121 */
  372    442   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  373    443   
            source,
  374    444   
            meta: meta.unwrap_or_default(),
  375    445   
        })
         446  +
        /* OperationErrorGenerator.kt:110 */
  376    447   
    }
         448  +
    /* OperationErrorGenerator.kt:109 */
  377    449   
}
  378    450   
         451  +
/* CodegenDelegator.kt:255 */
  379    452   
pub use crate::operation::xml_maps_xml_name::_xml_maps_xml_name_output::XmlMapsXmlNameOutput;
  380    453   
         454  +
/* CodegenDelegator.kt:255 */
  381    455   
pub use crate::operation::xml_maps_xml_name::_xml_maps_xml_name_input::XmlMapsXmlNameInput;
  382    456   
         457  +
/* RustModule.kt:172 */
  383    458   
mod _xml_maps_xml_name_input;
  384    459   
         460  +
/* RustModule.kt:172 */
  385    461   
mod _xml_maps_xml_name_output;
  386    462   
  387         -
/// Builders
         463  +
/// /* CodegenDelegator.kt:51 */Builders
  388    464   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps_xml_name/_xml_maps_xml_name_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 XmlMapsXmlNameInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsXmlNameInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl XmlMapsXmlNameInput {
    7         -
    /// Creates a new builder-style object to manufacture [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          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 XmlMapsXmlNameInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct XmlMapsXmlNameInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl XmlMapsXmlNameInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsXmlNameInput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameInput {
          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/aws_query/rust-client-codegen/src/operation/xml_maps_xml_name/_xml_maps_xml_name_output.rs

@@ -1,1 +55,97 @@
    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 XmlMapsXmlNameOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlMapsXmlNameOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlMapsXmlNameOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn my_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.my_map.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlMapsXmlNameOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlMapsXmlNameOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) my_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlMapsXmlNameOutputBuilder {
   29         -
    /// Adds a key-value pair to `my_map`.
          51  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `my_map`.
          52  +
    /* BuilderGenerator.kt:437 */
   30     53   
    ///
   31         -
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          54  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_my_map`](Self::set_my_map).
          55  +
    /* BuilderGenerator.kt:439 */
   32     56   
    ///
          57  +
    /* BuilderGenerator.kt:445 */
   33     58   
    pub fn my_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::GreetingStruct) -> Self {
          59  +
        /* BuilderGenerator.kt:448 */
   34     60   
        let mut hash_map = self.my_map.unwrap_or_default();
   35     61   
        hash_map.insert(k.into(), v);
   36     62   
        self.my_map = ::std::option::Option::Some(hash_map);
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:445 */
   38     65   
    }
          66  +
    /* BuilderGenerator.kt:312 */
   39     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* BuilderGenerator.kt:314 */
   40     69   
    pub fn set_my_map(
   41     70   
        mut self,
   42     71   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>>,
   43     72   
    ) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.my_map = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
          78  +
    /* BuilderGenerator.kt:334 */
   47     79   
    #[allow(missing_docs)] // documentation missing in model
          80  +
                           /* BuilderGenerator.kt:336 */
   48     81   
    pub fn get_my_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::GreetingStruct>> {
          82  +
        /* BuilderGenerator.kt:337 */
   49     83   
        &self.my_map
          84  +
        /* BuilderGenerator.kt:336 */
   50     85   
    }
   51         -
    /// Consumes the builder and constructs a [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          86  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlMapsXmlNameOutput`](crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput).
          87  +
    /* BuilderGenerator.kt:253 */
   52     88   
    pub fn build(self) -> crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput {
   53         -
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput { my_map: self.my_map }
          89  +
        /* BuilderGenerator.kt:477 */
          90  +
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameOutput {
          91  +
            /* BuilderGenerator.kt:481 */ my_map: self.my_map,
          92  +
            /* BuilderGenerator.kt:477 */
          93  +
        }
          94  +
        /* BuilderGenerator.kt:253 */
   54     95   
    }
          96  +
    /* BuilderGenerator.kt:355 */
   55     97   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_maps_xml_name/builders.rs

@@ -1,1 +110,122 @@
    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::xml_maps_xml_name::_xml_maps_xml_name_output::XmlMapsXmlNameOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_maps_xml_name::_xml_maps_xml_name_input::XmlMapsXmlNameInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder {
    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::xml_maps_xml_name::XmlMapsXmlNameOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_maps_xml_name();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlMapsXmlName`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlMapsXmlName`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct XmlMapsXmlNameFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder,
   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::xml_maps_xml_name::XmlMapsXmlNameOutput,
   34     40   
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   35     41   
    > for XmlMapsXmlNameFluentBuilder
   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::xml_maps_xml_name::XmlMapsXmlNameOutput,
   43     49   
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   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 XmlMapsXmlNameFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `XmlMapsXmlNameFluentBuilder`.
   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 XmlMapsXmlName as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::xml_maps_xml_name::builders::XmlMapsXmlNameInputBuilder {
   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::xml_maps_xml_name::XmlMapsXmlNameOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   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::xml_maps_xml_name::XmlMapsXmlName::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::xml_maps_xml_name::XmlMapsXmlName::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::xml_maps_xml_name::XmlMapsXmlNameOutput,
   96    106   
        crate::operation::xml_maps_xml_name::XmlMapsXmlNameError,
   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   
    }
         121  +
    /* FluentBuilderGenerator.kt:282 */
  110    122   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces.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 `XmlNamespaces`.
           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 XmlNamespaces;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlNamespaces {
    7         -
    /// Creates a new `XmlNamespaces`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlNamespaces`
          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::xml_namespaces::XmlNamespacesInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_namespaces::XmlNamespacesOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_namespaces::XmlNamespacesError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +378,454 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlNamespaces {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlNamespaces");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlNamespacesRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlNamespacesResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "XmlNamespaces",
  105    116   
            "Query Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlNamespaces")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlNamespacesEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_namespaces::XmlNamespacesError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_namespaces::XmlNamespacesError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct XmlNamespacesResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlNamespacesResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_xml_namespaces::de_xml_namespaces_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_namespaces::de_xml_namespaces_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct XmlNamespacesRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlNamespacesRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::xml_namespaces::XmlNamespacesInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::xml_namespaces::XmlNamespacesInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::xml_namespaces::XmlNamespacesInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_namespaces_input::ser_xml_namespaces_input_input_input(
  190    203   
            &input,
  191    204   
        )?);
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct XmlNamespacesEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlNamespacesEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "XmlNamespacesEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<XmlNamespacesInput>()
  217    231   
            .ok_or("failed to downcast to XmlNamespacesInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod xml_namespaces_test {
  234    251   
  235    252   
    /// Serializes XML namespaces
  236    253   
    /// Test ID: QueryXmlNamespaces
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn query_xml_namespaces_response() {
  240    257   
        let expected_output = crate::operation::xml_namespaces::XmlNamespacesOutput::builder()
  241    258   
            .set_nested(::std::option::Option::Some(
  242    259   
                crate::types::XmlNamespaceNested::builder()
  243    260   
                    .set_foo(::std::option::Option::Some("Foo".to_owned()))
  244    261   
                    .set_values(::std::option::Option::Some(vec!["Bar".to_owned(), "Baz".to_owned()]))
  245    262   
                    .build(),
  246    263   
            ))
  247    264   
            .build();
  248    265   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(::http::response::Builder::new()
  249    266   
        .header("Content-Type", "text/xml")
  250    267   
        .status(200)
  251    268   
                    .body(::aws_smithy_types::body::SdkBody::from("<XmlNamespacesResponse xmlns=\"https://example.com/\">\n    <XmlNamespacesResult>\n        <nested>\n            <foo xmlns:baz=\"http://baz.com\">Foo</foo>\n            <values xmlns=\"http://qux.com\">\n                <member xmlns=\"http://bux.com\">Bar</member>\n                <member xmlns=\"http://bux.com\">Baz</member>\n            </values>\n        </nested>\n    </XmlNamespacesResult>\n</XmlNamespacesResponse>\n"))
  252    269   
                    .unwrap()
  253    270   
                    ).unwrap();
  254    271   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  255    272   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  256    273   
  257    274   
        let op = crate::operation::xml_namespaces::XmlNamespaces::new();
  258    275   
        let config = op.config().expect("the operation has config");
  259    276   
        let de = config
  260    277   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  261    278   
            .expect("the config must have a deserializer");
  262    279   
  263    280   
        let parsed = de.deserialize_streaming(&mut http_response);
  264    281   
        let parsed = parsed.unwrap_or_else(|| {
  265    282   
            let http_response = http_response.map(|body| {
  266    283   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  267    284   
                    body.bytes().unwrap(),
  268    285   
                    ::aws_smithy_protocol_test::MediaType::from("application/xml"),
  269    286   
                )))
  270    287   
            });
  271    288   
            de.deserialize_nonstreaming(&http_response)
  272    289   
        });
  273    290   
        let parsed = parsed
  274    291   
            .expect("should be successful response")
  275    292   
            .downcast::<crate::operation::xml_namespaces::XmlNamespacesOutput>()
  276    293   
            .unwrap();
  277    294   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  278    295   
    }
         296  +
         297  +
    /* ProtocolTestGenerator.kt:98 */
  279    298   
}
  280    299   
         300  +
/* OperationErrorGenerator.kt:79 */
  281    301   
/// Error type for the `XmlNamespacesError` operation.
         302  +
/* RustType.kt:516 */
  282    303   
#[non_exhaustive]
         304  +
/* RustType.kt:516 */
  283    305   
#[derive(::std::fmt::Debug)]
  284         -
pub enum XmlNamespacesError {
         306  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlNamespacesError {
         307  +
    /* OperationErrorGenerator.kt:88 */
  285    308   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  286    309   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  287    310   
    variable wildcard pattern and check `.code()`:
  288    311   
     \
  289    312   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  290    313   
     \
  291    314   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlNamespacesError) for what information is available for the error.")]
  292    315   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         316  +
    /* OperationErrorGenerator.kt:81 */
  293    317   
}
         318  +
/* OperationErrorGenerator.kt:218 */
  294    319   
impl XmlNamespacesError {
         320  +
    /* OperationErrorGenerator.kt:219 */
  295    321   
    /// Creates the `XmlNamespacesError::Unhandled` variant from any error type.
  296    322   
    pub fn unhandled(
  297    323   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  298    324   
    ) -> Self {
  299    325   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  300    326   
            source: err.into(),
  301    327   
            meta: ::std::default::Default::default(),
  302    328   
        })
  303    329   
    }
  304    330   
  305    331   
    /// Creates the `XmlNamespacesError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  306    332   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  307    333   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  308    334   
            source: err.clone().into(),
  309    335   
            meta: err,
  310    336   
        })
  311    337   
    }
  312         -
    ///
         338  +
    /// /* OperationErrorGenerator.kt:236 */
  313    339   
    /// Returns error metadata, which includes the error code, message,
  314    340   
    /// request ID, and potentially additional information.
  315    341   
    ///
         342  +
    /* OperationErrorGenerator.kt:242 */
  316    343   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         344  +
        /* OperationErrorGenerator.kt:243 */
  317    345   
        match self {
  318         -
            Self::Unhandled(e) => &e.meta,
         346  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         347  +
            /* OperationErrorGenerator.kt:243 */
  319    348   
        }
         349  +
        /* OperationErrorGenerator.kt:242 */
  320    350   
    }
         351  +
    /* OperationErrorGenerator.kt:218 */
  321    352   
}
         353  +
/* OperationErrorGenerator.kt:269 */
  322    354   
impl ::std::error::Error for XmlNamespacesError {
         355  +
    /* OperationErrorGenerator.kt:270 */
  323    356   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         357  +
        /* OperationErrorGenerator.kt:318 */
  324    358   
        match self {
  325         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         359  +
            /* OperationErrorGenerator.kt:326 */
         360  +
            Self::Unhandled(_inner) => {
         361  +
                /* OperationErrorGenerator.kt:279 */
         362  +
                ::std::option::Option::Some(&*_inner.source)
         363  +
                /* OperationErrorGenerator.kt:326 */
         364  +
            } /* OperationErrorGenerator.kt:318 */
  326    365   
        }
         366  +
        /* OperationErrorGenerator.kt:270 */
  327    367   
    }
         368  +
    /* OperationErrorGenerator.kt:269 */
  328    369   
}
         370  +
/* OperationErrorGenerator.kt:133 */
  329    371   
impl ::std::fmt::Display for XmlNamespacesError {
         372  +
    /* OperationErrorGenerator.kt:134 */
  330    373   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         374  +
        /* OperationErrorGenerator.kt:318 */
  331    375   
        match self {
         376  +
            /* OperationErrorGenerator.kt:326 */
  332    377   
            Self::Unhandled(_inner) => {
         378  +
                /* OperationErrorGenerator.kt:139 */
  333    379   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  334    380   
                    write!(f, "unhandled error ({code})")
  335    381   
                } else {
  336    382   
                    f.write_str("unhandled error")
  337    383   
                }
  338         -
            }
         384  +
                /* OperationErrorGenerator.kt:326 */
         385  +
            } /* OperationErrorGenerator.kt:318 */
  339    386   
        }
         387  +
        /* OperationErrorGenerator.kt:134 */
  340    388   
    }
         389  +
    /* OperationErrorGenerator.kt:133 */
  341    390   
}
         391  +
/* OperationErrorGenerator.kt:182 */
  342    392   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlNamespacesError {
         393  +
    /* OperationErrorGenerator.kt:186 */
  343    394   
    fn code(&self) -> ::std::option::Option<&str> {
         395  +
        /* OperationErrorGenerator.kt:187 */
  344    396   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         397  +
        /* OperationErrorGenerator.kt:186 */
  345    398   
    }
         399  +
    /* OperationErrorGenerator.kt:190 */
  346    400   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         401  +
        /* OperationErrorGenerator.kt:197 */
  347    402   
        ::std::option::Option::None
         403  +
        /* OperationErrorGenerator.kt:190 */
  348    404   
    }
         405  +
    /* OperationErrorGenerator.kt:182 */
  349    406   
}
         407  +
/* OperationErrorGenerator.kt:163 */
  350    408   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlNamespacesError {
         409  +
    /* OperationErrorGenerator.kt:164 */
  351    410   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         411  +
        /* OperationErrorGenerator.kt:318 */
  352    412   
        match self {
  353         -
            Self::Unhandled(_inner) => &_inner.meta,
         413  +
            /* OperationErrorGenerator.kt:326 */
         414  +
            Self::Unhandled(_inner) => {
         415  +
                /* OperationErrorGenerator.kt:168 */
         416  +
                &_inner.meta
         417  +
                /* OperationErrorGenerator.kt:326 */
         418  +
            } /* OperationErrorGenerator.kt:318 */
  354    419   
        }
         420  +
        /* OperationErrorGenerator.kt:164 */
  355    421   
    }
         422  +
    /* OperationErrorGenerator.kt:163 */
  356    423   
}
         424  +
/* OperationErrorGenerator.kt:109 */
  357    425   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlNamespacesError {
         426  +
    /* OperationErrorGenerator.kt:110 */
  358    427   
    fn create_unhandled_error(
  359    428   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  360    429   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  361    430   
    ) -> Self {
         431  +
        /* OperationErrorGenerator.kt:121 */
  362    432   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  363    433   
            source,
  364    434   
            meta: meta.unwrap_or_default(),
  365    435   
        })
         436  +
        /* OperationErrorGenerator.kt:110 */
  366    437   
    }
         438  +
    /* OperationErrorGenerator.kt:109 */
  367    439   
}
  368    440   
         441  +
/* CodegenDelegator.kt:255 */
  369    442   
pub use crate::operation::xml_namespaces::_xml_namespaces_output::XmlNamespacesOutput;
  370    443   
         444  +
/* CodegenDelegator.kt:255 */
  371    445   
pub use crate::operation::xml_namespaces::_xml_namespaces_input::XmlNamespacesInput;
  372    446   
         447  +
/* RustModule.kt:172 */
  373    448   
mod _xml_namespaces_input;
  374    449   
         450  +
/* RustModule.kt:172 */
  375    451   
mod _xml_namespaces_output;
  376    452   
  377         -
/// Builders
         453  +
/// /* CodegenDelegator.kt:51 */Builders
  378    454   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_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 XmlNamespacesInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlNamespacesInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl XmlNamespacesInput {
    7         -
    /// Creates a new builder-style object to manufacture [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          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 XmlNamespacesInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct XmlNamespacesInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl XmlNamespacesInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlNamespacesInput`](crate::operation::xml_namespaces::XmlNamespacesInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::xml_namespaces::XmlNamespacesInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::xml_namespaces::XmlNamespacesInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::xml_namespaces::XmlNamespacesInput {
          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/aws_query/rust-client-codegen/src/operation/xml_namespaces/_xml_namespaces_output.rs

@@ -1,1 +47,89 @@
    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 XmlNamespacesOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlNamespacesOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub nested: ::std::option::Option<crate::types::XmlNamespaceNested>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl XmlNamespacesOutput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn nested(&self) -> ::std::option::Option<&crate::types::XmlNamespaceNested> {
          20  +
        /* StructureGenerator.kt:170 */
   12     21   
        self.nested.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl XmlNamespacesOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::xml_namespaces::builders::XmlNamespacesOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          39  +
/* RustType.kt:516 */
   23     40   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          41  +
/* RustType.kt:516 */
   24     42   
#[non_exhaustive]
          43  +
/* BuilderGenerator.kt:345 */
   25     44   
pub struct XmlNamespacesOutputBuilder {
          45  +
    /* BuilderGenerator.kt:275 */
   26     46   
    pub(crate) nested: ::std::option::Option<crate::types::XmlNamespaceNested>,
          47  +
    /* BuilderGenerator.kt:345 */
   27     48   
}
          49  +
/* BuilderGenerator.kt:355 */
   28     50   
impl XmlNamespacesOutputBuilder {
          51  +
    /* BuilderGenerator.kt:286 */
   29     52   
    #[allow(missing_docs)] // documentation missing in model
          53  +
                           /* BuilderGenerator.kt:291 */
   30     54   
    pub fn nested(mut self, input: crate::types::XmlNamespaceNested) -> Self {
          55  +
        /* BuilderGenerator.kt:292 */
   31     56   
        self.nested = ::std::option::Option::Some(input);
          57  +
        /* BuilderGenerator.kt:293 */
   32     58   
        self
          59  +
        /* BuilderGenerator.kt:291 */
   33     60   
    }
          61  +
    /* BuilderGenerator.kt:312 */
   34     62   
    #[allow(missing_docs)] // documentation missing in model
          63  +
                           /* BuilderGenerator.kt:314 */
   35     64   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::XmlNamespaceNested>) -> Self {
          65  +
        /* BuilderGenerator.kt:315 */
   36     66   
        self.nested = input;
   37     67   
        self
          68  +
        /* BuilderGenerator.kt:314 */
   38     69   
    }
          70  +
    /* BuilderGenerator.kt:334 */
   39     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* BuilderGenerator.kt:336 */
   40     73   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::XmlNamespaceNested> {
          74  +
        /* BuilderGenerator.kt:337 */
   41     75   
        &self.nested
          76  +
        /* BuilderGenerator.kt:336 */
   42     77   
    }
   43         -
    /// Consumes the builder and constructs a [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlNamespacesOutput`](crate::operation::xml_namespaces::XmlNamespacesOutput).
          79  +
    /* BuilderGenerator.kt:253 */
   44     80   
    pub fn build(self) -> crate::operation::xml_namespaces::XmlNamespacesOutput {
   45         -
        crate::operation::xml_namespaces::XmlNamespacesOutput { nested: self.nested }
          81  +
        /* BuilderGenerator.kt:477 */
          82  +
        crate::operation::xml_namespaces::XmlNamespacesOutput {
          83  +
            /* BuilderGenerator.kt:481 */ nested: self.nested,
          84  +
            /* BuilderGenerator.kt:477 */
          85  +
        }
          86  +
        /* BuilderGenerator.kt:253 */
   46     87   
    }
          88  +
    /* BuilderGenerator.kt:355 */
   47     89   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_namespaces/builders.rs

@@ -1,1 +110,122 @@
    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::xml_namespaces::_xml_namespaces_output::XmlNamespacesOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_namespaces::_xml_namespaces_input::XmlNamespacesInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
    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::xml_namespaces::XmlNamespacesOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_namespaces::XmlNamespacesError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_namespaces();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlNamespaces`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlNamespaces`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct XmlNamespacesFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder,
   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::xml_namespaces::XmlNamespacesOutput,
   34     40   
        crate::operation::xml_namespaces::XmlNamespacesError,
   35     41   
    > for XmlNamespacesFluentBuilder
   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::xml_namespaces::XmlNamespacesOutput,
   43     49   
            crate::operation::xml_namespaces::XmlNamespacesError,
   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 XmlNamespacesFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `XmlNamespacesFluentBuilder`.
   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 XmlNamespaces as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::xml_namespaces::builders::XmlNamespacesInputBuilder {
   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::xml_namespaces::XmlNamespacesOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::xml_namespaces::XmlNamespacesError,
   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::xml_namespaces::XmlNamespaces::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::xml_namespaces::XmlNamespaces::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::xml_namespaces::XmlNamespacesOutput,
   96    106   
        crate::operation::xml_namespaces::XmlNamespacesError,
   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   
    }
         121  +
    /* FluentBuilderGenerator.kt:282 */
  110    122   
}

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps.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 `XmlTimestamps`.
           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 XmlTimestamps;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl XmlTimestamps {
    7         -
    /// Creates a new `XmlTimestamps`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `XmlTimestamps`
          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::xml_timestamps::XmlTimestampsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::xml_timestamps::XmlTimestampsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::xml_timestamps::XmlTimestampsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +262,279 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for XmlTimestamps {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("XmlTimestamps");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            XmlTimestampsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            XmlTimestampsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "XmlTimestamps",
  105    116   
            "Query Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("XmlTimestamps")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(XmlTimestampsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::xml_timestamps::XmlTimestampsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::xml_timestamps::XmlTimestampsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct XmlTimestampsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for XmlTimestampsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_xml_timestamps::de_xml_timestamps_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_xml_timestamps::de_xml_timestamps_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct XmlTimestampsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for XmlTimestampsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::xml_timestamps::XmlTimestampsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::xml_timestamps::XmlTimestampsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::xml_timestamps::XmlTimestampsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-www-form-urlencoded");
  187    200   
            builder
  188    201   
        };
  189    202   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_xml_timestamps_input::ser_xml_timestamps_input_input_input(
  190    203   
            &input,
  191    204   
        )?);
  192    205   
  193    206   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  194    207   
    }
  195    208   
}
         209  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  196    210   
#[derive(Debug)]
  197    211   
struct XmlTimestampsEndpointParamsInterceptor;
  198    212   
  199    213   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for XmlTimestampsEndpointParamsInterceptor {
  200    214   
    fn name(&self) -> &'static str {
  201    215   
        "XmlTimestampsEndpointParamsInterceptor"
  202    216   
    }
  203    217   
  204    218   
    fn read_before_execution(
  205    219   
        &self,
  206    220   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  207    221   
            '_,
  208    222   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  209    223   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  210    224   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  211    225   
        >,
  212    226   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  213    227   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  214    228   
        let _input = context
  215    229   
            .input()
  216    230   
            .downcast_ref::<XmlTimestampsInput>()
  217    231   
            .ok_or("failed to downcast to XmlTimestampsInput")?;
  218    232   
  219    233   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  220    234   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  221    235   
        })?;
  222    236   
        cfg.interceptor_state()
  223    237   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  224    238   
        ::std::result::Result::Ok(())
  225    239   
    }
  226    240   
}
  227    241   
  228    242   
// The get_* functions below are generated from JMESPath expressions in the
  229    243   
// operationContextParams trait. They target the operation's input shape.
  230    244   
         245  +
/* RustType.kt:516 */
  231    246   
#[allow(unreachable_code, unused_variables)]
         247  +
/* RustType.kt:516 */
  232    248   
#[cfg(test)]
         249  +
/* ProtocolTestGenerator.kt:98 */
  233    250   
mod xml_timestamps_test {
  234    251   
  235    252   
    /// Tests how normal timestamps are serialized
  236    253   
    /// Test ID: QueryXmlTimestamps
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn query_xml_timestamps_response() {
  240    257   
        let expected_output = crate::operation::xml_timestamps::XmlTimestampsOutput::builder()
  241    258   
            .set_normal(::std::option::Option::Some(::aws_smithy_types::DateTime::from_fractional_secs(
  242    259   
                1398796238, 0_f64,
@@ -652,669 +781,857 @@
  672    689   
            expected_output.epoch_seconds_on_target,
  673    690   
            "Unexpected value for `epoch_seconds_on_target`"
  674    691   
        );
  675    692   
        ::pretty_assertions::assert_eq!(parsed.http_date, expected_output.http_date, "Unexpected value for `http_date`");
  676    693   
        ::pretty_assertions::assert_eq!(
  677    694   
            parsed.http_date_on_target,
  678    695   
            expected_output.http_date_on_target,
  679    696   
            "Unexpected value for `http_date_on_target`"
  680    697   
        );
  681    698   
    }
         699  +
         700  +
    /* ProtocolTestGenerator.kt:98 */
  682    701   
}
  683    702   
         703  +
/* OperationErrorGenerator.kt:79 */
  684    704   
/// Error type for the `XmlTimestampsError` operation.
         705  +
/* RustType.kt:516 */
  685    706   
#[non_exhaustive]
         707  +
/* RustType.kt:516 */
  686    708   
#[derive(::std::fmt::Debug)]
  687         -
pub enum XmlTimestampsError {
         709  +
pub /* OperationErrorGenerator.kt:81 */ enum XmlTimestampsError {
         710  +
    /* OperationErrorGenerator.kt:88 */
  688    711   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  689    712   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  690    713   
    variable wildcard pattern and check `.code()`:
  691    714   
     \
  692    715   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  693    716   
     \
  694    717   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-XmlTimestampsError) for what information is available for the error.")]
  695    718   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         719  +
    /* OperationErrorGenerator.kt:81 */
  696    720   
}
         721  +
/* OperationErrorGenerator.kt:218 */
  697    722   
impl XmlTimestampsError {
         723  +
    /* OperationErrorGenerator.kt:219 */
  698    724   
    /// Creates the `XmlTimestampsError::Unhandled` variant from any error type.
  699    725   
    pub fn unhandled(
  700    726   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  701    727   
    ) -> Self {
  702    728   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  703    729   
            source: err.into(),
  704    730   
            meta: ::std::default::Default::default(),
  705    731   
        })
  706    732   
    }
  707    733   
  708    734   
    /// Creates the `XmlTimestampsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  709    735   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  710    736   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  711    737   
            source: err.clone().into(),
  712    738   
            meta: err,
  713    739   
        })
  714    740   
    }
  715         -
    ///
         741  +
    /// /* OperationErrorGenerator.kt:236 */
  716    742   
    /// Returns error metadata, which includes the error code, message,
  717    743   
    /// request ID, and potentially additional information.
  718    744   
    ///
         745  +
    /* OperationErrorGenerator.kt:242 */
  719    746   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         747  +
        /* OperationErrorGenerator.kt:243 */
  720    748   
        match self {
  721         -
            Self::Unhandled(e) => &e.meta,
         749  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         750  +
            /* OperationErrorGenerator.kt:243 */
  722    751   
        }
         752  +
        /* OperationErrorGenerator.kt:242 */
  723    753   
    }
         754  +
    /* OperationErrorGenerator.kt:218 */
  724    755   
}
         756  +
/* OperationErrorGenerator.kt:269 */
  725    757   
impl ::std::error::Error for XmlTimestampsError {
         758  +
    /* OperationErrorGenerator.kt:270 */
  726    759   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         760  +
        /* OperationErrorGenerator.kt:318 */
  727    761   
        match self {
  728         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         762  +
            /* OperationErrorGenerator.kt:326 */
         763  +
            Self::Unhandled(_inner) => {
         764  +
                /* OperationErrorGenerator.kt:279 */
         765  +
                ::std::option::Option::Some(&*_inner.source)
         766  +
                /* OperationErrorGenerator.kt:326 */
         767  +
            } /* OperationErrorGenerator.kt:318 */
  729    768   
        }
         769  +
        /* OperationErrorGenerator.kt:270 */
  730    770   
    }
         771  +
    /* OperationErrorGenerator.kt:269 */
  731    772   
}
         773  +
/* OperationErrorGenerator.kt:133 */
  732    774   
impl ::std::fmt::Display for XmlTimestampsError {
         775  +
    /* OperationErrorGenerator.kt:134 */
  733    776   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         777  +
        /* OperationErrorGenerator.kt:318 */
  734    778   
        match self {
         779  +
            /* OperationErrorGenerator.kt:326 */
  735    780   
            Self::Unhandled(_inner) => {
         781  +
                /* OperationErrorGenerator.kt:139 */
  736    782   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  737    783   
                    write!(f, "unhandled error ({code})")
  738    784   
                } else {
  739    785   
                    f.write_str("unhandled error")
  740    786   
                }
  741         -
            }
         787  +
                /* OperationErrorGenerator.kt:326 */
         788  +
            } /* OperationErrorGenerator.kt:318 */
  742    789   
        }
         790  +
        /* OperationErrorGenerator.kt:134 */
  743    791   
    }
         792  +
    /* OperationErrorGenerator.kt:133 */
  744    793   
}
         794  +
/* OperationErrorGenerator.kt:182 */
  745    795   
impl ::aws_smithy_types::retry::ProvideErrorKind for XmlTimestampsError {
         796  +
    /* OperationErrorGenerator.kt:186 */
  746    797   
    fn code(&self) -> ::std::option::Option<&str> {
         798  +
        /* OperationErrorGenerator.kt:187 */
  747    799   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         800  +
        /* OperationErrorGenerator.kt:186 */
  748    801   
    }
         802  +
    /* OperationErrorGenerator.kt:190 */
  749    803   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         804  +
        /* OperationErrorGenerator.kt:197 */
  750    805   
        ::std::option::Option::None
         806  +
        /* OperationErrorGenerator.kt:190 */
  751    807   
    }
         808  +
    /* OperationErrorGenerator.kt:182 */
  752    809   
}
         810  +
/* OperationErrorGenerator.kt:163 */
  753    811   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for XmlTimestampsError {
         812  +
    /* OperationErrorGenerator.kt:164 */
  754    813   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         814  +
        /* OperationErrorGenerator.kt:318 */
  755    815   
        match self {
  756         -
            Self::Unhandled(_inner) => &_inner.meta,
         816  +
            /* OperationErrorGenerator.kt:326 */
         817  +
            Self::Unhandled(_inner) => {
         818  +
                /* OperationErrorGenerator.kt:168 */
         819  +
                &_inner.meta
         820  +
                /* OperationErrorGenerator.kt:326 */
         821  +
            } /* OperationErrorGenerator.kt:318 */
  757    822   
        }
         823  +
        /* OperationErrorGenerator.kt:164 */
  758    824   
    }
         825  +
    /* OperationErrorGenerator.kt:163 */
  759    826   
}
         827  +
/* OperationErrorGenerator.kt:109 */
  760    828   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for XmlTimestampsError {
         829  +
    /* OperationErrorGenerator.kt:110 */
  761    830   
    fn create_unhandled_error(
  762    831   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  763    832   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  764    833   
    ) -> Self {
         834  +
        /* OperationErrorGenerator.kt:121 */
  765    835   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  766    836   
            source,
  767    837   
            meta: meta.unwrap_or_default(),
  768    838   
        })
         839  +
        /* OperationErrorGenerator.kt:110 */
  769    840   
    }
         841  +
    /* OperationErrorGenerator.kt:109 */
  770    842   
}
  771    843   
         844  +
/* CodegenDelegator.kt:255 */
  772    845   
pub use crate::operation::xml_timestamps::_xml_timestamps_output::XmlTimestampsOutput;
  773    846   
         847  +
/* CodegenDelegator.kt:255 */
  774    848   
pub use crate::operation::xml_timestamps::_xml_timestamps_input::XmlTimestampsInput;
  775    849   
         850  +
/* RustModule.kt:172 */
  776    851   
mod _xml_timestamps_input;
  777    852   
         853  +
/* RustModule.kt:172 */
  778    854   
mod _xml_timestamps_output;
  779    855   
  780         -
/// Builders
         856  +
/// /* CodegenDelegator.kt:51 */Builders
  781    857   
pub mod builders;

tmp-codegen-diff/codegen-client-test/aws_query/rust-client-codegen/src/operation/xml_timestamps/_xml_timestamps_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 XmlTimestampsInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlTimestampsInput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl XmlTimestampsInput {
    7         -
    /// Creates a new builder-style object to manufacture [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::xml_timestamps::builders::XmlTimestampsInputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          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 XmlTimestampsInputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct XmlTimestampsInputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl XmlTimestampsInputBuilder {
   18         -
    /// Consumes the builder and constructs a [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlTimestampsInput`](crate::operation::xml_timestamps::XmlTimestampsInput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(
   20     33   
        self,
   21     34   
    ) -> ::std::result::Result<crate::operation::xml_timestamps::XmlTimestampsInput, ::aws_smithy_types::error::operation::BuildError> {
   22         -
        ::std::result::Result::Ok(crate::operation::xml_timestamps::XmlTimestampsInput {})
          35  +
        /* BuilderGenerator.kt:254 */
          36  +
        ::std::result::Result::Ok(
          37  +
            /* BuilderGenerator.kt:477 */
          38  +
            crate::operation::xml_timestamps::XmlTimestampsInput {
          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/aws_query/rust-client-codegen/src/operation/xml_timestamps/_xml_timestamps_output.rs

@@ -1,1 +181,335 @@
    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 XmlTimestampsOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct XmlTimestampsOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub normal: ::std::option::Option<::aws_smithy_types::DateTime>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
          21  +
    /* StructureGenerator.kt:231 */
   14     22   
    #[allow(missing_docs)] // documentation missing in model
   15     23   
    pub epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          24  +
    /* StructureGenerator.kt:231 */
   16     25   
    #[allow(missing_docs)] // documentation missing in model
   17     26   
    pub http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
          27  +
    /* StructureGenerator.kt:231 */
   18     28   
    #[allow(missing_docs)] // documentation missing in model
   19     29   
    pub http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
          30  +
    /* StructureGenerator.kt:201 */
   20     31   
}
          32  +
/* StructureGenerator.kt:135 */
   21     33   
impl XmlTimestampsOutput {
          34  +
    /* StructureGenerator.kt:231 */
   22     35   
    #[allow(missing_docs)] // documentation missing in model
          36  +
                           /* StructureGenerator.kt:166 */
   23     37   
    pub fn normal(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          38  +
        /* StructureGenerator.kt:170 */
   24     39   
        self.normal.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   25     41   
    }
          42  +
    /* StructureGenerator.kt:231 */
   26     43   
    #[allow(missing_docs)] // documentation missing in model
          44  +
                           /* StructureGenerator.kt:166 */
   27     45   
    pub fn date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          46  +
        /* StructureGenerator.kt:170 */
   28     47   
        self.date_time.as_ref()
          48  +
        /* StructureGenerator.kt:166 */
   29     49   
    }
          50  +
    /* StructureGenerator.kt:231 */
   30     51   
    #[allow(missing_docs)] // documentation missing in model
          52  +
                           /* StructureGenerator.kt:166 */
   31     53   
    pub fn date_time_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          54  +
        /* StructureGenerator.kt:170 */
   32     55   
        self.date_time_on_target.as_ref()
          56  +
        /* StructureGenerator.kt:166 */
   33     57   
    }
          58  +
    /* StructureGenerator.kt:231 */
   34     59   
    #[allow(missing_docs)] // documentation missing in model
          60  +
                           /* StructureGenerator.kt:166 */
   35     61   
    pub fn epoch_seconds(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          62  +
        /* StructureGenerator.kt:170 */
   36     63   
        self.epoch_seconds.as_ref()
          64  +
        /* StructureGenerator.kt:166 */
   37     65   
    }
          66  +
    /* StructureGenerator.kt:231 */
   38     67   
    #[allow(missing_docs)] // documentation missing in model
          68  +
                           /* StructureGenerator.kt:166 */
   39     69   
    pub fn epoch_seconds_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          70  +
        /* StructureGenerator.kt:170 */
   40     71   
        self.epoch_seconds_on_target.as_ref()
          72  +
        /* StructureGenerator.kt:166 */
   41     73   
    }
          74  +
    /* StructureGenerator.kt:231 */
   42     75   
    #[allow(missing_docs)] // documentation missing in model
          76  +
                           /* StructureGenerator.kt:166 */
   43     77   
    pub fn http_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          78  +
        /* StructureGenerator.kt:170 */
   44     79   
        self.http_date.as_ref()
          80  +
        /* StructureGenerator.kt:166 */
   45     81   
    }
          82  +
    /* StructureGenerator.kt:231 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* StructureGenerator.kt:166 */
   47     85   
    pub fn http_date_on_target(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          86  +
        /* StructureGenerator.kt:170 */
   48     87   
        self.http_date_on_target.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   49     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   50     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   51     93   
impl XmlTimestampsOutput {
   52         -
    /// Creates a new builder-style object to manufacture [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
          95  +
    /* BuilderGenerator.kt:175 */
   53     96   
    pub fn builder() -> crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   54     98   
        crate::operation::xml_timestamps::builders::XmlTimestampsOutputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   55    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   56    102   
}
   57    103   
   58         -
/// A builder for [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         105  +
/* RustType.kt:516 */
   59    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   60    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   61    110   
pub struct XmlTimestampsOutputBuilder {
   62         -
    pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
   63         -
    pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   64         -
    pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   65         -
    pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
   66         -
    pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
   67         -
    pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) normal: ::std::option::Option<::aws_smithy_types::DateTime>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) date_time_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds: ::std::option::Option<::aws_smithy_types::DateTime>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) epoch_seconds_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) http_date: ::std::option::Option<::aws_smithy_types::DateTime>,
         117  +
    /* BuilderGenerator.kt:275 */
   68    118   
    pub(crate) http_date_on_target: ::std::option::Option<::aws_smithy_types::DateTime>,
         119  +
    /* BuilderGenerator.kt:345 */
   69    120   
}
         121  +
/* BuilderGenerator.kt:355 */
   70    122   
impl XmlTimestampsOutputBuilder {
         123  +
    /* BuilderGenerator.kt:286 */
   71    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
                           /* BuilderGenerator.kt:291 */
   72    126   
    pub fn normal(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         127  +
        /* BuilderGenerator.kt:292 */
   73    128   
        self.normal = ::std::option::Option::Some(input);
         129  +
        /* BuilderGenerator.kt:293 */
   74    130   
        self
         131  +
        /* BuilderGenerator.kt:291 */
   75    132   
    }
         133  +
    /* BuilderGenerator.kt:312 */
   76    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:314 */
   77    136   
    pub fn set_normal(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         137  +
        /* BuilderGenerator.kt:315 */
   78    138   
        self.normal = input;
   79    139   
        self
         140  +
        /* BuilderGenerator.kt:314 */
   80    141   
    }
         142  +
    /* BuilderGenerator.kt:334 */
   81    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* BuilderGenerator.kt:336 */
   82    145   
    pub fn get_normal(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         146  +
        /* BuilderGenerator.kt:337 */
   83    147   
        &self.normal
         148  +
        /* BuilderGenerator.kt:336 */
   84    149   
    }
         150  +
    /* BuilderGenerator.kt:286 */
   85    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* BuilderGenerator.kt:291 */
   86    153   
    pub fn date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         154  +
        /* BuilderGenerator.kt:292 */
   87    155   
        self.date_time = ::std::option::Option::Some(input);
         156  +
        /* BuilderGenerator.kt:293 */
   88    157   
        self
         158  +
        /* BuilderGenerator.kt:291 */
   89    159   
    }
         160  +
    /* BuilderGenerator.kt:312 */
   90    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:314 */
   91    163   
    pub fn set_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         164  +
        /* BuilderGenerator.kt:315 */
   92    165   
        self.date_time = input;
   93    166   
        self
         167  +
        /* BuilderGenerator.kt:314 */
   94    168   
    }
         169  +
    /* BuilderGenerator.kt:334 */
   95    170   
    #[allow(missing_docs)] // documentation missing in model
         171  +
                           /* BuilderGenerator.kt:336 */
   96    172   
    pub fn get_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         173  +
        /* BuilderGenerator.kt:337 */
   97    174   
        &self.date_time
         175  +
        /* BuilderGenerator.kt:336 */
   98    176   
    }
         177  +
    /* BuilderGenerator.kt:286 */
   99    178   
    #[allow(missing_docs)] // documentation missing in model
         179  +
                           /* BuilderGenerator.kt:291 */
  100    180   
    pub fn date_time_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         181  +
        /* BuilderGenerator.kt:292 */
  101    182   
        self.date_time_on_target = ::std::option::Option::Some(input);
         183  +
        /* BuilderGenerator.kt:293 */
  102    184   
        self
         185  +
        /* BuilderGenerator.kt:291 */
  103    186   
    }
         187  +
    /* BuilderGenerator.kt:312 */
  104    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:314 */
  105    190   
    pub fn set_date_time_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         191  +
        /* BuilderGenerator.kt:315 */
  106    192   
        self.date_time_on_target = input;
  107    193   
        self
         194  +
        /* BuilderGenerator.kt:314 */
  108    195   
    }
         196  +
    /* BuilderGenerator.kt:334 */
  109    197   
    #[allow(missing_docs)] // documentation missing in model
         198  +
                           /* BuilderGenerator.kt:336 */
  110    199   
    pub fn get_date_time_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         200  +
        /* BuilderGenerator.kt:337 */
  111    201   
        &self.date_time_on_target
         202  +
        /* BuilderGenerator.kt:336 */
  112    203   
    }
         204  +
    /* BuilderGenerator.kt:286 */
  113    205   
    #[allow(missing_docs)] // documentation missing in model
         206  +
                           /* BuilderGenerator.kt:291 */
  114    207   
    pub fn epoch_seconds(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         208  +
        /* BuilderGenerator.kt:292 */
  115    209   
        self.epoch_seconds = ::std::option::Option::Some(input);
         210  +
        /* BuilderGenerator.kt:293 */
  116    211   
        self
         212  +
        /* BuilderGenerator.kt:291 */
  117    213   
    }
         214  +
    /* BuilderGenerator.kt:312 */
  118    215   
    #[allow(missing_docs)] // documentation missing in model
         216  +
                           /* BuilderGenerator.kt:314 */
  119    217   
    pub fn set_epoch_seconds(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         218  +
        /* BuilderGenerator.kt:315 */
  120    219   
        self.epoch_seconds = input;
  121    220   
        self
         221  +
        /* BuilderGenerator.kt:314 */
  122    222   
    }
         223  +
    /* BuilderGenerator.kt:334 */
  123    224   
    #[allow(missing_docs)] // documentation missing in model
         225  +
                           /* BuilderGenerator.kt:336 */
  124    226   
    pub fn get_epoch_seconds(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         227  +
        /* BuilderGenerator.kt:337 */
  125    228   
        &self.epoch_seconds
         229  +
        /* BuilderGenerator.kt:336 */
  126    230   
    }
         231  +
    /* BuilderGenerator.kt:286 */
  127    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* BuilderGenerator.kt:291 */
  128    234   
    pub fn epoch_seconds_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         235  +
        /* BuilderGenerator.kt:292 */
  129    236   
        self.epoch_seconds_on_target = ::std::option::Option::Some(input);
         237  +
        /* BuilderGenerator.kt:293 */
  130    238   
        self
         239  +
        /* BuilderGenerator.kt:291 */
  131    240   
    }
         241  +
    /* BuilderGenerator.kt:312 */
  132    242   
    #[allow(missing_docs)] // documentation missing in model
         243  +
                           /* BuilderGenerator.kt:314 */
  133    244   
    pub fn set_epoch_seconds_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         245  +
        /* BuilderGenerator.kt:315 */
  134    246   
        self.epoch_seconds_on_target = input;
  135    247   
        self
         248  +
        /* BuilderGenerator.kt:314 */
  136    249   
    }
         250  +
    /* BuilderGenerator.kt:334 */
  137    251   
    #[allow(missing_docs)] // documentation missing in model
         252  +
                           /* BuilderGenerator.kt:336 */
  138    253   
    pub fn get_epoch_seconds_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         254  +
        /* BuilderGenerator.kt:337 */
  139    255   
        &self.epoch_seconds_on_target
         256  +
        /* BuilderGenerator.kt:336 */
  140    257   
    }
         258  +
    /* BuilderGenerator.kt:286 */
  141    259   
    #[allow(missing_docs)] // documentation missing in model
         260  +
                           /* BuilderGenerator.kt:291 */
  142    261   
    pub fn http_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         262  +
        /* BuilderGenerator.kt:292 */
  143    263   
        self.http_date = ::std::option::Option::Some(input);
         264  +
        /* BuilderGenerator.kt:293 */
  144    265   
        self
         266  +
        /* BuilderGenerator.kt:291 */
  145    267   
    }
         268  +
    /* BuilderGenerator.kt:312 */
  146    269   
    #[allow(missing_docs)] // documentation missing in model
         270  +
                           /* BuilderGenerator.kt:314 */
  147    271   
    pub fn set_http_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         272  +
        /* BuilderGenerator.kt:315 */
  148    273   
        self.http_date = input;
  149    274   
        self
         275  +
        /* BuilderGenerator.kt:314 */
  150    276   
    }
         277  +
    /* BuilderGenerator.kt:334 */
  151    278   
    #[allow(missing_docs)] // documentation missing in model
         279  +
                           /* BuilderGenerator.kt:336 */
  152    280   
    pub fn get_http_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         281  +
        /* BuilderGenerator.kt:337 */
  153    282   
        &self.http_date
         283  +
        /* BuilderGenerator.kt:336 */
  154    284   
    }
         285  +
    /* BuilderGenerator.kt:286 */
  155    286   
    #[allow(missing_docs)] // documentation missing in model
         287  +
                           /* BuilderGenerator.kt:291 */
  156    288   
    pub fn http_date_on_target(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         289  +
        /* BuilderGenerator.kt:292 */
  157    290   
        self.http_date_on_target = ::std::option::Option::Some(input);
         291  +
        /* BuilderGenerator.kt:293 */
  158    292   
        self
         293  +
        /* BuilderGenerator.kt:291 */
  159    294   
    }
         295  +
    /* BuilderGenerator.kt:312 */
  160    296   
    #[allow(missing_docs)] // documentation missing in model
         297  +
                           /* BuilderGenerator.kt:314 */
  161    298   
    pub fn set_http_date_on_target(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         299  +
        /* BuilderGenerator.kt:315 */
  162    300   
        self.http_date_on_target = input;
  163    301   
        self
         302  +
        /* BuilderGenerator.kt:314 */
  164    303   
    }
         304  +
    /* BuilderGenerator.kt:334 */
  165    305   
    #[allow(missing_docs)] // documentation missing in model
         306  +
                           /* BuilderGenerator.kt:336 */
  166    307   
    pub fn get_http_date_on_target(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         308  +
        /* BuilderGenerator.kt:337 */
  167    309   
        &self.http_date_on_target
         310  +
        /* BuilderGenerator.kt:336 */
  168    311   
    }
  169         -
    /// Consumes the builder and constructs a [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         312  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`XmlTimestampsOutput`](crate::operation::xml_timestamps::XmlTimestampsOutput).
         313  +
    /* BuilderGenerator.kt:253 */
  170    314   
    pub fn build(self) -> crate::operation::xml_timestamps::XmlTimestampsOutput {
         315  +
        /* BuilderGenerator.kt:477 */
  171    316   
        crate::operation::xml_timestamps::XmlTimestampsOutput {
  172         -
            normal: self.normal,
         317  +
            /* BuilderGenerator.kt:481 */ normal: self.normal,
         318  +
            /* BuilderGenerator.kt:481 */
  173    319   
            date_time: self.date_time,
         320  +
            /* BuilderGenerator.kt:481 */
  174    321   
            date_time_on_target: self.date_time_on_target,
         322  +
            /* BuilderGenerator.kt:481 */
  175    323   
            epoch_seconds: self.epoch_seconds,
         324  +
            /* BuilderGenerator.kt:481 */
  176    325   
            epoch_seconds_on_target: self.epoch_seconds_on_target,
         326  +
            /* BuilderGenerator.kt:481 */
  177    327   
            http_date: self.http_date,
         328  +
            /* BuilderGenerator.kt:481 */
  178    329   
            http_date_on_target: self.http_date_on_target,
         330  +
            /* BuilderGenerator.kt:477 */
  179    331   
        }
         332  +
        /* BuilderGenerator.kt:253 */
  180    333   
    }
         334  +
    /* BuilderGenerator.kt:355 */
  181    335   
}