Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +40,40 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `EmptyInputOutput` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `EmptyInputOutput` operation.
    4      4   
pub mod empty_input_output;
    5      5   
    6         -
/// Types for the `Float16` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `Float16` operation.
    7      7   
pub mod float16;
    8      8   
    9         -
/// Types for the `FractionalSeconds` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `FractionalSeconds` operation.
   10     10   
pub mod fractional_seconds;
   11     11   
   12         -
/// Types for the `GreetingWithErrors` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `GreetingWithErrors` operation.
   13     13   
pub mod greeting_with_errors;
   14     14   
   15         -
/// Types for the `NoInputOutput` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `NoInputOutput` operation.
   16     16   
pub mod no_input_output;
   17     17   
   18         -
/// Types for the `OperationWithDefaults` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `OperationWithDefaults` operation.
   19     19   
pub mod operation_with_defaults;
   20     20   
   21         -
/// Types for the `OptionalInputOutput` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `OptionalInputOutput` operation.
   22     22   
pub mod optional_input_output;
   23     23   
   24         -
/// Types for the `RecursiveShapes` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `RecursiveShapes` operation.
   25     25   
pub mod recursive_shapes;
   26     26   
   27         -
/// Types for the `RpcV2CborDenseMaps` operation.
          27  +
/// /* CodegenDelegator.kt:51 */Types for the `RpcV2CborDenseMaps` operation.
   28     28   
pub mod rpc_v2_cbor_dense_maps;
   29     29   
   30         -
/// Types for the `RpcV2CborLists` operation.
          30  +
/// /* CodegenDelegator.kt:51 */Types for the `RpcV2CborLists` operation.
   31     31   
pub mod rpc_v2_cbor_lists;
   32     32   
   33         -
/// Types for the `RpcV2CborSparseMaps` operation.
          33  +
/// /* CodegenDelegator.kt:51 */Types for the `RpcV2CborSparseMaps` operation.
   34     34   
pub mod rpc_v2_cbor_sparse_maps;
   35     35   
   36         -
/// Types for the `SimpleScalarProperties` operation.
          36  +
/// /* CodegenDelegator.kt:51 */Types for the `SimpleScalarProperties` operation.
   37     37   
pub mod simple_scalar_properties;
   38     38   
   39         -
/// Types for the `SparseNullsOperation` operation.
          39  +
/// /* CodegenDelegator.kt:51 */Types for the `SparseNullsOperation` operation.
   40     40   
pub mod sparse_nulls_operation;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/empty_input_output.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 `EmptyInputOutput`.
           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 EmptyInputOutput;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl EmptyInputOutput {
    7         -
    /// Creates a new `EmptyInputOutput`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `EmptyInputOutput`
          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::empty_input_output::EmptyInputOutputInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::empty_input_output::EmptyInputOutputOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::empty_input_output::EmptyInputOutputError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +267,284 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for EmptyInputOutput {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("EmptyInputOutput");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            EmptyInputOutputRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            EmptyInputOutputResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "EmptyInputOutput",
  105    116   
            "RpcV2Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("EmptyInputOutput")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(EmptyInputOutputEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::empty_input_output::EmptyInputOutputError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::empty_input_output::EmptyInputOutputError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct EmptyInputOutputResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for EmptyInputOutputResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_empty_input_output::de_empty_input_output_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_empty_input_output::de_empty_input_output_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct EmptyInputOutputRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for EmptyInputOutputRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::empty_input_output::EmptyInputOutputInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::empty_input_output::EmptyInputOutputInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/service/RpcV2Protocol/operation/EmptyInputOutput").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::empty_input_output::EmptyInputOutputInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/cbor");
  187    200   
            builder =
  188    201   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  189    202   
            builder =
  190    203   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  191    204   
            builder
  192    205   
        };
  193    206   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_empty_input_output::ser_empty_input_output_input(&input)?);
  194    207   
        if let Some(content_length) = body.content_length() {
  195    208   
            let content_length = content_length.to_string();
  196    209   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  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 EmptyInputOutputEndpointParamsInterceptor;
  203    217   
  204    218   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for EmptyInputOutputEndpointParamsInterceptor {
  205    219   
    fn name(&self) -> &'static str {
  206    220   
        "EmptyInputOutputEndpointParamsInterceptor"
  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::<EmptyInputOutputInput>()
  222    236   
            .ok_or("failed to downcast to EmptyInputOutputInput")?;
  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  +
/* RustType.kt:516 */
  236    251   
#[allow(unreachable_code, unused_variables)]
         252  +
/* RustType.kt:516 */
  237    253   
#[cfg(test)]
         254  +
/* ProtocolTestGenerator.kt:98 */
  238    255   
mod empty_input_output_test {
  239    256   
  240    257   
    /// When Input structure is empty we write CBOR equivalent of {}
  241    258   
    /// Test ID: empty_input
  242    259   
    #[::tokio::test]
  243    260   
    #[::tracing_test::traced_test]
  244    261   
    async fn empty_input_request() {
  245    262   
        let (http_client, request_receiver) = ::aws_smithy_http_client::test_util::capture_request(None);
  246    263   
        let config_builder = crate::config::Config::builder().with_test_defaults().endpoint_url("https://example.com");
  247    264   
@@ -322,339 +451,527 @@
  342    359   
                    ::aws_smithy_protocol_test::MediaType::from("application/cbor"),
  343    360   
                )))
  344    361   
            });
  345    362   
            de.deserialize_nonstreaming(&http_response)
  346    363   
        });
  347    364   
        let parsed = parsed
  348    365   
            .expect("should be successful response")
  349    366   
            .downcast::<crate::operation::empty_input_output::EmptyInputOutputOutput>()
  350    367   
            .unwrap();
  351    368   
    }
         369  +
         370  +
    /* ProtocolTestGenerator.kt:98 */
  352    371   
}
  353    372   
         373  +
/* OperationErrorGenerator.kt:79 */
  354    374   
/// Error type for the `EmptyInputOutputError` operation.
         375  +
/* RustType.kt:516 */
  355    376   
#[non_exhaustive]
         377  +
/* RustType.kt:516 */
  356    378   
#[derive(::std::fmt::Debug)]
  357         -
