Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `HttpPayloadWithXmlName`.
           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 HttpPayloadWithXmlName;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpPayloadWithXmlName {
    7         -
    /// Creates a new `HttpPayloadWithXmlName`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpPayloadWithXmlName`
          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::http_payload_with_xml_name::HttpPayloadWithXmlNameInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   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 HttpPayloadWithXmlName {
   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("HttpPayloadWithXmlName");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpPayloadWithXmlNameRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpPayloadWithXmlNameResponseDeserializer,
  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   
            "HttpPayloadWithXmlName",
  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("HttpPayloadWithXmlName")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpPayloadWithXmlNameEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
  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 HttpPayloadWithXmlNameResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPayloadWithXmlNameResponseDeserializer {
  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_http_payload_with_xml_name::de_http_payload_with_xml_name_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_payload_with_xml_name::de_http_payload_with_xml_name_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct HttpPayloadWithXmlNameRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPayloadWithXmlNameRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/HttpPayloadWithXmlName").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_http_payload_with_xml_name_input::ser_nested_http_payload(
  196    209   
            &input.nested,
  197    210   
        )?);
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct HttpPayloadWithXmlNameEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPayloadWithXmlNameEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "HttpPayloadWithXmlNameEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<HttpPayloadWithXmlNameInput>()
  226    240   
            .ok_or("failed to downcast to HttpPayloadWithXmlNameInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod http_payload_with_xml_name_test {
  243    260   
  244    261   
    /// Serializes a structure in the payload using a wrapper name based on xmlName
  245    262   
    /// Test ID: HttpPayloadWithXmlName
  246    263   
    #[::tokio::test]
  247    264   
    #[::tracing_test::traced_test]
  248    265   
    async fn http_payload_with_xml_name_request() {
  249    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  251    268   
@@ -294,311 +423,499 @@
  314    331   
                )))
  315    332   
            });
  316    333   
            de.deserialize_nonstreaming(&http_response)
  317    334   
        });
  318    335   
        let parsed = parsed
  319    336   
            .expect("should be successful response")
  320    337   
            .downcast::<crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput>()
  321    338   
            .unwrap();
  322    339   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  323    340   
    }
         341  +
         342  +
    /* ProtocolTestGenerator.kt:98 */
  324    343   
}
  325    344   
         345  +
/* OperationErrorGenerator.kt:79 */
  326    346   
/// Error type for the `HttpPayloadWithXmlNameError` operation.
         347  +
/* RustType.kt:516 */
  327    348   
#[non_exhaustive]
         349  +
/* RustType.kt:516 */
  328    350   
#[derive(::std::fmt::Debug)]
  329         -
pub enum HttpPayloadWithXmlNameError {
         351  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpPayloadWithXmlNameError {
         352  +
    /* OperationErrorGenerator.kt:88 */
  330    353   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  331    354   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  332    355   
    variable wildcard pattern and check `.code()`:
  333    356   
     \
  334    357   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  335    358   
     \
  336    359   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPayloadWithXmlNameError) for what information is available for the error.")]
  337    360   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         361  +
    /* OperationErrorGenerator.kt:81 */
  338    362   
}
         363  +
/* OperationErrorGenerator.kt:218 */
  339    364   
impl HttpPayloadWithXmlNameError {
         365  +
    /* OperationErrorGenerator.kt:219 */
  340    366   
    /// Creates the `HttpPayloadWithXmlNameError::Unhandled` variant from any error type.
  341    367   
    pub fn unhandled(
  342    368   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  343    369   
    ) -> Self {
  344    370   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  345    371   
            source: err.into(),
  346    372   
            meta: ::std::default::Default::default(),
  347    373   
        })
  348    374   
    }
  349    375   
  350    376   
    /// Creates the `HttpPayloadWithXmlNameError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  351    377   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  352    378   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  353    379   
            source: err.clone().into(),
  354    380   
            meta: err,
  355    381   
        })
  356    382   
    }
  357         -
    ///
         383  +
    /// /* OperationErrorGenerator.kt:236 */
  358    384   
    /// Returns error metadata, which includes the error code, message,
  359    385   
    /// request ID, and potentially additional information.
  360    386   
    ///
         387  +
    /* OperationErrorGenerator.kt:242 */
  361    388   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         389  +
        /* OperationErrorGenerator.kt:243 */
  362    390   
        match self {
  363         -
            Self::Unhandled(e) => &e.meta,
         391  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         392  +
            /* OperationErrorGenerator.kt:243 */
  364    393   
        }
         394  +
        /* OperationErrorGenerator.kt:242 */
  365    395   
    }
         396  +
    /* OperationErrorGenerator.kt:218 */
  366    397   
}
         398  +
/* OperationErrorGenerator.kt:269 */
  367    399   
impl ::std::error::Error for HttpPayloadWithXmlNameError {
         400  +
    /* OperationErrorGenerator.kt:270 */
  368    401   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         402  +
        /* OperationErrorGenerator.kt:318 */
  369    403   
        match self {
  370         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         404  +
            /* OperationErrorGenerator.kt:326 */
         405  +
            Self::Unhandled(_inner) => {
         406  +
                /* OperationErrorGenerator.kt:279 */
         407  +
                ::std::option::Option::Some(&*_inner.source)
         408  +
                /* OperationErrorGenerator.kt:326 */
         409  +
            } /* OperationErrorGenerator.kt:318 */
  371    410   
        }
         411  +
        /* OperationErrorGenerator.kt:270 */
  372    412   
    }
         413  +
    /* OperationErrorGenerator.kt:269 */
  373    414   
}
         415  +
/* OperationErrorGenerator.kt:133 */
  374    416   
impl ::std::fmt::Display for HttpPayloadWithXmlNameError {
         417  +
    /* OperationErrorGenerator.kt:134 */
  375    418   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         419  +
        /* OperationErrorGenerator.kt:318 */
  376    420   
        match self {
         421  +
            /* OperationErrorGenerator.kt:326 */
  377    422   
            Self::Unhandled(_inner) => {
         423  +
                /* OperationErrorGenerator.kt:139 */
  378    424   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  379    425   
                    write!(f, "unhandled error ({code})")
  380    426   
                } else {
  381    427   
                    f.write_str("unhandled error")
  382    428   
                }
  383         -
            }
         429  +
                /* OperationErrorGenerator.kt:326 */
         430  +
            } /* OperationErrorGenerator.kt:318 */
  384    431   
        }
         432  +
        /* OperationErrorGenerator.kt:134 */
  385    433   
    }
         434  +
    /* OperationErrorGenerator.kt:133 */
  386    435   
}
         436  +
/* OperationErrorGenerator.kt:182 */
  387    437   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPayloadWithXmlNameError {
         438  +
    /* OperationErrorGenerator.kt:186 */
  388    439   
    fn code(&self) -> ::std::option::Option<&str> {
         440  +
        /* OperationErrorGenerator.kt:187 */
  389    441   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         442  +
        /* OperationErrorGenerator.kt:186 */
  390    443   
    }
         444  +
    /* OperationErrorGenerator.kt:190 */
  391    445   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         446  +
        /* OperationErrorGenerator.kt:197 */
  392    447   
        ::std::option::Option::None
         448  +
        /* OperationErrorGenerator.kt:190 */
  393    449   
    }
         450  +
    /* OperationErrorGenerator.kt:182 */
  394    451   
}
         452  +
/* OperationErrorGenerator.kt:163 */
  395    453   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPayloadWithXmlNameError {
         454  +
    /* OperationErrorGenerator.kt:164 */
  396    455   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         456  +
        /* OperationErrorGenerator.kt:318 */
  397    457   
        match self {
  398         -
            Self::Unhandled(_inner) => &_inner.meta,
         458  +
            /* OperationErrorGenerator.kt:326 */
         459  +
            Self::Unhandled(_inner) => {
         460  +
                /* OperationErrorGenerator.kt:168 */
         461  +
                &_inner.meta
         462  +
                /* OperationErrorGenerator.kt:326 */
         463  +
            } /* OperationErrorGenerator.kt:318 */
  399    464   
        }
         465  +
        /* OperationErrorGenerator.kt:164 */
  400    466   
    }
         467  +
    /* OperationErrorGenerator.kt:163 */
  401    468   
}
         469  +
