Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_generic_string/_malformed_content_type_with_generic_string_input.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_generic_string/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_payload/_malformed_content_type_with_payload_input.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_with_payload/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body/_malformed_content_type_without_body_input.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_content_type_without_body/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double/_malformed_double_input.rs

@@ -1,1 +118,217 @@
    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 MalformedDoubleInput {
           8  +
pub /* StructureGenerator.kt:201 */ struct MalformedDoubleInput {
           9  +
    /* StructureGenerator.kt:231 */
    6     10   
    #[allow(missing_docs)] // documentation missing in model
    7     11   
    pub double_in_body: ::std::option::Option<f64>,
          12  +
    /* StructureGenerator.kt:231 */
    8     13   
    #[allow(missing_docs)] // documentation missing in model
    9     14   
    pub double_in_path: ::std::option::Option<f64>,
          15  +
    /* StructureGenerator.kt:231 */
   10     16   
    #[allow(missing_docs)] // documentation missing in model
   11     17   
    pub double_in_query: ::std::option::Option<f64>,
          18  +
    /* StructureGenerator.kt:231 */
   12     19   
    #[allow(missing_docs)] // documentation missing in model
   13     20   
    pub double_in_header: ::std::option::Option<f64>,
          21  +
    /* StructureGenerator.kt:201 */
   14     22   
}
          23  +
/* StructureGenerator.kt:135 */
   15     24   
impl MalformedDoubleInput {
          25  +
    /* StructureGenerator.kt:231 */
   16     26   
    #[allow(missing_docs)] // documentation missing in model
          27  +
                           /* StructureGenerator.kt:166 */
   17     28   
    pub fn double_in_body(&self) -> ::std::option::Option<f64> {
          29  +
        /* StructureGenerator.kt:168 */
   18     30   
        self.double_in_body
          31  +
        /* StructureGenerator.kt:166 */
   19     32   
    }
          33  +
    /* StructureGenerator.kt:231 */
   20     34   
    #[allow(missing_docs)] // documentation missing in model
          35  +
                           /* StructureGenerator.kt:166 */
   21     36   
    pub fn double_in_path(&self) -> ::std::option::Option<f64> {
          37  +
        /* StructureGenerator.kt:168 */
   22     38   
        self.double_in_path
          39  +
        /* StructureGenerator.kt:166 */
   23     40   
    }
          41  +
    /* StructureGenerator.kt:231 */
   24     42   
    #[allow(missing_docs)] // documentation missing in model
          43  +
                           /* StructureGenerator.kt:166 */
   25     44   
    pub fn double_in_query(&self) -> ::std::option::Option<f64> {
          45  +
        /* StructureGenerator.kt:168 */
   26     46   
        self.double_in_query
          47  +
        /* StructureGenerator.kt:166 */
   27     48   
    }
          49  +
    /* StructureGenerator.kt:231 */
   28     50   
    #[allow(missing_docs)] // documentation missing in model
          51  +
                           /* StructureGenerator.kt:166 */
   29     52   
    pub fn double_in_header(&self) -> ::std::option::Option<f64> {
          53  +
        /* StructureGenerator.kt:168 */
   30     54   
        self.double_in_header
          55  +
        /* StructureGenerator.kt:166 */
   31     56   
    }
          57  +
    /* StructureGenerator.kt:135 */
   32     58   
}
          59  +
/* ClientCodegenVisitor.kt:237 */
   33     60   
impl MalformedDoubleInput {
   34         -
    /// Creates a new builder-style object to manufacture [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
          61  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
          62  +
    /* BuilderGenerator.kt:175 */
   35     63   
    pub fn builder() -> crate::operation::malformed_double::builders::MalformedDoubleInputBuilder {
          64  +
        /* BuilderGenerator.kt:176 */
   36     65   
        crate::operation::malformed_double::builders::MalformedDoubleInputBuilder::default()
          66  +
        /* BuilderGenerator.kt:175 */
   37     67   
    }
          68  +
    /* ClientCodegenVisitor.kt:237 */
   38     69   
}
   39     70   
   40         -
/// A builder for [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
          71  +
/// /* BuilderGenerator.kt:342 */A builder for [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
          72  +
/* RustType.kt:516 */
   41     73   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          74  +
/* RustType.kt:516 */
   42     75   
#[non_exhaustive]
          76  +
/* BuilderGenerator.kt:345 */
   43     77   
pub struct MalformedDoubleInputBuilder {
   44         -
    pub(crate) double_in_body: ::std::option::Option<f64>,
   45         -
    pub(crate) double_in_path: ::std::option::Option<f64>,
   46         -
    pub(crate) double_in_query: ::std::option::Option<f64>,
   47         -
    pub(crate) double_in_header: ::std::option::Option<f64>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_in_body: ::std::option::Option<f64>,
          79  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_in_path: ::std::option::Option<f64>,
          80  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_in_query: ::std::option::Option<f64>,
          81  +
    /* BuilderGenerator.kt:275 */ pub(crate) double_in_header: ::std::option::Option<f64>,
          82  +
    /* BuilderGenerator.kt:345 */
   48     83   
}
          84  +
/* BuilderGenerator.kt:355 */
   49     85   
impl MalformedDoubleInputBuilder {
          86  +
    /* BuilderGenerator.kt:286 */
   50     87   
    #[allow(missing_docs)] // documentation missing in model
          88  +
                           /* BuilderGenerator.kt:291 */
   51     89   
    pub fn double_in_body(mut self, input: f64) -> Self {
          90  +
        /* BuilderGenerator.kt:292 */
   52     91   
        self.double_in_body = ::std::option::Option::Some(input);
          92  +
        /* BuilderGenerator.kt:293 */
   53     93   
        self
          94  +
        /* BuilderGenerator.kt:291 */
   54     95   
    }
          96  +
    /* BuilderGenerator.kt:312 */
   55     97   
    #[allow(missing_docs)] // documentation missing in model
          98  +
                           /* BuilderGenerator.kt:314 */
   56     99   
    pub fn set_double_in_body(mut self, input: ::std::option::Option<f64>) -> Self {
         100  +
        /* BuilderGenerator.kt:315 */
   57    101   
        self.double_in_body = input;
   58    102   
        self
         103  +
        /* BuilderGenerator.kt:314 */
   59    104   
    }
         105  +
    /* BuilderGenerator.kt:334 */
   60    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:336 */
   61    108   
    pub fn get_double_in_body(&self) -> &::std::option::Option<f64> {
         109  +
        /* BuilderGenerator.kt:337 */
   62    110   
        &self.double_in_body
         111  +
        /* BuilderGenerator.kt:336 */
   63    112   
    }
         113  +
    /* BuilderGenerator.kt:286 */
   64    114   
    #[allow(missing_docs)] // documentation missing in model
   65         -
    /// This field is required.
         115  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         116  +
    /* BuilderGenerator.kt:291 */
   66    117   
    pub fn double_in_path(mut self, input: f64) -> Self {
         118  +
        /* BuilderGenerator.kt:292 */
   67    119   
        self.double_in_path = ::std::option::Option::Some(input);
         120  +
        /* BuilderGenerator.kt:293 */
   68    121   
        self
         122  +
        /* BuilderGenerator.kt:291 */
   69    123   
    }
         124  +
    /* BuilderGenerator.kt:312 */
   70    125   
    #[allow(missing_docs)] // documentation missing in model
         126  +
                           /* BuilderGenerator.kt:314 */
   71    127   
    pub fn set_double_in_path(mut self, input: ::std::option::Option<f64>) -> Self {
         128  +
        /* BuilderGenerator.kt:315 */
   72    129   
        self.double_in_path = input;
   73    130   
        self
         131  +
        /* BuilderGenerator.kt:314 */
   74    132   
    }
         133  +
    /* BuilderGenerator.kt:334 */
   75    134   
    #[allow(missing_docs)] // documentation missing in model
         135  +
                           /* BuilderGenerator.kt:336 */
   76    136   
    pub fn get_double_in_path(&self) -> &::std::option::Option<f64> {
         137  +
        /* BuilderGenerator.kt:337 */
   77    138   
        &self.double_in_path
         139  +
        /* BuilderGenerator.kt:336 */
   78    140   
    }
         141  +
    /* BuilderGenerator.kt:286 */
   79    142   
    #[allow(missing_docs)] // documentation missing in model
         143  +
                           /* BuilderGenerator.kt:291 */
   80    144   
    pub fn double_in_query(mut self, input: f64) -> Self {
         145  +
        /* BuilderGenerator.kt:292 */
   81    146   
        self.double_in_query = ::std::option::Option::Some(input);
         147  +
        /* BuilderGenerator.kt:293 */
   82    148   
        self
         149  +
        /* BuilderGenerator.kt:291 */
   83    150   
    }
         151  +
    /* BuilderGenerator.kt:312 */
   84    152   
    #[allow(missing_docs)] // documentation missing in model
         153  +
                           /* BuilderGenerator.kt:314 */
   85    154   
    pub fn set_double_in_query(mut self, input: ::std::option::Option<f64>) -> Self {
         155  +
        /* BuilderGenerator.kt:315 */
   86    156   
        self.double_in_query = input;
   87    157   
        self
         158  +
        /* BuilderGenerator.kt:314 */
   88    159   
    }
         160  +
    /* BuilderGenerator.kt:334 */
   89    161   
    #[allow(missing_docs)] // documentation missing in model
         162  +
                           /* BuilderGenerator.kt:336 */
   90    163   
    pub fn get_double_in_query(&self) -> &::std::option::Option<f64> {
         164  +
        /* BuilderGenerator.kt:337 */
   91    165   
        &self.double_in_query
         166  +
        /* BuilderGenerator.kt:336 */
   92    167   
    }
         168  +
    /* BuilderGenerator.kt:286 */
   93    169   
    #[allow(missing_docs)] // documentation missing in model
         170  +
                           /* BuilderGenerator.kt:291 */
   94    171   
    pub fn double_in_header(mut self, input: f64) -> Self {
         172  +
        /* BuilderGenerator.kt:292 */
   95    173   
        self.double_in_header = ::std::option::Option::Some(input);
         174  +
        /* BuilderGenerator.kt:293 */
   96    175   
        self
         176  +
        /* BuilderGenerator.kt:291 */
   97    177   
    }
         178  +
    /* BuilderGenerator.kt:312 */
   98    179   
    #[allow(missing_docs)] // documentation missing in model
         180  +
                           /* BuilderGenerator.kt:314 */
   99    181   
    pub fn set_double_in_header(mut self, input: ::std::option::Option<f64>) -> Self {
         182  +
        /* BuilderGenerator.kt:315 */
  100    183   
        self.double_in_header = input;
  101    184   
        self
         185  +
        /* BuilderGenerator.kt:314 */
  102    186   
    }
         187  +
    /* BuilderGenerator.kt:334 */
  103    188   
    #[allow(missing_docs)] // documentation missing in model
         189  +
                           /* BuilderGenerator.kt:336 */
  104    190   
    pub fn get_double_in_header(&self) -> &::std::option::Option<f64> {
         191  +
        /* BuilderGenerator.kt:337 */
  105    192   
        &self.double_in_header
         193  +
        /* BuilderGenerator.kt:336 */
  106    194   
    }
  107         -
    /// Consumes the builder and constructs a [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
         195  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`MalformedDoubleInput`](crate::operation::malformed_double::MalformedDoubleInput).
         196  +
    /* BuilderGenerator.kt:253 */
  108    197   
    pub fn build(
  109    198   
        self,
  110    199   
    ) -> ::std::result::Result<crate::operation::malformed_double::MalformedDoubleInput, ::aws_smithy_types::error::operation::BuildError> {
  111         -
        ::std::result::Result::Ok(crate::operation::malformed_double::MalformedDoubleInput {
  112         -
            double_in_body: self.double_in_body,
         200  +
        /* BuilderGenerator.kt:254 */
         201  +
        ::std::result::Result::Ok(
         202  +
            /* BuilderGenerator.kt:477 */
         203  +
            crate::operation::malformed_double::MalformedDoubleInput {
         204  +
                /* BuilderGenerator.kt:481 */ double_in_body: self.double_in_body,
         205  +
                /* BuilderGenerator.kt:481 */
  113    206   
                double_in_path: self.double_in_path,
         207  +
                /* BuilderGenerator.kt:481 */
  114    208   
                double_in_query: self.double_in_query,
         209  +
                /* BuilderGenerator.kt:481 */
  115    210   
                double_in_header: self.double_in_header,
  116         -
        })
         211  +
                /* BuilderGenerator.kt:477 */
         212  +
            }, /* BuilderGenerator.kt:254 */
         213  +
        )
         214  +
        /* BuilderGenerator.kt:253 */
  117    215   
    }
         216  +
    /* BuilderGenerator.kt:355 */
  118    217   
}

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

tmp-codegen-diff/codegen-client-test/rest_json/rust-client-codegen/src/operation/malformed_double/builders.rs

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