Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header.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 `StringHeader`.
           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 StringHeader;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl StringHeader {
    7         -
    /// Creates a new `StringHeader`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `StringHeader`
          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::string_header::StringHeaderInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::string_header::StringHeaderOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::string_header::StringHeaderError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +376,452 @@
   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 StringHeader {
   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("StringHeader");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            StringHeaderRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            StringHeaderResponseDeserializer,
   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   
            "StringHeader",
  105    116   
            "Rest XML 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("StringHeader")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(StringHeaderEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::string_header::StringHeaderError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::string_header::StringHeaderError,
  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 StringHeaderResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for StringHeaderResponseDeserializer {
  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_string_header::de_string_header_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_string_header::de_string_header_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 StringHeaderRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for StringHeaderRequestSerializer {
  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::string_header::StringHeaderInput>()
  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::string_header::StringHeaderInput,
  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, "/StringHeader").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::string_header::StringHeaderInput,
  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
  187    200   
        };
  188    201   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  189    202   
  190    203   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  191    204   
    }
  192    205   
}
         206  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  193    207   
#[derive(Debug)]
  194    208   
struct StringHeaderEndpointParamsInterceptor;
  195    209   
  196    210   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for StringHeaderEndpointParamsInterceptor {
  197    211   
    fn name(&self) -> &'static str {
  198    212   
        "StringHeaderEndpointParamsInterceptor"
  199    213   
    }
  200    214   
  201    215   
    fn read_before_execution(
  202    216   
        &self,
  203    217   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  204    218   
            '_,
  205    219   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  206    220   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  207    221   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  208    222   
        >,
  209    223   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  210    224   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  211    225   
        let _input = context
  212    226   
            .input()
  213    227   
            .downcast_ref::<StringHeaderInput>()
  214    228   
            .ok_or("failed to downcast to StringHeaderInput")?;
  215    229   
  216    230   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  218    232   
        })?;
  219    233   
        cfg.interceptor_state()
  220    234   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  221    235   
        ::std::result::Result::Ok(())
  222    236   
    }
  223    237   
}
  224    238   
  225    239   
// The get_* functions below are generated from JMESPath expressions in the
  226    240   
// operationContextParams trait. They target the operation's input shape.
  227    241   
         242  +
/* RustType.kt:516 */
  228    243   
#[allow(unreachable_code, unused_variables)]
         244  +
/* RustType.kt:516 */
  229    245   
#[cfg(test)]
         246  +
/* ProtocolTestGenerator.kt:98 */
  230    247   
mod string_header_test {
  231    248   
  232    249   
    /// Regression test for https://github.com/awslabs/aws-sdk-rust/issues/122
  233    250   
    /// where `,` was eagerly used to split fields in cases where the input was not
  234    251   
    /// a list.
  235    252   
    ///
  236    253   
    /// Test ID: DeserHeaderStringCommas
  237    254   
    #[::tokio::test]
  238    255   
    #[::tracing_test::traced_test]
  239    256   
    async fn deser_header_string_commas_response() {
  240    257   
        let expected_output = crate::operation::string_header::StringHeaderOutput::builder()
  241    258   
            .set_field(::std::option::Option::Some("a,b,c".to_owned()))
  242    259   
            .build();
  243    260   
        let mut http_response = ::aws_smithy_runtime_api::http::Response::try_from(
  244    261   
            ::http::response::Builder::new()
  245    262   
                .header("x-field", "a,b,c")
  246    263   
                .status(200)
  247    264   
                .body(::aws_smithy_types::body::SdkBody::from(""))
  248    265   
                .unwrap(),
  249    266   
        )
  250    267   
        .unwrap();
  251    268   
        use ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin;
  252    269   
        use ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse;
  253    270   
  254    271   
        let op = crate::operation::string_header::StringHeader::new();
  255    272   
        let config = op.config().expect("the operation has config");
  256    273   
        let de = config
  257    274   
            .load::<::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer>()
  258    275   
            .expect("the config must have a deserializer");
  259    276   
  260    277   
        let parsed = de.deserialize_streaming(&mut http_response);
  261    278   
        let parsed = parsed.unwrap_or_else(|| {
  262    279   
            let http_response = http_response.map(|body| {
  263    280   
                ::aws_smithy_types::body::SdkBody::from(::bytes::Bytes::copy_from_slice(&::aws_smithy_protocol_test::decode_body_data(
  264    281   
                    body.bytes().unwrap(),
  265    282   
                    ::aws_smithy_protocol_test::MediaType::from("unknown"),
  266    283   
                )))
  267    284   
            });
  268    285   
            de.deserialize_nonstreaming(&http_response)
  269    286   
        });
  270    287   
        let parsed = parsed
  271    288   
            .expect("should be successful response")
  272    289   
            .downcast::<crate::operation::string_header::StringHeaderOutput>()
  273    290   
            .unwrap();
  274    291   
        ::pretty_assertions::assert_eq!(parsed.field, expected_output.field, "Unexpected value for `field`");
  275    292   
        ::pretty_assertions::assert_eq!(parsed.enum_header, expected_output.enum_header, "Unexpected value for `enum_header`");
  276    293   
    }
         294  +
         295  +
    /* ProtocolTestGenerator.kt:98 */
  277    296   
}
  278    297   
         298  +