/* OperationErrorGenerator.kt:109 */
  402    470   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPayloadWithXmlNameError {
         471  +
    /* OperationErrorGenerator.kt:110 */
  403    472   
    fn create_unhandled_error(
  404    473   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  405    474   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  406    475   
    ) -> Self {
         476  +
        /* OperationErrorGenerator.kt:121 */
  407    477   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  408    478   
            source,
  409    479   
            meta: meta.unwrap_or_default(),
  410    480   
        })
         481  +
        /* OperationErrorGenerator.kt:110 */
  411    482   
    }
         483  +
    /* OperationErrorGenerator.kt:109 */
  412    484   
}
  413    485   
         486  +
/* CodegenDelegator.kt:255 */
  414    487   
pub use crate::operation::http_payload_with_xml_name::_http_payload_with_xml_name_output::HttpPayloadWithXmlNameOutput;
  415    488   
         489  +
/* CodegenDelegator.kt:255 */
  416    490   
pub use crate::operation::http_payload_with_xml_name::_http_payload_with_xml_name_input::HttpPayloadWithXmlNameInput;
  417    491   
         492  +
/* RustModule.kt:172 */
  418    493   
mod _http_payload_with_xml_name_input;
  419    494   
         495  +
/* RustModule.kt:172 */
  420    496   
mod _http_payload_with_xml_name_output;
  421    497   
  422         -
/// Builders
         498  +
/// /* CodegenDelegator.kt:51 */Builders
  423    499   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_name/_http_payload_with_xml_name_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_name/_http_payload_with_xml_name_output.rs

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

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

@@ -1,1 +125,143 @@
    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::http_payload_with_xml_name::_http_payload_with_xml_name_output::HttpPayloadWithXmlNameOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_payload_with_xml_name::_http_payload_with_xml_name_input::HttpPayloadWithXmlNameInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_payload_with_xml_name::builders::HttpPayloadWithXmlNameInputBuilder {
    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::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_payload_with_xml_name();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpPayloadWithXmlName`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpPayloadWithXmlName`.
   24     27   
///
   25         -
/// The following example serializes a payload that uses an XML name, changing the wrapper name.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The following example serializes a payload that uses an XML name, changing the wrapper name.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct HttpPayloadWithXmlNameFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::http_payload_with_xml_name::builders::HttpPayloadWithXmlNameInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   35     41   
        crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   36     42   
    > for HttpPayloadWithXmlNameFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   44     50   
            crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl HttpPayloadWithXmlNameFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `HttpPayloadWithXmlNameFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the HttpPayloadWithXmlName as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::http_payload_with_xml_name::builders::HttpPayloadWithXmlNameInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlName::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::http_payload_with_xml_name::HttpPayloadWithXmlName::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::http_payload_with_xml_name::HttpPayloadWithXmlNameOutput,
   97    107   
        crate::operation::http_payload_with_xml_name::HttpPayloadWithXmlNameError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn nested(mut self, input: crate::types::PayloadWithXmlName) -> Self {
  113    126   
        self.inner = self.inner.nested(input);
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::PayloadWithXmlName>) -> Self {
  118    133   
        self.inner = self.inner.set_nested(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::PayloadWithXmlName> {
  123    140   
        self.inner.get_nested()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_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 `HttpPayloadWithXmlNamespace`.
           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 HttpPayloadWithXmlNamespace;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpPayloadWithXmlNamespace {
    7         -
    /// Creates a new `HttpPayloadWithXmlNamespace`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpPayloadWithXmlNamespace`
          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::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +271,288 @@
   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 HttpPayloadWithXmlNamespace {
   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("HttpPayloadWithXmlNamespace");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpPayloadWithXmlNamespaceRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpPayloadWithXmlNamespaceResponseDeserializer,
  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   
            "HttpPayloadWithXmlNamespace",
  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("HttpPayloadWithXmlNamespace")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpPayloadWithXmlNamespaceEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
  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 HttpPayloadWithXmlNamespaceResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPayloadWithXmlNamespaceResponseDeserializer {
  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_http_payload_with_xml_namespace::de_http_payload_with_xml_namespace_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_payload_with_xml_namespace::de_http_payload_with_xml_namespace_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct HttpPayloadWithXmlNamespaceRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPayloadWithXmlNamespaceRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/HttpPayloadWithXmlNamespace").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                ::std::result::Result::Ok(builder.method("PUT").uri(uri))
  190    203   
            }
  191    204   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  192    205   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/xml");
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from(
  196    209   
            crate::protocol_serde::shape_http_payload_with_xml_namespace_input::ser_nested_http_payload(&input.nested)?,
  197    210   
        );
  198    211   
        if let Some(content_length) = body.content_length() {
  199    212   
            let content_length = content_length.to_string();
  200    213   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  201    214   
        }
  202    215   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  203    216   
    }
  204    217   
}
         218  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  205    219   
#[derive(Debug)]
  206    220   
struct HttpPayloadWithXmlNamespaceEndpointParamsInterceptor;
  207    221   
  208    222   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPayloadWithXmlNamespaceEndpointParamsInterceptor {
  209    223   
    fn name(&self) -> &'static str {
  210    224   
        "HttpPayloadWithXmlNamespaceEndpointParamsInterceptor"
  211    225   
    }
  212    226   
  213    227   
    fn read_before_execution(
  214    228   
        &self,
  215    229   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  216    230   
            '_,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  219    233   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  220    234   
        >,
  221    235   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  222    236   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  223    237   
        let _input = context
  224    238   
            .input()
  225    239   
            .downcast_ref::<HttpPayloadWithXmlNamespaceInput>()
  226    240   
            .ok_or("failed to downcast to HttpPayloadWithXmlNamespaceInput")?;
  227    241   
  228    242   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  229    243   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  230    244   
        })?;
  231    245   
        cfg.interceptor_state()
  232    246   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  233    247   
        ::std::result::Result::Ok(())
  234    248   
    }
  235    249   
}
  236    250   
  237    251   
// The get_* functions below are generated from JMESPath expressions in the
  238    252   
// operationContextParams trait. They target the operation's input shape.
  239    253   
         254  +
/* RustType.kt:516 */
  240    255   
#[allow(unreachable_code, unused_variables)]
         256  +
/* RustType.kt:516 */
  241    257   
#[cfg(test)]
         258  +
/* ProtocolTestGenerator.kt:98 */
  242    259   
mod http_payload_with_xml_namespace_test {
  243    260   
  244    261   
    /// Serializes a structure in the payload using a wrapper with an XML namespace
  245    262   
    /// Test ID: HttpPayloadWithXmlNamespace
  246    263   
    #[::tokio::test]
  247    264   
    #[::tracing_test::traced_test]
  248    265   
    async fn http_payload_with_xml_namespace_request() {
  249    266   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  250    267   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  251    268   
@@ -296,313 +425,501 @@
  316    333   
                )))
  317    334   
            });
  318    335   
            de.deserialize_nonstreaming(&http_response)
  319    336   
        });
  320    337   
        let parsed = parsed
  321    338   
            .expect("should be successful response")
  322    339   
            .downcast::<crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput>()
  323    340   
            .unwrap();
  324    341   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  325    342   
    }
         343  +
         344  +
    /* ProtocolTestGenerator.kt:98 */
  326    345   
}
  327    346   
         347  +
/* OperationErrorGenerator.kt:79 */
  328    348   
/// Error type for the `HttpPayloadWithXmlNamespaceError` operation.
         349  +
/* RustType.kt:516 */
  329    350   
#[non_exhaustive]
         351  +
/* RustType.kt:516 */
  330    352   
#[derive(::std::fmt::Debug)]
  331         -
