Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/lens.rs

@@ -1,1 +80,88 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* NestedAccessorGenerator.kt:63 */
    2      3   
pub(crate) fn reflens_list_contributor_insights_output_output_next_token(
    3      4   
    input: &crate::operation::list_contributor_insights::ListContributorInsightsOutput,
    4      5   
) -> ::std::option::Option<&::std::string::String> {
    5      6   
    let input = match &input.next_token {
    6      7   
        ::std::option::Option::None => return ::std::option::Option::None,
    7      8   
        ::std::option::Option::Some(t) => t,
    8      9   
    };
    9     10   
    ::std::option::Option::Some(input)
   10     11   
}
   11     12   
          13  +
/* NestedAccessorGenerator.kt:63 */
   12     14   
pub(crate) fn reflens_list_exports_output_output_next_token(
   13     15   
    input: &crate::operation::list_exports::ListExportsOutput,
   14     16   
) -> ::std::option::Option<&::std::string::String> {
   15     17   
    let input = match &input.next_token {
   16     18   
        ::std::option::Option::None => return ::std::option::Option::None,
   17     19   
        ::std::option::Option::Some(t) => t,
   18     20   
    };
   19     21   
    ::std::option::Option::Some(input)
   20     22   
}
   21     23   
          24  +
/* NestedAccessorGenerator.kt:63 */
   22     25   
pub(crate) fn reflens_list_tables_output_output_last_evaluated_table_name(
   23     26   
    input: &crate::operation::list_tables::ListTablesOutput,
   24     27   
) -> ::std::option::Option<&::std::string::String> {
   25     28   
    let input = match &input.last_evaluated_table_name {
   26     29   
        ::std::option::Option::None => return ::std::option::Option::None,
   27     30   
        ::std::option::Option::Some(t) => t,
   28     31   
    };
   29     32   
    ::std::option::Option::Some(input)
   30     33   
}
   31     34   
          35  +
/* NestedAccessorGenerator.kt:63 */
   32     36   
pub(crate) fn reflens_query_output_output_last_evaluated_key(
   33     37   
    input: &crate::operation::query::QueryOutput,
   34     38   
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
   35     39   
    let input = match &input.last_evaluated_key {
   36     40   
        ::std::option::Option::None => return ::std::option::Option::None,
   37     41   
        ::std::option::Option::Some(t) => t,
   38     42   
    };
   39     43   
    ::std::option::Option::Some(input)
   40     44   
}
   41     45   
          46  +
/* NestedAccessorGenerator.kt:63 */
   42     47   
pub(crate) fn reflens_scan_output_output_last_evaluated_key(
   43     48   
    input: &crate::operation::scan::ScanOutput,
   44     49   
) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
   45     50   
    let input = match &input.last_evaluated_key {
   46     51   
        ::std::option::Option::None => return ::std::option::Option::None,
   47     52   
        ::std::option::Option::Some(t) => t,
   48     53   
    };
   49     54   
    ::std::option::Option::Some(input)
   50     55   
}
   51     56   
          57  +
/* NestedAccessorGenerator.kt:40 */
   52     58   
pub(crate) fn lens_list_tables_output_output_table_names(
   53     59   
    input: crate::operation::list_tables::ListTablesOutput,
   54     60   
) -> ::std::option::Option<::std::vec::Vec<::std::string::String>> {
   55     61   
    let input = match input.table_names {
   56     62   
        ::std::option::Option::None => return ::std::option::Option::None,
   57     63   
        ::std::option::Option::Some(t) => t,
   58     64   
    };
   59     65   
    ::std::option::Option::Some(input)
   60     66   
}
   61     67   
          68  +
/* NestedAccessorGenerator.kt:40 */
   62     69   
pub(crate) fn lens_query_output_output_items(
   63     70   
    input: crate::operation::query::QueryOutput,
   64     71   
) -> ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>> {
   65     72   
    let input = match input.items {
   66     73   
        ::std::option::Option::None => return ::std::option::Option::None,
   67     74   
        ::std::option::Option::Some(t) => t,
   68     75   
    };
   69     76   
    ::std::option::Option::Some(input)
   70     77   
}
   71     78   
          79  +
/* NestedAccessorGenerator.kt:40 */
   72     80   