/* OperationErrorGenerator.kt:79 */
  279    299   
/// Error type for the `StringHeaderError` operation.
         300  +
/* RustType.kt:516 */
  280    301   
#[non_exhaustive]
         302  +
/* RustType.kt:516 */
  281    303   
#[derive(::std::fmt::Debug)]
  282         -
pub enum StringHeaderError {
         304  +
pub /* OperationErrorGenerator.kt:81 */ enum StringHeaderError {
         305  +
    /* OperationErrorGenerator.kt:88 */
  283    306   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  284    307   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  285    308   
    variable wildcard pattern and check `.code()`:
  286    309   
     \
  287    310   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  288    311   
     \
  289    312   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-StringHeaderError) for what information is available for the error.")]
  290    313   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         314  +
    /* OperationErrorGenerator.kt:81 */
  291    315   
}
         316  +
/* OperationErrorGenerator.kt:218 */
  292    317   
impl StringHeaderError {
         318  +
    /* OperationErrorGenerator.kt:219 */
  293    319   
    /// Creates the `StringHeaderError::Unhandled` variant from any error type.
  294    320   
    pub fn unhandled(
  295    321   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  296    322   
    ) -> Self {
  297    323   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  298    324   
            source: err.into(),
  299    325   
            meta: ::std::default::Default::default(),
  300    326   
        })
  301    327   
    }
  302    328   
  303    329   
    /// Creates the `StringHeaderError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  304    330   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  305    331   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  306    332   
            source: err.clone().into(),
  307    333   
            meta: err,
  308    334   
        })
  309    335   
    }
  310         -
    ///
         336  +
    /// /* OperationErrorGenerator.kt:236 */
  311    337   
    /// Returns error metadata, which includes the error code, message,
  312    338   
    /// request ID, and potentially additional information.
  313    339   
    ///
         340  +
    /* OperationErrorGenerator.kt:242 */
  314    341   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         342  +
        /* OperationErrorGenerator.kt:243 */
  315    343   
        match self {
  316         -
            Self::Unhandled(e) => &e.meta,
         344  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         345  +
            /* OperationErrorGenerator.kt:243 */
  317    346   
        }
         347  +
        /* OperationErrorGenerator.kt:242 */
  318    348   
    }
         349  +
    /* OperationErrorGenerator.kt:218 */
  319    350   
}
         351  +
/* OperationErrorGenerator.kt:269 */
  320    352   
impl ::std::error::Error for StringHeaderError {
         353  +
    /* OperationErrorGenerator.kt:270 */
  321    354   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         355  +
        /* OperationErrorGenerator.kt:318 */
  322    356   
        match self {
  323         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         357  +
            /* OperationErrorGenerator.kt:326 */
         358  +
            Self::Unhandled(_inner) => {
         359  +
                /* OperationErrorGenerator.kt:279 */
         360  +
                ::std::option::Option::Some(&*_inner.source)
         361  +
                /* OperationErrorGenerator.kt:326 */
         362  +
            } /* OperationErrorGenerator.kt:318 */
  324    363   
        }
         364  +
        /* OperationErrorGenerator.kt:270 */
  325    365   
    }
         366  +
    /* OperationErrorGenerator.kt:269 */
  326    367   
}
         368  +
/* OperationErrorGenerator.kt:133 */
  327    369   
impl ::std::fmt::Display for StringHeaderError {
         370  +
    /* OperationErrorGenerator.kt:134 */
  328    371   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         372  +
        /* OperationErrorGenerator.kt:318 */
  329    373   
        match self {
         374  +
            /* OperationErrorGenerator.kt:326 */
  330    375   
            Self::Unhandled(_inner) => {
         376  +
                /* OperationErrorGenerator.kt:139 */
  331    377   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  332    378   
                    write!(f, "unhandled error ({code})")
  333    379   
                } else {
  334    380   
                    f.write_str("unhandled error")
  335    381   
                }
         382  +
                /* OperationErrorGenerator.kt:326 */
         383  +
            } /* OperationErrorGenerator.kt:318 */
  336    384   
        }
         385  +
        /* OperationErrorGenerator.kt:134 */
  337    386   
    }
  338         -
    }
         387  +
    /* OperationErrorGenerator.kt:133 */
  339    388   
}
         389  +
/* OperationErrorGenerator.kt:182 */
  340    390   
impl ::aws_smithy_types::retry::ProvideErrorKind for StringHeaderError {
         391  +
    /* OperationErrorGenerator.kt:186 */
  341    392   
    fn code(&self) -> ::std::option::Option<&str> {
         393  +
        /* OperationErrorGenerator.kt:187 */
  342    394   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         395  +
        /* OperationErrorGenerator.kt:186 */
  343    396   
    }
         397  +
    /* OperationErrorGenerator.kt:190 */
  344    398   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         399  +
        /* OperationErrorGenerator.kt:197 */
  345    400   
        ::std::option::Option::None
         401  +
        /* OperationErrorGenerator.kt:190 */
  346    402   
    }
         403  +
    /* OperationErrorGenerator.kt:182 */
  347    404   
}
         405  +
