Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_export/builders.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table.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 `DescribeGlobalTable`.
           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 DescribeGlobalTable;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl DescribeGlobalTable {
    7         -
    /// Creates a new `DescribeGlobalTable`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `DescribeGlobalTable`
          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::describe_global_table::DescribeGlobalTableInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::describe_global_table::DescribeGlobalTableOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::describe_global_table::DescribeGlobalTableError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +366,510 @@
   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 DescribeGlobalTable {
   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("DescribeGlobalTable");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            DescribeGlobalTableRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            DescribeGlobalTableResponseDeserializer,
   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   
            "DescribeGlobalTable",
  105    116   
            "DynamoDB",
  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("DescribeGlobalTable")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(DescribeGlobalTableEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::describe_global_table::DescribeGlobalTableError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::describe_global_table::DescribeGlobalTableError,
  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 DescribeGlobalTableResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeGlobalTableResponseDeserializer {
  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_describe_global_table::de_describe_global_table_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_describe_global_table::de_describe_global_table_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 DescribeGlobalTableRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeGlobalTableRequestSerializer {
  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::describe_global_table::DescribeGlobalTableInput>()
  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::describe_global_table::DescribeGlobalTableInput,
  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, "/").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::describe_global_table::DescribeGlobalTableInput,
  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/x-amz-json-1.0");
  187    200   
            builder = _header_serialization_settings.set_default_header(
  188    201   
                builder,
  189    202   
                ::http::header::HeaderName::from_static("x-amz-target"),
  190    203   
                "DynamoDB_20120810.DescribeGlobalTable",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_describe_global_table::ser_describe_global_table_input(
  195    208   
            &input,
  196    209   
        )?);
  197    210   
        if let Some(content_length) = body.content_length() {
  198    211   
            let content_length = content_length.to_string();
  199    212   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  200    213   
        }
  201    214   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  202    215   
    }
  203    216   
}
         217  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  204    218   
#[derive(Debug)]
  205    219   
struct DescribeGlobalTableEndpointParamsInterceptor;
  206    220   
  207    221   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeGlobalTableEndpointParamsInterceptor {
  208    222   
    fn name(&self) -> &'static str {
  209    223   
        "DescribeGlobalTableEndpointParamsInterceptor"
  210    224   
    }
  211    225   
  212    226   
    fn read_before_execution(
  213    227   
        &self,
  214    228   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  215    229   
            '_,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  217    231   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  218    232   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  219    233   
        >,
  220    234   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  221    235   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  222    236   
        let _input = context
  223    237   
            .input()
  224    238   
            .downcast_ref::<DescribeGlobalTableInput>()
  225    239   
            .ok_or("failed to downcast to DescribeGlobalTableInput")?;
  226    240   
  227    241   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  228    242   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  229    243   
        })?;
  230    244   
        cfg.interceptor_state()
  231    245   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  232    246   
        ::std::result::Result::Ok(())
  233    247   
    }
  234    248   
}
  235    249   
  236    250   
// The get_* functions below are generated from JMESPath expressions in the
  237    251   
// operationContextParams trait. They target the operation's input shape.
  238    252   
         253  +
/* OperationErrorGenerator.kt:79 */
  239    254   
/// Error type for the `DescribeGlobalTableError` operation.
         255  +
/* RustType.kt:516 */
  240    256   
#[non_exhaustive]
         257  +
/* RustType.kt:516 */
  241    258   
#[derive(::std::fmt::Debug)]
  242         -
pub enum DescribeGlobalTableError {
  243         -
    /// <p>The specified global table does not exist.</p>
         259  +
pub /* OperationErrorGenerator.kt:81 */ enum DescribeGlobalTableError {
         260  +
    /// /* OperationErrorGenerator.kt:83 */<p>The specified global table does not exist.</p>
         261  +
    /* OperationErrorGenerator.kt:86 */
  244    262   
    GlobalTableNotFoundError(crate::types::error::GlobalTableNotFoundError),
  245         -
    /// <p>An error occurred on the server side.</p>
         263  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         264  +
    /* OperationErrorGenerator.kt:86 */
  246    265   
    InternalServerError(crate::types::error::InternalServerError),
         266  +
    /* OperationErrorGenerator.kt:83 */
  247    267   
    #[allow(missing_docs)] // documentation missing in model
         268  +
    /* OperationErrorGenerator.kt:86 */
  248    269   
    InvalidEndpointError(crate::types::error::InvalidEndpointError),
         270  +
    /* OperationErrorGenerator.kt:88 */
  249    271   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  250    272   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  251    273   
    variable wildcard pattern and check `.code()`:
  252    274   
     \
  253    275   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  254    276   
     \
  255    277   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DescribeGlobalTableError) for what information is available for the error.")]
  256    278   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         279  +
    /* OperationErrorGenerator.kt:81 */
  257    280   
}
         281  +
/* OperationErrorGenerator.kt:218 */
  258    282   
impl DescribeGlobalTableError {
         283  +
    /* OperationErrorGenerator.kt:219 */
  259    284   
    /// Creates the `DescribeGlobalTableError::Unhandled` variant from any error type.
  260    285   
    pub fn unhandled(
  261    286   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  262    287   
    ) -> Self {
  263    288   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  264    289   
            source: err.into(),
  265    290   
            meta: ::std::default::Default::default(),
  266    291   
        })
  267    292   
    }
  268    293   
  269    294   
    /// Creates the `DescribeGlobalTableError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  270    295   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  271    296   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  272    297   
            source: err.clone().into(),
  273    298   
            meta: err,
  274    299   
        })
  275    300   
    }
  276         -
    ///
         301  +
    /// /* OperationErrorGenerator.kt:236 */
  277    302   
    /// Returns error metadata, which includes the error code, message,
  278    303   
    /// request ID, and potentially additional information.
  279    304   
    ///
         305  +
    /* OperationErrorGenerator.kt:242 */
  280    306   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         307  +
        /* OperationErrorGenerator.kt:243 */
  281    308   
        match self {
         309  +
            /* OperationErrorGenerator.kt:246 */
  282    310   
            Self::GlobalTableNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         311  +
            /* OperationErrorGenerator.kt:246 */
  283    312   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         313  +
            /* OperationErrorGenerator.kt:246 */
  284    314   
            Self::InvalidEndpointError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  285         -
            Self::Unhandled(e) => &e.meta,
         315  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         316  +
            /* OperationErrorGenerator.kt:243 */
  286    317   
        }
         318  +
        /* OperationErrorGenerator.kt:242 */
  287    319   
    }
         320  +
    /* OperationErrorGenerator.kt:257 */
  288    321   
    /// Returns `true` if the error kind is `DescribeGlobalTableError::GlobalTableNotFoundError`.
         322  +
    /* OperationErrorGenerator.kt:258 */
  289    323   
    pub fn is_global_table_not_found_error(&self) -> bool {
         324  +
        /* OperationErrorGenerator.kt:259 */
  290    325   
        matches!(self, Self::GlobalTableNotFoundError(_))
         326  +
        /* OperationErrorGenerator.kt:258 */
  291    327   
    }
         328  +
    /* OperationErrorGenerator.kt:257 */
  292    329   
    /// Returns `true` if the error kind is `DescribeGlobalTableError::InternalServerError`.
         330  +
    /* OperationErrorGenerator.kt:258 */
  293    331   
    pub fn is_internal_server_error(&self) -> bool {
         332  +
        /* OperationErrorGenerator.kt:259 */
  294    333   
        matches!(self, Self::InternalServerError(_))
         334  +
        /* OperationErrorGenerator.kt:258 */
  295    335   
    }
         336  +
    /* OperationErrorGenerator.kt:257 */
  296    337   
    /// Returns `true` if the error kind is `DescribeGlobalTableError::InvalidEndpointError`.
         338  +
    /* OperationErrorGenerator.kt:258 */
  297    339   
    pub fn is_invalid_endpoint_error(&self) -> bool {
         340  +
        /* OperationErrorGenerator.kt:259 */
  298    341   
        matches!(self, Self::InvalidEndpointError(_))
         342  +
        /* OperationErrorGenerator.kt:258 */
  299    343   
    }
         344  +
    /* OperationErrorGenerator.kt:218 */
  300    345   
}
         346  +