pub(crate) fn lens_scan_output_output_items(
   73     81   
    input: crate::operation::scan::ScanOutput,
   74     82   
) -> ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>> {
   75     83   
    let input = match input.items {
   76     84   
        ::std::option::Option::None => return ::std::option::Option::None,
   77     85   
        ::std::option::Option::Some(t) => t,
   78     86   
    };
   79     87   
    ::std::option::Option::Some(input)
   80     88   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/lib.rs

@@ -36,36 +175,187 @@
   56     56   
//! The [`operation`](crate::operation) module has a submodule for every API, and in each submodule
   57     57   
//! is the input, output, and error type for that API, as well as builders to construct each of those.
   58     58   
//!
   59     59   
//! There is a top-level [`Error`](crate::Error) type that encompasses all the errors that the
   60     60   
//! client can return. Any other error type can be converted to this `Error` type via the
   61     61   
//! [`From`](std::convert::From) trait.
   62     62   
//!
   63     63   
//! The other modules within this crate are not required for normal usage.
   64     64   
   65     65   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          66  +
/* ServiceErrorGenerator.kt:127 */
   66     67   
pub use error_meta::Error;
   67     68   
          69  +
/* RustType.kt:516 */
   68     70   
#[doc(inline)]
          71  +
/* ServiceGenerator.kt:63 */
   69     72   
pub use config::Config;
   70     73   
   71         -
/// Client for calling Amazon DynamoDB.
          74  +
/// /* FluentClientDocs.kt:24 */Client for calling Amazon DynamoDB.
   72     75   
///
   73     76   
/// ## Constructing a `Client`
   74     77   
///
   75     78   
/// A `Client` requires a config in order to be constructed. With the default set of Cargo features,
   76     79   
/// this config will only require an endpoint to produce a functioning client. However, some Smithy
   77     80   
/// features will require additional configuration. For example, `@auth` requires some kind of identity
   78     81   
/// or identity resolver to be configured. The config is used to customize various aspects of the client,
   79     82   
/// such as:
   80     83   
///
   81     84   
///   - [The underlying HTTP client](crate::config::Builder::http_client)
   82     85   
///   - [Retries](crate::config::Builder::retry_config)
   83     86   
///   - [Timeouts](crate::config::Builder::timeout_config)
   84     87   
///   - [... and more](crate::config::Builder)
   85     88   
///
   86     89   
/// Below is a minimal example of how to create a client:
   87     90   
///
   88     91   
/// ```rust,no_run
   89     92   
/// let config = dynamo::Config::builder()
   90     93   
///     .endpoint_url("http://localhost:1234")
   91     94   
///     .build();
   92     95   
/// let client = dynamo::Client::from_conf(config);
   93     96   
/// ```
   94     97   
///
   95     98   
/// _Note:_ Client construction is expensive due to connection thread pool initialization, and should be done
   96     99   
/// once at application start-up. Cloning a client is cheap (it's just an [`Arc`](std::sync::Arc) under the hood),
   97    100   
/// so creating it once at start-up and cloning it around the application as needed is recommended.
   98         -
/// # Using the `Client`
         101  +
/// /* FluentClientDocs.kt:79 */# Using the `Client`
   99    102   
///
  100    103   
/// A client has a function for every operation that can be performed by the service.
  101    104   
/// For example, the [`BatchGetItem`](crate::operation::batch_get_item) operation has
  102    105   
/// a [`Client::batch_get_item`], function which returns a builder for that operation.
  103    106   
/// The fluent builder ultimately has a `send()` function that returns an async future that
  104    107   
/// returns a result, as illustrated below:
  105    108   
///
  106    109   
/// ```rust,ignore
  107    110   
/// let result = client.batch_get_item()
  108    111   
///     .return_consumed_capacity("example")
  109    112   
///     .send()
  110    113   
///     .await;
  111    114   
/// ```
  112    115   
///
  113    116   
/// The underlying HTTP requests that get made by this can be modified with the `customize_operation`
  114    117   
/// function on the fluent builder. See the [`customize`](crate::client::customize) module for more
  115    118   
/// information.
  116         -
/// # Waiters
         119  +
/// /* FluentClientDocs.kt:110 */# Waiters
  117    120   
///
  118    121   
/// This client provides `wait_until` methods behind the [`Waiters`](crate::client::Waiters) trait.
  119    122   
/// To use them, simply import the trait, and then call one of the `wait_until` methods. This will
  120    123   
/// return a waiter fluent builder that takes various parameters, which are documented on the builder
  121    124   
/// type. Once parameters have been provided, the `wait` method can be called to initiate waiting.
  122    125   
///
  123    126   
/// For example, if there was a `wait_until_thing` method, it could look like:
  124    127   
/// ```rust,ignore
  125    128   
/// let result = client.wait_until_thing()
  126    129   
///     .thing_id("someId")
  127    130   
///     .wait(Duration::from_secs(120))
  128    131   
///     .await;
  129    132   
/// ```
  130    133   
pub mod client;
  131    134   
  132         -
/// Configuration for Amazon DynamoDB.
         135  +
/// /* ClientRustModule.kt:121 */Configuration for Amazon DynamoDB.
  133    136   
pub mod config;
  134    137   
  135         -
/// Common errors and error handling utilities.
         138  +
/// /* ClientRustModule.kt:121 */Common errors and error handling utilities.
  136    139   
pub mod error;
  137    140   
         141  +
/* RustModule.kt:172 */
  138    142   
mod error_meta;
  139    143   
  140         -
/// Information about this crate.
         144  +
/// /* ClientRustModule.kt:121 */Information about this crate.
  141    145   
pub mod meta;
  142    146   
  143         -
/// Primitives such as `Blob` or `DateTime` used by other types.
         147  +
/// /* ClientRustModule.kt:121 */Primitives such as `Blob` or `DateTime` used by other types.
  144    148   
pub mod primitives;
  145    149   
  146         -
/// Data structures used by operation inputs/outputs.
         150  +
/// /* ClientRustModule.kt:121 */Data structures used by operation inputs/outputs.
  147    151   
pub mod types;
  148    152   
         153  +
/* RustModule.kt:172 */
  149    154   
mod auth_plugin;
  150    155   
  151    156   
pub(crate) mod client_idempotency_token;
  152    157   
         158  +
/* RustModule.kt:172 */
  153    159   
mod idempotency_token;
  154    160   
  155         -
/// All operations that this crate can perform.
         161  +
/// /* ClientRustModule.kt:121 */All operations that this crate can perform.
  156    162   
pub mod operation;
  157    163   
  158    164   
pub(crate) mod protocol_serde;
  159    165   
         166  +
/* RustModule.kt:172 */
  160    167   
mod sdk_feature_tracker;
  161    168   
         169  +
/* RustModule.kt:172 */
  162    170   
mod serialization_settings;
  163    171   
         172  +
/* RustModule.kt:172 */
  164    173   
mod lens;
  165    174   
         175  +
/* RustModule.kt:172 */
  166    176   
mod serde_util;
  167    177   
  168         -
/// Supporting types for waiters.
         178  +
/// /* ClientRustModule.kt:121 */Supporting types for waiters.
  169    179   
///
  170    180   
/// Note: to use waiters, import the [`Waiters`](crate::client::Waiters) trait, which adds methods prefixed with `wait_until` to the client.
  171    181   
pub mod waiters;
  172    182   
         183  +
/* RustModule.kt:172 */
  173    184   
mod json_errors;
  174    185   
         186  +
/* FluentClientDecorator.kt:76 */
  175    187   
pub use client::Client;

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/meta.rs

@@ -1,1 +4,5 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* CrateVersionCustomization.kt:23 */
    3      4   
/// Crate version number.
    4      5   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");

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

@@ -1,1 +151,151 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Types for the `BatchExecuteStatement` operation.
           2  +
/* CodegenDelegator.kt:51 */
           3  +
/// /* CodegenDelegator.kt:51 */Types for the `BatchExecuteStatement` operation.
    4      4   
pub mod batch_execute_statement;
    5      5   
    6         -
/// Types for the `BatchGetItem` operation.
           6  +
/// /* CodegenDelegator.kt:51 */Types for the `BatchGetItem` operation.
    7      7   
pub mod batch_get_item;
    8      8   
    9         -
/// Types for the `BatchWriteItem` operation.
           9  +
/// /* CodegenDelegator.kt:51 */Types for the `BatchWriteItem` operation.
   10     10   
pub mod batch_write_item;
   11     11   
   12         -
/// Types for the `CreateBackup` operation.
          12  +
/// /* CodegenDelegator.kt:51 */Types for the `CreateBackup` operation.
   13     13   
pub mod create_backup;
   14     14   
   15         -
/// Types for the `CreateGlobalTable` operation.
          15  +
/// /* CodegenDelegator.kt:51 */Types for the `CreateGlobalTable` operation.
   16     16   
pub mod create_global_table;
   17     17   
   18         -
/// Types for the `CreateTable` operation.
          18  +
/// /* CodegenDelegator.kt:51 */Types for the `CreateTable` operation.
   19     19   
pub mod create_table;
   20     20   
   21         -
/// Types for the `DeleteBackup` operation.
          21  +
/// /* CodegenDelegator.kt:51 */Types for the `DeleteBackup` operation.
   22     22   
pub mod delete_backup;
   23     23   
   24         -
/// Types for the `DeleteItem` operation.
          24  +
/// /* CodegenDelegator.kt:51 */Types for the `DeleteItem` operation.
   25     25   
pub mod delete_item;
   26     26   
   27         -
/// Types for the `DeleteTable` operation.
          27  +
/// /* CodegenDelegator.kt:51 */Types for the `DeleteTable` operation.
   28     28   
pub mod delete_table;
   29     29   
   30         -
/// Types for the `DescribeBackup` operation.
          30  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeBackup` operation.
   31     31   
pub mod describe_backup;
   32     32   
   33         -
/// Types for the `DescribeContinuousBackups` operation.
          33  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeContinuousBackups` operation.
   34     34   
pub mod describe_continuous_backups;
   35     35   
   36         -
/// Types for the `DescribeContributorInsights` operation.
          36  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeContributorInsights` operation.
   37     37   
pub mod describe_contributor_insights;
   38     38   
   39         -
/// Types for the `DescribeEndpoints` operation.
          39  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeEndpoints` operation.
   40     40   
pub mod describe_endpoints;
   41     41   
   42         -
/// Types for the `DescribeExport` operation.
          42  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeExport` operation.
   43     43   
pub mod describe_export;
   44     44   
   45         -
/// Types for the `DescribeGlobalTable` operation.
          45  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeGlobalTable` operation.
   46     46   
pub mod describe_global_table;
   47     47   
   48         -
/// Types for the `DescribeGlobalTableSettings` operation.
          48  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeGlobalTableSettings` operation.
   49     49   
pub mod describe_global_table_settings;
   50     50   
   51         -
/// Types for the `DescribeKinesisStreamingDestination` operation.
          51  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeKinesisStreamingDestination` operation.
   52     52   
pub mod describe_kinesis_streaming_destination;
   53     53   
   54         -
/// Types for the `DescribeLimits` operation.
          54  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeLimits` operation.
   55     55   
pub mod describe_limits;
   56     56   
   57         -
/// Types for the `DescribeTable` operation.
          57  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeTable` operation.
   58     58   
pub mod describe_table;
   59     59   
   60         -
/// Types for the `DescribeTableReplicaAutoScaling` operation.
          60  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeTableReplicaAutoScaling` operation.
   61     61   
pub mod describe_table_replica_auto_scaling;
   62     62   
   63         -
/// Types for the `DescribeTimeToLive` operation.
          63  +
/// /* CodegenDelegator.kt:51 */Types for the `DescribeTimeToLive` operation.
   64     64   
pub mod describe_time_to_live;
   65     65   
   66         -
/// Types for the `DisableKinesisStreamingDestination` operation.
          66  +
/// /* CodegenDelegator.kt:51 */Types for the `DisableKinesisStreamingDestination` operation.
   67     67   
pub mod disable_kinesis_streaming_destination;
   68     68   
   69         -
/// Types for the `EnableKinesisStreamingDestination` operation.
          69  +
/// /* CodegenDelegator.kt:51 */Types for the `EnableKinesisStreamingDestination` operation.
   70     70   
pub mod enable_kinesis_streaming_destination;
   71     71   
   72         -
/// Types for the `ExecuteStatement` operation.
          72  +
/// /* CodegenDelegator.kt:51 */Types for the `ExecuteStatement` operation.
   73     73   
pub mod execute_statement;
   74     74   
   75         -
/// Types for the `ExecuteTransaction` operation.
          75  +
/// /* CodegenDelegator.kt:51 */Types for the `ExecuteTransaction` operation.
   76     76   
pub mod execute_transaction;
   77     77   
   78         -
/// Types for the `ExportTableToPointInTime` operation.
          78  +
/// /* CodegenDelegator.kt:51 */Types for the `ExportTableToPointInTime` operation.
   79     79   
pub mod export_table_to_point_in_time;
   80     80   
   81         -
/// Types for the `GetItem` operation.
          81  +
/// /* CodegenDelegator.kt:51 */Types for the `GetItem` operation.
   82     82   
pub mod get_item;
   83     83   
   84         -
/// Types for the `ListBackups` operation.
          84  +
/// /* CodegenDelegator.kt:51 */Types for the `ListBackups` operation.
   85     85   
pub mod list_backups;
   86     86   
   87         -
/// Types for the `ListContributorInsights` operation.
          87  +
/// /* CodegenDelegator.kt:51 */Types for the `ListContributorInsights` operation.
   88     88   
pub mod list_contributor_insights;
   89     89   
   90         -
/// Types for the `ListExports` operation.
          90  +
/// /* CodegenDelegator.kt:51 */Types for the `ListExports` operation.
   91     91   
pub mod list_exports;
   92     92   
   93         -
/// Types for the `ListGlobalTables` operation.
          93  +
/// /* CodegenDelegator.kt:51 */Types for the `ListGlobalTables` operation.
   94     94   
pub mod list_global_tables;
   95     95   
   96         -
/// Types for the `ListTables` operation.
          96  +
/// /* CodegenDelegator.kt:51 */Types for the `ListTables` operation.
   97     97   
pub mod list_tables;
   98     98   
   99         -
/// Types for the `ListTagsOfResource` operation.
          99  +
/// /* CodegenDelegator.kt:51 */Types for the `ListTagsOfResource` operation.
  100    100   
pub mod list_tags_of_resource;
  101    101   
  102         -
/// Types for the `PutItem` operation.
         102  +
/// /* CodegenDelegator.kt:51 */Types for the `PutItem` operation.
  103    103   
pub mod put_item;
  104    104   
  105         -
/// Types for the `Query` operation.
         105  +
/// /* CodegenDelegator.kt:51 */Types for the `Query` operation.
  106    106   
pub mod query;
  107    107   
  108         -
/// Types for the `RestoreTableFromBackup` operation.
         108  +
/// /* CodegenDelegator.kt:51 */Types for the `RestoreTableFromBackup` operation.
  109    109   
pub mod restore_table_from_backup;
  110    110   
  111         -
/// Types for the `RestoreTableToPointInTime` operation.
         111  +
/// /* CodegenDelegator.kt:51 */Types for the `RestoreTableToPointInTime` operation.
  112    112   
pub mod restore_table_to_point_in_time;
  113    113   
  114         -
/// Types for the `Scan` operation.
         114  +
/// /* CodegenDelegator.kt:51 */Types for the `Scan` operation.
  115    115   
pub mod scan;
  116    116   
  117         -
/// Types for the `TagResource` operation.
         117  +
/// /* CodegenDelegator.kt:51 */Types for the `TagResource` operation.
  118    118   
pub mod tag_resource;
  119    119   
  120         -
/// Types for the `TransactGetItems` operation.
         120  +
/// /* CodegenDelegator.kt:51 */Types for the `TransactGetItems` operation.
  121    121   
pub mod transact_get_items;
  122    122   
  123         -
/// Types for the `TransactWriteItems` operation.
         123  +
/// /* CodegenDelegator.kt:51 */Types for the `TransactWriteItems` operation.
  124    124   
pub mod transact_write_items;
  125    125   
  126         -
/// Types for the `UntagResource` operation.
         126  +
/// /* CodegenDelegator.kt:51 */Types for the `UntagResource` operation.
  127    127   
pub mod untag_resource;
  128    128   
  129         -
/// Types for the `UpdateContinuousBackups` operation.
         129  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateContinuousBackups` operation.
  130    130   
pub mod update_continuous_backups;
  131    131   
  132         -
/// Types for the `UpdateContributorInsights` operation.
         132  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateContributorInsights` operation.
  133    133   
pub mod update_contributor_insights;
  134    134   
  135         -
/// Types for the `UpdateGlobalTable` operation.
         135  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateGlobalTable` operation.
  136    136   
pub mod update_global_table;
  137    137   
  138         -
/// Types for the `UpdateGlobalTableSettings` operation.
         138  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateGlobalTableSettings` operation.
  139    139   
pub mod update_global_table_settings;
  140    140   
  141         -
/// Types for the `UpdateItem` operation.
         141  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateItem` operation.
  142    142   
pub mod update_item;
  143    143   
  144         -
/// Types for the `UpdateTable` operation.
         144  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateTable` operation.
  145    145   
pub mod update_table;
  146    146   
  147         -
/// Types for the `UpdateTableReplicaAutoScaling` operation.
         147  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateTableReplicaAutoScaling` operation.
  148    148   
pub mod update_table_replica_auto_scaling;
  149    149   
  150         -
/// Types for the `UpdateTimeToLive` operation.
         150  +
/// /* CodegenDelegator.kt:51 */Types for the `UpdateTimeToLive` operation.
  151    151   
pub mod update_time_to_live;

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_execute_statement.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 `BatchExecuteStatement`.
           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 BatchExecuteStatement;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl BatchExecuteStatement {
    7         -
    /// Creates a new `BatchExecuteStatement`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `BatchExecuteStatement`
          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::batch_execute_statement::BatchExecuteStatementInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::batch_execute_statement::BatchExecuteStatementOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::batch_execute_statement::BatchExecuteStatementError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +356,475 @@
   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 BatchExecuteStatement {
   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("BatchExecuteStatement");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            BatchExecuteStatementRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            BatchExecuteStatementResponseDeserializer,
   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   
            "BatchExecuteStatement",
  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("BatchExecuteStatement")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(BatchExecuteStatementEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::batch_execute_statement::BatchExecuteStatementError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::batch_execute_statement::BatchExecuteStatementError,
  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 BatchExecuteStatementResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchExecuteStatementResponseDeserializer {
  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_batch_execute_statement::de_batch_execute_statement_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_batch_execute_statement::de_batch_execute_statement_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 BatchExecuteStatementRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchExecuteStatementRequestSerializer {
  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::batch_execute_statement::BatchExecuteStatementInput>()
  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::batch_execute_statement::BatchExecuteStatementInput,
  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::batch_execute_statement::BatchExecuteStatementInput,
  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.BatchExecuteStatement",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_execute_statement::ser_batch_execute_statement_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 BatchExecuteStatementEndpointParamsInterceptor;
  206    220   
  207    221   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchExecuteStatementEndpointParamsInterceptor {
  208    222   
    fn name(&self) -> &'static str {
  209    223   
        "BatchExecuteStatementEndpointParamsInterceptor"
  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::<BatchExecuteStatementInput>()
  225    239   
            .ok_or("failed to downcast to BatchExecuteStatementInput")?;
  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 `BatchExecuteStatementError` operation.
         255  +
/* RustType.kt:516 */
  240    256   
#[non_exhaustive]
         257  +
/* RustType.kt:516 */
  241    258   
#[derive(::std::fmt::Debug)]
  242         -
pub enum BatchExecuteStatementError {
  243         -
    /// <p>An error occurred on the server side.</p>
         259  +
pub /* OperationErrorGenerator.kt:81 */ enum BatchExecuteStatementError {
         260  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         261  +
    /* OperationErrorGenerator.kt:86 */
  244    262   
    InternalServerError(crate::types::error::InternalServerError),
  245         -
    /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
         263  +
    /// /* OperationErrorGenerator.kt:83 */<p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
         264  +
    /* OperationErrorGenerator.kt:86 */
  246    265   
    RequestLimitExceeded(crate::types::error::RequestLimitExceeded),
         266  +
    /* OperationErrorGenerator.kt:88 */
  247    267   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  248    268   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  249    269   
    variable wildcard pattern and check `.code()`:
  250    270   
     \
  251    271   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  252    272   
     \
  253    273   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-BatchExecuteStatementError) for what information is available for the error.")]
  254    274   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         275  +
    /* OperationErrorGenerator.kt:81 */
  255    276   
}
         277  +
/* OperationErrorGenerator.kt:218 */
  256    278   
impl BatchExecuteStatementError {
         279  +
    /* OperationErrorGenerator.kt:219 */
  257    280   
    /// Creates the `BatchExecuteStatementError::Unhandled` variant from any error type.
  258    281   
    pub fn unhandled(
  259    282   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  260    283   
    ) -> Self {
  261    284   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  262    285   
            source: err.into(),
  263    286   
            meta: ::std::default::Default::default(),
  264    287   
        })
  265    288   
    }
  266    289   
  267    290   
    /// Creates the `BatchExecuteStatementError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  268    291   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  269    292   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  270    293   
            source: err.clone().into(),
  271    294   
            meta: err,
  272    295   
        })
  273    296   
    }
  274         -
    ///
         297  +
    /// /* OperationErrorGenerator.kt:236 */
  275    298   
    /// Returns error metadata, which includes the error code, message,
  276    299   
    /// request ID, and potentially additional information.
  277    300   
    ///
         301  +
    /* OperationErrorGenerator.kt:242 */
  278    302   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         303  +
        /* OperationErrorGenerator.kt:243 */
  279    304   
        match self {
         305  +
            /* OperationErrorGenerator.kt:246 */
  280    306   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         307  +
            /* OperationErrorGenerator.kt:246 */
  281    308   
            Self::RequestLimitExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  282         -
            Self::Unhandled(e) => &e.meta,
         309  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         310  +
            /* OperationErrorGenerator.kt:243 */
  283    311   
        }
         312  +
        /* OperationErrorGenerator.kt:242 */
  284    313   
    }
         314  +
    /* OperationErrorGenerator.kt:257 */
  285    315   
    /// Returns `true` if the error kind is `BatchExecuteStatementError::InternalServerError`.
         316  +
    /* OperationErrorGenerator.kt:258 */
  286    317   
    pub fn is_internal_server_error(&self) -> bool {
         318  +
        /* OperationErrorGenerator.kt:259 */
  287    319   
        matches!(self, Self::InternalServerError(_))
         320  +
        /* OperationErrorGenerator.kt:258 */
  288    321   
    }
         322  +
    /* OperationErrorGenerator.kt:257 */
  289    323   
    /// Returns `true` if the error kind is `BatchExecuteStatementError::RequestLimitExceeded`.
         324  +
    /* OperationErrorGenerator.kt:258 */
  290    325   
    pub fn is_request_limit_exceeded(&self) -> bool {
         326  +
        /* OperationErrorGenerator.kt:259 */
  291    327   
        matches!(self, Self::RequestLimitExceeded(_))
         328  +
        /* OperationErrorGenerator.kt:258 */
  292    329   
    }
         330  +
    /* OperationErrorGenerator.kt:218 */
  293    331   
}
         332  +
/* OperationErrorGenerator.kt:269 */
  294    333   
impl ::std::error::Error for BatchExecuteStatementError {
         334  +
    /* OperationErrorGenerator.kt:270 */
  295    335   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         336  +
        /* OperationErrorGenerator.kt:318 */
  296    337   
        match self {
  297         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  298         -
            Self::RequestLimitExceeded(_inner) => ::std::option::Option::Some(_inner),
  299         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         338  +
            /* OperationErrorGenerator.kt:321 */
         339  +
            Self::InternalServerError(_inner) =>
         340  +
            /* OperationErrorGenerator.kt:283 */
         341  +
            {
         342  +
                ::std::option::Option::Some(_inner)
         343  +
            }
         344  +
            ,
         345  +
            /* OperationErrorGenerator.kt:321 */
         346  +
            Self::RequestLimitExceeded(_inner) =>
         347  +
            /* OperationErrorGenerator.kt:283 */
         348  +
            {
         349  +
                ::std::option::Option::Some(_inner)
         350  +
            }
         351  +
            ,
         352  +
            /* OperationErrorGenerator.kt:326 */
         353  +
            Self::Unhandled(_inner) => {
         354  +
                /* OperationErrorGenerator.kt:279 */
         355  +
                ::std::option::Option::Some(&*_inner.source)
         356  +
                /* OperationErrorGenerator.kt:326 */
         357  +
            } /* OperationErrorGenerator.kt:318 */
  300    358   
        }
         359  +
        /* OperationErrorGenerator.kt:270 */
  301    360   
    }
         361  +
    /* OperationErrorGenerator.kt:269 */
  302    362   
}
         363  +
