Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

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

@@ -1,1 +49,94 @@
    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 BodyWithXmlNameInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct BodyWithXmlNameInput {
           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 BodyWithXmlNameInput {
          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 BodyWithXmlNameInput {
   16         -
    /// Creates a new builder-style object to manufacture [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          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 BodyWithXmlNameInputBuilder {
          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 BodyWithXmlNameInputBuilder {
          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 [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BodyWithXmlNameInput`](crate::operation::body_with_xml_name::BodyWithXmlNameInput).
          79  +
    /* BuilderGenerator.kt:253 */
   44     80   
    pub fn build(
   45     81   
        self,
   46     82   
    ) -> ::std::result::Result<crate::operation::body_with_xml_name::BodyWithXmlNameInput, ::aws_smithy_types::error::operation::BuildError> {
   47         -
        ::std::result::Result::Ok(crate::operation::body_with_xml_name::BodyWithXmlNameInput { nested: self.nested })
          83  +
        /* BuilderGenerator.kt:254 */
          84  +
        ::std::result::Result::Ok(
          85  +
            /* BuilderGenerator.kt:477 */
          86  +
            crate::operation::body_with_xml_name::BodyWithXmlNameInput {
          87  +
                /* BuilderGenerator.kt:481 */ nested: self.nested,
          88  +
                /* BuilderGenerator.kt:477 */
          89  +
            }, /* BuilderGenerator.kt:254 */
          90  +
        )
          91  +
        /* BuilderGenerator.kt:253 */
   48     92   
    }
          93  +
    /* BuilderGenerator.kt:355 */
   49     94   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/body_with_xml_name/_body_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 BodyWithXmlNameOutput {
           8  +
pub /* StructureGenerator.kt:201 */ struct BodyWithXmlNameOutput {
           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 BodyWithXmlNameOutput {
          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 BodyWithXmlNameOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::body_with_xml_name::builders::BodyWithXmlNameOutputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::body_with_xml_name::builders::BodyWithXmlNameOutputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          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 BodyWithXmlNameOutputBuilder {
          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 BodyWithXmlNameOutputBuilder {
          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 [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BodyWithXmlNameOutput`](crate::operation::body_with_xml_name::BodyWithXmlNameOutput).
          79  +
    /* BuilderGenerator.kt:253 */
   44     80   
    pub fn build(self) -> crate::operation::body_with_xml_name::BodyWithXmlNameOutput {
   45         -
        crate::operation::body_with_xml_name::BodyWithXmlNameOutput { nested: self.nested }
          81  +
        /* BuilderGenerator.kt:477 */
          82  +
        crate::operation::body_with_xml_name::BodyWithXmlNameOutput {
          83  +
            /* BuilderGenerator.kt:481 */ nested: self.nested,
          84  +
            /* BuilderGenerator.kt:477 */
   46     85   
        }
          86  +
        /* BuilderGenerator.kt:253 */
          87  +
    }
          88  +
    /* BuilderGenerator.kt:355 */
   47     89   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/body_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::body_with_xml_name::_body_with_xml_name_output::BodyWithXmlNameOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::body_with_xml_name::_body_with_xml_name_input::BodyWithXmlNameInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder {
    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::body_with_xml_name::BodyWithXmlNameOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::body_with_xml_name::BodyWithXmlNameError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.body_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 `BodyWithXmlName`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `BodyWithXmlName`.
   24     27   
///
   25         -
/// The following example serializes a body that uses an XML name, changing the wrapper name.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The following example serializes a body 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 BodyWithXmlNameFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder,
   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::body_with_xml_name::BodyWithXmlNameOutput,
   35     41   
        crate::operation::body_with_xml_name::BodyWithXmlNameError,
   36     42   
    > for BodyWithXmlNameFluentBuilder
   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::body_with_xml_name::BodyWithXmlNameOutput,
   44     50   
            crate::operation::body_with_xml_name::BodyWithXmlNameError,
   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 BodyWithXmlNameFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `BodyWithXmlNameFluentBuilder`.
   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 BodyWithXmlName as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::body_with_xml_name::builders::BodyWithXmlNameInputBuilder {
   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::body_with_xml_name::BodyWithXmlNameOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::body_with_xml_name::BodyWithXmlNameError,
   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::body_with_xml_name::BodyWithXmlName::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::body_with_xml_name::BodyWithXmlName::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::body_with_xml_name::BodyWithXmlNameOutput,
   97    107   
        crate::operation::body_with_xml_name::BodyWithXmlNameError,
   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/constant_and_variable_query_string.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 `ConstantAndVariableQueryString`.
           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 ConstantAndVariableQueryString;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl ConstantAndVariableQueryString {
    7         -
    /// Creates a new `ConstantAndVariableQueryString`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `ConstantAndVariableQueryString`
          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::constant_and_variable_query_string::ConstantAndVariableQueryStringInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +188,201 @@
   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 ConstantAndVariableQueryString {
   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("ConstantAndVariableQueryString");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            ConstantAndVariableQueryStringRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            ConstantAndVariableQueryStringResponseDeserializer,
  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   
            "ConstantAndVariableQueryString",
  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("ConstantAndVariableQueryString")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(ConstantAndVariableQueryStringEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
  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 ConstantAndVariableQueryStringResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ConstantAndVariableQueryStringResponseDeserializer {
  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_constant_and_variable_query_string::de_constant_and_variable_query_string_http_error(status, headers, body)
  151    163   
        } else {
  152    164   
            crate::protocol_serde::shape_constant_and_variable_query_string::de_constant_and_variable_query_string_http_response(
  153    165   
                status, headers, body,
  154    166   
            )
  155    167   
        };
  156    168   
        crate::protocol_serde::type_erase_result(parse_result)
  157    169   
    }
  158    170   
}
         171  +
/* RequestSerializerGenerator.kt:67 */
  159    172   
#[derive(Debug)]
  160    173   
struct ConstantAndVariableQueryStringRequestSerializer;
  161    174   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ConstantAndVariableQueryStringRequestSerializer {
  162    175   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  163    176   
    fn serialize_input(
  164    177   
        &self,
  165    178   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  166    179   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  167    180   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  168    181   
        let input = input
@@ -190,203 +412,488 @@
  210    223   
                ::std::result::Result::Ok(builder.method("GET").uri(uri))
  211    224   
            }
  212    225   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  213    226   
            builder
  214    227   
        };
  215    228   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  216    229   
  217    230   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  218    231   
    }
  219    232   
}
         233  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  220    234   
#[derive(Debug)]
  221    235   
struct ConstantAndVariableQueryStringEndpointParamsInterceptor;
  222    236   
  223    237   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ConstantAndVariableQueryStringEndpointParamsInterceptor {
  224    238   
    fn name(&self) -> &'static str {
  225    239   
        "ConstantAndVariableQueryStringEndpointParamsInterceptor"
  226    240   
    }
  227    241   
  228    242   
    fn read_before_execution(
  229    243   
        &self,
  230    244   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  231    245   
            '_,
  232    246   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  233    247   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  234    248   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  235    249   
        >,
  236    250   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  237    251   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  238    252   
        let _input = context
  239    253   
            .input()
  240    254   
            .downcast_ref::<ConstantAndVariableQueryStringInput>()
  241    255   
            .ok_or("failed to downcast to ConstantAndVariableQueryStringInput")?;
  242    256   
  243    257   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  244    258   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  245    259   
        })?;
  246    260   
        cfg.interceptor_state()
  247    261   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  248    262   
        ::std::result::Result::Ok(())
  249    263   
    }
  250    264   
}
  251    265   
  252    266   
// The get_* functions below are generated from JMESPath expressions in the
  253    267   
// operationContextParams trait. They target the operation's input shape.
  254    268   
         269  +
/* RustType.kt:516 */
  255    270   
#[allow(unreachable_code, unused_variables)]
         271  +
/* RustType.kt:516 */
  256    272   
#[cfg(test)]
         273  +
/* ProtocolTestGenerator.kt:98 */
  257    274   
mod constant_and_variable_query_string_test {
  258    275   
  259    276   
    /// Mixes constant and variable query string parameters
  260    277   
    /// Test ID: ConstantAndVariableQueryStringMissingOneValue
  261    278   
    #[::tokio::test]
  262    279   
    #[::tracing_test::traced_test]
  263    280   
    async fn constant_and_variable_query_string_missing_one_value_request() {
  264    281   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  265    282   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  266    283   
  267    284   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  268    285   
        let result = client
  269    286   
            .constant_and_variable_query_string()
  270    287   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  271    288   
            .send()
  272    289   
            .await;
  273    290   
        let _ = dbg!(result);
  274    291   
        let http_request = request_receiver.expect_request();
  275    292   
        let expected_query_params = &["foo=bar", "baz=bam"];
  276    293   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  277    294   
        let forbid_params = &["maybeSet"];
  278    295   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::forbid_query_params(&http_request, forbid_params));
  279    296   
        let body = http_request.body().bytes().expect("body should be strict");
  280    297   
        // No body.
  281    298   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  282    299   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  283    300   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  284    301   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  285    302   
    }
  286    303   
  287    304   
    /// Mixes constant and variable query string parameters
  288    305   
    /// Test ID: ConstantAndVariableQueryStringAllValues
  289    306   
    #[::tokio::test]
  290    307   
    #[::tracing_test::traced_test]
  291    308   
    async fn constant_and_variable_query_string_all_values_request() {
  292    309   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  293    310   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  294    311   
  295    312   
        let client = crate::Client::from_conf(config_builder.http_client(http_client).build());
  296    313   
        let result = client
  297    314   
            .constant_and_variable_query_string()
  298    315   
            .set_baz(::std::option::Option::Some("bam".to_owned()))
  299    316   
            .set_maybe_set(::std::option::Option::Some("yes".to_owned()))
  300    317   
            .send()
  301    318   
            .await;
  302    319   
        let _ = dbg!(result);
  303    320   
        let http_request = request_receiver.expect_request();
  304    321   
        let expected_query_params = &["foo=bar", "baz=bam", "maybeSet=yes"];
  305    322   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_query_string(&http_request, expected_query_params));
  306    323   
        let body = http_request.body().bytes().expect("body should be strict");
  307    324   
        // No body.
  308    325   
        ::pretty_assertions::assert_eq!(&body, &bytes::Bytes::new());
  309    326   
        let uri: ::http::Uri = http_request.uri().parse().expect("invalid URI sent");
  310    327   
        ::pretty_assertions::assert_eq!(http_request.method(), "GET", "method was incorrect");
  311    328   
        ::pretty_assertions::assert_eq!(uri.path(), "/ConstantAndVariableQueryString", "path was incorrect");
  312    329   
    }
         330  +
         331  +
    /* ProtocolTestGenerator.kt:98 */
  313    332   
}
  314    333   
         334  +