pub enum HttpPayloadWithXmlNamespaceError {
         353  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpPayloadWithXmlNamespaceError {
         354  +
    /* OperationErrorGenerator.kt:88 */
  332    355   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  333    356   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  334    357   
    variable wildcard pattern and check `.code()`:
  335    358   
     \
  336    359   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  337    360   
     \
  338    361   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPayloadWithXmlNamespaceError) for what information is available for the error.")]
  339    362   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         363  +
    /* OperationErrorGenerator.kt:81 */
  340    364   
}
         365  +
/* OperationErrorGenerator.kt:218 */
  341    366   
impl HttpPayloadWithXmlNamespaceError {
         367  +
    /* OperationErrorGenerator.kt:219 */
  342    368   
    /// Creates the `HttpPayloadWithXmlNamespaceError::Unhandled` variant from any error type.
  343    369   
    pub fn unhandled(
  344    370   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  345    371   
    ) -> Self {
  346    372   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  347    373   
            source: err.into(),
  348    374   
            meta: ::std::default::Default::default(),
  349    375   
        })
  350    376   
    }
  351    377   
  352    378   
    /// Creates the `HttpPayloadWithXmlNamespaceError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  353    379   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  354    380   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  355    381   
            source: err.clone().into(),
  356    382   
            meta: err,
  357    383   
        })
  358    384   
    }
  359         -
    ///
         385  +
    /// /* OperationErrorGenerator.kt:236 */
  360    386   
    /// Returns error metadata, which includes the error code, message,
  361    387   
    /// request ID, and potentially additional information.
  362    388   
    ///
         389  +
    /* OperationErrorGenerator.kt:242 */
  363    390   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         391  +
        /* OperationErrorGenerator.kt:243 */
  364    392   
        match self {
  365         -
            Self::Unhandled(e) => &e.meta,
         393  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         394  +
            /* OperationErrorGenerator.kt:243 */
  366    395   
        }
         396  +
        /* OperationErrorGenerator.kt:242 */
  367    397   
    }
         398  +
    /* OperationErrorGenerator.kt:218 */
  368    399   
}
         400  +
/* OperationErrorGenerator.kt:269 */
  369    401   
impl ::std::error::Error for HttpPayloadWithXmlNamespaceError {
         402  +
    /* OperationErrorGenerator.kt:270 */
  370    403   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         404  +
        /* OperationErrorGenerator.kt:318 */
  371    405   
        match self {
  372         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         406  +
            /* OperationErrorGenerator.kt:326 */
         407  +
            Self::Unhandled(_inner) => {
         408  +
                /* OperationErrorGenerator.kt:279 */
         409  +
                ::std::option::Option::Some(&*_inner.source)
         410  +
                /* OperationErrorGenerator.kt:326 */
         411  +
            } /* OperationErrorGenerator.kt:318 */
  373    412   
        }
         413  +
        /* OperationErrorGenerator.kt:270 */
  374    414   
    }
         415  +
    /* OperationErrorGenerator.kt:269 */
  375    416   
}
         417  +
/* OperationErrorGenerator.kt:133 */
  376    418   
impl ::std::fmt::Display for HttpPayloadWithXmlNamespaceError {
         419  +
    /* OperationErrorGenerator.kt:134 */
  377    420   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         421  +
        /* OperationErrorGenerator.kt:318 */
  378    422   
        match self {
         423  +
            /* OperationErrorGenerator.kt:326 */
  379    424   
            Self::Unhandled(_inner) => {
         425  +
                /* OperationErrorGenerator.kt:139 */
  380    426   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  381    427   
                    write!(f, "unhandled error ({code})")
  382    428   
                } else {
  383    429   
                    f.write_str("unhandled error")
  384    430   
                }
  385         -
            }
         431  +
                /* OperationErrorGenerator.kt:326 */
         432  +
            } /* OperationErrorGenerator.kt:318 */
  386    433   
        }
         434  +
        /* OperationErrorGenerator.kt:134 */
  387    435   
    }
         436  +
    /* OperationErrorGenerator.kt:133 */
  388    437   
}
         438  +
/* OperationErrorGenerator.kt:182 */
  389    439   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPayloadWithXmlNamespaceError {
         440  +
    /* OperationErrorGenerator.kt:186 */
  390    441   
    fn code(&self) -> ::std::option::Option<&str> {
         442  +
        /* OperationErrorGenerator.kt:187 */
  391    443   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         444  +
        /* OperationErrorGenerator.kt:186 */
  392    445   
    }
         446  +
    /* OperationErrorGenerator.kt:190 */
  393    447   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         448  +
        /* OperationErrorGenerator.kt:197 */
  394    449   
        ::std::option::Option::None
         450  +
        /* OperationErrorGenerator.kt:190 */
  395    451   
    }
         452  +
    /* OperationErrorGenerator.kt:182 */
  396    453   
}
         454  +
/* OperationErrorGenerator.kt:163 */
  397    455   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPayloadWithXmlNamespaceError {
         456  +
    /* OperationErrorGenerator.kt:164 */
  398    457   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         458  +
        /* OperationErrorGenerator.kt:318 */
  399    459   
        match self {
  400         -
            Self::Unhandled(_inner) => &_inner.meta,
         460  +
            /* OperationErrorGenerator.kt:326 */
         461  +
            Self::Unhandled(_inner) => {
         462  +
                /* OperationErrorGenerator.kt:168 */
         463  +
                &_inner.meta
         464  +
                /* OperationErrorGenerator.kt:326 */
         465  +
            } /* OperationErrorGenerator.kt:318 */
  401    466   
        }
         467  +
        /* OperationErrorGenerator.kt:164 */
  402    468   
    }
         469  +
    /* OperationErrorGenerator.kt:163 */
  403    470   
}
         471  +
/* OperationErrorGenerator.kt:109 */
  404    472   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPayloadWithXmlNamespaceError {
         473  +
    /* OperationErrorGenerator.kt:110 */
  405    474   
    fn create_unhandled_error(
  406    475   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  407    476   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  408    477   
    ) -> Self {
         478  +
        /* OperationErrorGenerator.kt:121 */
  409    479   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  410    480   
            source,
  411    481   
            meta: meta.unwrap_or_default(),
  412    482   
        })
         483  +
        /* OperationErrorGenerator.kt:110 */
  413    484   
    }
         485  +
    /* OperationErrorGenerator.kt:109 */
  414    486   
}
  415    487   
         488  +
/* CodegenDelegator.kt:255 */
  416    489   
pub use crate::operation::http_payload_with_xml_namespace::_http_payload_with_xml_namespace_output::HttpPayloadWithXmlNamespaceOutput;
  417    490   
         491  +
/* CodegenDelegator.kt:255 */
  418    492   
pub use crate::operation::http_payload_with_xml_namespace::_http_payload_with_xml_namespace_input::HttpPayloadWithXmlNamespaceInput;
  419    493   
         494  +
/* RustModule.kt:172 */
  420    495   
mod _http_payload_with_xml_namespace_input;
  421    496   
         497  +
/* RustModule.kt:172 */
  422    498   
mod _http_payload_with_xml_namespace_output;
  423    499   
  424         -
/// Builders
         500  +
/// /* CodegenDelegator.kt:51 */Builders
  425    501   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace/_http_payload_with_xml_namespace_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace/_http_payload_with_xml_namespace_output.rs

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

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