/* OperationErrorGenerator.kt:163 */
  348    406   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for StringHeaderError {
         407  +
    /* OperationErrorGenerator.kt:164 */
  349    408   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         409  +
        /* OperationErrorGenerator.kt:318 */
  350    410   
        match self {
  351         -
            Self::Unhandled(_inner) => &_inner.meta,
         411  +
            /* OperationErrorGenerator.kt:326 */
         412  +
            Self::Unhandled(_inner) => {
         413  +
                /* OperationErrorGenerator.kt:168 */
         414  +
                &_inner.meta
         415  +
                /* OperationErrorGenerator.kt:326 */
         416  +
            } /* OperationErrorGenerator.kt:318 */
  352    417   
        }
         418  +
        /* OperationErrorGenerator.kt:164 */
  353    419   
    }
         420  +
    /* OperationErrorGenerator.kt:163 */
  354    421   
}
         422  +
/* OperationErrorGenerator.kt:109 */
  355    423   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for StringHeaderError {
         424  +
    /* OperationErrorGenerator.kt:110 */
  356    425   
    fn create_unhandled_error(
  357    426   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  358    427   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  359    428   
    ) -> Self {
         429  +
        /* OperationErrorGenerator.kt:121 */
  360    430   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  361    431   
            source,
  362    432   
            meta: meta.unwrap_or_default(),
  363    433   
        })
         434  +
        /* OperationErrorGenerator.kt:110 */
  364    435   
    }
         436  +
    /* OperationErrorGenerator.kt:109 */
  365    437   
}
  366    438   
         439  +
/* CodegenDelegator.kt:255 */
  367    440   
pub use crate::operation::string_header::_string_header_output::StringHeaderOutput;
  368    441   
         442  +
/* CodegenDelegator.kt:255 */
  369    443   
pub use crate::operation::string_header::_string_header_input::StringHeaderInput;
  370    444   
         445  +
/* RustModule.kt:172 */
  371    446   
mod _string_header_input;
  372    447   
         448  +
/* RustModule.kt:172 */
  373    449   
mod _string_header_output;
  374    450   
  375         -
/// Builders
         451  +
/// /* CodegenDelegator.kt:51 */Builders
  376    452   
pub mod builders;

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/string_header/_string_header_output.rs

@@ -1,1 +71,129 @@
    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 StringHeaderOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct StringHeaderOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub field: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub enum_header: ::std::option::Option<crate::types::StringEnum>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl StringHeaderOutput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn field(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.field.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   16     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   17     30   
    pub fn enum_header(&self) -> ::std::option::Option<&crate::types::StringEnum> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.enum_header.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl StringHeaderOutput {
   22         -
    /// Creates a new builder-style object to manufacture [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::string_header::builders::StringHeaderOutputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::string_header::builders::StringHeaderOutputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
          50  +
/* RustType.kt:516 */
   29     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   30     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   31     55   
pub struct StringHeaderOutputBuilder {
   32         -
    pub(crate) field: ::std::option::Option<::std::string::String>,
   33         -
    pub(crate) enum_header: ::std::option::Option<crate::types::StringEnum>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) field: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) enum_header: ::std::option::Option<crate::types::StringEnum>,
          58  +
    /* BuilderGenerator.kt:345 */
   34     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   35     61   
impl StringHeaderOutputBuilder {
          62  +
    /* BuilderGenerator.kt:286 */
   36     63   
    #[allow(missing_docs)] // documentation missing in model
          64  +
                           /* BuilderGenerator.kt:291 */
   37     65   
    pub fn field(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   38     67   
        self.field = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   39     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   40     71   
    }
          72  +
    /* BuilderGenerator.kt:312 */
   41     73   
    #[allow(missing_docs)] // documentation missing in model
          74  +
                           /* BuilderGenerator.kt:314 */
   42     75   
    pub fn set_field(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   43     77   
        self.field = input;
   44     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   45     80   
    }
          81  +
    /* BuilderGenerator.kt:334 */
   46     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:336 */
   47     84   
    pub fn get_field(&self) -> &::std::option::Option<::std::string::String> {
          85  +
        /* BuilderGenerator.kt:337 */
   48     86   
        &self.field
          87  +
        /* BuilderGenerator.kt:336 */
   49     88   
    }
          89  +
    /* BuilderGenerator.kt:286 */
   50     90   
    #[allow(missing_docs)] // documentation missing in model
          91  +
                           /* BuilderGenerator.kt:291 */
   51     92   
    pub fn enum_header(mut self, input: crate::types::StringEnum) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   52     94   
        self.enum_header = ::std::option::Option::Some(input);
          95  +
        /* BuilderGenerator.kt:293 */
   53     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   54     98   
    }
          99  +
    /* BuilderGenerator.kt:312 */
   55    100   
    #[allow(missing_docs)] // documentation missing in model
         101  +
                           /* BuilderGenerator.kt:314 */
   56    102   
    pub fn set_enum_header(mut self, input: ::std::option::Option<crate::types::StringEnum>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   57    104   
        self.enum_header = input;
   58    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   59    107   
    }
         108  +
    /* BuilderGenerator.kt:334 */
   60    109   
    #[allow(missing_docs)] // documentation missing in model
         110  +
                           /* BuilderGenerator.kt:336 */
   61    111   
    pub fn get_enum_header(&self) -> &::std::option::Option<crate::types::StringEnum> {
         112  +
        /* BuilderGenerator.kt:337 */
   62    113   
        &self.enum_header
         114  +
        /* BuilderGenerator.kt:336 */
   63    115   
    }
   64         -
    /// Consumes the builder and constructs a [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
         116  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`StringHeaderOutput`](crate::operation::string_header::StringHeaderOutput).
         117  +
    /* BuilderGenerator.kt:253 */
   65    118   
    pub fn build(self) -> crate::operation::string_header::StringHeaderOutput {
         119  +
        /* BuilderGenerator.kt:477 */
   66    120   
        crate::operation::string_header::StringHeaderOutput {
   67         -
            field: self.field,
         121  +
            /* BuilderGenerator.kt:481 */ field: self.field,
         122  +
            /* BuilderGenerator.kt:481 */
   68    123   
            enum_header: self.enum_header,
         124  +
            /* BuilderGenerator.kt:477 */
   69    125   
        }
         126  +
        /* BuilderGenerator.kt:253 */
   70    127   
    }
         128  +
    /* BuilderGenerator.kt:355 */
   71    129   
}

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/xml_maps_flattened_nested_xml_namespace/_xml_maps_flattened_nested_xml_namespace_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/xml_maps_flattened_nested_xml_namespace/_xml_maps_flattened_nested_xml_namespace_output.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml_extras/rust-client-codegen/src/operation/xml_maps_flattened_nested_xml_namespace/builders.rs