/* OperationErrorGenerator.kt:79 */
  315    335   
/// Error type for the `ConstantAndVariableQueryStringError` operation.
         336  +
/* RustType.kt:516 */
  316    337   
#[non_exhaustive]
         338  +
/* RustType.kt:516 */
  317    339   
#[derive(::std::fmt::Debug)]
  318         -
pub enum ConstantAndVariableQueryStringError {
         340  +
pub /* OperationErrorGenerator.kt:81 */ enum ConstantAndVariableQueryStringError {
         341  +
    /* OperationErrorGenerator.kt:88 */
  319    342   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  320    343   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  321    344   
    variable wildcard pattern and check `.code()`:
  322    345   
     \
  323    346   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  324    347   
     \
  325    348   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ConstantAndVariableQueryStringError) for what information is available for the error.")]
  326    349   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         350  +
    /* OperationErrorGenerator.kt:81 */
  327    351   
}
         352  +
/* OperationErrorGenerator.kt:218 */
  328    353   
impl ConstantAndVariableQueryStringError {
         354  +
    /* OperationErrorGenerator.kt:219 */
  329    355   
    /// Creates the `ConstantAndVariableQueryStringError::Unhandled` variant from any error type.
  330    356   
    pub fn unhandled(
  331    357   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  332    358   
    ) -> Self {
  333    359   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  334    360   
            source: err.into(),
  335    361   
            meta: ::std::default::Default::default(),
  336    362   
        })
  337    363   
    }
  338    364   
  339    365   
    /// Creates the `ConstantAndVariableQueryStringError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  340    366   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  341    367   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  342    368   
            source: err.clone().into(),
  343    369   
            meta: err,
  344    370   
        })
  345    371   
    }
  346         -
    ///
         372  +
    /// /* OperationErrorGenerator.kt:236 */
  347    373   
    /// Returns error metadata, which includes the error code, message,
  348    374   
    /// request ID, and potentially additional information.
  349    375   
    ///
         376  +
    /* OperationErrorGenerator.kt:242 */
  350    377   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         378  +
        /* OperationErrorGenerator.kt:243 */
  351    379   
        match self {
  352         -
            Self::Unhandled(e) => &e.meta,
         380  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         381  +
            /* OperationErrorGenerator.kt:243 */
  353    382   
        }
         383  +
        /* OperationErrorGenerator.kt:242 */
  354    384   
    }
         385  +
    /* OperationErrorGenerator.kt:218 */
  355    386   
}
         387  +