pub enum EmptyInputOutputError {
         379  +
pub /* OperationErrorGenerator.kt:81 */ enum EmptyInputOutputError {
         380  +
    /* OperationErrorGenerator.kt:88 */
  358    381   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  359    382   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  360    383   
    variable wildcard pattern and check `.code()`:
  361    384   
     \
  362    385   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  363    386   
     \
  364    387   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-EmptyInputOutputError) for what information is available for the error.")]
  365    388   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         389  +
    /* OperationErrorGenerator.kt:81 */
  366    390   
}
         391  +
/* OperationErrorGenerator.kt:218 */
  367    392   
impl EmptyInputOutputError {
         393  +
    /* OperationErrorGenerator.kt:219 */
  368    394   
    /// Creates the `EmptyInputOutputError::Unhandled` variant from any error type.
  369    395   
    pub fn unhandled(
  370    396   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  371    397   
    ) -> Self {
  372    398   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  373    399   
            source: err.into(),
  374    400   
            meta: ::std::default::Default::default(),
  375    401   
        })
  376    402   
    }
  377    403   
  378    404   
    /// Creates the `EmptyInputOutputError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  379    405   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  380    406   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  381    407   
            source: err.clone().into(),
  382    408   
            meta: err,
  383    409   
        })
  384    410   
    }
  385         -
    ///
         411  +
    /// /* OperationErrorGenerator.kt:236 */
  386    412   
    /// Returns error metadata, which includes the error code, message,
  387    413   
    /// request ID, and potentially additional information.
  388    414   
    ///
         415  +
    /* OperationErrorGenerator.kt:242 */
  389    416   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         417  +
        /* OperationErrorGenerator.kt:243 */
  390    418   
        match self {
  391         -
            Self::Unhandled(e) => &e.meta,
         419  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         420  +
            /* OperationErrorGenerator.kt:243 */
  392    421   
        }
         422  +
        /* OperationErrorGenerator.kt:242 */
  393    423   
    }
         424  +
    /* OperationErrorGenerator.kt:218 */
  394    425   
}
         426  +
/* OperationErrorGenerator.kt:269 */
  395    427   
impl ::std::error::Error for EmptyInputOutputError {
         428  +
    /* OperationErrorGenerator.kt:270 */
  396    429   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         430  +
        /* OperationErrorGenerator.kt:318 */
  397    431   
        match self {
  398         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         432  +
            /* OperationErrorGenerator.kt:326 */
         433  +
            Self::Unhandled(_inner) => {
         434  +
                /* OperationErrorGenerator.kt:279 */
         435  +
                ::std::option::Option::Some(&*_inner.source)
         436  +
                /* OperationErrorGenerator.kt:326 */
         437  +
            } /* OperationErrorGenerator.kt:318 */
  399    438   
        }
         439  +
        /* OperationErrorGenerator.kt:270 */
  400    440   
    }
         441  +
    /* OperationErrorGenerator.kt:269 */
  401    442   
}
         443  +
/* OperationErrorGenerator.kt:133 */
  402    444   
impl ::std::fmt::Display for EmptyInputOutputError {
         445  +
    /* OperationErrorGenerator.kt:134 */
  403    446   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         447  +
        /* OperationErrorGenerator.kt:318 */
  404    448   
        match self {
         449  +
            /* OperationErrorGenerator.kt:326 */
  405    450   
            Self::Unhandled(_inner) => {
         451  +
                /* OperationErrorGenerator.kt:139 */
  406    452   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  407    453   
                    write!(f, "unhandled error ({code})")
  408    454   
                } else {
  409    455   
                    f.write_str("unhandled error")
  410    456   
                }
  411         -
            }
         457  +
                /* OperationErrorGenerator.kt:326 */
         458  +
            } /* OperationErrorGenerator.kt:318 */
  412    459   
        }
         460  +
        /* OperationErrorGenerator.kt:134 */
  413    461   
    }
         462  +
    /* OperationErrorGenerator.kt:133 */
  414    463   
}
         464  +
/* OperationErrorGenerator.kt:182 */
  415    465   
impl ::aws_smithy_types::retry::ProvideErrorKind for EmptyInputOutputError {
         466  +
    /* OperationErrorGenerator.kt:186 */
  416    467   
    fn code(&self) -> ::std::option::Option<&str> {
         468  +
        /* OperationErrorGenerator.kt:187 */
  417    469   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         470  +
        /* OperationErrorGenerator.kt:186 */
  418    471   
    }
         472  +
    /* OperationErrorGenerator.kt:190 */
  419    473   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         474  +
        /* OperationErrorGenerator.kt:197 */
  420    475   
        ::std::option::Option::None
         476  +
        /* OperationErrorGenerator.kt:190 */
  421    477   
    }
         478  +
    /* OperationErrorGenerator.kt:182 */
  422    479   
}
         480  +
/* OperationErrorGenerator.kt:163 */
  423    481   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for EmptyInputOutputError {
         482  +
    /* OperationErrorGenerator.kt:164 */
  424    483   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         484  +
        /* OperationErrorGenerator.kt:318 */
  425    485   
        match self {
  426         -
            Self::Unhandled(_inner) => &_inner.meta,
         486  +
            /* OperationErrorGenerator.kt:326 */
         487  +
            Self::Unhandled(_inner) => {
         488  +
                /* OperationErrorGenerator.kt:168 */
         489  +
                &_inner.meta
         490  +
                /* OperationErrorGenerator.kt:326 */
         491  +
            } /* OperationErrorGenerator.kt:318 */
  427    492   
        }
         493  +
        /* OperationErrorGenerator.kt:164 */
  428    494   
    }
         495  +
    /* OperationErrorGenerator.kt:163 */
  429    496   
}
         497  +
/* OperationErrorGenerator.kt:109 */
  430    498   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for EmptyInputOutputError {
         499  +
    /* OperationErrorGenerator.kt:110 */
  431    500   
    fn create_unhandled_error(
  432    501   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  433    502   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  434    503   
    ) -> Self {
         504  +
        /* OperationErrorGenerator.kt:121 */
  435    505   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  436    506   
            source,
  437    507   
            meta: meta.unwrap_or_default(),
  438    508   
        })
         509  +
        /* OperationErrorGenerator.kt:110 */
  439    510   
    }
         511  +
    /* OperationErrorGenerator.kt:109 */
  440    512   
}
  441    513   
         514  +
/* CodegenDelegator.kt:255 */
  442    515   