@@ -1,1 +143,161 @@
    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_flattened_nested_xml_namespace::_xml_maps_flattened_nested_xml_namespace_output::XmlMapsFlattenedNestedXmlNamespaceOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::xml_maps_flattened_nested_xml_namespace::_xml_maps_flattened_nested_xml_namespace_input::XmlMapsFlattenedNestedXmlNamespaceInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::xml_maps_flattened_nested_xml_namespace::builders::XmlMapsFlattenedNestedXmlNamespaceInputBuilder {
    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_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.xml_maps_flattened_nested_xml_namespace();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `XmlMapsFlattenedNestedXmlNamespace`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `XmlMapsFlattenedNestedXmlNamespace`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct XmlMapsFlattenedNestedXmlNamespaceFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::xml_maps_flattened_nested_xml_namespace::builders::XmlMapsFlattenedNestedXmlNamespaceInputBuilder,
   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_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   34     40   
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   35     41   
    > for XmlMapsFlattenedNestedXmlNamespaceFluentBuilder
   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_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   43     49   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   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 XmlMapsFlattenedNestedXmlNamespaceFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `XmlMapsFlattenedNestedXmlNamespaceFluentBuilder`.
   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 XmlMapsFlattenedNestedXmlNamespace as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::xml_maps_flattened_nested_xml_namespace::builders::XmlMapsFlattenedNestedXmlNamespaceInputBuilder {
   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_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   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 =
   84     94   
            crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespace::operation_runtime_plugins(
   85     95   
                self.handle.runtime_plugins.clone(),
   86     96   
                &self.handle.conf,
   87     97   
                self.config_override,
   88     98   
            );
   89     99   
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespace::orchestrate(&runtime_plugins, input).await
   90    100   
    }
   91    101   
   92    102   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   93    103   
    pub fn customize(
   94    104   
        self,
   95    105   
    ) -> crate::client::customize::CustomizableOperation<
   96    106   
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceOutput,
   97    107   
        crate::operation::xml_maps_flattened_nested_xml_namespace::XmlMapsFlattenedNestedXmlNamespaceError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
  111         -
    ///
         122  +
    /// /* FluentBuilderGenerator.kt:466 */
  112    123   
    /// Adds a key-value pair to `myMap`.
  113    124   
    ///
  114    125   
    /// To override the contents of this collection use [`set_my_map`](Self::set_my_map).
  115    126   
    ///
         127  +
    /* FluentBuilderGenerator.kt:473 */
  116    128   
    #[allow(missing_docs)] // documentation missing in model
         129  +
                           /* FluentBuilderGenerator.kt:475 */
  117    130   
    pub fn my_map(
  118    131   
        mut self,
  119    132   
        k: impl ::std::convert::Into<::std::string::String>,
  120    133   
        v: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  121    134   
    ) -> Self {
  122    135   
        self.inner = self.inner.my_map(k.into(), v);
  123    136   
        self
  124    137   
    }
         138  +
    /* FluentBuilderGenerator.kt:498 */
  125    139   
    #[allow(missing_docs)] // documentation missing in model
         140  +
                           /* FluentBuilderGenerator.kt:500 */
  126    141   
    pub fn set_my_map(
  127    142   
        mut self,
  128    143   
        input: ::std::option::Option<
  129    144   
            ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  130    145   
        >,
  131    146   
    ) -> Self {
  132    147   
        self.inner = self.inner.set_my_map(input);
  133    148   
        self
  134    149   
    }
         150  +
    /* FluentBuilderGenerator.kt:518 */
  135    151   
    #[allow(missing_docs)] // documentation missing in model
         152  +
                           /* FluentBuilderGenerator.kt:520 */
  136    153   
    pub fn get_my_map(
  137    154   
        &self,
  138    155   
    ) -> &::std::option::Option<
  139    156   
        ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  140    157   
    > {
  141    158   
        self.inner.get_my_map()
  142    159   
    }
         160  +
    /* FluentBuilderGenerator.kt:282 */
  143    161   
}

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

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

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