@@ -1,1 +125,143 @@
    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::http_payload_with_xml_namespace::_http_payload_with_xml_namespace_output::HttpPayloadWithXmlNamespaceOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_payload_with_xml_namespace::_http_payload_with_xml_namespace_input::HttpPayloadWithXmlNamespaceInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_payload_with_xml_namespace::builders::HttpPayloadWithXmlNamespaceInputBuilder {
    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::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_payload_with_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 `HttpPayloadWithXmlNamespace`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpPayloadWithXmlNamespace`.
   24     27   
///
   25         -
/// The following example serializes a payload that uses an XML namespace.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The following example serializes a payload that uses an XML namespace.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct HttpPayloadWithXmlNamespaceFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::http_payload_with_xml_namespace::builders::HttpPayloadWithXmlNamespaceInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   35     41   
        crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   36     42   
    > for HttpPayloadWithXmlNamespaceFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   44     50   
            crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl HttpPayloadWithXmlNamespaceFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `HttpPayloadWithXmlNamespaceFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the HttpPayloadWithXmlNamespace as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::http_payload_with_xml_namespace::builders::HttpPayloadWithXmlNamespaceInputBuilder {
   61     70   
        &self.inner
   62     71   
    }
          72  +
    /* FluentBuilderGenerator.kt:145 */
   63     73   
    /// Sends the request and returns the response.
   64     74   
    ///
   65     75   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   66     76   
    /// can be matched against.
   67     77   
    ///
   68     78   
    /// By default, any retryable failures will be retried twice. Retry behavior
   69     79   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   70     80   
    /// set when configuring the client.
   71     81   
    pub async fn send(
   72     82   
        self,
   73     83   
    ) -> ::std::result::Result<
   74     84   
        crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   77     87   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   78     88   
        >,
   79     89   
    > {
   80     90   
        let input = self
   81     91   
            .inner
   82     92   
            .build()
   83     93   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   84     94   
        let runtime_plugins = crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespace::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::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespace::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::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceOutput,
   97    107   
        crate::operation::http_payload_with_xml_namespace::HttpPayloadWithXmlNamespaceError,
   98    108   
        Self,
   99    109   
    > {
  100    110   
        crate::client::customize::CustomizableOperation::new(self)
  101    111   
    }
         112  +
    /* FluentBuilderGenerator.kt:315 */
  102    113   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  103    114   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  104    115   
        self
  105    116   
    }
  106    117   
  107    118   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  108    119   
        self.config_override = config_override;
  109    120   
        self
  110    121   
    }
         122  +
    /* FluentBuilderGenerator.kt:498 */
  111    123   
    #[allow(missing_docs)] // documentation missing in model
         124  +
                           /* FluentBuilderGenerator.kt:500 */
  112    125   
    pub fn nested(mut self, input: crate::types::PayloadWithXmlNamespace) -> Self {
  113    126   
        self.inner = self.inner.nested(input);
  114    127   
        self
  115    128   
    }
         129  +
    /* FluentBuilderGenerator.kt:498 */
  116    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* FluentBuilderGenerator.kt:500 */
  117    132   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::PayloadWithXmlNamespace>) -> Self {
  118    133   
        self.inner = self.inner.set_nested(input);
  119    134   
        self
  120    135   
    }
         136  +
    /* FluentBuilderGenerator.kt:518 */
  121    137   
    #[allow(missing_docs)] // documentation missing in model
         138  +
                           /* FluentBuilderGenerator.kt:520 */
  122    139   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::PayloadWithXmlNamespace> {
  123    140   
        self.inner.get_nested()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace_and_prefix.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 `HttpPayloadWithXmlNamespaceAndPrefix`.
           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 HttpPayloadWithXmlNamespaceAndPrefix;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpPayloadWithXmlNamespaceAndPrefix {
    7         -
    /// Creates a new `HttpPayloadWithXmlNamespaceAndPrefix`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpPayloadWithXmlNamespaceAndPrefix`
          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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +275,292 @@
   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 HttpPayloadWithXmlNamespaceAndPrefix {
   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("HttpPayloadWithXmlNamespaceAndPrefix");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpPayloadWithXmlNamespaceAndPrefixRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpPayloadWithXmlNamespaceAndPrefixResponseDeserializer,
  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   
            "HttpPayloadWithXmlNamespaceAndPrefix",
  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("HttpPayloadWithXmlNamespaceAndPrefix")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpPayloadWithXmlNamespaceAndPrefixEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
  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 HttpPayloadWithXmlNamespaceAndPrefixResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPayloadWithXmlNamespaceAndPrefixResponseDeserializer {
  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_http_payload_with_xml_namespace_and_prefix::de_http_payload_with_xml_namespace_and_prefix_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_http_payload_with_xml_namespace_and_prefix::de_http_payload_with_xml_namespace_and_prefix_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 HttpPayloadWithXmlNamespaceAndPrefixRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPayloadWithXmlNamespaceAndPrefixRequestSerializer {
  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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput>()
  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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput,
  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, "/HttpPayloadWithXmlNamespaceAndPrefix").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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixInput,
  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("PUT").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_http_payload_with_xml_namespace_and_prefix_input::ser_nested_http_payload(&input.nested)?,
  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 HttpPayloadWithXmlNamespaceAndPrefixEndpointParamsInterceptor;
  211    225   
  212    226   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPayloadWithXmlNamespaceAndPrefixEndpointParamsInterceptor {
  213    227   
    fn name(&self) -> &'static str {
  214    228   
        "HttpPayloadWithXmlNamespaceAndPrefixEndpointParamsInterceptor"
  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::<HttpPayloadWithXmlNamespaceAndPrefixInput>()
  230    244   
            .ok_or("failed to downcast to HttpPayloadWithXmlNamespaceAndPrefixInput")?;
  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 http_payload_with_xml_namespace_and_prefix_test {
  247    264   
  248    265   
    /// Serializes a structure in the payload using a wrapper with an XML namespace
  249    266   
    /// Test ID: HttpPayloadWithXmlNamespaceAndPrefix
  250    267   
    #[::tokio::test]
  251    268   
    #[::tracing_test::traced_test]
  252    269   
    async fn http_payload_with_xml_namespace_and_prefix_request() {
  253    270   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  254    271   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  255    272   
@@ -300,317 +429,505 @@
  320    337   
                )))
  321    338   
            });
  322    339   
            de.deserialize_nonstreaming(&http_response)
  323    340   
        });
  324    341   
        let parsed = parsed
  325    342   
            .expect("should be successful response")
  326    343   
            .downcast::<crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput>()
  327    344   
            .unwrap();
  328    345   
        ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  329    346   
    }
         347  +
         348  +
    /* ProtocolTestGenerator.kt:98 */
  330    349   
}
  331    350   
         351  +
/* OperationErrorGenerator.kt:79 */
  332    352   
/// Error type for the `HttpPayloadWithXmlNamespaceAndPrefixError` operation.
         353  +
/* RustType.kt:516 */
  333    354   
#[non_exhaustive]
         355  +
/* RustType.kt:516 */
  334    356   
#[derive(::std::fmt::Debug)]
  335         -
pub enum HttpPayloadWithXmlNamespaceAndPrefixError {
         357  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpPayloadWithXmlNamespaceAndPrefixError {
         358  +
    /* OperationErrorGenerator.kt:88 */
  336    359   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  337    360   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  338    361   
    variable wildcard pattern and check `.code()`:
  339    362   
     \
  340    363   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  341    364   
     \
  342    365   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPayloadWithXmlNamespaceAndPrefixError) for what information is available for the error.")]
  343    366   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         367  +
    /* OperationErrorGenerator.kt:81 */
  344    368   
}
         369  +
/* OperationErrorGenerator.kt:218 */
  345    370   
impl HttpPayloadWithXmlNamespaceAndPrefixError {
         371  +
    /* OperationErrorGenerator.kt:219 */
  346    372   
    /// Creates the `HttpPayloadWithXmlNamespaceAndPrefixError::Unhandled` variant from any error type.
  347    373   
    pub fn unhandled(
  348    374   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  349    375   
    ) -> Self {
  350    376   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  351    377   
            source: err.into(),
  352    378   
            meta: ::std::default::Default::default(),
  353    379   
        })
  354    380   
    }
  355    381   
  356    382   
    /// Creates the `HttpPayloadWithXmlNamespaceAndPrefixError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  357    383   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  358    384   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  359    385   
            source: err.clone().into(),
  360    386   
            meta: err,
  361    387   
        })
  362    388   
    }
  363         -
    ///
         389  +
    /// /* OperationErrorGenerator.kt:236 */
  364    390   
    /// Returns error metadata, which includes the error code, message,
  365    391   
    /// request ID, and potentially additional information.
  366    392   
    ///
         393  +
    /* OperationErrorGenerator.kt:242 */
  367    394   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         395  +
        /* OperationErrorGenerator.kt:243 */
  368    396   
        match self {
  369         -
            Self::Unhandled(e) => &e.meta,
         397  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         398  +
            /* OperationErrorGenerator.kt:243 */
  370    399   
        }
         400  +
        /* OperationErrorGenerator.kt:242 */
  371    401   
    }
         402  +
    /* OperationErrorGenerator.kt:218 */
  372    403   
}
         404  +