/* OperationErrorGenerator.kt:269 */
  356    388   
impl ::std::error::Error for ConstantAndVariableQueryStringError {
         389  +
    /* OperationErrorGenerator.kt:270 */
  357    390   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         391  +
        /* OperationErrorGenerator.kt:318 */
  358    392   
        match self {
  359         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         393  +
            /* OperationErrorGenerator.kt:326 */
         394  +
            Self::Unhandled(_inner) => {
         395  +
                /* OperationErrorGenerator.kt:279 */
         396  +
                ::std::option::Option::Some(&*_inner.source)
         397  +
                /* OperationErrorGenerator.kt:326 */
         398  +
            } /* OperationErrorGenerator.kt:318 */
  360    399   
        }
         400  +
        /* OperationErrorGenerator.kt:270 */
  361    401   
    }
         402  +
    /* OperationErrorGenerator.kt:269 */
  362    403   
}
         404  +
/* OperationErrorGenerator.kt:133 */
  363    405   
impl ::std::fmt::Display for ConstantAndVariableQueryStringError {
         406  +
    /* OperationErrorGenerator.kt:134 */
  364    407   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         408  +
        /* OperationErrorGenerator.kt:318 */
  365    409   
        match self {
         410  +
            /* OperationErrorGenerator.kt:326 */
  366    411   
            Self::Unhandled(_inner) => {
         412  +
                /* OperationErrorGenerator.kt:139 */
  367    413   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  368    414   
                    write!(f, "unhandled error ({code})")
  369    415   
                } else {
  370    416   
                    f.write_str("unhandled error")
  371    417   
                }
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  372    420   
        }
         421  +
        /* OperationErrorGenerator.kt:134 */
  373    422   
    }
  374         -
    }
         423  +
    /* OperationErrorGenerator.kt:133 */
  375    424   
}
         425  +