/* OperationErrorGenerator.kt:269 */
  301    347   
impl ::std::error::Error for DescribeGlobalTableError {
         348  +
    /* OperationErrorGenerator.kt:270 */
  302    349   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         350  +
        /* OperationErrorGenerator.kt:318 */
  303    351   
        match self {
  304         -
            Self::GlobalTableNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  305         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  306         -
            Self::InvalidEndpointError(_inner) => ::std::option::Option::Some(_inner),
  307         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         352  +
            /* OperationErrorGenerator.kt:321 */
         353  +
            Self::GlobalTableNotFoundError(_inner) =>
         354  +
            /* OperationErrorGenerator.kt:283 */
         355  +
            {
         356  +
                ::std::option::Option::Some(_inner)
         357  +
            }
         358  +
            ,
         359  +
            /* OperationErrorGenerator.kt:321 */
         360  +
            Self::InternalServerError(_inner) =>
         361  +
            /* OperationErrorGenerator.kt:283 */
         362  +
            {
         363  +
                ::std::option::Option::Some(_inner)
         364  +
            }
         365  +
            ,
         366  +
            /* OperationErrorGenerator.kt:321 */
         367  +
            Self::InvalidEndpointError(_inner) =>
         368  +
            /* OperationErrorGenerator.kt:283 */
         369  +
            {
         370  +
                ::std::option::Option::Some(_inner)
         371  +
            }
         372  +
            ,
         373  +
            /* OperationErrorGenerator.kt:326 */
         374  +
            Self::Unhandled(_inner) => {
         375  +
                /* OperationErrorGenerator.kt:279 */
         376  +
                ::std::option::Option::Some(&*_inner.source)
         377  +
                /* OperationErrorGenerator.kt:326 */
         378  +
            } /* OperationErrorGenerator.kt:318 */
  308    379   
        }
         380  +
        /* OperationErrorGenerator.kt:270 */
  309    381   
    }
         382  +
    /* OperationErrorGenerator.kt:269 */
  310    383   
}
         384  +
/* OperationErrorGenerator.kt:133 */
  311    385   
impl ::std::fmt::Display for DescribeGlobalTableError {
         386  +
    /* OperationErrorGenerator.kt:134 */
  312    387   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         388  +
        /* OperationErrorGenerator.kt:318 */
  313    389   
        match self {
  314         -
            Self::GlobalTableNotFoundError(_inner) => _inner.fmt(f),
  315         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  316         -
            Self::InvalidEndpointError(_inner) => _inner.fmt(f),
         390  +
            /* OperationErrorGenerator.kt:321 */
         391  +
            Self::GlobalTableNotFoundError(_inner) =>
         392  +
            /* OperationErrorGenerator.kt:151 */
         393  +
            {
         394  +
                _inner.fmt(f)
         395  +
            }
         396  +
            ,
         397  +
            /* OperationErrorGenerator.kt:321 */
         398  +
            Self::InternalServerError(_inner) =>
         399  +
            /* OperationErrorGenerator.kt:151 */
         400  +
            {
         401  +
                _inner.fmt(f)
         402  +
            }
         403  +
            ,
         404  +
            /* OperationErrorGenerator.kt:321 */
         405  +
            Self::InvalidEndpointError(_inner) =>
         406  +
            /* OperationErrorGenerator.kt:151 */
         407  +
            {
         408  +
                _inner.fmt(f)
         409  +
            }
         410  +
            ,
         411  +
            /* OperationErrorGenerator.kt:326 */
  317    412   
            Self::Unhandled(_inner) => {
         413  +
                /* OperationErrorGenerator.kt:139 */
  318    414   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  319    415   
                    write!(f, "unhandled error ({code})")
  320    416   
                } else {
  321    417   
                    f.write_str("unhandled error")
  322    418   
                }
         419  +
                /* OperationErrorGenerator.kt:326 */
         420  +
            } /* OperationErrorGenerator.kt:318 */
  323    421   
        }
         422  +
        /* OperationErrorGenerator.kt:134 */
  324    423   
    }
  325         -
    }
         424  +
    /* OperationErrorGenerator.kt:133 */
  326    425   
}
         426  +
/* OperationErrorGenerator.kt:182 */
  327    427   
impl ::aws_smithy_types::retry::ProvideErrorKind for DescribeGlobalTableError {
         428  +
    /* OperationErrorGenerator.kt:186 */
  328    429   
    fn code(&self) -> ::std::option::Option<&str> {
         430  +
        /* OperationErrorGenerator.kt:187 */
  329    431   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         432  +
        /* OperationErrorGenerator.kt:186 */
  330    433   
    }
         434  +
    /* OperationErrorGenerator.kt:190 */
  331    435   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         436  +
        /* OperationErrorGenerator.kt:197 */
  332    437   
        ::std::option::Option::None
         438  +
        /* OperationErrorGenerator.kt:190 */
  333    439   
    }
         440  +
    /* OperationErrorGenerator.kt:182 */
  334    441   
}
         442  +
/* OperationErrorGenerator.kt:163 */
  335    443   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DescribeGlobalTableError {
         444  +
    /* OperationErrorGenerator.kt:164 */
  336    445   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         446  +
        /* OperationErrorGenerator.kt:318 */
  337    447   
        match self {
  338         -
            Self::GlobalTableNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  339         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  340         -
            Self::InvalidEndpointError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  341         -
            Self::Unhandled(_inner) => &_inner.meta,
         448  +
            /* OperationErrorGenerator.kt:321 */
         449  +
            Self::GlobalTableNotFoundError(_inner) =>
         450  +
            /* OperationErrorGenerator.kt:169 */
         451  +
            {
         452  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         453  +
            }
         454  +
            ,
         455  +
            /* OperationErrorGenerator.kt:321 */
         456  +
            Self::InternalServerError(_inner) =>
         457  +
            /* OperationErrorGenerator.kt:169 */
         458  +
            {
         459  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         460  +
            }
         461  +
            ,
         462  +
            /* OperationErrorGenerator.kt:321 */
         463  +
            Self::InvalidEndpointError(_inner) =>
         464  +
            /* OperationErrorGenerator.kt:169 */
         465  +
            {
         466  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         467  +
            }
         468  +
            ,
         469  +
            /* OperationErrorGenerator.kt:326 */
         470  +
            Self::Unhandled(_inner) => {
         471  +
                /* OperationErrorGenerator.kt:168 */
         472  +
                &_inner.meta
         473  +
                /* OperationErrorGenerator.kt:326 */
         474  +
            } /* OperationErrorGenerator.kt:318 */
  342    475   
        }
         476  +
        /* OperationErrorGenerator.kt:164 */
  343    477   
    }
         478  +
    /* OperationErrorGenerator.kt:163 */
  344    479   
}
         480  +