/* OperationErrorGenerator.kt:269 */
  373    405   
impl ::std::error::Error for HttpPayloadWithXmlNamespaceAndPrefixError {
         406  +
    /* OperationErrorGenerator.kt:270 */
  374    407   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         408  +
        /* OperationErrorGenerator.kt:318 */
  375    409   
        match self {
  376         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         410  +
            /* OperationErrorGenerator.kt:326 */
         411  +
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:279 */
         413  +
                ::std::option::Option::Some(&*_inner.source)
         414  +
                /* OperationErrorGenerator.kt:326 */
         415  +
            } /* OperationErrorGenerator.kt:318 */
  377    416   
        }
         417  +
        /* OperationErrorGenerator.kt:270 */
  378    418   
    }
         419  +
    /* OperationErrorGenerator.kt:269 */
  379    420   
}
         421  +
/* OperationErrorGenerator.kt:133 */
  380    422   
impl ::std::fmt::Display for HttpPayloadWithXmlNamespaceAndPrefixError {
         423  +
    /* OperationErrorGenerator.kt:134 */
  381    424   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         425  +
        /* OperationErrorGenerator.kt:318 */
  382    426   
        match self {
         427  +
            /* OperationErrorGenerator.kt:326 */
  383    428   
            Self::Unhandled(_inner) => {
         429  +
                /* OperationErrorGenerator.kt:139 */
  384    430   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  385    431   
                    write!(f, "unhandled error ({code})")
  386    432   
                } else {
  387    433   
                    f.write_str("unhandled error")
  388    434   
                }
  389         -
            }
         435  +
                /* OperationErrorGenerator.kt:326 */
         436  +
            } /* OperationErrorGenerator.kt:318 */
  390    437   
        }
         438  +
        /* OperationErrorGenerator.kt:134 */
  391    439   
    }
         440  +
    /* OperationErrorGenerator.kt:133 */
  392    441   
}
         442  +
/* OperationErrorGenerator.kt:182 */
  393    443   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPayloadWithXmlNamespaceAndPrefixError {
         444  +
    /* OperationErrorGenerator.kt:186 */
  394    445   
    fn code(&self) -> ::std::option::Option<&str> {
         446  +
        /* OperationErrorGenerator.kt:187 */
  395    447   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         448  +
        /* OperationErrorGenerator.kt:186 */
  396    449   
    }
         450  +
    /* OperationErrorGenerator.kt:190 */
  397    451   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         452  +
        /* OperationErrorGenerator.kt:197 */
  398    453   
        ::std::option::Option::None
         454  +
        /* OperationErrorGenerator.kt:190 */
  399    455   
    }
         456  +
    /* OperationErrorGenerator.kt:182 */
  400    457   
}
         458  +
/* OperationErrorGenerator.kt:163 */
  401    459   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPayloadWithXmlNamespaceAndPrefixError {
         460  +
    /* OperationErrorGenerator.kt:164 */
  402    461   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         462  +
        /* OperationErrorGenerator.kt:318 */
  403    463   
        match self {
  404         -
            Self::Unhandled(_inner) => &_inner.meta,
         464  +
            /* OperationErrorGenerator.kt:326 */
         465  +
            Self::Unhandled(_inner) => {
         466  +
                /* OperationErrorGenerator.kt:168 */
         467  +
                &_inner.meta
         468  +
                /* OperationErrorGenerator.kt:326 */
         469  +
            } /* OperationErrorGenerator.kt:318 */
  405    470   
        }
         471  +
        /* OperationErrorGenerator.kt:164 */
  406    472   
    }
         473  +
    /* OperationErrorGenerator.kt:163 */
  407    474   
}
         475  +
/* OperationErrorGenerator.kt:109 */
  408    476   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPayloadWithXmlNamespaceAndPrefixError {
         477  +
    /* OperationErrorGenerator.kt:110 */
  409    478   
    fn create_unhandled_error(
  410    479   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  411    480   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  412    481   
    ) -> Self {
         482  +
        /* OperationErrorGenerator.kt:121 */
  413    483   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  414    484   
            source,
  415    485   
            meta: meta.unwrap_or_default(),
  416    486   
        })
         487  +
        /* OperationErrorGenerator.kt:110 */
  417    488   
    }
         489  +
    /* OperationErrorGenerator.kt:109 */
  418    490   
}
  419    491   
         492  +
/* CodegenDelegator.kt:255 */
  420    493   
pub use crate::operation::http_payload_with_xml_namespace_and_prefix::_http_payload_with_xml_namespace_and_prefix_output::HttpPayloadWithXmlNamespaceAndPrefixOutput;
  421    494   
         495  +
/* CodegenDelegator.kt:255 */
  422    496   
pub use crate::operation::http_payload_with_xml_namespace_and_prefix::_http_payload_with_xml_namespace_and_prefix_input::HttpPayloadWithXmlNamespaceAndPrefixInput;
  423    497   
         498  +
/* RustModule.kt:172 */
  424    499   
mod _http_payload_with_xml_namespace_and_prefix_input;
  425    500   
         501  +
/* RustModule.kt:172 */
  426    502   
mod _http_payload_with_xml_namespace_and_prefix_output;
  427    503   
  428         -
/// Builders
         504  +
/// /* CodegenDelegator.kt:51 */Builders
  429    505   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace_and_prefix/_http_payload_with_xml_namespace_and_prefix_input.rs

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

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_payload_with_xml_namespace_and_prefix/_http_payload_with_xml_namespace_and_prefix_output.rs

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

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

@@ -1,1 +128,146 @@
    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::http_payload_with_xml_namespace_and_prefix::_http_payload_with_xml_namespace_and_prefix_output::HttpPayloadWithXmlNamespaceAndPrefixOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::http_payload_with_xml_namespace_and_prefix::_http_payload_with_xml_namespace_and_prefix_input::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder {
    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::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.http_payload_with_xml_namespace_and_prefix();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `HttpPayloadWithXmlNamespaceAndPrefix`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `HttpPayloadWithXmlNamespaceAndPrefix`.
   24     27   
///
   25         -
/// The following example serializes a payload that uses an XML namespace.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The following example serializes a payload that uses an XML namespace.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct HttpPayloadWithXmlNamespaceAndPrefixFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder,
   30     35   
    config_override: ::std::option::Option<crate::config::Builder>,
   31     36   
}
          37  +
/* FluentBuilderGenerator.kt:381 */
   32     38   
impl
   33     39   
    crate::client::customize::internal::CustomizableSend<
   34     40   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   35     41   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   36     42   
    > for HttpPayloadWithXmlNamespaceAndPrefixFluentBuilder
   37     43   
{
   38     44   
    fn send(
   39     45   
        self,
   40     46   
        config_override: crate::config::Builder,
   41     47   
    ) -> crate::client::customize::internal::BoxFuture<
   42     48   
        crate::client::customize::internal::SendResult<
   43     49   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   44     50   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   45     51   
        >,
   46     52   
    > {
   47     53   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   48     54   
    }
   49     55   
}
          56  +
/* FluentBuilderGenerator.kt:282 */
   50     57   