pub use crate::operation::empty_input_output::_empty_input_output_output::EmptyInputOutputOutput;
  443    516   
         517  +
/* CodegenDelegator.kt:255 */
  444    518   
pub use crate::operation::empty_input_output::_empty_input_output_input::EmptyInputOutputInput;
  445    519   
         520  +
/* RustModule.kt:172 */
  446    521   
mod _empty_input_output_input;
  447    522   
         523  +
/* RustModule.kt:172 */
  448    524   
mod _empty_input_output_output;
  449    525   
  450         -
/// Builders
         526  +
/// /* CodegenDelegator.kt:51 */Builders
  451    527   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/empty_input_output/_empty_input_output_input.rs

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

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/empty_input_output/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::empty_input_output::_empty_input_output_output::EmptyInputOutputOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::empty_input_output::_empty_input_output_input::EmptyInputOutputInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::empty_input_output::builders::EmptyInputOutputInputBuilder {
    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::empty_input_output::EmptyInputOutputOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::empty_input_output::EmptyInputOutputError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.empty_input_output();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `EmptyInputOutput`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `EmptyInputOutput`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct EmptyInputOutputFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::empty_input_output::builders::EmptyInputOutputInputBuilder,
   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::empty_input_output::EmptyInputOutputOutput,
   34     40   
        crate::operation::empty_input_output::EmptyInputOutputError,
   35     41   
    > for EmptyInputOutputFluentBuilder
   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::empty_input_output::EmptyInputOutputOutput,
   43     49   
            crate::operation::empty_input_output::EmptyInputOutputError,
   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 EmptyInputOutputFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `EmptyInputOutputFluentBuilder`.
   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 EmptyInputOutput as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::empty_input_output::builders::EmptyInputOutputInputBuilder {
   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::empty_input_output::EmptyInputOutputOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::empty_input_output::EmptyInputOutputError,
   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::empty_input_output::EmptyInputOutput::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::empty_input_output::EmptyInputOutput::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::empty_input_output::EmptyInputOutputOutput,
   96    106   
        crate::operation::empty_input_output::EmptyInputOutputError,
   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/rpcv2Cbor/rust-client-codegen/src/operation/float16.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 `Float16`.
           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 Float16;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl Float16 {
    7         -
    /// Creates a new `Float16`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `Float16`
          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::float16::Float16Input,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::float16::Float16Output,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::float16::Float16Error,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -53,62 +257,274 @@
   73     82   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   74     83   
            }
   75     84   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   76     85   
                config_override,
   77     86   
                client_config.config.clone(),
   78     87   
                &client_config.runtime_components,
   79     88   
            ));
   80     89   
        }
   81     90   
        runtime_plugins
   82     91   
    }
          92  +
    /* OperationGenerator.kt:85 */
   83     93   
}
          94  +
/* OperationRuntimePluginGenerator.kt:55 */
   84     95   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for Float16 {
   85     96   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   86     97   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("Float16");
   87     98   
   88     99   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   89    100   
            Float16RequestSerializer,
   90    101   
        ));
   91    102   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   92    103   
            Float16ResponseDeserializer,
   93    104   
        ));
   94    105   
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
   96    107   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("Float16", "RpcV2Protocol"));
  100    111   
  101    112   
        ::std::option::Option::Some(cfg.freeze())
  102    113   
    }
  103    114   
  104    115   
    fn runtime_components(
  105    116   
        &self,
  106    117   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  107    118   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  108    119   
        #[allow(unused_mut)]
  109    120   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("Float16")
  110    121   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  111    122   
            .with_interceptor(Float16EndpointParamsInterceptor)
  112    123   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  113    124   
                crate::operation::float16::Float16Error,
  114    125   
            >::new())
  115    126   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  116    127   
                crate::operation::float16::Float16Error,
  117    128   
            >::new());
  118    129   
  119    130   
        ::std::borrow::Cow::Owned(rcb)
  120    131   
    }
  121    132   
}
  122    133   
         134  +
/* ResponseDeserializerGenerator.kt:64 */
  123    135   
#[derive(Debug)]
  124    136   
struct Float16ResponseDeserializer;
  125    137   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for Float16ResponseDeserializer {
  126    138   
    fn deserialize_nonstreaming(
  127    139   
        &self,
  128    140   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  129    141   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  130    142   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  131    143   
        let headers = response.headers();
  132    144   
        let body = response.body().bytes().expect("body loaded");
  133    145   
        #[allow(unused_mut)]
  134    146   
        let mut force_error = false;
  135    147   
  136    148   
        let parse_result = if !success && status != 200 || force_error {
  137    149   
            crate::protocol_serde::shape_float16::de_float16_http_error(status, headers, body)
  138    150   
        } else {
  139    151   
            crate::protocol_serde::shape_float16::de_float16_http_response(status, headers, body)
  140    152   
        };
  141    153   
        crate::protocol_serde::type_erase_result(parse_result)
  142    154   
    }
  143    155   
}
         156  +
/* RequestSerializerGenerator.kt:67 */
  144    157   
#[derive(Debug)]
  145    158   
struct Float16RequestSerializer;
  146    159   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for Float16RequestSerializer {
  147    160   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  148    161   
    fn serialize_input(
  149    162   
        &self,
  150    163   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  151    164   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  152    165   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  153    166   
        let input = input.downcast::<crate::operation::float16::Float16Input>().expect("correct type");
  154    167   
        let _header_serialization_settings = _cfg
  155    168   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  156    169   
            .cloned()
  157    170   
            .unwrap_or_default();
  158    171   
        let mut request_builder = {
  159    172   
            fn uri_base(
  160    173   
                _input: &crate::operation::float16::Float16Input,
  161    174   
                output: &mut ::std::string::String,
  162    175   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  163    176   
                use ::std::fmt::Write as _;
  164    177   
                ::std::write!(output, "/service/RpcV2Protocol/operation/Float16").expect("formatting should succeed");
  165    178   
                ::std::result::Result::Ok(())
  166    179   
            }
  167    180   
            #[allow(clippy::unnecessary_wraps)]
  168    181   
            fn update_http_builder(
  169    182   
                input: &crate::operation::float16::Float16Input,
  170    183   
                builder: ::http::request::Builder,
  171    184   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                let mut uri = ::std::string::String::new();
  173    186   
                uri_base(input, &mut uri)?;
  174    187   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  175    188   
            }
  176    189   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  177    190   
            builder =
  178    191   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  179    192   
            builder =
  180    193   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  181    194   
            builder
  182    195   
        };
  183    196   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  184    197   
        if let Some(content_length) = body.content_length() {
  185    198   
            let content_length = content_length.to_string();
  186    199   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  187    200   
        }
  188    201   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  189    202   
    }
  190    203   
}
         204  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  191    205   