@@ -1,1 +21,29 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Opaque struct used as inner data for the `Unknown` variant defined in enums in
           2  +
/* ClientEnumGenerator.kt:189 */
           3  +
/// /* ClientEnumGenerator.kt:189 */Opaque struct used as inner data for the `Unknown` variant defined in enums in
    4      4   
/// the crate.
    5      5   
///
    6      6   
/// This is not intended to be used directly.
           7  +
/* RustType.kt:516 */
    7      8   
#[non_exhaustive]
           9  +
/* RustType.kt:516 */
    8     10   
#[derive(
    9     11   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   10     12   
)]
   11         -
pub struct UnknownVariantValue(pub(crate) ::std::string::String);
          13  +
pub /* ClientEnumGenerator.kt:203 */ struct UnknownVariantValue(pub(crate) ::std::string::String);
          14  +
/* ClientEnumGenerator.kt:204 */
   12     15   
impl UnknownVariantValue {
          16  +
    /* ClientEnumGenerator.kt:206 */
   13     17   
    pub(crate) fn as_str(&self) -> &str {
          18  +
        /* ClientEnumGenerator.kt:207 */
   14     19   
        &self.0
          20  +
        /* ClientEnumGenerator.kt:206 */
   15     21   
    }
          22  +
    /* ClientEnumGenerator.kt:204 */
   16     23   
}
          24  +
/* ClientEnumGenerator.kt:210 */
   17     25   
impl ::std::fmt::Display for UnknownVariantValue {
   18     26   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
   19     27   
        write!(f, "{}", self.0)
   20     28   
    }
   21     29   
}

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

@@ -1,1 +53,57 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ResponseDeserializerGenerator.kt:170 */
    2      3   
pub(crate) fn type_erase_result<O, E>(
    3      4   
    result: ::std::result::Result<O, E>,
    4      5   
) -> ::std::result::Result<
    5      6   
    ::aws_smithy_runtime_api::client::interceptors::context::Output,
    6      7   
    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
    7      8   
>
    8      9   
where
    9     10   
    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   10     11   
    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
   11     12   
{
   12     13   
    result
   13     14   
        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
   14     15   
        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
   15     16   
        .map_err(::std::convert::Into::into)
   16     17   
}
   17     18   
          19  +
/* RestXml.kt:61 */
   18     20   
pub fn parse_http_error_metadata(
   19     21   
    _response_status: u16,
   20     22   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   21     23   
    response_body: &[u8],
   22     24   
) -> ::std::result::Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_xml::decode::XmlDecodeError> {
          25  +
    /* RestXml.kt:65 */
   23     26   
    crate::rest_xml_wrapped_errors::parse_error_metadata(response_body)
          27  +
    /* RestXml.kt:61 */
   24     28   
}
   25     29   
   26     30   
pub(crate) mod shape_attribute_party;
   27     31   
   28     32   
pub(crate) mod shape_checksum_required;
   29     33   
   30     34   
pub(crate) mod shape_create_foo;
   31     35   
   32     36   
pub(crate) mod shape_enum_keys;
   33     37   

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

@@ -1,1 +91,156 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_attribute_party_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::attribute_party::AttributePartyOutput, crate::operation::attribute_party::AttributePartyError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::attribute_party::AttributePartyError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::attribute_party::AttributePartyError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_attribute_party_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::attribute_party::AttributePartyOutput, crate::operation::attribute_party::AttributePartyError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::attribute_party::builders::AttributePartyOutputBuilder::default();
          36  +
        /* ProtocolParserGenerator.kt:247 */
   24     37   
        output = crate::protocol_serde::shape_attribute_party::de_attribute_party(_response_body, output)
   25     38   
            .map_err(crate::operation::attribute_party::AttributePartyError::unhandled)?;
          39  +
        /* ClientBuilderInstantiator.kt:56 */
   26     40   
        output.build()
          41  +
        /* ProtocolParserGenerator.kt:77 */
   27     42   
    })
          43  +
    /* ProtocolParserGenerator.kt:71 */
   28     44   
}
   29     45   
          46  +
/* RustType.kt:516 */
   30     47   
#[allow(unused_mut)]
          48  +
/* XmlBindingTraitParserGenerator.kt:189 */
   31     49   