impl HttpPayloadWithXmlNamespaceAndPrefixFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `HttpPayloadWithXmlNamespaceAndPrefixFluentBuilder`.
   52     60   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   53     61   
        Self {
   54     62   
            handle,
   55     63   
            inner: ::std::default::Default::default(),
   56     64   
            config_override: ::std::option::Option::None,
   57     65   
        }
   58     66   
    }
          67  +
    /* FluentBuilderGenerator.kt:301 */
   59     68   
    /// Access the HttpPayloadWithXmlNamespaceAndPrefix as a reference.
   60     69   
    pub fn as_input(
   61     70   
        &self,
   62     71   
    ) -> &crate::operation::http_payload_with_xml_namespace_and_prefix::builders::HttpPayloadWithXmlNamespaceAndPrefixInputBuilder {
   63     72   
        &self.inner
   64     73   
    }
          74  +
    /* FluentBuilderGenerator.kt:145 */
   65     75   
    /// Sends the request and returns the response.
   66     76   
    ///
   67     77   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   68     78   
    /// can be matched against.
   69     79   
    ///
   70     80   
    /// By default, any retryable failures will be retried twice. Retry behavior
   71     81   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   72     82   
    /// set when configuring the client.
   73     83   
    pub async fn send(
   74     84   
        self,
   75     85   
    ) -> ::std::result::Result<
   76     86   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
   77     87   
        ::aws_smithy_runtime_api::client::result::SdkError<
   78     88   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
   79     89   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   80     90   
        >,
   81     91   
    > {
   82     92   
        let input = self
   83     93   
            .inner
   84     94   
            .build()
   85     95   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   86     96   
        let runtime_plugins =
   87     97   
            crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefix::operation_runtime_plugins(
   88     98   
                self.handle.runtime_plugins.clone(),
   89     99   
                &self.handle.conf,
   90    100   
                self.config_override,
   91    101   
            );
   92    102   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefix::orchestrate(&runtime_plugins, input).await
   93    103   
    }
   94    104   
   95    105   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
   96    106   
    pub fn customize(
   97    107   
        self,
   98    108   
    ) -> crate::client::customize::CustomizableOperation<
   99    109   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixOutput,
  100    110   
        crate::operation::http_payload_with_xml_namespace_and_prefix::HttpPayloadWithXmlNamespaceAndPrefixError,
  101    111   
        Self,
  102    112   
    > {
  103    113   
        crate::client::customize::CustomizableOperation::new(self)
  104    114   
    }
         115  +
    /* FluentBuilderGenerator.kt:315 */
  105    116   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  106    117   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  107    118   
        self
  108    119   
    }
  109    120   
  110    121   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  111    122   
        self.config_override = config_override;
  112    123   
        self
  113    124   
    }
         125  +
    /* FluentBuilderGenerator.kt:498 */
  114    126   
    #[allow(missing_docs)] // documentation missing in model
         127  +
                           /* FluentBuilderGenerator.kt:500 */
  115    128   
    pub fn nested(mut self, input: crate::types::PayloadWithXmlNamespaceAndPrefix) -> Self {
  116    129   
        self.inner = self.inner.nested(input);
  117    130   
        self
  118    131   
    }
         132  +
    /* FluentBuilderGenerator.kt:498 */
  119    133   
    #[allow(missing_docs)] // documentation missing in model
         134  +
                           /* FluentBuilderGenerator.kt:500 */
  120    135   
    pub fn set_nested(mut self, input: ::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix>) -> Self {
  121    136   
        self.inner = self.inner.set_nested(input);
  122    137   
        self
  123    138   
    }
         139  +
    /* FluentBuilderGenerator.kt:518 */
  124    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* FluentBuilderGenerator.kt:520 */
  125    142   
    pub fn get_nested(&self) -> &::std::option::Option<crate::types::PayloadWithXmlNamespaceAndPrefix> {
  126    143   
        self.inner.get_nested()
  127    144   
    }
         145  +
    /* FluentBuilderGenerator.kt:282 */
  128    146   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_prefix_headers.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 `HttpPrefixHeaders`.
           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 HttpPrefixHeaders;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl HttpPrefixHeaders {
    7         -
    /// Creates a new `HttpPrefixHeaders`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `HttpPrefixHeaders`
          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::http_prefix_headers::HttpPrefixHeadersInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::http_prefix_headers::HttpPrefixHeadersOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::http_prefix_headers::HttpPrefixHeadersError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +266,283 @@
   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 HttpPrefixHeaders {
   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("HttpPrefixHeaders");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            HttpPrefixHeadersRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            HttpPrefixHeadersResponseDeserializer,
  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   
            "HttpPrefixHeaders",
  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("HttpPrefixHeaders")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(HttpPrefixHeadersEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::http_prefix_headers::HttpPrefixHeadersError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::http_prefix_headers::HttpPrefixHeadersError,
  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 HttpPrefixHeadersResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for HttpPrefixHeadersResponseDeserializer {
  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_http_prefix_headers::de_http_prefix_headers_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_http_prefix_headers::de_http_prefix_headers_http_response(status, headers, body)
  153    165   
        };
  154    166   
        crate::protocol_serde::type_erase_result(parse_result)
  155    167   
    }
  156    168   
}
         169  +
/* RequestSerializerGenerator.kt:67 */
  157    170   
#[derive(Debug)]
  158    171   
struct HttpPrefixHeadersRequestSerializer;
  159    172   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for HttpPrefixHeadersRequestSerializer {
  160    173   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  161    174   
    fn serialize_input(
  162    175   
        &self,
  163    176   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  164    177   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  165    178   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  166    179   
        let input = input
  167    180   
            .downcast::<crate::operation::http_prefix_headers::HttpPrefixHeadersInput>()
  168    181   
            .expect("correct type");
  169    182   
        let _header_serialization_settings = _cfg
  170    183   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  171    184   
            .cloned()
  172    185   
            .unwrap_or_default();
  173    186   
        let mut request_builder = {
  174    187   
            fn uri_base(
  175    188   
                _input: &crate::operation::http_prefix_headers::HttpPrefixHeadersInput,
  176    189   
                output: &mut ::std::string::String,
  177    190   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  178    191   
                use ::std::fmt::Write as _;
  179    192   
                ::std::write!(output, "/HttpPrefixHeaders").expect("formatting should succeed");
  180    193   
                ::std::result::Result::Ok(())
  181    194   
            }
  182    195   
            #[allow(clippy::unnecessary_wraps)]
  183    196   
            fn update_http_builder(
  184    197   
                input: &crate::operation::http_prefix_headers::HttpPrefixHeadersInput,
  185    198   
                builder: ::http::request::Builder,
  186    199   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  187    200   
                let mut uri = ::std::string::String::new();
  188    201   
                uri_base(input, &mut uri)?;
  189    202   
                let builder = crate::protocol_serde::shape_http_prefix_headers::ser_http_prefix_headers_headers(input, builder)?;
  190    203   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  191    204   
            }
  192    205   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  193    206   
            builder
  194    207   
        };
  195    208   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  196    209   
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct HttpPrefixHeadersEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for HttpPrefixHeadersEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "HttpPrefixHeadersEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<HttpPrefixHeadersInput>()
  221    235   
            .ok_or("failed to downcast to HttpPrefixHeadersInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* RustType.kt:516 */
  235    250   
#[allow(unreachable_code, unused_variables)]
         251  +
/* RustType.kt:516 */
  236    252   
#[cfg(test)]
         253  +
/* ProtocolTestGenerator.kt:98 */
  237    254   
mod http_prefix_headers_test {
  238    255   
  239    256   
    /// Adds headers by prefix
  240    257   
    /// Test ID: HttpPrefixHeadersArePresent
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn http_prefix_headers_are_present_request() {
  244    261   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  245    262   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  246    263   
@@ -392,409 +521,597 @@
  412    429   
            });
  413    430   
            de.deserialize_nonstreaming(&http_response)
  414    431   
        });
  415    432   
        let parsed = parsed
  416    433   
            .expect("should be successful response")
  417    434   
            .downcast::<crate::operation::http_prefix_headers::HttpPrefixHeadersOutput>()
  418    435   
            .unwrap();
  419    436   
        ::pretty_assertions::assert_eq!(parsed.foo, expected_output.foo, "Unexpected value for `foo`");
  420    437   
        ::pretty_assertions::assert_eq!(parsed.foo_map, expected_output.foo_map, "Unexpected value for `foo_map`");
  421    438   
    }
         439  +
         440  +
    /* ProtocolTestGenerator.kt:98 */
  422    441   
}
  423    442   
         443  +