/* OperationErrorGenerator.kt:133 */
  303    364   
impl ::std::fmt::Display for BatchExecuteStatementError {
         365  +
    /* OperationErrorGenerator.kt:134 */
  304    366   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         367  +
        /* OperationErrorGenerator.kt:318 */
  305    368   
        match self {
  306         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  307         -
            Self::RequestLimitExceeded(_inner) => _inner.fmt(f),
         369  +
            /* OperationErrorGenerator.kt:321 */
         370  +
            Self::InternalServerError(_inner) =>
         371  +
            /* OperationErrorGenerator.kt:151 */
         372  +
            {
         373  +
                _inner.fmt(f)
         374  +
            }
         375  +
            ,
         376  +
            /* OperationErrorGenerator.kt:321 */
         377  +
            Self::RequestLimitExceeded(_inner) =>
         378  +
            /* OperationErrorGenerator.kt:151 */
         379  +
            {
         380  +
                _inner.fmt(f)
         381  +
            }
         382  +
            ,
         383  +
            /* OperationErrorGenerator.kt:326 */
  308    384   
            Self::Unhandled(_inner) => {
         385  +
                /* OperationErrorGenerator.kt:139 */
  309    386   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  310    387   
                    write!(f, "unhandled error ({code})")
  311    388   
                } else {
  312    389   
                    f.write_str("unhandled error")
  313    390   
                }
  314         -
            }
         391  +
                /* OperationErrorGenerator.kt:326 */
         392  +
            } /* OperationErrorGenerator.kt:318 */
  315    393   
        }
         394  +
        /* OperationErrorGenerator.kt:134 */
  316    395   
    }
         396  +
    /* OperationErrorGenerator.kt:133 */
  317    397   
}
         398  +
/* OperationErrorGenerator.kt:182 */
  318    399   
impl ::aws_smithy_types::retry::ProvideErrorKind for BatchExecuteStatementError {
         400  +
    /* OperationErrorGenerator.kt:186 */
  319    401   
    fn code(&self) -> ::std::option::Option<&str> {
         402  +
        /* OperationErrorGenerator.kt:187 */
  320    403   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         404  +
        /* OperationErrorGenerator.kt:186 */
  321    405   
    }
         406  +
    /* OperationErrorGenerator.kt:190 */
  322    407   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         408  +
        /* OperationErrorGenerator.kt:197 */
  323    409   
        ::std::option::Option::None
         410  +
        /* OperationErrorGenerator.kt:190 */
  324    411   
    }
         412  +
    /* OperationErrorGenerator.kt:182 */
  325    413   
}
         414  +
/* OperationErrorGenerator.kt:163 */
  326    415   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for BatchExecuteStatementError {
         416  +
    /* OperationErrorGenerator.kt:164 */
  327    417   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         418  +
        /* OperationErrorGenerator.kt:318 */
  328    419   
        match self {
  329         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  330         -
            Self::RequestLimitExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  331         -
            Self::Unhandled(_inner) => &_inner.meta,
         420  +
            /* OperationErrorGenerator.kt:321 */
         421  +
            Self::InternalServerError(_inner) =>
         422  +
            /* OperationErrorGenerator.kt:169 */
         423  +
            {
         424  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         425  +
            }
         426  +
            ,
         427  +
            /* OperationErrorGenerator.kt:321 */
         428  +
            Self::RequestLimitExceeded(_inner) =>
         429  +
            /* OperationErrorGenerator.kt:169 */
         430  +
            {
         431  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         432  +
            }
         433  +
            ,
         434  +
            /* OperationErrorGenerator.kt:326 */
         435  +
            Self::Unhandled(_inner) => {
         436  +
                /* OperationErrorGenerator.kt:168 */
         437  +
                &_inner.meta
         438  +
                /* OperationErrorGenerator.kt:326 */
         439  +
            } /* OperationErrorGenerator.kt:318 */
  332    440   
        }
         441  +
        /* OperationErrorGenerator.kt:164 */
  333    442   
    }
         443  +
    /* OperationErrorGenerator.kt:163 */
  334    444   
}
         445  +
/* OperationErrorGenerator.kt:109 */
  335    446   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for BatchExecuteStatementError {
         447  +
    /* OperationErrorGenerator.kt:110 */
  336    448   
    fn create_unhandled_error(
  337    449   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  338    450   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  339    451   
    ) -> Self {
         452  +
        /* OperationErrorGenerator.kt:121 */
  340    453   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  341    454   
            source,
  342    455   
            meta: meta.unwrap_or_default(),
  343    456   
        })
         457  +
        /* OperationErrorGenerator.kt:110 */
  344    458   
    }
         459  +
    /* OperationErrorGenerator.kt:109 */
  345    460   
}
  346    461   
         462  +
/* CodegenDelegator.kt:255 */
  347    463   
pub use crate::operation::batch_execute_statement::_batch_execute_statement_output::BatchExecuteStatementOutput;
  348    464   
         465  +
/* CodegenDelegator.kt:255 */
  349    466   
pub use crate::operation::batch_execute_statement::_batch_execute_statement_input::BatchExecuteStatementInput;
  350    467   
         468  +
/* RustModule.kt:172 */
  351    469   
mod _batch_execute_statement_input;
  352    470   
         471  +
/* RustModule.kt:172 */
  353    472   
mod _batch_execute_statement_output;
  354    473   
  355         -
/// Builders
         474  +
/// /* CodegenDelegator.kt:51 */Builders
  356    475   
pub mod builders;

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_execute_statement/_batch_execute_statement_input.rs

@@ -1,1 +58,102 @@
    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 BatchExecuteStatementInput {
    6         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchExecuteStatementInput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The list of PartiQL statements representing the batch to run.</p>
    7     10   
    pub statements: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>>,
          11  +
    /* StructureGenerator.kt:201 */
    8     12   
}
          13  +
/* StructureGenerator.kt:135 */
    9     14   
impl BatchExecuteStatementInput {
   10         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
   11         -
    ///
   12         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.statements.is_none()`.
          15  +
    /// /* StructureGenerator.kt:231 */<p>The list of PartiQL statements representing the batch to run.</p>
          16  +
    /// /* StructureGenerator.kt:162 */
          17  +
    /// /* 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 `.statements.is_none()`.
          18  +
    /* StructureGenerator.kt:166 */
   13     19   
    pub fn statements(&self) -> &[crate::types::BatchStatementRequest] {
   14         -
        self.statements.as_deref().unwrap_or_default()
          20  +
        /* StructureGenerator.kt:169 */
          21  +
        self.statements
          22  +
            .as_deref()
          23  +
            /* StructureGenerator.kt:175 */
          24  +
            .unwrap_or_default()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:135 */
   16     28   
}
          29  +
/* ClientCodegenVisitor.kt:237 */
   17     30   
impl BatchExecuteStatementInput {
   18         -
    /// Creates a new builder-style object to manufacture [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          31  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          32  +
    /* BuilderGenerator.kt:175 */
   19     33   
    pub fn builder() -> crate::operation::batch_execute_statement::builders::BatchExecuteStatementInputBuilder {
          34  +
        /* BuilderGenerator.kt:176 */
   20     35   
        crate::operation::batch_execute_statement::builders::BatchExecuteStatementInputBuilder::default()
          36  +
        /* BuilderGenerator.kt:175 */
   21     37   
    }
          38  +
    /* ClientCodegenVisitor.kt:237 */
   22     39   
}
   23     40   
   24         -
/// A builder for [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          41  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          42  +
/* RustType.kt:516 */
   25     43   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          44  +
/* RustType.kt:516 */
   26     45   
#[non_exhaustive]
          46  +
/* BuilderGenerator.kt:345 */
   27     47   
pub struct BatchExecuteStatementInputBuilder {
          48  +
    /* BuilderGenerator.kt:275 */
   28     49   
    pub(crate) statements: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>>,
          50  +
    /* BuilderGenerator.kt:345 */
   29     51   
}
          52  +
/* BuilderGenerator.kt:355 */
   30     53   
impl BatchExecuteStatementInputBuilder {
   31         -
    /// Appends an item to `statements`.
          54  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `statements`.
          55  +
    /* BuilderGenerator.kt:411 */
   32     56   
    ///
   33         -
    /// To override the contents of this collection use [`set_statements`](Self::set_statements).
          57  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_statements`](Self::set_statements).
          58  +
    /* BuilderGenerator.kt:413 */
   34     59   
    ///
   35         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
          60  +
    /// /* BuilderGenerator.kt:414 */<p>The list of PartiQL statements representing the batch to run.</p>
          61  +
    /* BuilderGenerator.kt:418 */
   36     62   
    pub fn statements(mut self, input: crate::types::BatchStatementRequest) -> Self {
          63  +
        /* BuilderGenerator.kt:419 */
   37     64   
        let mut v = self.statements.unwrap_or_default();
   38     65   
        v.push(input);
   39     66   
        self.statements = ::std::option::Option::Some(v);
   40     67   
        self
          68  +
        /* BuilderGenerator.kt:418 */
   41     69   
    }
   42         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
          70  +
    /// /* BuilderGenerator.kt:312 */<p>The list of PartiQL statements representing the batch to run.</p>
          71  +
    /* BuilderGenerator.kt:314 */
   43     72   
    pub fn set_statements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>>) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.statements = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
   47         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
          78  +
    /// /* BuilderGenerator.kt:334 */<p>The list of PartiQL statements representing the batch to run.</p>
          79  +
    /* BuilderGenerator.kt:336 */
   48     80   
    pub fn get_statements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>> {
          81  +
        /* BuilderGenerator.kt:337 */
   49     82   
        &self.statements
          83  +
        /* BuilderGenerator.kt:336 */
   50     84   
    }
   51         -
    /// Consumes the builder and constructs a [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          85  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchExecuteStatementInput`](crate::operation::batch_execute_statement::BatchExecuteStatementInput).
          86  +
    /* BuilderGenerator.kt:253 */
   52     87   
    pub fn build(
   53     88   
        self,
   54     89   
    ) -> ::std::result::Result<crate::operation::batch_execute_statement::BatchExecuteStatementInput, ::aws_smithy_types::error::operation::BuildError>
   55     90   
    {
   56         -
        ::std::result::Result::Ok(crate::operation::batch_execute_statement::BatchExecuteStatementInput { statements: self.statements })
          91  +
        /* BuilderGenerator.kt:254 */
          92  +
        ::std::result::Result::Ok(
          93  +
            /* BuilderGenerator.kt:477 */
          94  +
            crate::operation::batch_execute_statement::BatchExecuteStatementInput {
          95  +
                /* BuilderGenerator.kt:481 */ statements: self.statements,
          96  +
                /* BuilderGenerator.kt:477 */
          97  +
            }, /* BuilderGenerator.kt:254 */
          98  +
        )
          99  +
        /* BuilderGenerator.kt:253 */
   57    100   
    }
         101  +
    /* BuilderGenerator.kt:355 */
   58    102   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_execute_statement/_batch_execute_statement_output.rs

@@ -1,1 +55,96 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    4      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    5         -
pub struct BatchExecuteStatementOutput {
    6         -
    /// <p>The response to each PartiQL statement in the batch.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchExecuteStatementOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The response to each PartiQL statement in the batch.</p>
    7     10   
    pub responses: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementResponse>>,
          11  +
    /* StructureGenerator.kt:201 */
    8     12   
}
          13  +
/* StructureGenerator.kt:135 */
    9     14   
impl BatchExecuteStatementOutput {
   10         -
    /// <p>The response to each PartiQL statement in the batch.</p>
   11         -
    ///
   12         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.responses.is_none()`.
          15  +
    /// /* StructureGenerator.kt:231 */<p>The response to each PartiQL statement in the batch.</p>
          16  +
    /// /* StructureGenerator.kt:162 */
          17  +
    /// /* 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 `.responses.is_none()`.
          18  +
    /* StructureGenerator.kt:166 */
   13     19   
    pub fn responses(&self) -> &[crate::types::BatchStatementResponse] {
   14         -
        self.responses.as_deref().unwrap_or_default()
          20  +
        /* StructureGenerator.kt:169 */
          21  +
        self.responses
          22  +
            .as_deref()
          23  +
            /* StructureGenerator.kt:175 */
          24  +
            .unwrap_or_default()
          25  +
        /* StructureGenerator.kt:166 */
   15     26   
    }
          27  +
    /* StructureGenerator.kt:135 */
   16     28   
}
          29  +
/* ClientCodegenVisitor.kt:237 */
   17     30   
impl BatchExecuteStatementOutput {
   18         -
    /// Creates a new builder-style object to manufacture [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          31  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          32  +
    /* BuilderGenerator.kt:175 */
   19     33   
    pub fn builder() -> crate::operation::batch_execute_statement::builders::BatchExecuteStatementOutputBuilder {
          34  +
        /* BuilderGenerator.kt:176 */
   20     35   
        crate::operation::batch_execute_statement::builders::BatchExecuteStatementOutputBuilder::default()
          36  +
        /* BuilderGenerator.kt:175 */
   21     37   
    }
          38  +
    /* ClientCodegenVisitor.kt:237 */
   22     39   
}
   23     40   
   24         -
/// A builder for [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          41  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          42  +
/* RustType.kt:516 */
   25     43   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          44  +
/* RustType.kt:516 */
   26     45   
#[non_exhaustive]
          46  +
/* BuilderGenerator.kt:345 */
   27     47   
pub struct BatchExecuteStatementOutputBuilder {
          48  +
    /* BuilderGenerator.kt:275 */
   28     49   
    pub(crate) responses: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementResponse>>,
          50  +
    /* BuilderGenerator.kt:345 */
   29     51   
}
          52  +
/* BuilderGenerator.kt:355 */
   30     53   
impl BatchExecuteStatementOutputBuilder {
   31         -
    /// Appends an item to `responses`.
          54  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `responses`.
          55  +
    /* BuilderGenerator.kt:411 */
   32     56   
    ///
   33         -
    /// To override the contents of this collection use [`set_responses`](Self::set_responses).
          57  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_responses`](Self::set_responses).
          58  +
    /* BuilderGenerator.kt:413 */
   34     59   
    ///
   35         -
    /// <p>The response to each PartiQL statement in the batch.</p>
          60  +
    /// /* BuilderGenerator.kt:414 */<p>The response to each PartiQL statement in the batch.</p>
          61  +
    /* BuilderGenerator.kt:418 */
   36     62   
    pub fn responses(mut self, input: crate::types::BatchStatementResponse) -> Self {
          63  +
        /* BuilderGenerator.kt:419 */
   37     64   
        let mut v = self.responses.unwrap_or_default();
   38     65   
        v.push(input);
   39     66   
        self.responses = ::std::option::Option::Some(v);
   40     67   
        self
          68  +
        /* BuilderGenerator.kt:418 */
   41     69   
    }
   42         -
    /// <p>The response to each PartiQL statement in the batch.</p>
          70  +
    /// /* BuilderGenerator.kt:312 */<p>The response to each PartiQL statement in the batch.</p>
          71  +
    /* BuilderGenerator.kt:314 */
   43     72   
    pub fn set_responses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementResponse>>) -> Self {
          73  +
        /* BuilderGenerator.kt:315 */
   44     74   
        self.responses = input;
   45     75   
        self
          76  +
        /* BuilderGenerator.kt:314 */
   46     77   
    }
   47         -
    /// <p>The response to each PartiQL statement in the batch.</p>
          78  +
    /// /* BuilderGenerator.kt:334 */<p>The response to each PartiQL statement in the batch.</p>
          79  +
    /* BuilderGenerator.kt:336 */
   48     80   
    pub fn get_responses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchStatementResponse>> {
          81  +
        /* BuilderGenerator.kt:337 */
   49     82   
        &self.responses
          83  +
        /* BuilderGenerator.kt:336 */
   50     84   
    }
   51         -
    /// Consumes the builder and constructs a [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          85  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchExecuteStatementOutput`](crate::operation::batch_execute_statement::BatchExecuteStatementOutput).
          86  +
    /* BuilderGenerator.kt:253 */
   52     87   
    pub fn build(self) -> crate::operation::batch_execute_statement::BatchExecuteStatementOutput {
   53         -
        crate::operation::batch_execute_statement::BatchExecuteStatementOutput { responses: self.responses }
          88  +
        /* BuilderGenerator.kt:477 */
          89  +
        crate::operation::batch_execute_statement::BatchExecuteStatementOutput {
          90  +
            /* BuilderGenerator.kt:481 */ responses: self.responses,
          91  +
            /* BuilderGenerator.kt:477 */
          92  +
        }
          93  +
        /* BuilderGenerator.kt:253 */
   54     94   
    }
          95  +
    /* BuilderGenerator.kt:355 */
   55     96   
}

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