pub fn de_attribute_party(
   32     50   
    inp: &[u8],
   33     51   
    mut builder: crate::operation::attribute_party::builders::AttributePartyOutputBuilder,
   34     52   
) -> std::result::Result<crate::operation::attribute_party::builders::AttributePartyOutputBuilder, ::aws_smithy_xml::decode::XmlDecodeError> {
          53  +
    /* XmlBindingTraitParserGenerator.kt:194 */
   35     54   
    let mut doc = ::aws_smithy_xml::decode::Document::try_from(inp)?;
   36     55   
   37     56   
    #[allow(unused_mut)]
   38     57   
    let mut decoder = doc.root_element()?;
   39     58   
    #[allow(unused_variables)]
   40     59   
    let start_el = decoder.start_el();
          60  +
    /* RestXmlParserGenerator.kt:36 */
   41     61   
    if !start_el.matches("AttributePartyInputOutput") {
   42     62   
        return Err(::aws_smithy_xml::decode::XmlDecodeError::custom(format!(
   43     63   
            "encountered invalid XML root: expected AttributePartyInputOutput but got {:?}. This is likely a bug in the SDK.",
   44     64   
            start_el
   45     65   
        )));
   46     66   
    }
   47         -
    let attrib_1 = {
   48         -
        let s = decoder.start_el().attr("prefix:anumber");
   49         -
        match s {
   50         -
            None => None,
   51         -
            Some(s) => Some({
   52         -
                <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(s)
   53         -
                    .map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `aws.protocoltests.restxml#PrimitiveInt`)"))
   54         -
            }?),
   55         -
        }
   56         -
    };
          67  +
    /* XmlBindingTraitParserGenerator.kt:316 */
          68  +
    let attrib_1 =
          69  +
        /* XmlBindingTraitParserGenerator.kt:411 */ {
          70  +
            /* XmlBindingTraitParserGenerator.kt:412 */let s = decoder
          71  +
                                .start_el()
          72  +
                                .attr("prefix:anumber");
          73  +
            /* XmlBindingTraitParserGenerator.kt:420 */match s {
          74  +
                /* XmlBindingTraitParserGenerator.kt:421 */None => None,
          75  +
                /* XmlBindingTraitParserGenerator.kt:422 */Some(s) => Some(
          76  +
                    /* XmlBindingTraitParserGenerator.kt:676 */ {
          77  +
                        /* XmlBindingTraitParserGenerator.kt:677 */<i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
          78  +
                            /* XmlBindingTraitParserGenerator.kt:424 */s
          79  +
                        /* XmlBindingTraitParserGenerator.kt:677 */)
          80  +
                        /* XmlBindingTraitParserGenerator.kt:685 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `aws.protocoltests.restxml#PrimitiveInt`)"))
          81  +
                    /* XmlBindingTraitParserGenerator.kt:676 */}
          82  +
                    /* XmlBindingTraitParserGenerator.kt:426 */?
          83  +
                /* XmlBindingTraitParserGenerator.kt:422 */)
          84  +
            /* XmlBindingTraitParserGenerator.kt:420 */}
          85  +
        /* XmlBindingTraitParserGenerator.kt:411 */}
          86  +
    /* XmlBindingTraitParserGenerator.kt:316 */;
          87  +
    /* XmlBindingTraitParserGenerator.kt:319 */
   57     88   
    builder.number = attrib_1;
   58         -
    let attrib_2 = {
   59         -
        let s = decoder.start_el().attr("bool");
   60         -
        match s {
   61         -
            None => None,
   62         -
            Some(s) => Some({
   63         -
                <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(s)
   64         -
                    .map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `smithy.api#Boolean`)"))
   65         -
            }?),
   66         -
        }
   67         -
    };
          89  +
    /* XmlBindingTraitParserGenerator.kt:316 */
          90  +
    let attrib_2 =
          91  +
        /* XmlBindingTraitParserGenerator.kt:411 */ {
          92  +
            /* XmlBindingTraitParserGenerator.kt:412 */let s = decoder
          93  +
                                .start_el()
          94  +
                                .attr("bool");
          95  +
            /* XmlBindingTraitParserGenerator.kt:420 */match s {
          96  +
                /* XmlBindingTraitParserGenerator.kt:421 */None => None,
          97  +
                /* XmlBindingTraitParserGenerator.kt:422 */Some(s) => Some(
          98  +
                    /* XmlBindingTraitParserGenerator.kt:676 */ {
          99  +
                        /* XmlBindingTraitParserGenerator.kt:677 */<bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
         100  +
                            /* XmlBindingTraitParserGenerator.kt:424 */s
         101  +
                        /* XmlBindingTraitParserGenerator.kt:677 */)
         102  +
                        /* XmlBindingTraitParserGenerator.kt:685 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `smithy.api#Boolean`)"))
         103  +
                    /* XmlBindingTraitParserGenerator.kt:676 */}
         104  +
                    /* XmlBindingTraitParserGenerator.kt:426 */?
         105  +
                /* XmlBindingTraitParserGenerator.kt:422 */)
         106  +
            /* XmlBindingTraitParserGenerator.kt:420 */}
         107  +
        /* XmlBindingTraitParserGenerator.kt:411 */}
         108  +
    /* XmlBindingTraitParserGenerator.kt:316 */;
         109  +
    /* XmlBindingTraitParserGenerator.kt:319 */
   68    110   
    builder.bool = attrib_2;
   69         -
    let attrib_3 = {
   70         -
        let s = decoder.start_el().attr("enum");
   71         -
        match s {
   72         -
            None => None,
   73         -
            Some(s) => Some(Result::<crate::types::StringEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
   74         -
                crate::types::StringEnum::from(s),
   75         -
            )?),
   76         -
        }
   77         -
    };
         111  +
    /* XmlBindingTraitParserGenerator.kt:316 */
         112  +
    let attrib_3 =
         113  +
        /* XmlBindingTraitParserGenerator.kt:411 */ {
         114  +
            /* XmlBindingTraitParserGenerator.kt:412 */let s = decoder
         115  +
                                .start_el()
         116  +
                                .attr("enum");
         117  +
            /* XmlBindingTraitParserGenerator.kt:420 */match s {
         118  +
                /* XmlBindingTraitParserGenerator.kt:421 */None => None,
         119  +
                /* XmlBindingTraitParserGenerator.kt:422 */Some(s) => Some(
         120  +
                    /* XmlBindingTraitParserGenerator.kt:729 */Result::<crate::types::StringEnum, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
         121  +
                        /* XmlBindingTraitParserGenerator.kt:741 */crate::types::StringEnum::from(
         122  +
                            /* XmlBindingTraitParserGenerator.kt:424 */s
         123  +
                        /* XmlBindingTraitParserGenerator.kt:741 */)
         124  +
                    /* XmlBindingTraitParserGenerator.kt:729 */)
         125  +
                    /* XmlBindingTraitParserGenerator.kt:426 */?
         126  +
                /* XmlBindingTraitParserGenerator.kt:422 */)
         127  +
            /* XmlBindingTraitParserGenerator.kt:420 */}
         128  +
        /* XmlBindingTraitParserGenerator.kt:411 */}
         129  +
    /* XmlBindingTraitParserGenerator.kt:316 */;
         130  +
    /* XmlBindingTraitParserGenerator.kt:319 */
   78    131   
    builder.r#enum = attrib_3;
   79         -
    let attrib_4 = {
   80         -
        let s = decoder.start_el().attr("ts");
   81         -
        match s {
   82         -
            None => None,
   83         -
            Some(s) => Some(
   84         -
                ::aws_smithy_types::DateTime::from_str(s, ::aws_smithy_types::date_time::Format::DateTimeWithOffset)
   85         -
                    .map_err(|_| ::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))?,
   86         -
            ),
   87         -
        }
   88         -
    };
         132  +
    /* XmlBindingTraitParserGenerator.kt:316 */
         133  +
    let attrib_4 =
         134  +
        /* XmlBindingTraitParserGenerator.kt:411 */ {
         135  +
            /* XmlBindingTraitParserGenerator.kt:412 */let s = decoder
         136  +
                                .start_el()
         137  +
                                .attr("ts");
         138  +
            /* XmlBindingTraitParserGenerator.kt:420 */match s {
         139  +
                /* XmlBindingTraitParserGenerator.kt:421 */None => None,
         140  +
                /* XmlBindingTraitParserGenerator.kt:422 */Some(s) => Some(
         141  +
                    /* XmlBindingTraitParserGenerator.kt:701 */::aws_smithy_types::DateTime::from_str(
         142  +
                        /* XmlBindingTraitParserGenerator.kt:424 */s
         143  +
                        /* XmlBindingTraitParserGenerator.kt:703 */, ::aws_smithy_types::date_time::Format::DateTimeWithOffset
         144  +
                    /* XmlBindingTraitParserGenerator.kt:701 */)
         145  +
                    /* XmlBindingTraitParserGenerator.kt:705 */.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `smithy.api#Timestamp`)"))
         146  +
                    /* XmlBindingTraitParserGenerator.kt:426 */?
         147  +
                /* XmlBindingTraitParserGenerator.kt:422 */)
         148  +
            /* XmlBindingTraitParserGenerator.kt:420 */}
         149  +
        /* XmlBindingTraitParserGenerator.kt:411 */}
         150  +
    /* XmlBindingTraitParserGenerator.kt:316 */;
         151  +
    /* XmlBindingTraitParserGenerator.kt:319 */
   89    152   
    builder.ts = attrib_4;
         153  +
    /* XmlBindingTraitParserGenerator.kt:213 */
   90    154   
    Ok(builder)
         155  +
    /* XmlBindingTraitParserGenerator.kt:189 */
   91    156   
}

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