#[derive(Debug)]
  192    206   
struct Float16EndpointParamsInterceptor;
  193    207   
  194    208   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for Float16EndpointParamsInterceptor {
  195    209   
    fn name(&self) -> &'static str {
  196    210   
        "Float16EndpointParamsInterceptor"
  197    211   
    }
  198    212   
  199    213   
    fn read_before_execution(
  200    214   
        &self,
  201    215   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  202    216   
            '_,
  203    217   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  204    218   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  205    219   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  206    220   
        >,
  207    221   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  208    222   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  209    223   
        let _input = context
  210    224   
            .input()
  211    225   
            .downcast_ref::<Float16Input>()
  212    226   
            .ok_or("failed to downcast to Float16Input")?;
  213    227   
  214    228   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  216    230   
        })?;
  217    231   
        cfg.interceptor_state()
  218    232   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  219    233   
        ::std::result::Result::Ok(())
  220    234   
    }
  221    235   
}
  222    236   
  223    237   
// The get_* functions below are generated from JMESPath expressions in the
  224    238   
// operationContextParams trait. They target the operation's input shape.
  225    239   
         240  +
/* RustType.kt:516 */
  226    241   
#[allow(unreachable_code, unused_variables)]
         242  +
/* RustType.kt:516 */
  227    243   
#[cfg(test)]
         244  +
/* ProtocolTestGenerator.kt:98 */
  228    245   
mod float16_test {
  229    246   
    use ::aws_smithy_protocol_test::FloatEquals;
  230    247   
  231    248   
    /// Ensures that clients can correctly parse float16 +Inf.
  232    249   
    /// Test ID: RpcV2CborFloat16Inf
  233    250   
    #[::tokio::test]
  234    251   
    #[::tracing_test::traced_test]
  235    252   
    async fn rpc_v2_cbor_float16_inf_response() {
  236    253   
        let expected_output = crate::operation::float16::Float16Output::builder()
  237    254   
            .set_value(::std::option::Option::Some(
@@ -448,465 +577,653 @@
  468    485   
            .expect("should be successful response")
  469    486   
            .downcast::<crate::operation::float16::Float16Output>()
  470    487   
            .unwrap();
  471    488   
        assert!(
  472    489   
            parsed.value.float_equals(&expected_output.value),
  473    490   
            "Unexpected value for `value` {:?} vs. {:?}",
  474    491   
            expected_output.value,
  475    492   
            parsed.value
  476    493   
        );
  477    494   
    }
         495  +
         496  +
    /* ProtocolTestGenerator.kt:98 */
  478    497   
}
  479    498   
         499  +
/* OperationErrorGenerator.kt:79 */
  480    500   
/// Error type for the `Float16Error` operation.
         501  +
/* RustType.kt:516 */
  481    502   
#[non_exhaustive]
         503  +
/* RustType.kt:516 */
  482    504   
#[derive(::std::fmt::Debug)]
  483         -
pub enum Float16Error {
         505  +
pub /* OperationErrorGenerator.kt:81 */ enum Float16Error {
         506  +
    /* OperationErrorGenerator.kt:88 */
  484    507   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  485    508   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  486    509   
    variable wildcard pattern and check `.code()`:
  487    510   
     \
  488    511   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  489    512   
     \
  490    513   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-Float16Error) for what information is available for the error.")]
  491    514   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         515  +
    /* OperationErrorGenerator.kt:81 */
  492    516   
}
         517  +
/* OperationErrorGenerator.kt:218 */
  493    518   
impl Float16Error {
         519  +
    /* OperationErrorGenerator.kt:219 */
  494    520   
    /// Creates the `Float16Error::Unhandled` variant from any error type.
  495    521   
    pub fn unhandled(
  496    522   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  497    523   
    ) -> Self {
  498    524   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  499    525   
            source: err.into(),
  500    526   
            meta: ::std::default::Default::default(),
  501    527   
        })
  502    528   
    }
  503    529   
  504    530   
    /// Creates the `Float16Error::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  505    531   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  506    532   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  507    533   
            source: err.clone().into(),
  508    534   
            meta: err,
  509    535   
        })
  510    536   
    }
  511         -
    ///
         537  +
    /// /* OperationErrorGenerator.kt:236 */
  512    538   
    /// Returns error metadata, which includes the error code, message,
  513    539   
    /// request ID, and potentially additional information.
  514    540   
    ///
         541  +
    /* OperationErrorGenerator.kt:242 */
  515    542   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         543  +
        /* OperationErrorGenerator.kt:243 */
  516    544   
        match self {
  517         -
            Self::Unhandled(e) => &e.meta,
         545  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         546  +
            /* OperationErrorGenerator.kt:243 */
  518    547   
        }
         548  +
        /* OperationErrorGenerator.kt:242 */
  519    549   
    }
         550  +
    /* OperationErrorGenerator.kt:218 */
  520    551   
}
         552  +
/* OperationErrorGenerator.kt:269 */
  521    553   
impl ::std::error::Error for Float16Error {
         554  +
    /* OperationErrorGenerator.kt:270 */
  522    555   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         556  +
        /* OperationErrorGenerator.kt:318 */
  523    557   
        match self {
  524         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         558  +
            /* OperationErrorGenerator.kt:326 */
         559  +
            Self::Unhandled(_inner) => {
         560  +
                /* OperationErrorGenerator.kt:279 */
         561  +
                ::std::option::Option::Some(&*_inner.source)
         562  +
                /* OperationErrorGenerator.kt:326 */
         563  +
            } /* OperationErrorGenerator.kt:318 */
  525    564   
        }
         565  +
        /* OperationErrorGenerator.kt:270 */
  526    566   
    }
         567  +
    /* OperationErrorGenerator.kt:269 */
  527    568   
}
         569  +
/* OperationErrorGenerator.kt:133 */
  528    570   