@@ -1,1 +130,145 @@
    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::batch_execute_statement::_batch_execute_statement_output::BatchExecuteStatementOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::batch_execute_statement::_batch_execute_statement_input::BatchExecuteStatementInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::batch_execute_statement::builders::BatchExecuteStatementInputBuilder {
    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::batch_execute_statement::BatchExecuteStatementOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::batch_execute_statement::BatchExecuteStatementError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.batch_execute_statement();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `BatchExecuteStatement`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `BatchExecuteStatement`.
   24     27   
///
   25         -
/// <p>This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL.</p>
          28  +
/// /* FluentBuilderGenerator.kt:130 */<p>This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL.</p>
          29  +
/* RustType.kt:516 */
   26     30   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          31  +
/* FluentBuilderGenerator.kt:270 */
   27     32   
pub struct BatchExecuteStatementFluentBuilder {
   28     33   
    handle: ::std::sync::Arc<crate::client::Handle>,
   29     34   
    inner: crate::operation::batch_execute_statement::builders::BatchExecuteStatementInputBuilder,
   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::batch_execute_statement::BatchExecuteStatementOutput,
   35     41   
        crate::operation::batch_execute_statement::BatchExecuteStatementError,
   36     42   
    > for BatchExecuteStatementFluentBuilder
   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::batch_execute_statement::BatchExecuteStatementOutput,
   44     50   
            crate::operation::batch_execute_statement::BatchExecuteStatementError,
   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 BatchExecuteStatementFluentBuilder {
          58  +
    /* FluentBuilderGenerator.kt:288 */
   51     59   
    /// Creates a new `BatchExecuteStatementFluentBuilder`.
   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 BatchExecuteStatement as a reference.
   60     69   
    pub fn as_input(&self) -> &crate::operation::batch_execute_statement::builders::BatchExecuteStatementInputBuilder {
   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::batch_execute_statement::BatchExecuteStatementOutput,
   75     85   
        ::aws_smithy_runtime_api::client::result::SdkError<
   76     86   
            crate::operation::batch_execute_statement::BatchExecuteStatementError,
   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::batch_execute_statement::BatchExecuteStatement::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::batch_execute_statement::BatchExecuteStatement::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::batch_execute_statement::BatchExecuteStatementOutput,
   97    107   
        crate::operation::batch_execute_statement::BatchExecuteStatementError,
   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         -
    ///
         122  +
    /// /* FluentBuilderGenerator.kt:436 */
  112    123   
    /// Appends an item to `Statements`.
  113    124   
    ///
  114    125   
    /// To override the contents of this collection use [`set_statements`](Self::set_statements).
  115    126   
    ///
  116         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
         127  +
    /// /* FluentBuilderGenerator.kt:443 */<p>The list of PartiQL statements representing the batch to run.</p>
         128  +
    /* FluentBuilderGenerator.kt:446 */
  117    129   
    pub fn statements(mut self, input: crate::types::BatchStatementRequest) -> Self {
  118    130   
        self.inner = self.inner.statements(input);
  119    131   
        self
  120    132   
    }
  121         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
         133  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The list of PartiQL statements representing the batch to run.</p>
         134  +
    /* FluentBuilderGenerator.kt:500 */
  122    135   
    pub fn set_statements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>>) -> Self {
  123    136   
        self.inner = self.inner.set_statements(input);
  124    137   
        self
  125    138   
    }
  126         -
    /// <p>The list of PartiQL statements representing the batch to run.</p>
         139  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The list of PartiQL statements representing the batch to run.</p>
         140  +
    /* FluentBuilderGenerator.kt:520 */
  127    141   
    pub fn get_statements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BatchStatementRequest>> {
  128    142   
        self.inner.get_statements()
  129    143   
    }
         144  +
    /* FluentBuilderGenerator.kt:282 */
  130    145   
}

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

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_get_item/_batch_get_item_input.rs

@@ -1,1 +333,386 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the input of a <code>BatchGetItem</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the input of a <code>BatchGetItem</code> operation.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct BatchGetItemInput {
    7         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchGetItemInput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
    8     10   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
    9     11   
    /// <ul>
   10     12   
    /// <li>
   11     13   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
   12     14   
    /// <li>
   13     15   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
   14     16   
    /// <ul>
   15     17   
    /// <li>
   16     18   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
   17     19   
    /// <li>
   18     20   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
   19     21   
    /// <li>
   20     22   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
   21     23   
    /// </ul>
   22     24   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
   23     25   
    /// <ul>
   24     26   
    /// <li>
   25     27   
    /// <p><code>Percentile</code></p></li>
   26     28   
    /// </ul>
   27     29   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
   28     30   
    /// <ul>
   29     31   
    /// <li>
   30     32   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
   31     33   
    /// </ul>
   32     34   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
   33     35   
    /// <ul>
   34     36   
    /// <li>
   35     37   
    /// <p><code>#P = :val</code></p></li>
   36     38   
    /// </ul><note>
   37     39   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
   38     40   
    /// </note>
   39     41   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
   40     42   
    /// <li>
   41     43   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
   42     44   
    /// <li>
   43     45   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
   44     46   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
   45     47   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
   46     48   
    /// <li>
   47     49   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
   48     50   
    /// </ul>
   49     51   
    pub request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
   50         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
          52  +
    /// /* StructureGenerator.kt:231 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
   51     53   
    /// <ul>
   52     54   
    /// <li>
   53     55   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
   54     56   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
   55     57   
    /// <li>
   56     58   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
   57     59   
    /// <li>
   58     60   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
   59     61   
    /// </ul>
   60     62   
    pub return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
          63  +
    /* StructureGenerator.kt:201 */
   61     64   
}
          65  +
/* StructureGenerator.kt:135 */
   62     66   
impl BatchGetItemInput {
   63         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
          67  +
    /// /* StructureGenerator.kt:231 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
   64     68   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
   65     69   
    /// <ul>
   66     70   
    /// <li>
   67     71   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
   68     72   
    /// <li>
   69     73   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
   70     74   
    /// <ul>
   71     75   
    /// <li>
   72     76   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
   73     77   
    /// <li>
   74     78   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
   75     79   
    /// <li>
   76     80   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
   77     81   
    /// </ul>
   78     82   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
   79     83   
    /// <ul>
   80     84   
    /// <li>
   81     85   
    /// <p><code>Percentile</code></p></li>
   82     86   
    /// </ul>
   83     87   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
   84     88   
    /// <ul>
   85     89   
    /// <li>
   86     90   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
   87     91   
    /// </ul>
   88     92   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
   89     93   
    /// <ul>
   90     94   
    /// <li>
   91     95   
    /// <p><code>#P = :val</code></p></li>
   92     96   
    /// </ul><note>
   93     97   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
   94     98   
    /// </note>
   95     99   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
   96    100   
    /// <li>
   97    101   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
   98    102   
    /// <li>
   99    103   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  100    104   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  101    105   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  102    106   
    /// <li>
  103    107   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  104    108   
    /// </ul>
         109  +
    /* StructureGenerator.kt:166 */
  105    110   
    pub fn request_items(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
         111  +
        /* StructureGenerator.kt:170 */
  106    112   
        self.request_items.as_ref()
         113  +
        /* StructureGenerator.kt:166 */
  107    114   
    }
  108         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         115  +
    /// /* StructureGenerator.kt:231 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  109    116   
    /// <ul>
  110    117   
    /// <li>
  111    118   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  112    119   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  113    120   
    /// <li>
  114    121   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  115    122   
    /// <li>
  116    123   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  117    124   
    /// </ul>
         125  +
    /* StructureGenerator.kt:166 */
  118    126   
    pub fn return_consumed_capacity(&self) -> ::std::option::Option<&crate::types::ReturnConsumedCapacity> {
         127  +
        /* StructureGenerator.kt:170 */
  119    128   
        self.return_consumed_capacity.as_ref()
         129  +
        /* StructureGenerator.kt:166 */
  120    130   
    }
         131  +
    /* StructureGenerator.kt:135 */
  121    132   
}
         133  +
/* ClientCodegenVisitor.kt:237 */
  122    134   
impl BatchGetItemInput {
  123         -
    /// Creates a new builder-style object to manufacture [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         135  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         136  +
    /* BuilderGenerator.kt:175 */
  124    137   
    pub fn builder() -> crate::operation::batch_get_item::builders::BatchGetItemInputBuilder {
         138  +
        /* BuilderGenerator.kt:176 */
  125    139   
        crate::operation::batch_get_item::builders::BatchGetItemInputBuilder::default()
         140  +
        /* BuilderGenerator.kt:175 */
  126    141   
    }
         142  +
    /* ClientCodegenVisitor.kt:237 */
  127    143   
}
  128    144   
  129         -
/// A builder for [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         145  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         146  +
/* RustType.kt:516 */
  130    147   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         148  +
/* RustType.kt:516 */
  131    149   
#[non_exhaustive]
         150  +
/* BuilderGenerator.kt:345 */
  132    151   
pub struct BatchGetItemInputBuilder {
         152  +
    /* BuilderGenerator.kt:275 */
  133    153   
    pub(crate) request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
         154  +
    /* BuilderGenerator.kt:275 */
  134    155   
    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
         156  +
    /* BuilderGenerator.kt:345 */
  135    157   
}
         158  +
/* BuilderGenerator.kt:355 */
  136    159   
impl BatchGetItemInputBuilder {
  137         -
    /// Adds a key-value pair to `request_items`.
         160  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `request_items`.
         161  +
    /* BuilderGenerator.kt:437 */
  138    162   
    ///
  139         -
    /// To override the contents of this collection use [`set_request_items`](Self::set_request_items).
         163  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_request_items`](Self::set_request_items).
         164  +
    /* BuilderGenerator.kt:439 */
  140    165   
    ///
  141         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         166  +
    /// /* BuilderGenerator.kt:440 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  142    167   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  143    168   
    /// <ul>
  144    169   
    /// <li>
  145    170   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  146    171   
    /// <li>
  147    172   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  148    173   
    /// <ul>
  149    174   
    /// <li>
  150    175   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  151    176   
    /// <li>
  152    177   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  153    178   
    /// <li>
  154    179   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  155    180   
    /// </ul>
  156    181   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  157    182   
    /// <ul>
  158    183   
    /// <li>
  159    184   
    /// <p><code>Percentile</code></p></li>
  160    185   
    /// </ul>
  161    186   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  162    187   
    /// <ul>
  163    188   
    /// <li>
  164    189   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  165    190   
    /// </ul>
  166    191   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  167    192   
    /// <ul>
  168    193   
    /// <li>
  169    194   
    /// <p><code>#P = :val</code></p></li>
  170    195   
    /// </ul><note>
  171    196   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  172    197   
    /// </note>
  173    198   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  174    199   
    /// <li>
  175    200   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  176    201   
    /// <li>
  177    202   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  178    203   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  179    204   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  180    205   
    /// <li>
  181    206   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  182    207   
    /// </ul>
         208  +
    /* BuilderGenerator.kt:445 */
  183    209   
    pub fn request_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::KeysAndAttributes) -> Self {
         210  +
        /* BuilderGenerator.kt:448 */
  184    211   
        let mut hash_map = self.request_items.unwrap_or_default();
  185    212   
        hash_map.insert(k.into(), v);
  186    213   
        self.request_items = ::std::option::Option::Some(hash_map);
  187    214   
        self
         215  +
        /* BuilderGenerator.kt:445 */
  188    216   
    }
  189         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         217  +
    /// /* BuilderGenerator.kt:312 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  190    218   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  191    219   
    /// <ul>
  192    220   
    /// <li>
  193    221   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  194    222   
    /// <li>
  195    223   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  196    224   
    /// <ul>
  197    225   
    /// <li>
  198    226   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  199    227   
    /// <li>
  200    228   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  201    229   
    /// <li>
  202    230   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  203    231   
    /// </ul>
  204    232   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  205    233   
    /// <ul>
  206    234   
    /// <li>
  207    235   
    /// <p><code>Percentile</code></p></li>
  208    236   
    /// </ul>
  209    237   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  210    238   
    /// <ul>
  211    239   
    /// <li>
  212    240   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  213    241   
    /// </ul>
  214    242   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  215    243   
    /// <ul>
  216    244   
    /// <li>
  217    245   
    /// <p><code>#P = :val</code></p></li>
  218    246   
    /// </ul><note>
  219    247   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  220    248   
    /// </note>
  221    249   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  222    250   
    /// <li>
  223    251   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  224    252   
    /// <li>
  225    253   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  226    254   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  227    255   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  228    256   
    /// <li>
  229    257   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  230    258   
    /// </ul>
         259  +
    /* BuilderGenerator.kt:314 */
  231    260   
    pub fn set_request_items(
  232    261   
        mut self,
  233    262   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
  234    263   
    ) -> Self {
         264  +
        /* BuilderGenerator.kt:315 */
  235    265   
        self.request_items = input;
  236    266   
        self
         267  +
        /* BuilderGenerator.kt:314 */
  237    268   
    }
  238         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         269  +
    /// /* BuilderGenerator.kt:334 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  239    270   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  240    271   
    /// <ul>
  241    272   
    /// <li>
  242    273   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  243    274   
    /// <li>
  244    275   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  245    276   
    /// <ul>
  246    277   
    /// <li>
  247    278   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  248    279   
    /// <li>
  249    280   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  250    281   
    /// <li>
  251    282   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  252    283   
    /// </ul>
  253    284   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  254    285   
    /// <ul>
  255    286   
    /// <li>
  256    287   
    /// <p><code>Percentile</code></p></li>
  257    288   
    /// </ul>
  258    289   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  259    290   
    /// <ul>
  260    291   
    /// <li>
  261    292   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  262    293   
    /// </ul>
  263    294   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  264    295   
    /// <ul>
  265    296   
    /// <li>
  266    297   
    /// <p><code>#P = :val</code></p></li>
  267    298   
    /// </ul><note>
  268    299   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  269    300   
    /// </note>
  270    301   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  271    302   
    /// <li>
  272    303   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  273    304   
    /// <li>
  274    305   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  275    306   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  276    307   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  277    308   
    /// <li>
  278    309   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  279    310   
    /// </ul>
         311  +
    /* BuilderGenerator.kt:336 */
  280    312   
    pub fn get_request_items(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
         313  +
        /* BuilderGenerator.kt:337 */
  281    314   
        &self.request_items
         315  +
        /* BuilderGenerator.kt:336 */
  282    316   
    }
  283         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         317  +
    /// /* BuilderGenerator.kt:286 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  284    318   
    /// <ul>
  285    319   
    /// <li>
  286    320   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  287    321   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  288    322   
    /// <li>
  289    323   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  290    324   
    /// <li>
  291    325   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  292    326   
    /// </ul>
         327  +
    /* BuilderGenerator.kt:291 */
  293    328   
    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
         329  +
        /* BuilderGenerator.kt:292 */
  294    330   
        self.return_consumed_capacity = ::std::option::Option::Some(input);
         331  +
        /* BuilderGenerator.kt:293 */
  295    332   
        self
         333  +
        /* BuilderGenerator.kt:291 */
  296    334   
    }
  297         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         335  +
    /// /* BuilderGenerator.kt:312 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  298    336   
    /// <ul>
  299    337   
    /// <li>
  300    338   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  301    339   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  302    340   
    /// <li>
  303    341   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  304    342   
    /// <li>
  305    343   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  306    344   
    /// </ul>
         345  +
    /* BuilderGenerator.kt:314 */
  307    346   
    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
         347  +
        /* BuilderGenerator.kt:315 */
  308    348   
        self.return_consumed_capacity = input;
  309    349   
        self
         350  +
        /* BuilderGenerator.kt:314 */
  310    351   
    }
  311         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         352  +
    /// /* BuilderGenerator.kt:334 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  312    353   
    /// <ul>
  313    354   
    /// <li>
  314    355   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  315    356   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  316    357   
    /// <li>
  317    358   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  318    359   
    /// <li>
  319    360   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  320    361   
    /// </ul>
         362  +
    /* BuilderGenerator.kt:336 */
  321    363   
    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
         364  +
        /* BuilderGenerator.kt:337 */
  322    365   
        &self.return_consumed_capacity
         366  +
        /* BuilderGenerator.kt:336 */
  323    367   
    }
  324         -
    /// Consumes the builder and constructs a [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         368  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchGetItemInput`](crate::operation::batch_get_item::BatchGetItemInput).
         369  +
    /* BuilderGenerator.kt:253 */
  325    370   
    pub fn build(
  326    371   
        self,
  327    372   
    ) -> ::std::result::Result<crate::operation::batch_get_item::BatchGetItemInput, ::aws_smithy_types::error::operation::BuildError> {
  328         -
        ::std::result::Result::Ok(crate::operation::batch_get_item::BatchGetItemInput {
  329         -
            request_items: self.request_items,
  330         -
            return_consumed_capacity: self.return_consumed_capacity,
  331         -
        })
         373  +
        /* BuilderGenerator.kt:254 */
         374  +
        ::std::result::Result::Ok(
         375  +
            /* BuilderGenerator.kt:477 */
         376  +
            crate::operation::batch_get_item::BatchGetItemInput {
         377  +
                /* BuilderGenerator.kt:481 */ request_items: self.request_items,
         378  +
                /* BuilderGenerator.kt:481 */
         379  +
                return_consumed_capacity: self.return_consumed_capacity,
         380  +
                /* BuilderGenerator.kt:477 */
         381  +
            }, /* BuilderGenerator.kt:254 */
         382  +
        )
         383  +
        /* BuilderGenerator.kt:253 */
  332    384   
    }
         385  +
    /* BuilderGenerator.kt:355 */
  333    386   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_get_item/_batch_get_item_output.rs

@@ -1,1 +240,310 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the output of a <code>BatchGetItem</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the output of a <code>BatchGetItem</code> operation.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct BatchGetItemOutput {
    7         -
    /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchGetItemOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
    8     10   
    pub responses: ::std::option::Option<
    9     11   
        ::std::collections::HashMap<
   10     12   
            ::std::string::String,
   11     13   
            ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   12     14   
        >,
   13     15   
    >,
   14         -
    /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
          16  +
    /// /* StructureGenerator.kt:231 */<p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
   15     17   
    /// <p>Each element consists of:</p>
   16     18   
    /// <ul>
   17     19   
    /// <li>
   18     20   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p></li>
   19     21   
    /// <li>
   20     22   
    /// <p><code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p></li>
   21     23   
    /// <li>
   22     24   
    /// <p><code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p></li>
   23     25   
    /// </ul>
   24     26   
    /// <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
   25     27   
    pub unprocessed_keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
   26         -
    /// <p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
   27     29   
    /// <p>Each element consists of:</p>
   28     30   
    /// <ul>
   29     31   
    /// <li>
   30     32   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
   31     33   
    /// <li>
   32     34   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
   33     35   
    /// </ul>
   34     36   
    pub consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
          37  +
    /* StructureGenerator.kt:201 */
   35     38   
}
          39  +
/* StructureGenerator.kt:135 */
   36     40   
impl BatchGetItemOutput {
   37         -
    /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
          41  +
    /// /* StructureGenerator.kt:231 */<p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
          42  +
    /* StructureGenerator.kt:166 */
   38     43   
    pub fn responses(
   39     44   
        &self,
   40     45   
    ) -> ::std::option::Option<
   41     46   
        &::std::collections::HashMap<
   42     47   
            ::std::string::String,
   43     48   
            ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   44     49   
        >,
   45     50   
    > {
          51  +
        /* StructureGenerator.kt:170 */
   46     52   
        self.responses.as_ref()
          53  +
        /* StructureGenerator.kt:166 */
   47     54   
    }
   48         -
    /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
          55  +
    /// /* StructureGenerator.kt:231 */<p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
   49     56   
    /// <p>Each element consists of:</p>
   50     57   
    /// <ul>
   51     58   
    /// <li>
   52     59   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p></li>
   53     60   
    /// <li>
   54     61   
    /// <p><code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p></li>
   55     62   
    /// <li>
   56     63   
    /// <p><code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p></li>
   57     64   
    /// </ul>
   58     65   
    /// <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
          66  +
    /* StructureGenerator.kt:166 */
   59     67   
    pub fn unprocessed_keys(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
          68  +
        /* StructureGenerator.kt:170 */
   60     69   
        self.unprocessed_keys.as_ref()
          70  +
        /* StructureGenerator.kt:166 */
   61     71   
    }
   62         -
    /// <p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
          72  +
    /// /* StructureGenerator.kt:231 */<p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
   63     73   
    /// <p>Each element consists of:</p>
   64     74   
    /// <ul>
   65     75   
    /// <li>
   66     76   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
   67     77   
    /// <li>
   68     78   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
   69     79   
    /// </ul>
   70         -
    ///
   71         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.consumed_capacity.is_none()`.
          80  +
    /// /* StructureGenerator.kt:162 */
          81  +
    /// /* 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 `.consumed_capacity.is_none()`.
          82  +
    /* StructureGenerator.kt:166 */
   72     83   
    pub fn consumed_capacity(&self) -> &[crate::types::ConsumedCapacity] {
   73         -
        self.consumed_capacity.as_deref().unwrap_or_default()
          84  +
        /* StructureGenerator.kt:169 */
          85  +
        self.consumed_capacity
          86  +
            .as_deref()
          87  +
            /* StructureGenerator.kt:175 */
          88  +
            .unwrap_or_default()
          89  +
        /* StructureGenerator.kt:166 */
   74     90   
    }
          91  +
    /* StructureGenerator.kt:135 */
   75     92   
}
          93  +
/* ClientCodegenVisitor.kt:237 */
   76     94   
impl BatchGetItemOutput {
   77         -
    /// Creates a new builder-style object to manufacture [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
          95  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
          96  +
    /* BuilderGenerator.kt:175 */
   78     97   
    pub fn builder() -> crate::operation::batch_get_item::builders::BatchGetItemOutputBuilder {
          98  +
        /* BuilderGenerator.kt:176 */
   79     99   
        crate::operation::batch_get_item::builders::BatchGetItemOutputBuilder::default()
         100  +
        /* BuilderGenerator.kt:175 */
   80    101   
    }
         102  +
    /* ClientCodegenVisitor.kt:237 */
   81    103   
}
   82    104   
   83         -
/// A builder for [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
         105  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
         106  +
/* RustType.kt:516 */
   84    107   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         108  +
/* RustType.kt:516 */
   85    109   
#[non_exhaustive]
         110  +
/* BuilderGenerator.kt:345 */
   86    111   
pub struct BatchGetItemOutputBuilder {
         112  +
    /* BuilderGenerator.kt:275 */
   87    113   
    pub(crate) responses: ::std::option::Option<
   88    114   
        ::std::collections::HashMap<
   89    115   
            ::std::string::String,
   90    116   
            ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   91    117   
        >,
   92    118   
    >,
         119  +
    /* BuilderGenerator.kt:275 */
   93    120   
    pub(crate) unprocessed_keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
         121  +
    /* BuilderGenerator.kt:275 */
   94    122   
    pub(crate) consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
         123  +
    /* BuilderGenerator.kt:345 */
   95    124   
}
         125  +
/* BuilderGenerator.kt:355 */
   96    126   
impl BatchGetItemOutputBuilder {
   97         -
    /// Adds a key-value pair to `responses`.
         127  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `responses`.
         128  +
    /* BuilderGenerator.kt:437 */
   98    129   
    ///
   99         -
    /// To override the contents of this collection use [`set_responses`](Self::set_responses).
         130  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_responses`](Self::set_responses).
         131  +
    /* BuilderGenerator.kt:439 */
  100    132   
    ///
  101         -
    /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         133  +
    /// /* BuilderGenerator.kt:440 */<p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         134  +
    /* BuilderGenerator.kt:445 */
  102    135   
    pub fn responses(
  103    136   
        mut self,
  104    137   
        k: impl ::std::convert::Into<::std::string::String>,
  105    138   
        v: ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
  106    139   
    ) -> Self {
         140  +
        /* BuilderGenerator.kt:448 */
  107    141   
        let mut hash_map = self.responses.unwrap_or_default();
  108    142   
        hash_map.insert(k.into(), v);
  109    143   
        self.responses = ::std::option::Option::Some(hash_map);
  110    144   
        self
         145  +
        /* BuilderGenerator.kt:445 */
  111    146   
    }
  112         -
    /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         147  +
    /// /* BuilderGenerator.kt:312 */<p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         148  +
    /* BuilderGenerator.kt:314 */
  113    149   
    pub fn set_responses(
  114    150   
        mut self,
  115    151   
        input: ::std::option::Option<
  116    152   
            ::std::collections::HashMap<
  117    153   
                ::std::string::String,
  118    154   
                ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
  119    155   
            >,
  120    156   
        >,
  121    157   
    ) -> Self {
         158  +
        /* BuilderGenerator.kt:315 */
  122    159   
        self.responses = input;
  123    160   
        self
         161  +
        /* BuilderGenerator.kt:314 */
  124    162   
    }
  125         -
    /// <p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         163  +
    /// /* BuilderGenerator.kt:334 */<p>A map of table name to a list of items. Each object in <code>Responses</code> consists of a table name, along with a map of attribute data consisting of the data type and attribute value.</p>
         164  +
    /* BuilderGenerator.kt:336 */
  126    165   
    pub fn get_responses(
  127    166   
        &self,
  128    167   
    ) -> &::std::option::Option<
  129    168   
        ::std::collections::HashMap<
  130    169   
            ::std::string::String,
  131    170   
            ::std::vec::Vec<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
  132    171   
        >,
  133    172   
    > {
         173  +
        /* BuilderGenerator.kt:337 */
  134    174   
        &self.responses
         175  +
        /* BuilderGenerator.kt:336 */
  135    176   
    }
  136         -
    /// Adds a key-value pair to `unprocessed_keys`.
         177  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `unprocessed_keys`.
         178  +
    /* BuilderGenerator.kt:437 */
  137    179   
    ///
  138         -
    /// To override the contents of this collection use [`set_unprocessed_keys`](Self::set_unprocessed_keys).
         180  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_unprocessed_keys`](Self::set_unprocessed_keys).
         181  +
    /* BuilderGenerator.kt:439 */
  139    182   
    ///
  140         -
    /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         183  +
    /// /* BuilderGenerator.kt:440 */<p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  141    184   
    /// <p>Each element consists of:</p>
  142    185   
    /// <ul>
  143    186   
    /// <li>
  144    187   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p></li>
  145    188   
    /// <li>
  146    189   
    /// <p><code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p></li>
  147    190   
    /// <li>
  148    191   
    /// <p><code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p></li>
  149    192   
    /// </ul>
  150    193   
    /// <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
         194  +
    /* BuilderGenerator.kt:445 */
  151    195   
    pub fn unprocessed_keys(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::KeysAndAttributes) -> Self {
         196  +
        /* BuilderGenerator.kt:448 */
  152    197   
        let mut hash_map = self.unprocessed_keys.unwrap_or_default();
  153    198   
        hash_map.insert(k.into(), v);
  154    199   
        self.unprocessed_keys = ::std::option::Option::Some(hash_map);
  155    200   
        self
         201  +
        /* BuilderGenerator.kt:445 */
  156    202   
    }
  157         -
    /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         203  +
    /// /* BuilderGenerator.kt:312 */<p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  158    204   
    /// <p>Each element consists of:</p>
  159    205   
    /// <ul>
  160    206   
    /// <li>
  161    207   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p></li>
  162    208   
    /// <li>
  163    209   
    /// <p><code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p></li>
  164    210   
    /// <li>
  165    211   
    /// <p><code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p></li>
  166    212   
    /// </ul>
  167    213   
    /// <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
         214  +
    /* BuilderGenerator.kt:314 */
  168    215   
    pub fn set_unprocessed_keys(
  169    216   
        mut self,
  170    217   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
  171    218   
    ) -> Self {
         219  +
        /* BuilderGenerator.kt:315 */
  172    220   
        self.unprocessed_keys = input;
  173    221   
        self
         222  +
        /* BuilderGenerator.kt:314 */
  174    223   
    }
  175         -
    /// <p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         224  +
    /// /* BuilderGenerator.kt:334 */<p>A map of tables and their respective keys that were not processed with the current response. The <code>UnprocessedKeys</code> value is in the same form as <code>RequestItems</code>, so the value can be provided directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  176    225   
    /// <p>Each element consists of:</p>
  177    226   
    /// <ul>
  178    227   
    /// <li>
  179    228   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table.</p></li>
  180    229   
    /// <li>
  181    230   
    /// <p><code>ProjectionExpression</code> - One or more attributes to be retrieved from the table or index. By default, all attributes are returned. If a requested attribute is not found, it does not appear in the result.</p></li>
  182    231   
    /// <li>
  183    232   
    /// <p><code>ConsistentRead</code> - The consistency of a read operation. If set to <code>true</code>, then a strongly consistent read is used; otherwise, an eventually consistent read is used.</p></li>
  184    233   
    /// </ul>
  185    234   
    /// <p>If there are no unprocessed keys remaining, the response contains an empty <code>UnprocessedKeys</code> map.</p>
         235  +
    /* BuilderGenerator.kt:336 */
  186    236   
    pub fn get_unprocessed_keys(
  187    237   
        &self,
  188    238   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
         239  +
        /* BuilderGenerator.kt:337 */
  189    240   
        &self.unprocessed_keys
         241  +
        /* BuilderGenerator.kt:336 */
  190    242   
    }
  191         -
    /// Appends an item to `consumed_capacity`.
         243  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `consumed_capacity`.
         244  +
    /* BuilderGenerator.kt:411 */
  192    245   
    ///
  193         -
    /// To override the contents of this collection use [`set_consumed_capacity`](Self::set_consumed_capacity).
         246  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_consumed_capacity`](Self::set_consumed_capacity).
         247  +
    /* BuilderGenerator.kt:413 */
  194    248   
    ///
  195         -
    /// <p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
         249  +
    /// /* BuilderGenerator.kt:414 */<p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
  196    250   
    /// <p>Each element consists of:</p>
  197    251   
    /// <ul>
  198    252   
    /// <li>
  199    253   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  200    254   
    /// <li>
  201    255   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  202    256   
    /// </ul>
         257  +
    /* BuilderGenerator.kt:418 */
  203    258   
    pub fn consumed_capacity(mut self, input: crate::types::ConsumedCapacity) -> Self {
         259  +
        /* BuilderGenerator.kt:419 */
  204    260   
        let mut v = self.consumed_capacity.unwrap_or_default();
  205    261   
        v.push(input);
  206    262   
        self.consumed_capacity = ::std::option::Option::Some(v);
  207    263   
        self
         264  +
        /* BuilderGenerator.kt:418 */
  208    265   
    }
  209         -
    /// <p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
         266  +
    /// /* BuilderGenerator.kt:312 */<p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
  210    267   
    /// <p>Each element consists of:</p>
  211    268   
    /// <ul>
  212    269   
    /// <li>
  213    270   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  214    271   
    /// <li>
  215    272   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  216    273   
    /// </ul>
         274  +
    /* BuilderGenerator.kt:314 */
  217    275   
    pub fn set_consumed_capacity(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>) -> Self {
         276  +
        /* BuilderGenerator.kt:315 */
  218    277   
        self.consumed_capacity = input;
  219    278   
        self
         279  +
        /* BuilderGenerator.kt:314 */
  220    280   
    }
  221         -
    /// <p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
         281  +
    /// /* BuilderGenerator.kt:334 */<p>The read capacity units consumed by the entire <code>BatchGetItem</code> operation.</p>
  222    282   
    /// <p>Each element consists of:</p>
  223    283   
    /// <ul>
  224    284   
    /// <li>
  225    285   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  226    286   
    /// <li>
  227    287   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  228    288   
    /// </ul>
         289  +
    /* BuilderGenerator.kt:336 */
  229    290   
    pub fn get_consumed_capacity(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>> {
         291  +
        /* BuilderGenerator.kt:337 */
  230    292   
        &self.consumed_capacity
         293  +
        /* BuilderGenerator.kt:336 */
  231    294   
    }
  232         -
    /// Consumes the builder and constructs a [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
         295  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchGetItemOutput`](crate::operation::batch_get_item::BatchGetItemOutput).
         296  +
    /* BuilderGenerator.kt:253 */
  233    297   
    pub fn build(self) -> crate::operation::batch_get_item::BatchGetItemOutput {
         298  +
        /* BuilderGenerator.kt:477 */
  234    299   
        crate::operation::batch_get_item::BatchGetItemOutput {
  235         -
            responses: self.responses,
         300  +
            /* BuilderGenerator.kt:481 */ responses: self.responses,
         301  +
            /* BuilderGenerator.kt:481 */
  236    302   
            unprocessed_keys: self.unprocessed_keys,
         303  +
            /* BuilderGenerator.kt:481 */
  237    304   
            consumed_capacity: self.consumed_capacity,
         305  +
            /* BuilderGenerator.kt:477 */
  238    306   
        }
         307  +
        /* BuilderGenerator.kt:253 */
  239    308   
    }
         309  +
    /* BuilderGenerator.kt:355 */
  240    310   
}

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

@@ -1,1 +309,327 @@
    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::batch_get_item::_batch_get_item_output::BatchGetItemOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::batch_get_item::_batch_get_item_input::BatchGetItemInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::batch_get_item::builders::BatchGetItemInputBuilder {
    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::batch_get_item::BatchGetItemOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::batch_get_item::BatchGetItemError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.batch_get_item();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `BatchGetItem`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `BatchGetItem`.
   24     27   
///
   25         -
/// <p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.</p>
          28  +
/// /* FluentBuilderGenerator.kt:130 */<p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.</p>
   26     29   
/// <p>A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items. <code>BatchGetItem</code> returns a partial result if the response size limit is exceeded, the table's provisioned throughput is exceeded, or an internal processing failure occurs. If a partial result is returned, the operation returns a value for <code>UnprocessedKeys</code>. You can use this value to retry the operation starting with the next item to get.</p><important>
   27     30   
/// <p>If you request more than 100 items, <code>BatchGetItem</code> returns a <code>ValidationException</code> with the message "Too many items requested for the BatchGetItem call."</p>
   28     31   
/// </important>
   29     32   
/// <p>For example, if you ask to retrieve 100 items, but each individual item is 300 KB in size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns an appropriate <code>UnprocessedKeys</code> value so you can get the next page of results. If desired, your application can include its own logic to assemble the pages of results into one dataset.</p>
   30     33   
/// <p>If <i>none</i> of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then <code>BatchGetItem</code> returns a <code>ProvisionedThroughputExceededException</code>. If <i>at least one</i> of the items is successfully processed, then <code>BatchGetItem</code> completes successfully, while returning the keys of the unread items in <code>UnprocessedKeys</code>.</p><important>
   31     34   
/// <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. If you retry the batch operation immediately, the underlying read or write requests can still fail due to throttling on the individual tables. If you delay the batch operation using exponential backoff, the individual requests in the batch are much more likely to succeed.</p>
   32     35   
/// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   33     36   
/// </important>
   34     37   
/// <p>By default, <code>BatchGetItem</code> performs eventually consistent reads on every table in the request. If you want strongly consistent reads instead, you can set <code>ConsistentRead</code> to <code>true</code> for any or all tables.</p>
   35     38   
/// <p>In order to minimize response latency, <code>BatchGetItem</code> retrieves items in parallel.</p>
   36     39   
/// <p>When designing your application, keep in mind that DynamoDB does not return items in any particular order. To help parse the response by item, include the primary key values for the items in your request in the <code>ProjectionExpression</code> parameter.</p>
   37     40   
/// <p>If a requested item does not exist, it is not returned in the result. Requests for nonexistent items consume the minimum read capacity units according to the type of read. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations">Working with Tables</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          41  +
/* RustType.kt:516 */
   38     42   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          43  +
/* FluentBuilderGenerator.kt:270 */
   39     44   
pub struct BatchGetItemFluentBuilder {
   40     45   
    handle: ::std::sync::Arc<crate::client::Handle>,
   41     46   
    inner: crate::operation::batch_get_item::builders::BatchGetItemInputBuilder,
   42     47   
    config_override: ::std::option::Option<crate::config::Builder>,
   43     48   
}
          49  +
/* FluentBuilderGenerator.kt:381 */
   44     50   
impl
   45     51   
    crate::client::customize::internal::CustomizableSend<
   46     52   
        crate::operation::batch_get_item::BatchGetItemOutput,
   47     53   
        crate::operation::batch_get_item::BatchGetItemError,
   48     54   
    > for BatchGetItemFluentBuilder
   49     55   
{
   50     56   
    fn send(
   51     57   
        self,
   52     58   
        config_override: crate::config::Builder,
   53     59   
    ) -> crate::client::customize::internal::BoxFuture<
   54     60   
        crate::client::customize::internal::SendResult<
   55     61   
            crate::operation::batch_get_item::BatchGetItemOutput,
   56     62   
            crate::operation::batch_get_item::BatchGetItemError,
   57     63   
        >,
   58     64   
    > {
   59     65   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   60     66   
    }
   61     67   
}
          68  +
/* FluentBuilderGenerator.kt:282 */
   62     69   
impl BatchGetItemFluentBuilder {
          70  +
    /* FluentBuilderGenerator.kt:288 */
   63     71   
    /// Creates a new `BatchGetItemFluentBuilder`.
   64     72   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   65     73   
        Self {
   66     74   
            handle,
   67     75   
            inner: ::std::default::Default::default(),
   68     76   
            config_override: ::std::option::Option::None,
   69     77   
        }
   70     78   
    }
          79  +
    /* FluentBuilderGenerator.kt:301 */
   71     80   
    /// Access the BatchGetItem as a reference.
   72     81   
    pub fn as_input(&self) -> &crate::operation::batch_get_item::builders::BatchGetItemInputBuilder {
   73     82   
        &self.inner
   74     83   
    }
          84  +
    /* FluentBuilderGenerator.kt:145 */
   75     85   
    /// Sends the request and returns the response.
   76     86   
    ///
   77     87   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   78     88   
    /// can be matched against.
   79     89   
    ///
   80     90   
    /// By default, any retryable failures will be retried twice. Retry behavior
   81     91   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   82     92   
    /// set when configuring the client.
   83     93   
    pub async fn send(
   84     94   
        self,
   85     95   
    ) -> ::std::result::Result<
   86     96   
        crate::operation::batch_get_item::BatchGetItemOutput,
   87     97   
        ::aws_smithy_runtime_api::client::result::SdkError<
   88     98   
            crate::operation::batch_get_item::BatchGetItemError,
   89     99   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   90    100   
        >,
   91    101   
    > {
   92    102   
        let input = self
   93    103   
            .inner
   94    104   
            .build()
   95    105   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
   96    106   
        let runtime_plugins = crate::operation::batch_get_item::BatchGetItem::operation_runtime_plugins(
   97    107   
            self.handle.runtime_plugins.clone(),
   98    108   
            &self.handle.conf,
   99    109   
            self.config_override,
  100    110   
        );
  101    111   
        crate::operation::batch_get_item::BatchGetItem::orchestrate(&runtime_plugins, input).await
  102    112   
    }
  103    113   
  104    114   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  105    115   
    pub fn customize(
  106    116   
        self,
  107    117   
    ) -> crate::client::customize::CustomizableOperation<
  108    118   
        crate::operation::batch_get_item::BatchGetItemOutput,
  109    119   
        crate::operation::batch_get_item::BatchGetItemError,
  110    120   
        Self,
  111    121   
    > {
  112    122   
        crate::client::customize::CustomizableOperation::new(self)
  113    123   
    }
         124  +
    /* FluentBuilderGenerator.kt:315 */
  114    125   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  115    126   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  116    127   
        self
  117    128   
    }
  118    129   
  119    130   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  120    131   
        self.config_override = config_override;
  121    132   
        self
  122    133   
    }
  123         -
    ///
         134  +
    /// /* FluentBuilderGenerator.kt:466 */
  124    135   
    /// Adds a key-value pair to `RequestItems`.
  125    136   
    ///
  126    137   
    /// To override the contents of this collection use [`set_request_items`](Self::set_request_items).
  127    138   
    ///
  128         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         139  +
    /// /* FluentBuilderGenerator.kt:473 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  129    140   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  130    141   
    /// <ul>
  131    142   
    /// <li>
  132    143   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  133    144   
    /// <li>
  134    145   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  135    146   
    /// <ul>
  136    147   
    /// <li>
  137    148   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  138    149   
    /// <li>
  139    150   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  140    151   
    /// <li>
  141    152   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  142    153   
    /// </ul>
  143    154   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  144    155   
    /// <ul>
  145    156   
    /// <li>
  146    157   
    /// <p><code>Percentile</code></p></li>
  147    158   
    /// </ul>
  148    159   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  149    160   
    /// <ul>
  150    161   
    /// <li>
  151    162   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  152    163   
    /// </ul>
  153    164   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  154    165   
    /// <ul>
  155    166   
    /// <li>
  156    167   
    /// <p><code>#P = :val</code></p></li>
  157    168   
    /// </ul><note>
  158    169   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  159    170   
    /// </note>
  160    171   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  161    172   
    /// <li>
  162    173   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  163    174   
    /// <li>
  164    175   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  165    176   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  166    177   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  167    178   
    /// <li>
  168    179   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  169    180   
    /// </ul>
         181  +
    /* FluentBuilderGenerator.kt:475 */
  170    182   
    pub fn request_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::KeysAndAttributes) -> Self {
  171    183   
        self.inner = self.inner.request_items(k.into(), v);
  172    184   
        self
  173    185   
    }
  174         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         186  +
    /// /* FluentBuilderGenerator.kt:498 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  175    187   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  176    188   
    /// <ul>
  177    189   
    /// <li>
  178    190   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  179    191   
    /// <li>
  180    192   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  181    193   
    /// <ul>
  182    194   
    /// <li>
  183    195   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  184    196   
    /// <li>
  185    197   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  186    198   
    /// <li>
  187    199   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  188    200   
    /// </ul>
  189    201   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  190    202   
    /// <ul>
  191    203   
    /// <li>
  192    204   
    /// <p><code>Percentile</code></p></li>
  193    205   
    /// </ul>
  194    206   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  195    207   
    /// <ul>
  196    208   
    /// <li>
  197    209   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  198    210   
    /// </ul>
  199    211   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  200    212   
    /// <ul>
  201    213   
    /// <li>
  202    214   
    /// <p><code>#P = :val</code></p></li>
  203    215   
    /// </ul><note>
  204    216   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  205    217   
    /// </note>
  206    218   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  207    219   
    /// <li>
  208    220   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  209    221   
    /// <li>
  210    222   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  211    223   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  212    224   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  213    225   
    /// <li>
  214    226   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  215    227   
    /// </ul>
         228  +
    /* FluentBuilderGenerator.kt:500 */
  216    229   
    pub fn set_request_items(
  217    230   
        mut self,
  218    231   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>>,
  219    232   
    ) -> Self {
  220    233   
        self.inner = self.inner.set_request_items(input);
  221    234   
        self
  222    235   
    }
  223         -
    /// <p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
         236  +
    /// /* FluentBuilderGenerator.kt:518 */<p>A map of one or more table names and, for each table, a map that describes one or more items to retrieve from that table. Each table name can be used only once per <code>BatchGetItem</code> request.</p>
  224    237   
    /// <p>Each element in the map of items to retrieve consists of the following:</p>
  225    238   
    /// <ul>
  226    239   
    /// <li>
  227    240   
    /// <p><code>ConsistentRead</code> - If <code>true</code>, a strongly consistent read is used; if <code>false</code> (the default), an eventually consistent read is used.</p></li>
  228    241   
    /// <li>
  229    242   
    /// <p><code>ExpressionAttributeNames</code> - One or more substitution tokens for attribute names in the <code>ProjectionExpression</code> parameter. The following are some use cases for using <code>ExpressionAttributeNames</code>:</p>
  230    243   
    /// <ul>
  231    244   
    /// <li>
  232    245   
    /// <p>To access an attribute whose name conflicts with a DynamoDB reserved word.</p></li>
  233    246   
    /// <li>
  234    247   
    /// <p>To create a placeholder for repeating occurrences of an attribute name in an expression.</p></li>
  235    248   
    /// <li>
  236    249   
    /// <p>To prevent special characters in an attribute name from being misinterpreted in an expression.</p></li>
  237    250   
    /// </ul>
  238    251   
    /// <p>Use the <b>#</b> character in an expression to dereference an attribute name. For example, consider the following attribute name:</p>
  239    252   
    /// <ul>
  240    253   
    /// <li>
  241    254   
    /// <p><code>Percentile</code></p></li>
  242    255   
    /// </ul>
  243    256   
    /// <p>The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html">Reserved Words</a> in the <i>Amazon DynamoDB Developer Guide</i>). To work around this, you could specify the following for <code>ExpressionAttributeNames</code>:</p>
  244    257   
    /// <ul>
  245    258   
    /// <li>
  246    259   
    /// <p><code>{"#P":"Percentile"}</code></p></li>
  247    260   
    /// </ul>
  248    261   
    /// <p>You could then use this substitution in an expression, as in this example:</p>
  249    262   
    /// <ul>
  250    263   
    /// <li>
  251    264   
    /// <p><code>#P = :val</code></p></li>
  252    265   
    /// </ul><note>
  253    266   
    /// <p>Tokens that begin with the <b>:</b> character are <i>expression attribute values</i>, which are placeholders for the actual value at runtime.</p>
  254    267   
    /// </note>
  255    268   
    /// <p>For more information about expression attribute names, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  256    269   
    /// <li>
  257    270   
    /// <p><code>Keys</code> - An array of primary key attribute values that define specific items in the table. For each primary key, you must provide <i>all</i> of the key attributes. For example, with a simple primary key, you only need to provide the partition key value. For a composite key, you must provide <i>both</i> the partition key value and the sort key value.</p></li>
  258    271   
    /// <li>
  259    272   
    /// <p><code>ProjectionExpression</code> - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.</p>
  260    273   
    /// <p>If no attribute names are specified, then all attributes are returned. If any of the requested attributes are not found, they do not appear in the result.</p>
  261    274   
    /// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html">Accessing Item Attributes</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  262    275   
    /// <li>
  263    276   
    /// <p><code>AttributesToGet</code> - This is a legacy parameter. Use <code>ProjectionExpression</code> instead. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html">AttributesToGet</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p></li>
  264    277   
    /// </ul>
         278  +
    /* FluentBuilderGenerator.kt:520 */
  265    279   
    pub fn get_request_items(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::KeysAndAttributes>> {
  266    280   
        self.inner.get_request_items()
  267    281   
    }
  268         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         282  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  269    283   
    /// <ul>
  270    284   
    /// <li>
  271    285   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  272    286   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  273    287   
    /// <li>
  274    288   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  275    289   
    /// <li>
  276    290   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  277    291   
    /// </ul>
         292  +
    /* FluentBuilderGenerator.kt:500 */
  278    293   
    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
  279    294   
        self.inner = self.inner.return_consumed_capacity(input);
  280    295   
        self
  281    296   
    }
  282         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         297  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  283    298   
    /// <ul>
  284    299   
    /// <li>
  285    300   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  286    301   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  287    302   
    /// <li>
  288    303   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  289    304   
    /// <li>
  290    305   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  291    306   
    /// </ul>
         307  +
    /* FluentBuilderGenerator.kt:500 */
  292    308   
    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
  293    309   
        self.inner = self.inner.set_return_consumed_capacity(input);
  294    310   
        self
  295    311   
    }
  296         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         312  +
    /// /* FluentBuilderGenerator.kt:518 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  297    313   
    /// <ul>
  298    314   
    /// <li>
  299    315   
    /// <p><code>INDEXES</code> - The response includes the aggregate <code>ConsumedCapacity</code> for the operation, together with <code>ConsumedCapacity</code> for each table and secondary index that was accessed.</p>
  300    316   
    /// <p>Note that some operations, such as <code>GetItem</code> and <code>BatchGetItem</code>, do not access any indexes at all. In these cases, specifying <code>INDEXES</code> will only return <code>ConsumedCapacity</code> information for table(s).</p></li>
  301    317   
    /// <li>
  302    318   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  303    319   
    /// <li>
  304    320   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  305    321   
    /// </ul>
         322  +
    /* FluentBuilderGenerator.kt:520 */
  306    323   
    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
  307    324   
        self.inner.get_return_consumed_capacity()
  308    325   
    }
         326  +
    /* FluentBuilderGenerator.kt:282 */
  309    327   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/batch_write_item.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 `BatchWriteItem`.
           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 BatchWriteItem;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl BatchWriteItem {
    7         -
    /// Creates a new `BatchWriteItem`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `BatchWriteItem`
          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::batch_write_item::BatchWriteItemInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::batch_write_item::BatchWriteItemOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::batch_write_item::BatchWriteItemError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +394,610 @@
   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 BatchWriteItem {
   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("BatchWriteItem");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            BatchWriteItemRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            BatchWriteItemResponseDeserializer,
   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   
            "BatchWriteItem",
  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("BatchWriteItem")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(BatchWriteItemEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::batch_write_item::BatchWriteItemError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::batch_write_item::BatchWriteItemError,
  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 BatchWriteItemResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for BatchWriteItemResponseDeserializer {
  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_batch_write_item::de_batch_write_item_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_batch_write_item::de_batch_write_item_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 BatchWriteItemRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for BatchWriteItemRequestSerializer {
  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::batch_write_item::BatchWriteItemInput>()
  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::batch_write_item::BatchWriteItemInput,
  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::batch_write_item::BatchWriteItemInput,
  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.BatchWriteItem",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_batch_write_item::ser_batch_write_item_input(&input)?);
  195    208   
        if let Some(content_length) = body.content_length() {
  196    209   
            let content_length = content_length.to_string();
  197    210   
            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
  198    211   
        }
  199    212   
        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
  200    213   
    }
  201    214   
}
         215  +
/* EndpointParamsInterceptorGenerator.kt:86 */
  202    216   
#[derive(Debug)]
  203    217   
struct BatchWriteItemEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for BatchWriteItemEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "BatchWriteItemEndpointParamsInterceptor"
  208    222   
    }
  209    223   
  210    224   
    fn read_before_execution(
  211    225   
        &self,
  212    226   
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
  213    227   
            '_,
  214    228   
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
  215    229   
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
  216    230   
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
  217    231   
        >,
  218    232   
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
  219    233   
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
  220    234   
        let _input = context
  221    235   
            .input()
  222    236   
            .downcast_ref::<BatchWriteItemInput>()
  223    237   
            .ok_or("failed to downcast to BatchWriteItemInput")?;
  224    238   
  225    239   
        let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
  226    240   
            ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
  227    241   
        })?;
  228    242   
        cfg.interceptor_state()
  229    243   
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
  230    244   
        ::std::result::Result::Ok(())
  231    245   
    }
  232    246   
}
  233    247   
  234    248   
// The get_* functions below are generated from JMESPath expressions in the
  235    249   
// operationContextParams trait. They target the operation's input shape.
  236    250   
         251  +
/* OperationErrorGenerator.kt:79 */
  237    252   
/// Error type for the `BatchWriteItemError` operation.
         253  +
/* RustType.kt:516 */
  238    254   
#[non_exhaustive]
         255  +
/* RustType.kt:516 */
  239    256   
#[derive(::std::fmt::Debug)]
  240         -
pub enum BatchWriteItemError {
  241         -
    /// <p>An error occurred on the server side.</p>
         257  +
pub /* OperationErrorGenerator.kt:81 */ enum BatchWriteItemError {
         258  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         259  +
    /* OperationErrorGenerator.kt:86 */
  242    260   
    InternalServerError(crate::types::error::InternalServerError),
         261  +
    /* OperationErrorGenerator.kt:83 */
  243    262   
    #[allow(missing_docs)] // documentation missing in model
         263  +
    /* OperationErrorGenerator.kt:86 */
  244    264   
    InvalidEndpointError(crate::types::error::InvalidEndpointError),
  245         -
    /// <p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
         265  +
    /// /* OperationErrorGenerator.kt:83 */<p>An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.</p>
         266  +
    /* OperationErrorGenerator.kt:86 */
  246    267   
    ItemCollectionSizeLimitExceededError(crate::types::error::ItemCollectionSizeLimitExceededError),
  247         -
    /// <p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         268  +
    /// /* OperationErrorGenerator.kt:83 */<p>Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff">Error Retries and Exponential Backoff</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         269  +
    /* OperationErrorGenerator.kt:86 */
  248    270   
    ProvisionedThroughputExceededError(crate::types::error::ProvisionedThroughputExceededError),
  249         -
    /// <p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
         271  +
    /// /* OperationErrorGenerator.kt:83 */<p>Throughput exceeds the current throughput quota for your account. Please contact AWS Support at <a href="https://aws.amazon.com/support">AWS Support</a> to request a quota increase.</p>
         272  +
    /* OperationErrorGenerator.kt:86 */
  250    273   
    RequestLimitExceeded(crate::types::error::RequestLimitExceeded),
  251         -
    /// <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>
         274  +
    /// /* 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>
         275  +
    /* OperationErrorGenerator.kt:86 */
  252    276   
    ResourceNotFoundError(crate::types::error::ResourceNotFoundError),
         277  +
    /* OperationErrorGenerator.kt:88 */
  253    278   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  254    279   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  255    280   
    variable wildcard pattern and check `.code()`:
  256    281   
     \
  257    282   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  258    283   
     \
  259    284   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-BatchWriteItemError) for what information is available for the error.")]
  260    285   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         286  +
    /* OperationErrorGenerator.kt:81 */
  261    287   
}
         288  +
/* OperationErrorGenerator.kt:218 */
  262    289   
impl BatchWriteItemError {
         290  +
    /* OperationErrorGenerator.kt:219 */
  263    291   
    /// Creates the `BatchWriteItemError::Unhandled` variant from any error type.
  264    292   
    pub fn unhandled(
  265    293   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  266    294   
    ) -> Self {
  267    295   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  268    296   
            source: err.into(),
  269    297   
            meta: ::std::default::Default::default(),
  270    298   
        })
  271    299   
    }
  272    300   
  273    301   
    /// Creates the `BatchWriteItemError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  274    302   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  275    303   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  276    304   
            source: err.clone().into(),
  277    305   
            meta: err,
  278    306   
        })
  279    307   
    }
  280         -
    ///
         308  +
    /// /* OperationErrorGenerator.kt:236 */
  281    309   
    /// Returns error metadata, which includes the error code, message,
  282    310   
    /// request ID, and potentially additional information.
  283    311   
    ///
         312  +
    /* OperationErrorGenerator.kt:242 */
  284    313   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         314  +
        /* OperationErrorGenerator.kt:243 */
  285    315   
        match self {
         316  +
            /* OperationErrorGenerator.kt:246 */
  286    317   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         318  +
            /* OperationErrorGenerator.kt:246 */
  287    319   
            Self::InvalidEndpointError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         320  +
            /* OperationErrorGenerator.kt:246 */
  288    321   
            Self::ItemCollectionSizeLimitExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         322  +
            /* OperationErrorGenerator.kt:246 */
  289    323   
            Self::ProvisionedThroughputExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         324  +
            /* OperationErrorGenerator.kt:246 */
  290    325   
            Self::RequestLimitExceeded(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         326  +
            /* OperationErrorGenerator.kt:246 */
  291    327   
            Self::ResourceNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  292         -
            Self::Unhandled(e) => &e.meta,
         328  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         329  +
            /* OperationErrorGenerator.kt:243 */
  293    330   
        }
         331  +
        /* OperationErrorGenerator.kt:242 */
  294    332   
    }
         333  +
    /* OperationErrorGenerator.kt:257 */
  295    334   
    /// Returns `true` if the error kind is `BatchWriteItemError::InternalServerError`.
         335  +
    /* OperationErrorGenerator.kt:258 */
  296    336   
    pub fn is_internal_server_error(&self) -> bool {
         337  +
        /* OperationErrorGenerator.kt:259 */
  297    338   
        matches!(self, Self::InternalServerError(_))
         339  +
        /* OperationErrorGenerator.kt:258 */
  298    340   
    }
         341  +
    /* OperationErrorGenerator.kt:257 */
  299    342   
    /// Returns `true` if the error kind is `BatchWriteItemError::InvalidEndpointError`.
         343  +
    /* OperationErrorGenerator.kt:258 */
  300    344   
    pub fn is_invalid_endpoint_error(&self) -> bool {
         345  +
        /* OperationErrorGenerator.kt:259 */
  301    346   
        matches!(self, Self::InvalidEndpointError(_))
         347  +
        /* OperationErrorGenerator.kt:258 */
  302    348   
    }
         349  +
    /* OperationErrorGenerator.kt:257 */
  303    350   
    /// Returns `true` if the error kind is `BatchWriteItemError::ItemCollectionSizeLimitExceededError`.
         351  +
    /* OperationErrorGenerator.kt:258 */
  304    352   
    pub fn is_item_collection_size_limit_exceeded_error(&self) -> bool {
         353  +
        /* OperationErrorGenerator.kt:259 */
  305    354   
        matches!(self, Self::ItemCollectionSizeLimitExceededError(_))
         355  +
        /* OperationErrorGenerator.kt:258 */
  306    356   
    }
         357  +
    /* OperationErrorGenerator.kt:257 */
  307    358   
    /// Returns `true` if the error kind is `BatchWriteItemError::ProvisionedThroughputExceededError`.
         359  +
    /* OperationErrorGenerator.kt:258 */
  308    360   
    pub fn is_provisioned_throughput_exceeded_error(&self) -> bool {
         361  +
        /* OperationErrorGenerator.kt:259 */
  309    362   
        matches!(self, Self::ProvisionedThroughputExceededError(_))
         363  +
        /* OperationErrorGenerator.kt:258 */
  310    364   
    }
         365  +
    /* OperationErrorGenerator.kt:257 */
  311    366   
    /// Returns `true` if the error kind is `BatchWriteItemError::RequestLimitExceeded`.
         367  +
    /* OperationErrorGenerator.kt:258 */
  312    368   
    pub fn is_request_limit_exceeded(&self) -> bool {
         369  +
        /* OperationErrorGenerator.kt:259 */
  313    370   
        matches!(self, Self::RequestLimitExceeded(_))
         371  +
        /* OperationErrorGenerator.kt:258 */
  314    372   
    }
         373  +
    /* OperationErrorGenerator.kt:257 */
  315    374   
    /// Returns `true` if the error kind is `BatchWriteItemError::ResourceNotFoundError`.
         375  +
    /* OperationErrorGenerator.kt:258 */
  316    376   
    pub fn is_resource_not_found_error(&self) -> bool {
         377  +
        /* OperationErrorGenerator.kt:259 */
  317    378   
        matches!(self, Self::ResourceNotFoundError(_))
         379  +
        /* OperationErrorGenerator.kt:258 */
  318    380   
    }
         381  +
    /* OperationErrorGenerator.kt:218 */
  319    382   
}
         383  +