/* OperationErrorGenerator.kt:79 */
  424    444   
/// Error type for the `HttpPrefixHeadersError` operation.
         445  +
/* RustType.kt:516 */
  425    446   
#[non_exhaustive]
         447  +
/* RustType.kt:516 */
  426    448   
#[derive(::std::fmt::Debug)]
  427         -
pub enum HttpPrefixHeadersError {
         449  +
pub /* OperationErrorGenerator.kt:81 */ enum HttpPrefixHeadersError {
         450  +
    /* OperationErrorGenerator.kt:88 */
  428    451   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  429    452   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  430    453   
    variable wildcard pattern and check `.code()`:
  431    454   
     \
  432    455   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  433    456   
     \
  434    457   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-HttpPrefixHeadersError) for what information is available for the error.")]
  435    458   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         459  +
    /* OperationErrorGenerator.kt:81 */
  436    460   
}
         461  +
/* OperationErrorGenerator.kt:218 */
  437    462   
impl HttpPrefixHeadersError {
         463  +
    /* OperationErrorGenerator.kt:219 */
  438    464   
    /// Creates the `HttpPrefixHeadersError::Unhandled` variant from any error type.
  439    465   
    pub fn unhandled(
  440    466   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  441    467   
    ) -> Self {
  442    468   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  443    469   
            source: err.into(),
  444    470   
            meta: ::std::default::Default::default(),
  445    471   
        })
  446    472   
    }
  447    473   
  448    474   
    /// Creates the `HttpPrefixHeadersError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  449    475   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  450    476   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  451    477   
            source: err.clone().into(),
  452    478   
            meta: err,
  453    479   
        })
  454    480   
    }
  455         -
    ///
         481  +
    /// /* OperationErrorGenerator.kt:236 */
  456    482   
    /// Returns error metadata, which includes the error code, message,
  457    483   
    /// request ID, and potentially additional information.
  458    484   
    ///
         485  +
    /* OperationErrorGenerator.kt:242 */
  459    486   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         487  +
        /* OperationErrorGenerator.kt:243 */
  460    488   
        match self {
  461         -
            Self::Unhandled(e) => &e.meta,
         489  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         490  +
            /* OperationErrorGenerator.kt:243 */
  462    491   
        }
         492  +
        /* OperationErrorGenerator.kt:242 */
  463    493   
    }
         494  +
    /* OperationErrorGenerator.kt:218 */
  464    495   
}
         496  +
/* OperationErrorGenerator.kt:269 */
  465    497   
impl ::std::error::Error for HttpPrefixHeadersError {
         498  +
    /* OperationErrorGenerator.kt:270 */
  466    499   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         500  +
        /* OperationErrorGenerator.kt:318 */
  467    501   
        match self {
  468         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         502  +
            /* OperationErrorGenerator.kt:326 */
         503  +
            Self::Unhandled(_inner) => {
         504  +
                /* OperationErrorGenerator.kt:279 */
         505  +
                ::std::option::Option::Some(&*_inner.source)
         506  +
                /* OperationErrorGenerator.kt:326 */
         507  +
            } /* OperationErrorGenerator.kt:318 */
  469    508   
        }
         509  +
        /* OperationErrorGenerator.kt:270 */
  470    510   
    }
         511  +
    /* OperationErrorGenerator.kt:269 */
  471    512   
}
         513  +
/* OperationErrorGenerator.kt:133 */
  472    514   
impl ::std::fmt::Display for HttpPrefixHeadersError {
         515  +
    /* OperationErrorGenerator.kt:134 */
  473    516   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         517  +
        /* OperationErrorGenerator.kt:318 */
  474    518   
        match self {
         519  +
            /* OperationErrorGenerator.kt:326 */
  475    520   
            Self::Unhandled(_inner) => {
         521  +
                /* OperationErrorGenerator.kt:139 */
  476    522   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  477    523   
                    write!(f, "unhandled error ({code})")
  478    524   
                } else {
  479    525   
                    f.write_str("unhandled error")
  480    526   
                }
  481         -
            }
         527  +
                /* OperationErrorGenerator.kt:326 */
         528  +
            } /* OperationErrorGenerator.kt:318 */
  482    529   
        }
         530  +
        /* OperationErrorGenerator.kt:134 */
  483    531   
    }
         532  +
    /* OperationErrorGenerator.kt:133 */
  484    533   
}
         534  +
/* OperationErrorGenerator.kt:182 */
  485    535   
impl ::aws_smithy_types::retry::ProvideErrorKind for HttpPrefixHeadersError {
         536  +
    /* OperationErrorGenerator.kt:186 */
  486    537   
    fn code(&self) -> ::std::option::Option<&str> {
         538  +
        /* OperationErrorGenerator.kt:187 */
  487    539   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         540  +
        /* OperationErrorGenerator.kt:186 */
  488    541   
    }
         542  +
    /* OperationErrorGenerator.kt:190 */
  489    543   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         544  +
        /* OperationErrorGenerator.kt:197 */
  490    545   
        ::std::option::Option::None
         546  +
        /* OperationErrorGenerator.kt:190 */
  491    547   
    }
         548  +
    /* OperationErrorGenerator.kt:182 */
  492    549   
}
         550  +
/* OperationErrorGenerator.kt:163 */
  493    551   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for HttpPrefixHeadersError {
         552  +
    /* OperationErrorGenerator.kt:164 */
  494    553   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         554  +
        /* OperationErrorGenerator.kt:318 */
  495    555   
        match self {
  496         -
            Self::Unhandled(_inner) => &_inner.meta,
         556  +
            /* OperationErrorGenerator.kt:326 */
         557  +
            Self::Unhandled(_inner) => {
         558  +
                /* OperationErrorGenerator.kt:168 */
         559  +
                &_inner.meta
         560  +
                /* OperationErrorGenerator.kt:326 */
         561  +
            } /* OperationErrorGenerator.kt:318 */
  497    562   
        }
         563  +
        /* OperationErrorGenerator.kt:164 */
  498    564   
    }
         565  +
    /* OperationErrorGenerator.kt:163 */
  499    566   
}
         567  +
/* OperationErrorGenerator.kt:109 */
  500    568   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for HttpPrefixHeadersError {
         569  +
    /* OperationErrorGenerator.kt:110 */
  501    570   
    fn create_unhandled_error(
  502    571   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  503    572   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  504    573   
    ) -> Self {
         574  +
        /* OperationErrorGenerator.kt:121 */
  505    575   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  506    576   
            source,
  507    577   
            meta: meta.unwrap_or_default(),
  508    578   
        })
         579  +
        /* OperationErrorGenerator.kt:110 */
  509    580   
    }
         581  +
    /* OperationErrorGenerator.kt:109 */
  510    582   
}
  511    583   
         584  +
/* CodegenDelegator.kt:255 */
  512    585   
pub use crate::operation::http_prefix_headers::_http_prefix_headers_output::HttpPrefixHeadersOutput;
  513    586   
         587  +
/* CodegenDelegator.kt:255 */
  514    588   
pub use crate::operation::http_prefix_headers::_http_prefix_headers_input::HttpPrefixHeadersInput;
  515    589   
         590  +
/* RustModule.kt:172 */
  516    591   
mod _http_prefix_headers_input;
  517    592   
         593  +
/* RustModule.kt:172 */
  518    594   
mod _http_prefix_headers_output;
  519    595   
  520         -
/// Builders
         596  +
/// /* CodegenDelegator.kt:51 */Builders
  521    597   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_prefix_headers/_http_prefix_headers_input.rs