impl ::std::fmt::Display for Float16Error {
         571  +
    /* OperationErrorGenerator.kt:134 */
  529    572   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         573  +
        /* OperationErrorGenerator.kt:318 */
  530    574   
        match self {
         575  +
            /* OperationErrorGenerator.kt:326 */
  531    576   
            Self::Unhandled(_inner) => {
         577  +
                /* OperationErrorGenerator.kt:139 */
  532    578   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  533    579   
                    write!(f, "unhandled error ({code})")
  534    580   
                } else {
  535    581   
                    f.write_str("unhandled error")
  536    582   
                }
  537         -
            }
         583  +
                /* OperationErrorGenerator.kt:326 */
         584  +
            } /* OperationErrorGenerator.kt:318 */
  538    585   
        }
         586  +
        /* OperationErrorGenerator.kt:134 */
  539    587   
    }
         588  +
    /* OperationErrorGenerator.kt:133 */
  540    589   
}
         590  +
/* OperationErrorGenerator.kt:182 */
  541    591   
impl ::aws_smithy_types::retry::ProvideErrorKind for Float16Error {
         592  +
    /* OperationErrorGenerator.kt:186 */
  542    593   
    fn code(&self) -> ::std::option::Option<&str> {
         594  +
        /* OperationErrorGenerator.kt:187 */
  543    595   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         596  +
        /* OperationErrorGenerator.kt:186 */
  544    597   
    }
         598  +
    /* OperationErrorGenerator.kt:190 */
  545    599   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         600  +
        /* OperationErrorGenerator.kt:197 */
  546    601   
        ::std::option::Option::None
         602  +
        /* OperationErrorGenerator.kt:190 */
  547    603   
    }
         604  +
    /* OperationErrorGenerator.kt:182 */
  548    605   
}
         606  +
/* OperationErrorGenerator.kt:163 */
  549    607   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for Float16Error {
         608  +
    /* OperationErrorGenerator.kt:164 */
  550    609   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         610  +
        /* OperationErrorGenerator.kt:318 */
  551    611   
        match self {
  552         -
            Self::Unhandled(_inner) => &_inner.meta,
         612  +
            /* OperationErrorGenerator.kt:326 */
         613  +
            Self::Unhandled(_inner) => {
         614  +
                /* OperationErrorGenerator.kt:168 */
         615  +
                &_inner.meta
         616  +
                /* OperationErrorGenerator.kt:326 */
         617  +
            } /* OperationErrorGenerator.kt:318 */
  553    618   
        }
         619  +
        /* OperationErrorGenerator.kt:164 */
  554    620   
    }
         621  +
    /* OperationErrorGenerator.kt:163 */
  555    622   
}
         623  +
/* OperationErrorGenerator.kt:109 */
  556    624   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for Float16Error {
         625  +
    /* OperationErrorGenerator.kt:110 */
  557    626   
    fn create_unhandled_error(
  558    627   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  559    628   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  560    629   
    ) -> Self {
         630  +
        /* OperationErrorGenerator.kt:121 */
  561    631   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  562    632   
            source,
  563    633   
            meta: meta.unwrap_or_default(),
  564    634   
        })
         635  +
        /* OperationErrorGenerator.kt:110 */
  565    636   
    }
         637  +
    /* OperationErrorGenerator.kt:109 */
  566    638   
}
  567    639   
         640  +
/* CodegenDelegator.kt:255 */
  568    641   
pub use crate::operation::float16::_float16_output::Float16Output;
  569    642   
         643  +
/* CodegenDelegator.kt:255 */
  570    644   
pub use crate::operation::float16::_float16_input::Float16Input;
  571    645   
         646  +
/* RustModule.kt:172 */
  572    647   
mod _float16_input;
  573    648   
         649  +
/* RustModule.kt:172 */
  574    650   
mod _float16_output;
  575    651   
  576         -
/// Builders
         652  +
/// /* CodegenDelegator.kt:51 */Builders
  577    653   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/float16/_float16_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/float16/_float16_output.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/float16/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/fractional_seconds/_fractional_seconds_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/fractional_seconds/_fractional_seconds_output.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/fractional_seconds/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::fractional_seconds::_fractional_seconds_output::FractionalSecondsOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::fractional_seconds::_fractional_seconds_input::FractionalSecondsInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder {
    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::fractional_seconds::FractionalSecondsOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::fractional_seconds::FractionalSecondsError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.fractional_seconds();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `FractionalSeconds`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `FractionalSeconds`.
   24     27   
///
          28  +
/* RustType.kt:516 */
   25     29   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          30  +
/* FluentBuilderGenerator.kt:270 */
   26     31   
pub struct FractionalSecondsFluentBuilder {
   27     32   
    handle: ::std::sync::Arc<crate::client::Handle>,
   28     33   
    inner: crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder,
   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::fractional_seconds::FractionalSecondsOutput,
   34     40   
        crate::operation::fractional_seconds::FractionalSecondsError,
   35     41   
    > for FractionalSecondsFluentBuilder
   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::fractional_seconds::FractionalSecondsOutput,
   43     49   
            crate::operation::fractional_seconds::FractionalSecondsError,
   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 FractionalSecondsFluentBuilder {
          57  +
    /* FluentBuilderGenerator.kt:288 */
   50     58   
    /// Creates a new `FractionalSecondsFluentBuilder`.
   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 FractionalSeconds as a reference.
   59     68   
    pub fn as_input(&self) -> &crate::operation::fractional_seconds::builders::FractionalSecondsInputBuilder {
   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::fractional_seconds::FractionalSecondsOutput,
   74     84   
        ::aws_smithy_runtime_api::client::result::SdkError<
   75     85   
            crate::operation::fractional_seconds::FractionalSecondsError,
   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::fractional_seconds::FractionalSeconds::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::fractional_seconds::FractionalSeconds::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::fractional_seconds::FractionalSecondsOutput,
   96    106   
        crate::operation::fractional_seconds::FractionalSecondsError,
   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/rpcv2Cbor/rust-client-codegen/src/operation/greeting_with_errors.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 `GreetingWithErrors`.
           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 GreetingWithErrors;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl GreetingWithErrors {
    7         -
    /// Creates a new `GreetingWithErrors`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `GreetingWithErrors`
          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::greeting_with_errors::GreetingWithErrorsInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::greeting_with_errors::GreetingWithErrorsOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::greeting_with_errors::GreetingWithErrorsError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +266,283 @@
   77     86   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   78     87   
            }
   79     88   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   80     89   
                config_override,
   81     90   
                client_config.config.clone(),
   82     91   
                &client_config.runtime_components,
   83     92   
            ));
   84     93   
        }
   85     94   
        runtime_plugins
   86     95   
    }
          96  +
    /* OperationGenerator.kt:85 */
   87     97   
}
          98  +