/* OperationErrorGenerator.kt:109 */
  345    481   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DescribeGlobalTableError {
         482  +
    /* OperationErrorGenerator.kt:110 */
  346    483   
    fn create_unhandled_error(
  347    484   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  348    485   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  349    486   
    ) -> Self {
         487  +
        /* OperationErrorGenerator.kt:121 */
  350    488   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  351    489   
            source,
  352    490   
            meta: meta.unwrap_or_default(),
  353    491   
        })
         492  +
        /* OperationErrorGenerator.kt:110 */
  354    493   
    }
         494  +
    /* OperationErrorGenerator.kt:109 */
  355    495   
}
  356    496   
         497  +
/* CodegenDelegator.kt:255 */
  357    498   
pub use crate::operation::describe_global_table::_describe_global_table_output::DescribeGlobalTableOutput;
  358    499   
         500  +
/* CodegenDelegator.kt:255 */
  359    501   
pub use crate::operation::describe_global_table::_describe_global_table_input::DescribeGlobalTableInput;
  360    502   
         503  +
/* RustModule.kt:172 */
  361    504   
mod _describe_global_table_input;
  362    505   
         506  +
/* RustModule.kt:172 */
  363    507   
mod _describe_global_table_output;
  364    508   
  365         -
/// Builders
         509  +
/// /* CodegenDelegator.kt:51 */Builders
  366    510   
pub mod builders;

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table/_describe_global_table_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table/_describe_global_table_output.rs

@@ -1,1 +49,84 @@
    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 DescribeGlobalTableOutput {
    6         -
    /// <p>Contains the details of the global table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct DescribeGlobalTableOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Contains the details of the global table.</p>
    7     10   
    pub global_table_description: ::std::option::Option<crate::types::GlobalTableDescription>,
          11  +
    /* StructureGenerator.kt:201 */
    8     12   
}
          13  +
/* StructureGenerator.kt:135 */
    9     14   