/* OperationErrorGenerator.kt:182 */
  376    426   
impl ::aws_smithy_types::retry::ProvideErrorKind for ConstantAndVariableQueryStringError {
         427  +
    /* OperationErrorGenerator.kt:186 */
  377    428   
    fn code(&self) -> ::std::option::Option<&str> {
         429  +
        /* OperationErrorGenerator.kt:187 */
  378    430   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         431  +
        /* OperationErrorGenerator.kt:186 */
  379    432   
    }
         433  +
    /* OperationErrorGenerator.kt:190 */
  380    434   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         435  +
        /* OperationErrorGenerator.kt:197 */
  381    436   
        ::std::option::Option::None
         437  +
        /* OperationErrorGenerator.kt:190 */
  382    438   
    }
         439  +
    /* OperationErrorGenerator.kt:182 */
  383    440   
}
         441  +
/* OperationErrorGenerator.kt:163 */
  384    442   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConstantAndVariableQueryStringError {
         443  +
    /* OperationErrorGenerator.kt:164 */
  385    444   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         445  +
        /* OperationErrorGenerator.kt:318 */
  386    446   
        match self {
  387         -
            Self::Unhandled(_inner) => &_inner.meta,
         447  +
            /* OperationErrorGenerator.kt:326 */
         448  +
            Self::Unhandled(_inner) => {
         449  +
                /* OperationErrorGenerator.kt:168 */
         450  +
                &_inner.meta
         451  +
                /* OperationErrorGenerator.kt:326 */
         452  +
            } /* OperationErrorGenerator.kt:318 */
  388    453   
        }
         454  +
        /* OperationErrorGenerator.kt:164 */
  389    455   
    }
         456  +
    /* OperationErrorGenerator.kt:163 */
  390    457   
}
         458  +