@@ -1,1 +39,62 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_checksum_required_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::checksum_required::ChecksumRequiredOutput, crate::operation::checksum_required::ChecksumRequiredError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::checksum_required::ChecksumRequiredError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::checksum_required::ChecksumRequiredError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_checksum_required_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::checksum_required::ChecksumRequiredOutput, crate::operation::checksum_required::ChecksumRequiredError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::checksum_required::builders::ChecksumRequiredOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}
   27     42   
          43  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   28     44   
pub fn ser_checksum_required_op_input(
   29     45   
    input: &crate::operation::checksum_required::ChecksumRequiredInput,
   30     46   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   31     48   
    let mut out = String::new();
          49  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   32     50   
    {
          51  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   33     52   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   34     53   
        #[allow(unused_mut)]
   35     54   
        let mut root = writer.start_el("ChecksumRequiredInput");
          55  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   36     56   
        crate::protocol_serde::shape_checksum_required_input::ser_checksum_required_input_input_input(input, root)?
          57  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   37     58   
    }
          59  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   38     60   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          61  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   39     62   
}

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

@@ -1,1 +14,26 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_checksum_required_input_input_input(
    3      4   
    input: &crate::operation::checksum_required::ChecksumRequiredInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(var_1) = &input.field {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:359 */
    9     14   
        let mut inner_writer = scope.start_el("field").finish();
   10         -
        inner_writer.data(var_1.as_str());
          15  +
        /* XmlBindingTraitSerializerGenerator.kt:360 */
          16  +
        inner_writer.data(
          17  +
            /* XmlBindingTraitSerializerGenerator.kt:321 */ var_1.as_str(), /* XmlBindingTraitSerializerGenerator.kt:360 */
          18  +
        );
          19  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   11     20   
    }
          21  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   12     22   
    scope.finish();
          23  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   13     24   
    Ok(())
          25  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   14     26   
}

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