impl DescribeGlobalTableOutput {
   10         -
    /// <p>Contains the details of the global table.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Contains the details of the global table.</p>
          16  +
    /* StructureGenerator.kt:166 */
   11     17   
    pub fn global_table_description(&self) -> ::std::option::Option<&crate::types::GlobalTableDescription> {
          18  +
        /* StructureGenerator.kt:170 */
   12     19   
        self.global_table_description.as_ref()
          20  +
        /* StructureGenerator.kt:166 */
   13     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   14     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   15     25   
impl DescribeGlobalTableOutput {
   16         -
    /// Creates a new builder-style object to manufacture [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          27  +
    /* BuilderGenerator.kt:175 */
   17     28   
    pub fn builder() -> crate::operation::describe_global_table::builders::DescribeGlobalTableOutputBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   18     30   
        crate::operation::describe_global_table::builders::DescribeGlobalTableOutputBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   19     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   20     34   
}
   21     35   
   22         -
/// A builder for [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          37  +
/* RustType.kt:516 */
   23     38   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          39  +
/* RustType.kt:516 */
   24     40   
#[non_exhaustive]
          41  +
/* BuilderGenerator.kt:345 */
   25     42   
pub struct DescribeGlobalTableOutputBuilder {
          43  +
    /* BuilderGenerator.kt:275 */
   26     44   
    pub(crate) global_table_description: ::std::option::Option<crate::types::GlobalTableDescription>,
          45  +
    /* BuilderGenerator.kt:345 */
   27     46   
}
          47  +
/* BuilderGenerator.kt:355 */
   28     48   
impl DescribeGlobalTableOutputBuilder {
   29         -
    /// <p>Contains the details of the global table.</p>
          49  +
    /// /* BuilderGenerator.kt:286 */<p>Contains the details of the global table.</p>
          50  +
    /* BuilderGenerator.kt:291 */
   30     51   
    pub fn global_table_description(mut self, input: crate::types::GlobalTableDescription) -> Self {
          52  +
        /* BuilderGenerator.kt:292 */
   31     53   
        self.global_table_description = ::std::option::Option::Some(input);
          54  +
        /* BuilderGenerator.kt:293 */
   32     55   
        self
          56  +
        /* BuilderGenerator.kt:291 */
   33     57   
    }
   34         -
    /// <p>Contains the details of the global table.</p>
          58  +
    /// /* BuilderGenerator.kt:312 */<p>Contains the details of the global table.</p>
          59  +
    /* BuilderGenerator.kt:314 */
   35     60   
    pub fn set_global_table_description(mut self, input: ::std::option::Option<crate::types::GlobalTableDescription>) -> Self {
          61  +
        /* BuilderGenerator.kt:315 */
   36     62   
        self.global_table_description = input;
   37     63   
        self
          64  +
        /* BuilderGenerator.kt:314 */
   38     65   
    }
   39         -
    /// <p>Contains the details of the global table.</p>
          66  +
    /// /* BuilderGenerator.kt:334 */<p>Contains the details of the global table.</p>
          67  +
    /* BuilderGenerator.kt:336 */
   40     68   
    pub fn get_global_table_description(&self) -> &::std::option::Option<crate::types::GlobalTableDescription> {
          69  +
        /* BuilderGenerator.kt:337 */
   41     70   
        &self.global_table_description
          71  +
        /* BuilderGenerator.kt:336 */
   42     72   
    }
   43         -
    /// Consumes the builder and constructs a [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          73  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DescribeGlobalTableOutput`](crate::operation::describe_global_table::DescribeGlobalTableOutput).
          74  +
    /* BuilderGenerator.kt:253 */
   44     75   
    pub fn build(self) -> crate::operation::describe_global_table::DescribeGlobalTableOutput {
          76  +
        /* BuilderGenerator.kt:477 */
   45     77   
        crate::operation::describe_global_table::DescribeGlobalTableOutput {
   46         -
            global_table_description: self.global_table_description,
          78  +
            /* BuilderGenerator.kt:481 */ global_table_description: self.global_table_description,
          79  +
            /* BuilderGenerator.kt:477 */
   47     80   
        }
          81  +
        /* BuilderGenerator.kt:253 */
   48     82   
    }
          83  +
    /* BuilderGenerator.kt:355 */
   49     84   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table/builders.rs

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

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table_settings/_describe_global_table_settings_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table_settings/_describe_global_table_settings_output.rs

@@ -1,1 +79,132 @@
    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 DescribeGlobalTableSettingsOutput {
    6         -
    /// <p>The name of the global table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct DescribeGlobalTableSettingsOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global table.</p>
    7     10   
    pub global_table_name: ::std::option::Option<::std::string::String>,
    8         -
    /// <p>The Region-specific settings for the global table.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The Region-specific settings for the global table.</p>
    9     12   
    pub replica_settings: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSettingsDescription>>,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* StructureGenerator.kt:135 */
   11     16   
impl DescribeGlobalTableSettingsOutput {
   12         -
    /// <p>The name of the global table.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global table.</p>
          18  +
    /* StructureGenerator.kt:166 */
   13     19   
    pub fn global_table_name(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   14     21   
        self.global_table_name.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   15     23   
    }
   16         -
    /// <p>The Region-specific settings for the global table.</p>
   17         -
    ///
   18         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replica_settings.is_none()`.
          24  +
    /// /* StructureGenerator.kt:231 */<p>The Region-specific settings for the global table.</p>
          25  +
    /// /* StructureGenerator.kt:162 */
          26  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replica_settings.is_none()`.
          27  +
    /* StructureGenerator.kt:166 */
   19     28   
    pub fn replica_settings(&self) -> &[crate::types::ReplicaSettingsDescription] {
   20         -
        self.replica_settings.as_deref().unwrap_or_default()
          29  +
        /* StructureGenerator.kt:169 */
          30  +
        self.replica_settings
          31  +
            .as_deref()
          32  +
            /* StructureGenerator.kt:175 */
          33  +
            .unwrap_or_default()
          34  +
        /* StructureGenerator.kt:166 */
   21     35   
    }
          36  +
    /* StructureGenerator.kt:135 */
   22     37   
}
          38  +
/* ClientCodegenVisitor.kt:237 */
   23     39   
impl DescribeGlobalTableSettingsOutput {
   24         -
    /// Creates a new builder-style object to manufacture [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
          40  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
          41  +
    /* BuilderGenerator.kt:175 */
   25     42   
    pub fn builder() -> crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder {
          43  +
        /* BuilderGenerator.kt:176 */
   26     44   
        crate::operation::describe_global_table_settings::builders::DescribeGlobalTableSettingsOutputBuilder::default()
          45  +
        /* BuilderGenerator.kt:175 */
   27     46   
    }
          47  +
    /* ClientCodegenVisitor.kt:237 */
   28     48   
}
   29     49   
   30         -
/// A builder for [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
          50  +
/// /* BuilderGenerator.kt:342 */A builder for [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
          51  +
/* RustType.kt:516 */
   31     52   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          53  +
/* RustType.kt:516 */
   32     54   
#[non_exhaustive]
          55  +
/* BuilderGenerator.kt:345 */
   33     56   
pub struct DescribeGlobalTableSettingsOutputBuilder {
   34         -
    pub(crate) global_table_name: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) global_table_name: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:275 */
   35     59   
    pub(crate) replica_settings: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSettingsDescription>>,
          60  +
    /* BuilderGenerator.kt:345 */
   36     61   
}
          62  +
/* BuilderGenerator.kt:355 */
   37     63   
impl DescribeGlobalTableSettingsOutputBuilder {
   38         -
    /// <p>The name of the global table.</p>
          64  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the global table.</p>
          65  +
    /* BuilderGenerator.kt:291 */
   39     66   
    pub fn global_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   40     68   
        self.global_table_name = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   41     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   42     72   
    }
   43         -
    /// <p>The name of the global table.</p>
          73  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the global table.</p>
          74  +
    /* BuilderGenerator.kt:314 */
   44     75   
    pub fn set_global_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   45     77   
        self.global_table_name = input;
   46     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   47     80   
    }
   48         -
    /// <p>The name of the global table.</p>
          81  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the global table.</p>
          82  +
    /* BuilderGenerator.kt:336 */
   49     83   
    pub fn get_global_table_name(&self) -> &::std::option::Option<::std::string::String> {
          84  +
        /* BuilderGenerator.kt:337 */
   50     85   
        &self.global_table_name
          86  +
        /* BuilderGenerator.kt:336 */
   51     87   
    }
   52         -
    /// Appends an item to `replica_settings`.
          88  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `replica_settings`.
          89  +
    /* BuilderGenerator.kt:411 */
   53     90   
    ///
   54         -
    /// To override the contents of this collection use [`set_replica_settings`](Self::set_replica_settings).
          91  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_replica_settings`](Self::set_replica_settings).
          92  +
    /* BuilderGenerator.kt:413 */
   55     93   
    ///
   56         -
    /// <p>The Region-specific settings for the global table.</p>
          94  +
    /// /* BuilderGenerator.kt:414 */<p>The Region-specific settings for the global table.</p>
          95  +
    /* BuilderGenerator.kt:418 */
   57     96   
    pub fn replica_settings(mut self, input: crate::types::ReplicaSettingsDescription) -> Self {
          97  +
        /* BuilderGenerator.kt:419 */
   58     98   
        let mut v = self.replica_settings.unwrap_or_default();
   59     99   
        v.push(input);
   60    100   
        self.replica_settings = ::std::option::Option::Some(v);
   61    101   
        self
         102  +
        /* BuilderGenerator.kt:418 */
   62    103   
    }
   63         -
    /// <p>The Region-specific settings for the global table.</p>
         104  +
    /// /* BuilderGenerator.kt:312 */<p>The Region-specific settings for the global table.</p>
         105  +
    /* BuilderGenerator.kt:314 */
   64    106   
    pub fn set_replica_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaSettingsDescription>>) -> Self {
         107  +
        /* BuilderGenerator.kt:315 */
   65    108   
        self.replica_settings = input;
   66    109   
        self
         110  +
        /* BuilderGenerator.kt:314 */
   67    111   
    }
   68         -
    /// <p>The Region-specific settings for the global table.</p>
         112  +
    /// /* BuilderGenerator.kt:334 */<p>The Region-specific settings for the global table.</p>
         113  +
    /* BuilderGenerator.kt:336 */
   69    114   
    pub fn get_replica_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaSettingsDescription>> {
         115  +
        /* BuilderGenerator.kt:337 */
   70    116   
        &self.replica_settings
         117  +
        /* BuilderGenerator.kt:336 */
   71    118   
    }
   72         -
    /// Consumes the builder and constructs a [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
         119  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DescribeGlobalTableSettingsOutput`](crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput).
         120  +
    /* BuilderGenerator.kt:253 */
   73    121   
    pub fn build(self) -> crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput {
         122  +
        /* BuilderGenerator.kt:477 */
   74    123   
        crate::operation::describe_global_table_settings::DescribeGlobalTableSettingsOutput {
   75         -
            global_table_name: self.global_table_name,
         124  +
            /* BuilderGenerator.kt:481 */ global_table_name: self.global_table_name,
         125  +
            /* BuilderGenerator.kt:481 */
   76    126   
            replica_settings: self.replica_settings,
         127  +
            /* BuilderGenerator.kt:477 */
   77    128   
        }
         129  +
        /* BuilderGenerator.kt:253 */
   78    130   
    }
         131  +
    /* BuilderGenerator.kt:355 */
   79    132   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_global_table_settings/builders.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_kinesis_streaming_destination.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 `DescribeKinesisStreamingDestination`.
           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 DescribeKinesisStreamingDestination;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl DescribeKinesisStreamingDestination {
    7         -
    /// Creates a new `DescribeKinesisStreamingDestination`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `DescribeKinesisStreamingDestination`
          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::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -63,72 +376,520 @@
   83     92   
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
   84     93   
            }
   85     94   
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
   86     95   
                config_override,
   87     96   
                client_config.config.clone(),
   88     97   
                &client_config.runtime_components,
   89     98   
            ));
   90     99   
        }
   91    100   
        runtime_plugins
   92    101   
    }
         102  +
    /* OperationGenerator.kt:85 */
   93    103   
}
         104  +