/* OperationErrorGenerator.kt:109 */
  391    459   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ConstantAndVariableQueryStringError {
         460  +
    /* OperationErrorGenerator.kt:110 */
  392    461   
    fn create_unhandled_error(
  393    462   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  394    463   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  395    464   
    ) -> Self {
         465  +
        /* OperationErrorGenerator.kt:121 */
  396    466   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  397    467   
            source,
  398    468   
            meta: meta.unwrap_or_default(),
  399    469   
        })
         470  +
        /* OperationErrorGenerator.kt:110 */
  400    471   
    }
         472  +
    /* OperationErrorGenerator.kt:109 */
  401    473   
}
  402    474   
         475  +
/* CodegenDelegator.kt:255 */
  403    476   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutput;
  404    477   
         478  +
/* CodegenDelegator.kt:255 */
  405    479   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInput;
  406    480   
         481  +
/* RustModule.kt:172 */
  407    482   
mod _constant_and_variable_query_string_input;
  408    483   
         484  +
/* RustModule.kt:172 */
  409    485   
mod _constant_and_variable_query_string_output;
  410    486   
  411         -
/// Builders
         487  +
/// /* CodegenDelegator.kt:51 */Builders
  412    488   
pub mod builders;

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

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

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

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ConstantAndVariableQueryStringOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantAndVariableQueryStringOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ConstantAndVariableQueryStringOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ConstantAndVariableQueryStringOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ConstantAndVariableQueryStringOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ConstantAndVariableQueryStringOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantAndVariableQueryStringOutput`](crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {
   20         -
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

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

@@ -1,1 +139,163 @@
    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::constant_and_variable_query_string::_constant_and_variable_query_string_output::ConstantAndVariableQueryStringOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::constant_and_variable_query_string::_constant_and_variable_query_string_input::ConstantAndVariableQueryStringInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
    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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.constant_and_variable_query_string();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ConstantAndVariableQueryString`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ConstantAndVariableQueryString`.
   24     27   
///
   25         -
/// This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example uses fixed query string params and variable query string params. The fixed query string parameters and variable parameters must both be serialized (implementations may need to merge them together).
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ConstantAndVariableQueryStringFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder,
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   35     41   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   36     42   
    > for ConstantAndVariableQueryStringFluentBuilder
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   44     50   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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 ConstantAndVariableQueryStringFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ConstantAndVariableQueryStringFluentBuilder`.
   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 ConstantAndVariableQueryString as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::constant_and_variable_query_string::builders::ConstantAndVariableQueryStringInputBuilder {
   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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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::constant_and_variable_query_string::ConstantAndVariableQueryString::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::constant_and_variable_query_string::ConstantAndVariableQueryString::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::constant_and_variable_query_string::ConstantAndVariableQueryStringOutput,
   97    107   
        crate::operation::constant_and_variable_query_string::ConstantAndVariableQueryStringError,
   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 baz(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.baz(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_baz(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_baz(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_baz(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_baz()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:498 */
  125    143   
    #[allow(missing_docs)] // documentation missing in model
         144  +
                           /* FluentBuilderGenerator.kt:500 */
  126    145   
    pub fn maybe_set(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  127    146   
        self.inner = self.inner.maybe_set(input.into());
  128    147   
        self
  129    148   
    }
         149  +
    /* FluentBuilderGenerator.kt:498 */
  130    150   
    #[allow(missing_docs)] // documentation missing in model
         151  +
                           /* FluentBuilderGenerator.kt:500 */
  131    152   
    pub fn set_maybe_set(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  132    153   
        self.inner = self.inner.set_maybe_set(input);
  133    154   
        self
  134    155   
    }
         156  +
    /* FluentBuilderGenerator.kt:518 */
  135    157   
    #[allow(missing_docs)] // documentation missing in model
         158  +
                           /* FluentBuilderGenerator.kt:520 */
  136    159   
    pub fn get_maybe_set(&self) -> &::std::option::Option<::std::string::String> {
  137    160   
        self.inner.get_maybe_set()
  138    161   
    }
         162  +
    /* FluentBuilderGenerator.kt:282 */
  139    163   
}

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

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

@@ -1,1 +51,95 @@
    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 ConstantQueryStringInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantQueryStringInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub hello: ::std::option::Option<::std::string::String>,
          12  +
    /* StructureGenerator.kt:201 */
    8     13   
}
          14  +
/* StructureGenerator.kt:135 */
    9     15   
impl ConstantQueryStringInput {
          16  +
    /* StructureGenerator.kt:231 */
   10     17   
    #[allow(missing_docs)] // documentation missing in model
          18  +
                           /* StructureGenerator.kt:166 */
   11     19   
    pub fn hello(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   12     21   
        self.hello.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   13     23   
    }
          24  +
    /* StructureGenerator.kt:135 */
   14     25   
}
          26  +
/* ClientCodegenVisitor.kt:237 */
   15     27   
impl ConstantQueryStringInput {
   16         -
    /// Creates a new builder-style object to manufacture [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          28  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          29  +
    /* BuilderGenerator.kt:175 */
   17     30   
    pub fn builder() -> crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
          31  +
        /* BuilderGenerator.kt:176 */
   18     32   
        crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder::default()
          33  +
        /* BuilderGenerator.kt:175 */
   19     34   
    }
          35  +
    /* ClientCodegenVisitor.kt:237 */
   20     36   
}
   21     37   
   22         -
/// A builder for [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          38  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          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 ConstantQueryStringInputBuilder {
   26         -
    pub(crate) hello: ::std::option::Option<::std::string::String>,
          45  +
    /* BuilderGenerator.kt:275 */ pub(crate) hello: ::std::option::Option<::std::string::String>,
          46  +
    /* BuilderGenerator.kt:345 */
   27     47   
}
          48  +
/* BuilderGenerator.kt:355 */
   28     49   
impl ConstantQueryStringInputBuilder {
          50  +
    /* BuilderGenerator.kt:286 */
   29     51   
    #[allow(missing_docs)] // documentation missing in model
   30         -
    /// This field is required.
          52  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          53  +
    /* BuilderGenerator.kt:291 */
   31     54   
    pub fn hello(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          55  +
        /* BuilderGenerator.kt:292 */
   32     56   
        self.hello = ::std::option::Option::Some(input.into());
          57  +
        /* BuilderGenerator.kt:293 */
   33     58   
        self
          59  +
        /* BuilderGenerator.kt:291 */
   34     60   
    }
          61  +
    /* BuilderGenerator.kt:312 */
   35     62   
    #[allow(missing_docs)] // documentation missing in model
          63  +
                           /* BuilderGenerator.kt:314 */
   36     64   
    pub fn set_hello(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          65  +
        /* BuilderGenerator.kt:315 */
   37     66   
        self.hello = input;
   38     67   
        self
          68  +
        /* BuilderGenerator.kt:314 */
   39     69   
    }
          70  +
    /* BuilderGenerator.kt:334 */
   40     71   
    #[allow(missing_docs)] // documentation missing in model
          72  +
                           /* BuilderGenerator.kt:336 */
   41     73   
    pub fn get_hello(&self) -> &::std::option::Option<::std::string::String> {
          74  +
        /* BuilderGenerator.kt:337 */
   42     75   
        &self.hello
          76  +
        /* BuilderGenerator.kt:336 */
   43     77   
    }
   44         -
    /// Consumes the builder and constructs a [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          78  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantQueryStringInput`](crate::operation::constant_query_string::ConstantQueryStringInput).
          79  +
    /* BuilderGenerator.kt:253 */
   45     80   
    pub fn build(
   46     81   
        self,
   47     82   
    ) -> ::std::result::Result<crate::operation::constant_query_string::ConstantQueryStringInput, ::aws_smithy_types::error::operation::BuildError>
   48     83   
    {
   49         -
        ::std::result::Result::Ok(crate::operation::constant_query_string::ConstantQueryStringInput { hello: self.hello })
          84  +
        /* BuilderGenerator.kt:254 */
          85  +
        ::std::result::Result::Ok(
          86  +
            /* BuilderGenerator.kt:477 */
          87  +
            crate::operation::constant_query_string::ConstantQueryStringInput {
          88  +
                /* BuilderGenerator.kt:481 */ hello: self.hello,
          89  +
                /* BuilderGenerator.kt:477 */
          90  +
            }, /* BuilderGenerator.kt:254 */
          91  +
        )
          92  +
        /* BuilderGenerator.kt:253 */
   50     93   
    }
          94  +
    /* BuilderGenerator.kt:355 */
   51     95   
}

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

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ConstantQueryStringOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ConstantQueryStringOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ConstantQueryStringOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::constant_query_string::builders::ConstantQueryStringOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::constant_query_string::builders::ConstantQueryStringOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ConstantQueryStringOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ConstantQueryStringOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ConstantQueryStringOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConstantQueryStringOutput`](crate::operation::constant_query_string::ConstantQueryStringOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::constant_query_string::ConstantQueryStringOutput {
   20         -
        crate::operation::constant_query_string::ConstantQueryStringOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::constant_query_string::ConstantQueryStringOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/constant_query_string/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::constant_query_string::_constant_query_string_output::ConstantQueryStringOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::constant_query_string::_constant_query_string_input::ConstantQueryStringInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
    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::constant_query_string::ConstantQueryStringOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::constant_query_string::ConstantQueryStringError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.constant_query_string();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ConstantQueryString`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ConstantQueryString`.
   24     27   
///
   25         -
/// This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, `{hello}`.
          28  +
/// /* FluentBuilderGenerator.kt:130 */This example uses a constant query string parameters and a label. This simply tests that labels and query string parameters are compatible. The fixed query string parameter named "hello" should in no way conflict with the label, `{hello}`.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ConstantQueryStringFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder,
   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::constant_query_string::ConstantQueryStringOutput,
   35     41   
        crate::operation::constant_query_string::ConstantQueryStringError,
   36     42   
    > for ConstantQueryStringFluentBuilder
   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::constant_query_string::ConstantQueryStringOutput,
   44     50   
            crate::operation::constant_query_string::ConstantQueryStringError,
   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 ConstantQueryStringFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ConstantQueryStringFluentBuilder`.
   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 ConstantQueryString as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::constant_query_string::builders::ConstantQueryStringInputBuilder {
   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::constant_query_string::ConstantQueryStringOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::constant_query_string::ConstantQueryStringError,
   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::constant_query_string::ConstantQueryString::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::constant_query_string::ConstantQueryString::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::constant_query_string::ConstantQueryStringOutput,
   97    107   
        crate::operation::constant_query_string::ConstantQueryStringError,
   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 hello(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  113    126   
        self.inner = self.inner.hello(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_hello(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  118    133   
        self.inner = self.inner.set_hello(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_hello(&self) -> &::std::option::Option<::std::string::String> {
  123    140   
        self.inner.get_hello()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}

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

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

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

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

@@ -1,1 +22,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct ContentTypeParametersOutput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ContentTypeParametersOutput {/* StructureGenerator.kt:201 */}
           9  +
/* ClientCodegenVisitor.kt:237 */
    6     10   
impl ContentTypeParametersOutput {
    7         -
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          11  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          12  +
    /* BuilderGenerator.kt:175 */
    8     13   
    pub fn builder() -> crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder {
          14  +
        /* BuilderGenerator.kt:176 */
    9     15   
        crate::operation::content_type_parameters::builders::ContentTypeParametersOutputBuilder::default()
          16  +
        /* BuilderGenerator.kt:175 */
   10     17   
    }
          18  +
    /* ClientCodegenVisitor.kt:237 */
   11     19   
}
   12     20   
   13         -
/// A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          21  +
/// /* BuilderGenerator.kt:342 */A builder for [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          22  +
/* RustType.kt:516 */
   14     23   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          24  +
/* RustType.kt:516 */
   15     25   
#[non_exhaustive]
   16         -
pub struct ContentTypeParametersOutputBuilder {}
          26  +
/* BuilderGenerator.kt:345 */
          27  +
pub struct ContentTypeParametersOutputBuilder {/* BuilderGenerator.kt:345 */}
          28  +
/* BuilderGenerator.kt:355 */
   17     29   
impl ContentTypeParametersOutputBuilder {
   18         -
    /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          30  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::operation::content_type_parameters::ContentTypeParametersOutput).
          31  +
    /* BuilderGenerator.kt:253 */
   19     32   
    pub fn build(self) -> crate::operation::content_type_parameters::ContentTypeParametersOutput {
   20         -
        crate::operation::content_type_parameters::ContentTypeParametersOutput {}
          33  +
        /* BuilderGenerator.kt:477 */
          34  +
        crate::operation::content_type_parameters::ContentTypeParametersOutput {
          35  +
        /* BuilderGenerator.kt:477 */}
          36  +
        /* BuilderGenerator.kt:253 */
   21     37   
    }
          38  +
    /* BuilderGenerator.kt:355 */
   22     39   
}

tmp-codegen-diff/codegen-client-test/rest_xml/rust-client-codegen/src/operation/content_type_parameters/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::content_type_parameters::_content_type_parameters_output::ContentTypeParametersOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::content_type_parameters::_content_type_parameters_input::ContentTypeParametersInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
    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::content_type_parameters::ContentTypeParametersOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.content_type_parameters();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `ContentTypeParameters`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `ContentTypeParameters`.
   24     27   
///
   25         -
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
          28  +
/// /* FluentBuilderGenerator.kt:130 */The example tests how servers must support requests containing a `Content-Type` header with parameters.
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct ContentTypeParametersFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder,
   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::content_type_parameters::ContentTypeParametersOutput,
   35     41   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   36     42   
    > for ContentTypeParametersFluentBuilder
   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::content_type_parameters::ContentTypeParametersOutput,
   44     50   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   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 ContentTypeParametersFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `ContentTypeParametersFluentBuilder`.
   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 ContentTypeParameters as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::content_type_parameters::builders::ContentTypeParametersInputBuilder {
   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::content_type_parameters::ContentTypeParametersOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::content_type_parameters::ContentTypeParametersError,
   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::content_type_parameters::ContentTypeParameters::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::content_type_parameters::ContentTypeParameters::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::content_type_parameters::ContentTypeParametersOutput,
   97    107   
        crate::operation::content_type_parameters::ContentTypeParametersError,
   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 value(mut self, input: i32) -> Self {
  113    126   
        self.inner = self.inner.value(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_value(mut self, input: ::std::option::Option<i32>) -> Self {
  118    133   
        self.inner = self.inner.set_value(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_value(&self) -> &::std::option::Option<i32> {
  123    140   
        self.inner.get_value()
  124    141   
    }
         142  +
    /* FluentBuilderGenerator.kt:282 */
  125    143   
}