@@ -1,1 +39,62 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[allow(clippy::unnecessary_wraps)]
           4  +
/* ProtocolParserGenerator.kt:99 */
    3      5   
pub fn de_create_foo_http_error(
    4      6   
    _response_status: u16,
    5      7   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
    6      8   
    _response_body: &[u8],
    7      9   
) -> std::result::Result<crate::operation::create_foo::CreateFooOutput, crate::operation::create_foo::CreateFooError> {
          10  +
    /* RustType.kt:516 */
    8     11   
    #[allow(unused_mut)]
          12  +
    /* ProtocolParserGenerator.kt:106 */
    9     13   
    let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
   10     14   
        .map_err(crate::operation::create_foo::CreateFooError::unhandled)?;
          15  +
    /* ProtocolParserGenerator.kt:120 */
   11     16   
    let generic = generic_builder.build();
          17  +
    /* ProtocolParserGenerator.kt:185 */
   12     18   
    Err(crate::operation::create_foo::CreateFooError::generic(generic))
          19  +
    /* ProtocolParserGenerator.kt:99 */
   13     20   
}
   14     21   
          22  +
/* RustType.kt:516 */
   15     23   
#[allow(clippy::unnecessary_wraps)]
          24  +
/* ProtocolParserGenerator.kt:71 */
   16     25   
pub fn de_create_foo_http_response(
   17     26   
    _response_status: u16,
   18     27   
    _response_headers: &::aws_smithy_runtime_api::http::Headers,
   19     28   
    _response_body: &[u8],
   20     29   
) -> std::result::Result<crate::operation::create_foo::CreateFooOutput, crate::operation::create_foo::CreateFooError> {
          30  +
    /* ProtocolParserGenerator.kt:77 */
   21     31   
    Ok({
          32  +
        /* RustType.kt:516 */
   22     33   
        #[allow(unused_mut)]
          34  +
        /* ProtocolParserGenerator.kt:240 */
   23     35   
        let mut output = crate::operation::create_foo::builders::CreateFooOutputBuilder::default();
          36  +
        /* ClientBuilderInstantiator.kt:56 */
   24     37   
        output.build()
          38  +
        /* ProtocolParserGenerator.kt:77 */
   25     39   
    })
          40  +
    /* ProtocolParserGenerator.kt:71 */
   26     41   
}
   27     42   
          43  +
/* XmlBindingTraitSerializerGenerator.kt:116 */
   28     44   
pub fn ser_create_foo_op_input(
   29     45   
    input: &crate::operation::create_foo::CreateFooInput,
   30     46   
) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
          47  +
    /* XmlBindingTraitSerializerGenerator.kt:120 */
   31     48   
    let mut out = String::new();
          49  +
    /* XmlBindingTraitSerializerGenerator.kt:124 */
   32     50   
    {
          51  +
        /* XmlBindingTraitSerializerGenerator.kt:125 */
   33     52   
        let mut writer = ::aws_smithy_xml::encode::XmlWriter::new(&mut out);
   34     53   
        #[allow(unused_mut)]
   35     54   
        let mut root = writer.start_el("CreateFooRequest");
          55  +
        /* XmlBindingTraitSerializerGenerator.kt:440 */
   36     56   
        crate::protocol_serde::shape_create_foo_input::ser_create_foo_input_input_input(input, root)?
          57  +
        /* XmlBindingTraitSerializerGenerator.kt:124 */
   37     58   
    }
          59  +
    /* XmlBindingTraitSerializerGenerator.kt:137 */
   38     60   
    Ok(::aws_smithy_types::body::SdkBody::from(out))
          61  +
    /* XmlBindingTraitSerializerGenerator.kt:116 */
   39     62   
}

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

@@ -1,1 +13,22 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* XmlBindingTraitSerializerGenerator.kt:427 */
    2      3   
pub fn ser_create_foo_input_input_input(
    3      4   
    input: &crate::operation::create_foo::CreateFooInput,
    4      5   
    writer: ::aws_smithy_xml::encode::ElWriter,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* RustType.kt:516 */
    6      8   
    #[allow(unused_mut)]
           9  +
    /* XmlBindingTraitSerializerGenerator.kt:299 */
    7     10   
    let mut scope = writer.finish();
          11  +
    /* XmlBindingTraitSerializerGenerator.kt:555 */
    8     12   
    if let Some(_var_1) = &input.input {
          13  +
        /* XmlBindingTraitSerializerGenerator.kt:397 */
    9     14   
        scope.start_el("input").finish();
          15  +
        /* XmlBindingTraitSerializerGenerator.kt:555 */
   10     16   
    }
          17  +
    /* XmlBindingTraitSerializerGenerator.kt:304 */
   11     18   
    scope.finish();
          19  +
    /* XmlBindingTraitSerializerGenerator.kt:437 */
   12     20   
    Ok(())
          21  +
    /* XmlBindingTraitSerializerGenerator.kt:427 */
   13     22   
}