/* OperationErrorGenerator.kt:269 */
  320    384   
impl ::std::error::Error for BatchWriteItemError {
         385  +
    /* OperationErrorGenerator.kt:270 */
  321    386   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         387  +
        /* OperationErrorGenerator.kt:318 */
  322    388   
        match self {
  323         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  324         -
            Self::InvalidEndpointError(_inner) => ::std::option::Option::Some(_inner),
  325         -
            Self::ItemCollectionSizeLimitExceededError(_inner) => ::std::option::Option::Some(_inner),
  326         -
            Self::ProvisionedThroughputExceededError(_inner) => ::std::option::Option::Some(_inner),
  327         -
            Self::RequestLimitExceeded(_inner) => ::std::option::Option::Some(_inner),
  328         -
            Self::ResourceNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  329         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         389  +
            /* OperationErrorGenerator.kt:321 */
         390  +
            Self::InternalServerError(_inner) =>
         391  +
            /* OperationErrorGenerator.kt:283 */
         392  +
            {
         393  +
                ::std::option::Option::Some(_inner)
         394  +
            }
         395  +
            ,
         396  +
            /* OperationErrorGenerator.kt:321 */
         397  +
            Self::InvalidEndpointError(_inner) =>
         398  +
            /* OperationErrorGenerator.kt:283 */
         399  +
            {
         400  +
                ::std::option::Option::Some(_inner)
         401  +
            }
         402  +
            ,
         403  +
            /* OperationErrorGenerator.kt:321 */
         404  +
            Self::ItemCollectionSizeLimitExceededError(_inner) =>
         405  +
            /* OperationErrorGenerator.kt:283 */
         406  +
            {
         407  +
                ::std::option::Option::Some(_inner)
         408  +
            }
         409  +
            ,
         410  +
            /* OperationErrorGenerator.kt:321 */
         411  +
            Self::ProvisionedThroughputExceededError(_inner) =>
         412  +
            /* OperationErrorGenerator.kt:283 */
         413  +
            {
         414  +
                ::std::option::Option::Some(_inner)
         415  +
            }
         416  +
            ,
         417  +
            /* OperationErrorGenerator.kt:321 */
         418  +
            Self::RequestLimitExceeded(_inner) =>
         419  +
            /* OperationErrorGenerator.kt:283 */
         420  +
            {
         421  +
                ::std::option::Option::Some(_inner)
         422  +
            }
         423  +
            ,
         424  +
            /* OperationErrorGenerator.kt:321 */
         425  +
            Self::ResourceNotFoundError(_inner) =>
         426  +
            /* OperationErrorGenerator.kt:283 */
         427  +
            {
         428  +
                ::std::option::Option::Some(_inner)
         429  +
            }
         430  +
            ,
         431  +
            /* OperationErrorGenerator.kt:326 */
         432  +
            Self::Unhandled(_inner) => {
         433  +
                /* OperationErrorGenerator.kt:279 */
         434  +
                ::std::option::Option::Some(&*_inner.source)
         435  +
                /* OperationErrorGenerator.kt:326 */
         436  +
            } /* OperationErrorGenerator.kt:318 */
  330    437   
        }
         438  +
        /* OperationErrorGenerator.kt:270 */
  331    439   
    }
         440  +
    /* OperationErrorGenerator.kt:269 */
  332    441   
}
         442  +