/* OperationRuntimePluginGenerator.kt:55 */
   94    105   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for DescribeKinesisStreamingDestination {
   95    106   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
   96    107   
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("DescribeKinesisStreamingDestination");
   97    108   
   98    109   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   99    110   
            DescribeKinesisStreamingDestinationRequestSerializer,
  100    111   
        ));
  101    112   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
  102    113   
            DescribeKinesisStreamingDestinationResponseDeserializer,
  103    114   
        ));
  104    115   
  105    116   
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
  106    117   
            ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
  107    118   
        ));
  108    119   
  109    120   
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
  110    121   
            "DescribeKinesisStreamingDestination",
  111    122   
            "DynamoDB",
  112    123   
        ));
  113    124   
  114    125   
        ::std::option::Option::Some(cfg.freeze())
  115    126   
    }
  116    127   
  117    128   
    fn runtime_components(
  118    129   
        &self,
  119    130   
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
  120    131   
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
  121    132   
        #[allow(unused_mut)]
  122    133   
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("DescribeKinesisStreamingDestination")
  123    134   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  124    135   
            .with_interceptor(DescribeKinesisStreamingDestinationEndpointParamsInterceptor)
  125    136   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  126    137   
                crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError,
  127    138   
            >::new())
  128    139   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  129    140   
                crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationError,
  130    141   
            >::new());
  131    142   
  132    143   
        ::std::borrow::Cow::Owned(rcb)
  133    144   
    }
  134    145   
}
  135    146   
         147  +
/* ResponseDeserializerGenerator.kt:64 */
  136    148   
#[derive(Debug)]
  137    149   
struct DescribeKinesisStreamingDestinationResponseDeserializer;
  138    150   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for DescribeKinesisStreamingDestinationResponseDeserializer {
  139    151   
    fn deserialize_nonstreaming(
  140    152   
        &self,
  141    153   
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  142    154   
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
  143    155   
        let (success, status) = (response.status().is_success(), response.status().as_u16());
  144    156   
        let headers = response.headers();
  145    157   
        let body = response.body().bytes().expect("body loaded");
  146    158   
        #[allow(unused_mut)]
  147    159   
        let mut force_error = false;
  148    160   
  149    161   
        let parse_result = if !success && status != 200 || force_error {
  150    162   
            crate::protocol_serde::shape_describe_kinesis_streaming_destination::de_describe_kinesis_streaming_destination_http_error(
  151    163   
                status, headers, body,
  152    164   
            )
  153    165   
        } else {
  154    166   
            crate::protocol_serde::shape_describe_kinesis_streaming_destination::de_describe_kinesis_streaming_destination_http_response(
  155    167   
                status, headers, body,
  156    168   
            )
  157    169   
        };
  158    170   
        crate::protocol_serde::type_erase_result(parse_result)
  159    171   
    }
  160    172   
}
         173  +
/* RequestSerializerGenerator.kt:67 */
  161    174   
#[derive(Debug)]
  162    175   
struct DescribeKinesisStreamingDestinationRequestSerializer;
  163    176   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for DescribeKinesisStreamingDestinationRequestSerializer {
  164    177   
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
  165    178   
    fn serialize_input(
  166    179   
        &self,
  167    180   
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
  168    181   
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  169    182   
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
  170    183   
        let input = input
  171    184   
            .downcast::<crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput>()
  172    185   
            .expect("correct type");
  173    186   
        let _header_serialization_settings = _cfg
  174    187   
            .load::<crate::serialization_settings::HeaderSerializationSettings>()
  175    188   
            .cloned()
  176    189   
            .unwrap_or_default();
  177    190   
        let mut request_builder = {
  178    191   
            fn uri_base(
  179    192   
                _input: &crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput,
  180    193   
                output: &mut ::std::string::String,
  181    194   
            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
  182    195   
                use ::std::fmt::Write as _;
  183    196   
                ::std::write!(output, "/").expect("formatting should succeed");
  184    197   
                ::std::result::Result::Ok(())
  185    198   
            }
  186    199   
            #[allow(clippy::unnecessary_wraps)]
  187    200   
            fn update_http_builder(
  188    201   
                input: &crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationInput,
  189    202   
                builder: ::http::request::Builder,
  190    203   
            ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
  191    204   
                let mut uri = ::std::string::String::new();
  192    205   
                uri_base(input, &mut uri)?;
  193    206   
                ::std::result::Result::Ok(builder.method("POST").uri(uri))
  194    207   
            }
  195    208   
            let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
  196    209   
            builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/x-amz-json-1.0");
  197    210   
            builder = _header_serialization_settings.set_default_header(
  198    211   
                builder,
  199    212   
                ::http::header::HeaderName::from_static("x-amz-target"),
  200    213   
                "DynamoDB_20120810.DescribeKinesisStreamingDestination",
  201    214   
            );
  202    215   
            builder
  203    216   
        };
  204    217   
        let body = ::aws_smithy_types::body::SdkBody::from(
  205    218   
            crate::protocol_serde::shape_describe_kinesis_streaming_destination::ser_describe_kinesis_streaming_destination_input(&input)?,
  206    219   
        );
  207    220   
        if let Some(content_length) = body.content_length() {
  208    221   
            let content_length = content_length.to_string();
  209    222   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  210    223   
        }
  211    224   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  212    225   
    }
  213    226   
}
         227  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  214    228   
#[derive(Debug)]
  215    229   
struct DescribeKinesisStreamingDestinationEndpointParamsInterceptor;
  216    230   
  217    231   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DescribeKinesisStreamingDestinationEndpointParamsInterceptor {
  218    232   
    fn name(&self) -> &'static str {
  219    233   
        "DescribeKinesisStreamingDestinationEndpointParamsInterceptor"
  220    234   
    }
  221    235   
  222    236   
    fn read_before_execution(
  223    237   
        &self,
  224    238   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  225    239   
            '_,
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  227    241   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  228    242   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  229    243   
        >,
  230    244   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  231    245   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  232    246   
        let _input = context
  233    247   
            .input()
  234    248   
            .downcast_ref::<DescribeKinesisStreamingDestinationInput>()
  235    249   
            .ok_or("failed to downcast to DescribeKinesisStreamingDestinationInput")?;
  236    250   
  237    251   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  238    252   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  239    253   
        })?;
  240    254   
        cfg.interceptor_state()
  241    255   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  242    256   
        ::std::result::Result::Ok(())
  243    257   
    }
  244    258   
}
  245    259   
  246    260   
// The get_* functions below are generated from JMESPath expressions in the
  247    261   
// operationContextParams trait. They target the operation's input shape.
  248    262   
         263  +
/* OperationErrorGenerator.kt:79 */
  249    264   
/// Error type for the `DescribeKinesisStreamingDestinationError` operation.
         265  +
/* RustType.kt:516 */
  250    266   
#[non_exhaustive]
         267  +
/* RustType.kt:516 */
  251    268   