/* OperationRuntimePluginGenerator.kt:55 */
   88     99   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GreetingWithErrors {
   89    100   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   90    101   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GreetingWithErrors");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            GreetingWithErrorsRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            GreetingWithErrorsResponseDeserializer,
   97    108   
        ));
   98    109   
   99    110   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  100    111   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  101    112   
        ));
  102    113   
  103    114   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  104    115   
            "GreetingWithErrors",
  105    116   
            "RpcV2Protocol",
  106    117   
        ));
  107    118   
  108    119   
        ::std::option::Option::Some(cfg.freeze())
  109    120   
    }
  110    121   
  111    122   
    fn runtime_components(
  112    123   
        &self,
  113    124   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  114    125   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  115    126   
        #[allow(unused_mut)]
  116    127   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GreetingWithErrors")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(GreetingWithErrorsEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::greeting_with_errors::GreetingWithErrorsError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::greeting_with_errors::GreetingWithErrorsError,
  124    135   
            >::new());
  125    136   
  126    137   
        ::std::borrow::Cow::Owned(rcb)
  127    138   
    }
  128    139   
}
  129    140   
         141  +
/* ResponseDeserializerGenerator.kt:64 */
  130    142   
#[derive(Debug)]
  131    143   
struct GreetingWithErrorsResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GreetingWithErrorsResponseDeserializer {
  133    145   
    fn deserialize_nonstreaming(
  134    146   
        &self,
  135    147   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  136    148   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  137    149   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  138    150   
        let headers = response.headers();
  139    151   
        let body = response.body().bytes().expect("body loaded");
  140    152   
        #[allow(unused_mut)]
  141    153   
        let mut force_error = false;
  142    154   
  143    155   
        let parse_result = if !success && status != 200 || force_error {
  144    156   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_greeting_with_errors::de_greeting_with_errors_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct GreetingWithErrorsRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GreetingWithErrorsRequestSerializer {
  154    167   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  155    168   
    fn serialize_input(
  156    169   
        &self,
  157    170   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  158    171   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  159    172   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  160    173   
        let input = input
  161    174   
            .downcast::<crate::operation::greeting_with_errors::GreetingWithErrorsInput>()
  162    175   
            .expect("correct type");
  163    176   
        let _header_serialization_settings = _cfg
  164    177   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  165    178   
            .cloned()
  166    179   
            .unwrap_or_default();
  167    180   
        let mut request_builder = {
  168    181   
            fn uri_base(
  169    182   
                _input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  170    183   
                output: &mut ::std::string::String,
  171    184   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  172    185   
                use ::std::fmt::Write as _;
  173    186   
                ::std::write!(output, "/service/RpcV2Protocol/operation/GreetingWithErrors").expect("formatting should succeed");
  174    187   
                ::std::result::Result::Ok(())
  175    188   
            }
  176    189   
            #[allow(clippy::unnecessary_wraps)]
  177    190   
            fn update_http_builder(
  178    191   
                input: &crate::operation::greeting_with_errors::GreetingWithErrorsInput,
  179    192   
                builder: ::http::request::Builder,
  180    193   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  181    194   
                let mut uri = ::std::string::String::new();
  182    195   
                uri_base(input, &mut uri)?;
  183    196   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  184    197   
            }
  185    198   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  186    199   
            builder =
  187    200   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("smithy-protocol"), "rpc-v2-cbor");
  188    201   
            builder =
  189    202   
                _header_serialization_settings.set_default_header(builder, ::http::header::HeaderName::from_static("accept"), "application/cbor");
  190    203   
            builder
  191    204   
        };
  192    205   
        let body = ::aws_smithy_types::body::SdkBody::from("");
  193    206   
        if let Some(content_length) = body.content_length() {
  194    207   
            let content_length = content_length.to_string();
  195    208   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  196    209   
        }
  197    210   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  198    211   
    }
  199    212   
}
         213  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  200    214   
#[derive(Debug)]
  201    215   
struct GreetingWithErrorsEndpointParamsInterceptor;
  202    216   
  203    217   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GreetingWithErrorsEndpointParamsInterceptor {
  204    218   
    fn name(&self) -> &'static str {
  205    219   
        "GreetingWithErrorsEndpointParamsInterceptor"
  206    220   
    }
  207    221   
  208    222   
    fn read_before_execution(
  209    223   
        &self,
  210    224   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  211    225   
            '_,
  212    226   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  213    227   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  215    229   
        >,
  216    230   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  217    231   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  218    232   
        let _input = context
  219    233   
            .input()
  220    234   
            .downcast_ref::<GreetingWithErrorsInput>()
  221    235   
            .ok_or("failed to downcast to GreetingWithErrorsInput")?;
  222    236   
  223    237   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  224    238   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  225    239   
        })?;
  226    240   
        cfg.interceptor_state()
  227    241   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  228    242   
        ::std::result::Result::Ok(())
  229    243   
    }
  230    244   
}
  231    245   
  232    246   
// The get_* functions below are generated from JMESPath expressions in the
  233    247   
// operationContextParams trait. They target the operation's input shape.
  234    248   
         249  +
/* RustType.kt:516 */
  235    250   
#[allow(unreachable_code, unused_variables)]
         251  +
/* RustType.kt:516 */
  236    252   
#[cfg(test)]
         253  +
/* ProtocolTestGenerator.kt:98 */
  237    254   