/* OperationErrorGenerator.kt:133 */
  333    443   
impl ::std::fmt::Display for BatchWriteItemError {
         444  +
    /* OperationErrorGenerator.kt:134 */
  334    445   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         446  +
        /* OperationErrorGenerator.kt:318 */
  335    447   
        match self {
  336         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  337         -
            Self::InvalidEndpointError(_inner) => _inner.fmt(f),
  338         -
            Self::ItemCollectionSizeLimitExceededError(_inner) => _inner.fmt(f),
  339         -
            Self::ProvisionedThroughputExceededError(_inner) => _inner.fmt(f),
  340         -
            Self::RequestLimitExceeded(_inner) => _inner.fmt(f),
  341         -
            Self::ResourceNotFoundError(_inner) => _inner.fmt(f),
         448  +
            /* OperationErrorGenerator.kt:321 */
         449  +
            Self::InternalServerError(_inner) =>
         450  +
            /* OperationErrorGenerator.kt:151 */
         451  +
            {
         452  +
                _inner.fmt(f)
         453  +
            }
         454  +
            ,
         455  +
            /* OperationErrorGenerator.kt:321 */
         456  +
            Self::InvalidEndpointError(_inner) =>
         457  +
            /* OperationErrorGenerator.kt:151 */
         458  +
            {
         459  +
                _inner.fmt(f)
         460  +
            }
         461  +
            ,
         462  +
            /* OperationErrorGenerator.kt:321 */
         463  +
            Self::ItemCollectionSizeLimitExceededError(_inner) =>
         464  +
            /* OperationErrorGenerator.kt:151 */
         465  +
            {
         466  +
                _inner.fmt(f)
         467  +
            }
         468  +
            ,
         469  +
            /* OperationErrorGenerator.kt:321 */
         470  +
            Self::ProvisionedThroughputExceededError(_inner) =>
         471  +
            /* OperationErrorGenerator.kt:151 */
         472  +
            {
         473  +
                _inner.fmt(f)
         474  +
            }
         475  +
            ,
         476  +
            /* OperationErrorGenerator.kt:321 */
         477  +
            Self::RequestLimitExceeded(_inner) =>
         478  +
            /* OperationErrorGenerator.kt:151 */
         479  +
            {
         480  +
                _inner.fmt(f)
         481  +
            }
         482  +
            ,
         483  +
            /* OperationErrorGenerator.kt:321 */
         484  +
            Self::ResourceNotFoundError(_inner) =>
         485  +
            /* OperationErrorGenerator.kt:151 */
         486  +
            {
         487  +
                _inner.fmt(f)
         488  +
            }
         489  +
            ,
         490  +
            /* OperationErrorGenerator.kt:326 */
  342    491   
            Self::Unhandled(_inner) => {
         492  +
                /* OperationErrorGenerator.kt:139 */
  343    493   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  344    494   
                    write!(f, "unhandled error ({code})")
  345    495   
                } else {
  346    496   
                    f.write_str("unhandled error")
  347    497   
                }
  348         -
            }
         498  +
                /* OperationErrorGenerator.kt:326 */
         499  +
            } /* OperationErrorGenerator.kt:318 */
  349    500   
        }
         501  +
        /* OperationErrorGenerator.kt:134 */
  350    502   
    }
         503  +
    /* OperationErrorGenerator.kt:133 */
  351    504   
}
         505  +