#[derive(::std::fmt::Debug)]
  252         -
pub enum DescribeKinesisStreamingDestinationError {
  253         -
    /// <p>An error occurred on the server side.</p>
         269  +
pub /* OperationErrorGenerator.kt:81 */ enum DescribeKinesisStreamingDestinationError {
         270  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         271  +
    /* OperationErrorGenerator.kt:86 */
  254    272   
    InternalServerError(crate::types::error::InternalServerError),
         273  +
    /* OperationErrorGenerator.kt:83 */
  255    274   
    #[allow(missing_docs)] // documentation missing in model
         275  +
    /* OperationErrorGenerator.kt:86 */
  256    276   
    InvalidEndpointError(crate::types::error::InvalidEndpointError),
  257         -
    /// <p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
         277  +
    /// /* OperationErrorGenerator.kt:83 */<p>The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
         278  +
    /* OperationErrorGenerator.kt:86 */
  258    279   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
         280  +
    /* OperationErrorGenerator.kt:88 */
  259    281   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  260    282   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  261    283   
    variable wildcard pattern and check `.code()`:
  262    284   
     \
  263    285   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  264    286   
     \
  265    287   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DescribeKinesisStreamingDestinationError) for what information is available for the error.")]
  266    288   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         289  +
    /* OperationErrorGenerator.kt:81 */
  267    290   
}
         291  +
/* OperationErrorGenerator.kt:218 */
  268    292   
impl DescribeKinesisStreamingDestinationError {
         293  +
    /* OperationErrorGenerator.kt:219 */
  269    294   
    /// Creates the `DescribeKinesisStreamingDestinationError::Unhandled` variant from any error type.
  270    295   
    pub fn unhandled(
  271    296   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  272    297   
    ) -> Self {
  273    298   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  274    299   
            source: err.into(),
  275    300   
            meta: ::std::default::Default::default(),
  276    301   
        })
  277    302   
    }
  278    303   
  279    304   
    /// Creates the `DescribeKinesisStreamingDestinationError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  280    305   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  281    306   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  282    307   
            source: err.clone().into(),
  283    308   
            meta: err,
  284    309   
        })
  285    310   
    }
  286         -
    ///
         311  +
    /// /* OperationErrorGenerator.kt:236 */
  287    312   
    /// Returns error metadata, which includes the error code, message,
  288    313   
    /// request ID, and potentially additional information.
  289    314   
    ///
         315  +
    /* OperationErrorGenerator.kt:242 */
  290    316   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         317  +
        /* OperationErrorGenerator.kt:243 */
  291    318   
        match self {
         319  +
            /* OperationErrorGenerator.kt:246 */
  292    320   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         321  +
            /* OperationErrorGenerator.kt:246 */
  293    322   
            Self::InvalidEndpointError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         323  +
            /* OperationErrorGenerator.kt:246 */
  294    324   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  295         -
            Self::Unhandled(e) => &e.meta,
         325  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         326  +
            /* OperationErrorGenerator.kt:243 */
  296    327   
        }
         328  +
        /* OperationErrorGenerator.kt:242 */
  297    329   
    }
         330  +
    /* OperationErrorGenerator.kt:257 */
  298    331   
    /// Returns `true` if the error kind is `DescribeKinesisStreamingDestinationError::InternalServerError`.
         332  +
    /* OperationErrorGenerator.kt:258 */
  299    333   
    pub fn is_internal_server_error(&self) -> bool {
         334  +
        /* OperationErrorGenerator.kt:259 */
  300    335   
        matches!(self, Self::InternalServerError(_))
         336  +
        /* OperationErrorGenerator.kt:258 */
  301    337   
    }
         338  +
    /* OperationErrorGenerator.kt:257 */
  302    339   
    /// Returns `true` if the error kind is `DescribeKinesisStreamingDestinationError::InvalidEndpointError`.
         340  +
    /* OperationErrorGenerator.kt:258 */
  303    341   
    pub fn is_invalid_endpoint_error(&self) -> bool {
         342  +
        /* OperationErrorGenerator.kt:259 */
  304    343   
        matches!(self, Self::InvalidEndpointError(_))
         344  +
        /* OperationErrorGenerator.kt:258 */
  305    345   
    }
         346  +
    /* OperationErrorGenerator.kt:257 */
  306    347   
    /// Returns `true` if the error kind is `DescribeKinesisStreamingDestinationError::ResourceNotFoundError`.
         348  +
    /* OperationErrorGenerator.kt:258 */
  307    349   
    pub fn is_resource_not_found_error(&self) -> bool {
         350  +
        /* OperationErrorGenerator.kt:259 */
  308    351   
        matches!(self, Self::ResourceNotFoundError(_))
         352  +
        /* OperationErrorGenerator.kt:258 */
  309    353   
    }
         354  +
    /* OperationErrorGenerator.kt:218 */
  310    355   
}
         356  +
/* OperationErrorGenerator.kt:269 */
  311    357   
impl ::std::error::Error for DescribeKinesisStreamingDestinationError {
         358  +
    /* OperationErrorGenerator.kt:270 */
  312    359   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         360  +
        /* OperationErrorGenerator.kt:318 */
  313    361   
        match self {
  314         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  315         -
            Self::InvalidEndpointError(_inner) => ::std::option::Option::Some(_inner),
  316         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  317         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         362  +
            /* OperationErrorGenerator.kt:321 */
         363  +
            Self::InternalServerError(_inner) =>
         364  +
            /* OperationErrorGenerator.kt:283 */
         365  +
            {
         366  +
                ::std::option::Option::Some(_inner)
         367  +
            }
         368  +
            ,
         369  +
            /* OperationErrorGenerator.kt:321 */
         370  +
            Self::InvalidEndpointError(_inner) =>
         371  +
            /* OperationErrorGenerator.kt:283 */
         372  +
            {
         373  +
                ::std::option::Option::Some(_inner)
         374  +
            }
         375  +
            ,
         376  +
            /* OperationErrorGenerator.kt:321 */
         377  +
            Self::ResourceNotFoundError(_inner) =>
         378  +
            /* OperationErrorGenerator.kt:283 */
         379  +
            {
         380  +
                ::std::option::Option::Some(_inner)
         381  +
            }
         382  +
            ,
         383  +
            /* OperationErrorGenerator.kt:326 */
         384  +
            Self::Unhandled(_inner) => {
         385  +
                /* OperationErrorGenerator.kt:279 */
         386  +
                ::std::option::Option::Some(&*_inner.source)
         387  +
                /* OperationErrorGenerator.kt:326 */
         388  +
            } /* OperationErrorGenerator.kt:318 */
  318    389   
        }
         390  +
        /* OperationErrorGenerator.kt:270 */
  319    391   
    }
         392  +
    /* OperationErrorGenerator.kt:269 */
  320    393   
}
         394  +
/* OperationErrorGenerator.kt:133 */
  321    395   