mod greeting_with_errors_test {
  238    255   
  239    256   
    /// Parses simple RpcV2 Cbor errors
  240    257   
    /// Test ID: RpcV2CborInvalidGreetingError
  241    258   
    #[::tokio::test]
  242    259   
    #[::tracing_test::traced_test]
  243    260   
    async fn rpc_v2_cbor_invalid_greeting_error_response() {
  244    261   
        let expected_output = crate::types::error::InvalidGreeting::builder()
  245    262   
            .set_message(::std::option::Option::Some("Hi".to_owned()))
  246    263   
            .build();
@@ -357,374 +506,628 @@
  377    394   
        let parsed: &crate::operation::greeting_with_errors::GreetingWithErrorsError =
  378    395   
            parsed.as_operation_error().expect("operation error").downcast_ref().unwrap();
  379    396   
        if let crate::operation::greeting_with_errors::GreetingWithErrorsError::ComplexError(parsed) = parsed {
  380    397   
            ::pretty_assertions::assert_eq!(parsed.top_level, expected_output.top_level, "Unexpected value for `top_level`");
  381    398   
            ::pretty_assertions::assert_eq!(parsed.nested, expected_output.nested, "Unexpected value for `nested`");
  382    399   
            ::pretty_assertions::assert_eq!(parsed.message, expected_output.message, "Unexpected value for `message`");
  383    400   
        } else {
  384    401   
            panic!("wrong variant: Got: {:?}. Expected: {:?}", parsed, expected_output);
  385    402   
        }
  386    403   
    }
         404  +
         405  +
    /* ProtocolTestGenerator.kt:98 */
  387    406   
}
  388    407   
         408  +
/* OperationErrorGenerator.kt:79 */
  389    409   
/// Error type for the `GreetingWithErrorsError` operation.
         410  +
/* RustType.kt:516 */
  390    411   
#[non_exhaustive]
         412  +
/* RustType.kt:516 */
  391    413   
#[derive(::std::fmt::Debug)]
  392         -
pub enum GreetingWithErrorsError {
  393         -
    /// This error is thrown when an invalid greeting value is provided.
         414  +
pub /* OperationErrorGenerator.kt:81 */ enum GreetingWithErrorsError {
         415  +
    /// /* OperationErrorGenerator.kt:83 */This error is thrown when an invalid greeting value is provided.
         416  +
    /* OperationErrorGenerator.kt:86 */
  394    417   
    InvalidGreeting(crate::types::error::InvalidGreeting),
  395         -
    /// This error is thrown when a request is invalid.
         418  +
    /// /* OperationErrorGenerator.kt:83 */This error is thrown when a request is invalid.
         419  +
    /* OperationErrorGenerator.kt:86 */
  396    420   
    ComplexError(crate::types::error::ComplexError),
         421  +
    /* OperationErrorGenerator.kt:88 */
  397    422   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  398    423   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  399    424   
    variable wildcard pattern and check `.code()`:
  400    425   
     \
  401    426   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  402    427   
     \
  403    428   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GreetingWithErrorsError) for what information is available for the error.")]
  404    429   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         430  +
    /* OperationErrorGenerator.kt:81 */
  405    431   
}
         432  +
/* OperationErrorGenerator.kt:218 */
  406    433   