/* OperationErrorGenerator.kt:182 */
  352    506   
impl ::aws_smithy_types::retry::ProvideErrorKind for BatchWriteItemError {
         507  +
    /* OperationErrorGenerator.kt:186 */
  353    508   
    fn code(&self) -> ::std::option::Option<&str> {
         509  +
        /* OperationErrorGenerator.kt:187 */
  354    510   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         511  +
        /* OperationErrorGenerator.kt:186 */
  355    512   
    }
         513  +
    /* OperationErrorGenerator.kt:190 */
  356    514   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         515  +
        /* OperationErrorGenerator.kt:197 */
  357    516   
        ::std::option::Option::None
         517  +
        /* OperationErrorGenerator.kt:190 */
  358    518   
    }
         519  +
    /* OperationErrorGenerator.kt:182 */
  359    520   
}
         521  +
/* OperationErrorGenerator.kt:163 */
  360    522   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for BatchWriteItemError {
         523  +
    /* OperationErrorGenerator.kt:164 */
  361    524   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         525  +
        /* OperationErrorGenerator.kt:318 */
  362    526   
        match self {
  363         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  364         -
            Self::InvalidEndpointError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  365         -
            Self::ItemCollectionSizeLimitExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  366         -
            Self::ProvisionedThroughputExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  367         -
            Self::RequestLimitExceeded(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  368         -
            Self::ResourceNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  369         -
            Self::Unhandled(_inner) => &_inner.meta,
         527  +
            /* OperationErrorGenerator.kt:321 */
         528  +
            Self::InternalServerError(_inner) =>
         529  +
            /* OperationErrorGenerator.kt:169 */
         530  +
            {
         531  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         532  +
            }
         533  +
            ,
         534  +
            /* OperationErrorGenerator.kt:321 */
         535  +
            Self::InvalidEndpointError(_inner) =>
         536  +
            /* OperationErrorGenerator.kt:169 */
         537  +
            {
         538  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         539  +
            }
         540  +
            ,
         541  +
            /* OperationErrorGenerator.kt:321 */
         542  +
            Self::ItemCollectionSizeLimitExceededError(_inner) =>
         543  +
            /* OperationErrorGenerator.kt:169 */
         544  +
            {
         545  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         546  +
            }
         547  +
            ,
         548  +
            /* OperationErrorGenerator.kt:321 */
         549  +
            Self::ProvisionedThroughputExceededError(_inner) =>
         550  +
            /* OperationErrorGenerator.kt:169 */
         551  +
            {
         552  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         553  +
            }
         554  +
            ,
         555  +
            /* OperationErrorGenerator.kt:321 */
         556  +
            Self::RequestLimitExceeded(_inner) =>
         557  +
            /* OperationErrorGenerator.kt:169 */
         558  +
            {
         559  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         560  +
            }
         561  +
            ,
         562  +
            /* OperationErrorGenerator.kt:321 */
         563  +
            Self::ResourceNotFoundError(_inner) =>
         564  +
            /* OperationErrorGenerator.kt:169 */
         565  +
            {
         566  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         567  +
            }
         568  +
            ,
         569  +
            /* OperationErrorGenerator.kt:326 */
         570  +
            Self::Unhandled(_inner) => {
         571  +
                /* OperationErrorGenerator.kt:168 */
         572  +
                &_inner.meta
         573  +
                /* OperationErrorGenerator.kt:326 */
         574  +
            } /* OperationErrorGenerator.kt:318 */
  370    575   
        }
         576  +
        /* OperationErrorGenerator.kt:164 */
  371    577   
    }
         578  +
    /* OperationErrorGenerator.kt:163 */
  372    579   
}
         580  +