impl ::std::fmt::Display for DescribeKinesisStreamingDestinationError {
         396  +
    /* OperationErrorGenerator.kt:134 */
  322    397   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         398  +
        /* OperationErrorGenerator.kt:318 */
  323    399   
        match self {
  324         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  325         -
            Self::InvalidEndpointError(_inner) => _inner.fmt(f),
  326         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
         400  +
            /* OperationErrorGenerator.kt:321 */
         401  +
            Self::InternalServerError(_inner) =>
         402  +
            /* OperationErrorGenerator.kt:151 */
         403  +
            {
         404  +
                _inner.fmt(f)
         405  +
            }
         406  +
            ,
         407  +
            /* OperationErrorGenerator.kt:321 */
         408  +
            Self::InvalidEndpointError(_inner) =>
         409  +
            /* OperationErrorGenerator.kt:151 */
         410  +
            {
         411  +
                _inner.fmt(f)
         412  +
            }
         413  +
            ,
         414  +
            /* OperationErrorGenerator.kt:321 */
         415  +
            Self::ResourceNotFoundError(_inner) =>
         416  +
            /* OperationErrorGenerator.kt:151 */
         417  +
            {
         418  +
                _inner.fmt(f)
         419  +
            }
         420  +
            ,
         421  +
            /* OperationErrorGenerator.kt:326 */
  327    422   
            Self::Unhandled(_inner) => {
         423  +
                /* OperationErrorGenerator.kt:139 */
  328    424   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  329    425   
                    write!(f, "unhandled error ({code})")
  330    426   
                } else {
  331    427   
                    f.write_str("unhandled error")
  332    428   
                }
         429  +
                /* OperationErrorGenerator.kt:326 */
         430  +
            } /* OperationErrorGenerator.kt:318 */
  333    431   
        }
         432  +
        /* OperationErrorGenerator.kt:134 */
  334    433   
    }
  335         -
    }
         434  +
    /* OperationErrorGenerator.kt:133 */
  336    435   
}
         436  +
/* OperationErrorGenerator.kt:182 */
  337    437   
impl ::aws_smithy_types::retry::ProvideErrorKind for DescribeKinesisStreamingDestinationError {
         438  +
    /* OperationErrorGenerator.kt:186 */
  338    439   
    fn code(&self) -> ::std::option::Option<&str> {
         440  +
        /* OperationErrorGenerator.kt:187 */
  339    441   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         442  +
        /* OperationErrorGenerator.kt:186 */
  340    443   
    }
         444  +
    /* OperationErrorGenerator.kt:190 */
  341    445   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         446  +
        /* OperationErrorGenerator.kt:197 */
  342    447   
        ::std::option::Option::None
         448  +
        /* OperationErrorGenerator.kt:190 */
  343    449   
    }
         450  +
    /* OperationErrorGenerator.kt:182 */
  344    451   
}
         452  +
/* OperationErrorGenerator.kt:163 */
  345    453   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for DescribeKinesisStreamingDestinationError {
         454  +
    /* OperationErrorGenerator.kt:164 */
  346    455   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         456  +
        /* OperationErrorGenerator.kt:318 */
  347    457   
        match self {
  348         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  349         -
            Self::InvalidEndpointError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  350         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  351         -
            Self::Unhandled(_inner) => &_inner.meta,
         458  +
            /* OperationErrorGenerator.kt:321 */
         459  +
            Self::InternalServerError(_inner) =>
         460  +
            /* OperationErrorGenerator.kt:169 */
         461  +
            {
         462  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         463  +
            }
         464  +
            ,
         465  +
            /* OperationErrorGenerator.kt:321 */
         466  +
            Self::InvalidEndpointError(_inner) =>
         467  +
            /* OperationErrorGenerator.kt:169 */
         468  +
            {
         469  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         470  +
            }
         471  +
            ,
         472  +
            /* OperationErrorGenerator.kt:321 */
         473  +
            Self::ResourceNotFoundError(_inner) =>
         474  +
            /* OperationErrorGenerator.kt:169 */
         475  +
            {
         476  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         477  +
            }
         478  +
            ,
         479  +
            /* OperationErrorGenerator.kt:326 */
         480  +
            Self::Unhandled(_inner) => {
         481  +
                /* OperationErrorGenerator.kt:168 */
         482  +
                &_inner.meta
         483  +
                /* OperationErrorGenerator.kt:326 */
         484  +
            } /* OperationErrorGenerator.kt:318 */
  352    485   
        }
         486  +
        /* OperationErrorGenerator.kt:164 */
  353    487   
    }
         488  +
    /* OperationErrorGenerator.kt:163 */
  354    489   
}
         490  +
/* OperationErrorGenerator.kt:109 */
  355    491   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for DescribeKinesisStreamingDestinationError {
         492  +
    /* OperationErrorGenerator.kt:110 */
  356    493   
    fn create_unhandled_error(
  357    494   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  358    495   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  359    496   
    ) -> Self {
         497  +
        /* OperationErrorGenerator.kt:121 */
  360    498   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  361    499   
            source,
  362    500   
            meta: meta.unwrap_or_default(),
  363    501   
        })
         502  +
        /* OperationErrorGenerator.kt:110 */
  364    503   
    }
         504  +
    /* OperationErrorGenerator.kt:109 */
  365    505   
}
  366    506   
         507  +
/* CodegenDelegator.kt:255 */
  367    508   
pub use crate::operation::describe_kinesis_streaming_destination::_describe_kinesis_streaming_destination_output::DescribeKinesisStreamingDestinationOutput;
  368    509   
         510  +
/* CodegenDelegator.kt:255 */
  369    511   
pub use crate::operation::describe_kinesis_streaming_destination::_describe_kinesis_streaming_destination_input::DescribeKinesisStreamingDestinationInput;
  370    512   
         513  +
/* RustModule.kt:172 */
  371    514   
mod _describe_kinesis_streaming_destination_input;
  372    515   
         516  +
/* RustModule.kt:172 */
  373    517   
mod _describe_kinesis_streaming_destination_output;
  374    518   
  375         -
/// Builders
         519  +
/// /* CodegenDelegator.kt:51 */Builders
  376    520   
pub mod builders;

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_input.rs

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/describe_kinesis_streaming_destination/_describe_kinesis_streaming_destination_output.rs