@@ -1,1 +78,140 @@
    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 HttpPrefixHeadersInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpPrefixHeadersInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub foo_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl HttpPrefixHeadersInput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.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 foo_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.foo_map.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl HttpPrefixHeadersInput {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::http_prefix_headers::builders::HttpPrefixHeadersInputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::http_prefix_headers::builders::HttpPrefixHeadersInputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
          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 HttpPrefixHeadersInputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) foo_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl HttpPrefixHeadersInputBuilder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.foo = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.foo = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.foo
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
   50         -
    /// Adds a key-value pair to `foo_map`.
          90  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `foo_map`.
          91  +
    /* BuilderGenerator.kt:437 */
   51     92   
    ///
   52         -
    /// To override the contents of this collection use [`set_foo_map`](Self::set_foo_map).
          93  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_foo_map`](Self::set_foo_map).
          94  +
    /* BuilderGenerator.kt:439 */
   53     95   
    ///
          96  +
    /* BuilderGenerator.kt:445 */
   54     97   
    pub fn foo_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
          98  +
        /* BuilderGenerator.kt:448 */
   55     99   
        let mut hash_map = self.foo_map.unwrap_or_default();
   56    100   
        hash_map.insert(k.into(), v.into());
   57    101   
        self.foo_map = ::std::option::Option::Some(hash_map);
   58    102   
        self
         103  +
        /* BuilderGenerator.kt:445 */
   59    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   60    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   61    108   
    pub fn set_foo_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   62    110   
        self.foo_map = input;
   63    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   64    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   65    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   66    117   
    pub fn get_foo_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         118  +
        /* BuilderGenerator.kt:337 */
   67    119   
        &self.foo_map
         120  +
        /* BuilderGenerator.kt:336 */
   68    121   
    }
   69         -
    /// Consumes the builder and constructs a [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
         122  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpPrefixHeadersInput`](crate::operation::http_prefix_headers::HttpPrefixHeadersInput).
         123  +
    /* BuilderGenerator.kt:253 */
   70    124   
    pub fn build(
   71    125   
        self,
   72    126   
    ) -> ::std::result::Result<crate::operation::http_prefix_headers::HttpPrefixHeadersInput, ::aws_smithy_types::error::operation::BuildError> {
   73         -
        ::std::result::Result::Ok(crate::operation::http_prefix_headers::HttpPrefixHeadersInput {
   74         -
            foo: self.foo,
   75         -
            foo_map: self.foo_map,
   76         -
        })
         127  +
        /* BuilderGenerator.kt:254 */
         128  +
        ::std::result::Result::Ok(
         129  +
            /* BuilderGenerator.kt:477 */
         130  +
            crate::operation::http_prefix_headers::HttpPrefixHeadersInput {
         131  +
                /* BuilderGenerator.kt:481 */ foo: self.foo,
         132  +
                /* BuilderGenerator.kt:481 */
         133  +
                foo_map: self.foo_map,
         134  +
                /* BuilderGenerator.kt:477 */
         135  +
            }, /* BuilderGenerator.kt:254 */
         136  +
        )
         137  +
        /* BuilderGenerator.kt:253 */
   77    138   
    }
         139  +
    /* BuilderGenerator.kt:355 */
   78    140   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/http_prefix_headers/_http_prefix_headers_output.rs

@@ -1,1 +76,135 @@
    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 HttpPrefixHeadersOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct HttpPrefixHeadersOutput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub foo: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub foo_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          15  +
    /* StructureGenerator.kt:201 */
   10     16   
}
          17  +
/* StructureGenerator.kt:135 */
   11     18   
impl HttpPrefixHeadersOutput {
          19  +
    /* StructureGenerator.kt:231 */
   12     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   13     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   14     24   
        self.foo.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 foo_map(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          31  +
        /* StructureGenerator.kt:170 */
   18     32   
        self.foo_map.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   19     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   20     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   21     38   
impl HttpPrefixHeadersOutput {
   22         -
    /// Creates a new builder-style object to manufacture [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
          40  +
    /* BuilderGenerator.kt:175 */
   23     41   
    pub fn builder() -> crate::operation::http_prefix_headers::builders::HttpPrefixHeadersOutputBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   24     43   
        crate::operation::http_prefix_headers::builders::HttpPrefixHeadersOutputBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   25     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   26     47   
}
   27     48   
   28         -
/// A builder for [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
          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 HttpPrefixHeadersOutputBuilder {
   32         -
    pub(crate) foo: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) foo: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */
   33     58   
    pub(crate) foo_map: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
          59  +
    /* BuilderGenerator.kt:345 */
   34     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   35     62   
impl HttpPrefixHeadersOutputBuilder {
          63  +
    /* BuilderGenerator.kt:286 */
   36     64   
    #[allow(missing_docs)] // documentation missing in model
          65  +
                           /* BuilderGenerator.kt:291 */
   37     66   
    pub fn foo(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   38     68   
        self.foo = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   39     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   40     72   
    }
          73  +
    /* BuilderGenerator.kt:312 */
   41     74   
    #[allow(missing_docs)] // documentation missing in model
          75  +
                           /* BuilderGenerator.kt:314 */
   42     76   
    pub fn set_foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          77  +
        /* BuilderGenerator.kt:315 */
   43     78   
        self.foo = input;
   44     79   
        self
          80  +
        /* BuilderGenerator.kt:314 */
   45     81   
    }
          82  +
    /* BuilderGenerator.kt:334 */
   46     83   
    #[allow(missing_docs)] // documentation missing in model
          84  +
                           /* BuilderGenerator.kt:336 */
   47     85   
    pub fn get_foo(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   48     87   
        &self.foo
          88  +
        /* BuilderGenerator.kt:336 */
   49     89   
    }
   50         -
    /// Adds a key-value pair to `foo_map`.
          90  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `foo_map`.
          91  +
    /* BuilderGenerator.kt:437 */
   51     92   
    ///
   52         -
    /// To override the contents of this collection use [`set_foo_map`](Self::set_foo_map).
          93  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_foo_map`](Self::set_foo_map).
          94  +
    /* BuilderGenerator.kt:439 */
   53     95   
    ///
          96  +
    /* BuilderGenerator.kt:445 */
   54     97   
    pub fn foo_map(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
          98  +
        /* BuilderGenerator.kt:448 */
   55     99   
        let mut hash_map = self.foo_map.unwrap_or_default();
   56    100   
        hash_map.insert(k.into(), v.into());
   57    101   
        self.foo_map = ::std::option::Option::Some(hash_map);
   58    102   
        self
         103  +
        /* BuilderGenerator.kt:445 */
   59    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   60    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   61    108   
    pub fn set_foo_map(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   62    110   
        self.foo_map = input;
   63    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   64    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   65    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   66    117   
    pub fn get_foo_map(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         118  +
        /* BuilderGenerator.kt:337 */
   67    119   
        &self.foo_map
         120  +
        /* BuilderGenerator.kt:336 */
   68    121   
    }
   69         -
    /// Consumes the builder and constructs a [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
         122  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`HttpPrefixHeadersOutput`](crate::operation::http_prefix_headers::HttpPrefixHeadersOutput).
         123  +
    /* BuilderGenerator.kt:253 */
   70    124   
    pub fn build(self) -> crate::operation::http_prefix_headers::HttpPrefixHeadersOutput {
         125  +
        /* BuilderGenerator.kt:477 */
   71    126   
        crate::operation::http_prefix_headers::HttpPrefixHeadersOutput {
   72         -
            foo: self.foo,
         127  +
            /* BuilderGenerator.kt:481 */ foo: self.foo,
         128  +
            /* BuilderGenerator.kt:481 */
   73    129   
            foo_map: self.foo_map,
         130  +
            /* BuilderGenerator.kt:477 */
   74    131   
        }
         132  +
        /* BuilderGenerator.kt:253 */
   75    133   
    }
         134  +
    /* BuilderGenerator.kt:355 */
   76    135   
}

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

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