impl GreetingWithErrorsError {
         434  +
    /* OperationErrorGenerator.kt:219 */
  407    435   
    /// Creates the `GreetingWithErrorsError::Unhandled` variant from any error type.
  408    436   
    pub fn unhandled(
  409    437   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  410    438   
    ) -> Self {
  411    439   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  412    440   
            source: err.into(),
  413    441   
            meta: ::std::default::Default::default(),
  414    442   
        })
  415    443   
    }
  416    444   
  417    445   
    /// Creates the `GreetingWithErrorsError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  418    446   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  419    447   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  420    448   
            source: err.clone().into(),
  421    449   
            meta: err,
  422    450   
        })
  423    451   
    }
  424         -
    ///
         452  +
    /// /* OperationErrorGenerator.kt:236 */
  425    453   
    /// Returns error metadata, which includes the error code, message,
  426    454   
    /// request ID, and potentially additional information.
  427    455   
    ///
         456  +
    /* OperationErrorGenerator.kt:242 */
  428    457   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         458  +
        /* OperationErrorGenerator.kt:243 */
  429    459   
        match self {
  430         -
            Self::InvalidGreeting(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  431         -
            Self::ComplexError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  432         -
            Self::Unhandled(e) => &e.meta,
         460  +
            /* OperationErrorGenerator.kt:246 */ Self::InvalidGreeting(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         461  +
            /* OperationErrorGenerator.kt:246 */ Self::ComplexError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         462  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         463  +
            /* OperationErrorGenerator.kt:243 */
  433    464   
        }
         465  +
        /* OperationErrorGenerator.kt:242 */
  434    466   
    }
         467  +
    /* OperationErrorGenerator.kt:257 */
  435    468   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::InvalidGreeting`.
         469  +
    /* OperationErrorGenerator.kt:258 */
  436    470   
    pub fn is_invalid_greeting(&self) -> bool {
         471  +
        /* OperationErrorGenerator.kt:259 */
  437    472   
        matches!(self, Self::InvalidGreeting(_))
         473  +
        /* OperationErrorGenerator.kt:258 */
  438    474   
    }
         475  +
    /* OperationErrorGenerator.kt:257 */
  439    476   
    /// Returns `true` if the error kind is `GreetingWithErrorsError::ComplexError`.
         477  +
    /* OperationErrorGenerator.kt:258 */
  440    478   
    pub fn is_complex_error(&self) -> bool {
         479  +
        /* OperationErrorGenerator.kt:259 */
  441    480   
        matches!(self, Self::ComplexError(_))
         481  +
        /* OperationErrorGenerator.kt:258 */
  442    482   
    }
         483  +
    /* OperationErrorGenerator.kt:218 */
  443    484   
}
         485  +
/* OperationErrorGenerator.kt:269 */
  444    486   
impl ::std::error::Error for GreetingWithErrorsError {
         487  +
    /* OperationErrorGenerator.kt:270 */
  445    488   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         489  +
        /* OperationErrorGenerator.kt:318 */
  446    490   
        match self {
  447         -
            Self::InvalidGreeting(_inner) => ::std::option::Option::Some(_inner),
  448         -
            Self::ComplexError(_inner) => ::std::option::Option::Some(_inner),
  449         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         491  +
            /* OperationErrorGenerator.kt:321 */
         492  +
            Self::InvalidGreeting(_inner) =>
         493  +
            /* OperationErrorGenerator.kt:283 */
         494  +
            {
         495  +
                ::std::option::Option::Some(_inner)
         496  +
            }
         497  +
            ,
         498  +
            /* OperationErrorGenerator.kt:321 */
         499  +
            Self::ComplexError(_inner) =>
         500  +
            /* OperationErrorGenerator.kt:283 */
         501  +
            {
         502  +
                ::std::option::Option::Some(_inner)
         503  +
            }
         504  +
            ,
         505  +
            /* OperationErrorGenerator.kt:326 */
         506  +
            Self::Unhandled(_inner) => {
         507  +
                /* OperationErrorGenerator.kt:279 */
         508  +
                ::std::option::Option::Some(&*_inner.source)
         509  +
                /* OperationErrorGenerator.kt:326 */
         510  +
            } /* OperationErrorGenerator.kt:318 */
  450    511   
        }
         512  +
        /* OperationErrorGenerator.kt:270 */
  451    513   
    }
         514  +
    /* OperationErrorGenerator.kt:269 */
  452    515   
}
         516  +
/* OperationErrorGenerator.kt:133 */
  453    517   
impl ::std::fmt::Display for GreetingWithErrorsError {
         518  +
    /* OperationErrorGenerator.kt:134 */
  454    519   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         520  +
        /* OperationErrorGenerator.kt:318 */
  455    521   
        match self {
  456         -
            Self::InvalidGreeting(_inner) => _inner.fmt(f),
  457         -
            Self::ComplexError(_inner) => _inner.fmt(f),
         522  +
            /* OperationErrorGenerator.kt:321 */
         523  +
            Self::InvalidGreeting(_inner) =>
         524  +
            /* OperationErrorGenerator.kt:151 */
         525  +
            {
         526  +
                _inner.fmt(f)
         527  +
            }
         528  +
            ,
         529  +
            /* OperationErrorGenerator.kt:321 */
         530  +
            Self::ComplexError(_inner) =>
         531  +
            /* OperationErrorGenerator.kt:151 */
         532  +
            {
         533  +
                _inner.fmt(f)
         534  +
            }
         535  +
            ,
         536  +
            /* OperationErrorGenerator.kt:326 */
  458    537   
            Self::Unhandled(_inner) => {
         538  +
                /* OperationErrorGenerator.kt:139 */
  459    539   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  460    540   
                    write!(f, "unhandled error ({code})")
  461    541   
                } else {
  462    542   
                    f.write_str("unhandled error")
  463    543   
                }
  464         -
            }
         544  +
                /* OperationErrorGenerator.kt:326 */
         545  +
            } /* OperationErrorGenerator.kt:318 */
  465    546   
        }
         547  +
        /* OperationErrorGenerator.kt:134 */
  466    548   
    }
         549  +
    /* OperationErrorGenerator.kt:133 */
  467    550   
}
         551  +
/* OperationErrorGenerator.kt:182 */
  468    552   
impl ::aws_smithy_types::retry::ProvideErrorKind for GreetingWithErrorsError {
         553  +
    /* OperationErrorGenerator.kt:186 */
  469    554   
    fn code(&self) -> ::std::option::Option<&str> {
         555  +
        /* OperationErrorGenerator.kt:187 */
  470    556   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         557  +
        /* OperationErrorGenerator.kt:186 */
  471    558   
    }
         559  +
    /* OperationErrorGenerator.kt:190 */
  472    560   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         561  +
        /* OperationErrorGenerator.kt:197 */
  473    562   
        ::std::option::Option::None
         563  +
        /* OperationErrorGenerator.kt:190 */
  474    564   
    }
         565  +
    /* OperationErrorGenerator.kt:182 */
  475    566   
}
         567  +
/* OperationErrorGenerator.kt:163 */
  476    568   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GreetingWithErrorsError {
         569  +
    /* OperationErrorGenerator.kt:164 */
  477    570   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         571  +
        /* OperationErrorGenerator.kt:318 */
  478    572   
        match self {
  479         -
            Self::InvalidGreeting(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  480         -
            Self::ComplexError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  481         -
            Self::Unhandled(_inner) => &_inner.meta,
         573  +
            /* OperationErrorGenerator.kt:321 */
         574  +
            Self::InvalidGreeting(_inner) =>
         575  +
            /* OperationErrorGenerator.kt:169 */
         576  +
            {
         577  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         578  +
            }
         579  +
            ,
         580  +
            /* OperationErrorGenerator.kt:321 */
         581  +
            Self::ComplexError(_inner) =>
         582  +
            /* OperationErrorGenerator.kt:169 */
         583  +
            {
         584  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         585  +
            }
         586  +
            ,
         587  +
            /* OperationErrorGenerator.kt:326 */
         588  +
            Self::Unhandled(_inner) => {
         589  +
                /* OperationErrorGenerator.kt:168 */
         590  +
                &_inner.meta
         591  +
                /* OperationErrorGenerator.kt:326 */
         592  +
            } /* OperationErrorGenerator.kt:318 */
  482    593   
        }
         594  +
        /* OperationErrorGenerator.kt:164 */
  483    595   
    }
         596  +
    /* OperationErrorGenerator.kt:163 */
  484    597   
}
         598  +
/* OperationErrorGenerator.kt:109 */
  485    599   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GreetingWithErrorsError {
         600  +
    /* OperationErrorGenerator.kt:110 */
  486    601   
    fn create_unhandled_error(
  487    602   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  488    603   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  489    604   
    ) -> Self {
         605  +
        /* OperationErrorGenerator.kt:121 */
  490    606   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  491    607   
            source,
  492    608   
            meta: meta.unwrap_or_default(),
  493    609   
        })
         610  +
        /* OperationErrorGenerator.kt:110 */
  494    611   
    }
         612  +
    /* OperationErrorGenerator.kt:109 */
  495    613   
}
  496    614   
         615  +
/* CodegenDelegator.kt:255 */
  497    616   
pub use crate::operation::greeting_with_errors::_greeting_with_errors_output::GreetingWithErrorsOutput;
  498    617   
         618  +
/* CodegenDelegator.kt:255 */
  499    619   
pub use crate::operation::greeting_with_errors::_greeting_with_errors_input::GreetingWithErrorsInput;
  500    620   
         621  +
/* RustModule.kt:172 */
  501    622   
mod _greeting_with_errors_input;
  502    623   
         624  +
/* RustModule.kt:172 */
  503    625   
mod _greeting_with_errors_output;
  504    626   
  505         -
/// Builders
         627  +
/// /* CodegenDelegator.kt:51 */Builders
  506    628   
pub mod builders;

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/greeting_with_errors/_greeting_with_errors_input.rs

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

tmp-codegen-diff/codegen-client-test/rpcv2Cbor/rust-client-codegen/src/operation/greeting_with_errors/_greeting_with_errors_output.rs

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