@@ -1,1 +82,135 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct DescribeKinesisStreamingDestinationOutput {
    6         -
    /// <p>The name of the table being described.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct DescribeKinesisStreamingDestinationOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the table being described.</p>
    7     10   
    pub table_name: ::std::option::Option<::std::string::String>,
    8         -
    /// <p>The list of replica structures for the table being described.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The list of replica structures for the table being described.</p>
    9     12   
    pub kinesis_data_stream_destinations: ::std::option::Option<::std::vec::Vec<crate::types::KinesisDataStreamDestination>>,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* StructureGenerator.kt:135 */
   11     16   
impl DescribeKinesisStreamingDestinationOutput {
   12         -
    /// <p>The name of the table being described.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>The name of the table being described.</p>
          18  +
    /* StructureGenerator.kt:166 */
   13     19   
    pub fn table_name(&self) -> ::std::option::Option<&str> {
          20  +
        /* StructureGenerator.kt:169 */
   14     21   
        self.table_name.as_deref()
          22  +
        /* StructureGenerator.kt:166 */
   15     23   
    }
   16         -
    /// <p>The list of replica structures for the table being described.</p>
   17         -
    ///
   18         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.kinesis_data_stream_destinations.is_none()`.
          24  +
    /// /* StructureGenerator.kt:231 */<p>The list of replica structures for the table being described.</p>
          25  +
    /// /* StructureGenerator.kt:162 */
          26  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.kinesis_data_stream_destinations.is_none()`.
          27  +
    /* StructureGenerator.kt:166 */
   19     28   
    pub fn kinesis_data_stream_destinations(&self) -> &[crate::types::KinesisDataStreamDestination] {
   20         -
        self.kinesis_data_stream_destinations.as_deref().unwrap_or_default()
          29  +
        /* StructureGenerator.kt:169 */
          30  +
        self.kinesis_data_stream_destinations
          31  +
            .as_deref()
          32  +
            /* StructureGenerator.kt:175 */
          33  +
            .unwrap_or_default()
          34  +
        /* StructureGenerator.kt:166 */
   21     35   
    }
          36  +
    /* StructureGenerator.kt:135 */
   22     37   
}
          38  +
/* ClientCodegenVisitor.kt:237 */
   23     39   
impl DescribeKinesisStreamingDestinationOutput {
   24         -
    /// Creates a new builder-style object to manufacture [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
          40  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
          41  +
    /* BuilderGenerator.kt:175 */
   25     42   
    pub fn builder() -> crate::operation::describe_kinesis_streaming_destination::builders::DescribeKinesisStreamingDestinationOutputBuilder {
          43  +
        /* BuilderGenerator.kt:176 */
   26     44   
        crate::operation::describe_kinesis_streaming_destination::builders::DescribeKinesisStreamingDestinationOutputBuilder::default()
          45  +
        /* BuilderGenerator.kt:175 */
   27     46   
    }
          47  +
    /* ClientCodegenVisitor.kt:237 */
   28     48   
}
   29     49   
   30         -
/// A builder for [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
          50  +
/// /* BuilderGenerator.kt:342 */A builder for [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
          51  +
/* RustType.kt:516 */
   31     52   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          53  +
/* RustType.kt:516 */
   32     54   
#[non_exhaustive]
          55  +
/* BuilderGenerator.kt:345 */
   33     56   
pub struct DescribeKinesisStreamingDestinationOutputBuilder {
   34         -
    pub(crate) table_name: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) table_name: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:275 */
   35     59   
    pub(crate) kinesis_data_stream_destinations: ::std::option::Option<::std::vec::Vec<crate::types::KinesisDataStreamDestination>>,
          60  +
    /* BuilderGenerator.kt:345 */
   36     61   
}
          62  +
/* BuilderGenerator.kt:355 */
   37     63   
impl DescribeKinesisStreamingDestinationOutputBuilder {
   38         -
    /// <p>The name of the table being described.</p>
          64  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the table being described.</p>
          65  +
    /* BuilderGenerator.kt:291 */
   39     66   
    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          67  +
        /* BuilderGenerator.kt:292 */
   40     68   
        self.table_name = ::std::option::Option::Some(input.into());
          69  +
        /* BuilderGenerator.kt:293 */
   41     70   
        self
          71  +
        /* BuilderGenerator.kt:291 */
   42     72   
    }
   43         -
    /// <p>The name of the table being described.</p>
          73  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the table being described.</p>
          74  +
    /* BuilderGenerator.kt:314 */
   44     75   
    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          76  +
        /* BuilderGenerator.kt:315 */
   45     77   
        self.table_name = input;
   46     78   
        self
          79  +
        /* BuilderGenerator.kt:314 */
   47     80   
    }
   48         -
    /// <p>The name of the table being described.</p>
          81  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the table being described.</p>
          82  +
    /* BuilderGenerator.kt:336 */
   49     83   
    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
          84  +
        /* BuilderGenerator.kt:337 */
   50     85   
        &self.table_name
          86  +
        /* BuilderGenerator.kt:336 */
   51     87   
    }
   52         -
    /// Appends an item to `kinesis_data_stream_destinations`.
          88  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `kinesis_data_stream_destinations`.
          89  +
    /* BuilderGenerator.kt:411 */
   53     90   
    ///
   54         -
    /// To override the contents of this collection use [`set_kinesis_data_stream_destinations`](Self::set_kinesis_data_stream_destinations).
          91  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_kinesis_data_stream_destinations`](Self::set_kinesis_data_stream_destinations).
          92  +
    /* BuilderGenerator.kt:413 */
   55     93   
    ///
   56         -
    /// <p>The list of replica structures for the table being described.</p>
          94  +
    /// /* BuilderGenerator.kt:414 */<p>The list of replica structures for the table being described.</p>
          95  +
    /* BuilderGenerator.kt:418 */
   57     96   
    pub fn kinesis_data_stream_destinations(mut self, input: crate::types::KinesisDataStreamDestination) -> Self {
          97  +
        /* BuilderGenerator.kt:419 */
   58     98   
        let mut v = self.kinesis_data_stream_destinations.unwrap_or_default();
   59     99   
        v.push(input);
   60    100   
        self.kinesis_data_stream_destinations = ::std::option::Option::Some(v);
   61    101   
        self
         102  +
        /* BuilderGenerator.kt:418 */
   62    103   
    }
   63         -
    /// <p>The list of replica structures for the table being described.</p>
         104  +
    /// /* BuilderGenerator.kt:312 */<p>The list of replica structures for the table being described.</p>
         105  +
    /* BuilderGenerator.kt:314 */
   64    106   
    pub fn set_kinesis_data_stream_destinations(
   65    107   
        mut self,
   66    108   
        input: ::std::option::Option<::std::vec::Vec<crate::types::KinesisDataStreamDestination>>,
   67    109   
    ) -> Self {
         110  +
        /* BuilderGenerator.kt:315 */
   68    111   
        self.kinesis_data_stream_destinations = input;
   69    112   
        self
         113  +
        /* BuilderGenerator.kt:314 */
   70    114   
    }
   71         -
    /// <p>The list of replica structures for the table being described.</p>
         115  +
    /// /* BuilderGenerator.kt:334 */<p>The list of replica structures for the table being described.</p>
         116  +
    /* BuilderGenerator.kt:336 */
   72    117   
    pub fn get_kinesis_data_stream_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KinesisDataStreamDestination>> {
         118  +
        /* BuilderGenerator.kt:337 */
   73    119   
        &self.kinesis_data_stream_destinations
         120  +
        /* BuilderGenerator.kt:336 */
   74    121   
    }
   75         -
    /// Consumes the builder and constructs a [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
         122  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`DescribeKinesisStreamingDestinationOutput`](crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput).
         123  +
    /* BuilderGenerator.kt:253 */
   76    124   
    pub fn build(self) -> crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput {
         125  +
        /* BuilderGenerator.kt:477 */
   77    126   
        crate::operation::describe_kinesis_streaming_destination::DescribeKinesisStreamingDestinationOutput {
   78         -
            table_name: self.table_name,
         127  +
            /* BuilderGenerator.kt:481 */ table_name: self.table_name,
         128  +
            /* BuilderGenerator.kt:481 */
   79    129   
            kinesis_data_stream_destinations: self.kinesis_data_stream_destinations,
         130  +
            /* BuilderGenerator.kt:477 */
   80    131   
        }
         132  +
        /* BuilderGenerator.kt:253 */
   81    133   
    }
         134  +
    /* BuilderGenerator.kt:355 */
   82    135   
}