/* OperationErrorGenerator.kt:109 */
  373    581   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for BatchWriteItemError {
         582  +
    /* OperationErrorGenerator.kt:110 */
  374    583   
    fn create_unhandled_error(
  375    584   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  376    585   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  377    586   
    ) -> Self {
         587  +
        /* OperationErrorGenerator.kt:121 */
  378    588   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  379    589   
            source,
  380    590   
            meta: meta.unwrap_or_default(),
  381    591   
        })
         592  +
        /* OperationErrorGenerator.kt:110 */
  382    593   
    }
         594  +
    /* OperationErrorGenerator.kt:109 */
  383    595   
}
  384    596   
         597  +
/* CodegenDelegator.kt:255 */
  385    598   
pub use crate::operation::batch_write_item::_batch_write_item_output::BatchWriteItemOutput;
  386    599   
         600  +
/* CodegenDelegator.kt:255 */
  387    601   
pub use crate::operation::batch_write_item::_batch_write_item_input::BatchWriteItemInput;
  388    602   
         603  +
/* RustModule.kt:172 */
  389    604   
mod _batch_write_item_input;
  390    605   
         606  +
/* RustModule.kt:172 */
  391    607   
mod _batch_write_item_output;
  392    608   
  393         -
/// Builders
         609  +
/// /* CodegenDelegator.kt:51 */Builders
  394    610   
pub mod builders;