Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +229,296 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the input of a <code>BatchWriteItem</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the input of a <code>BatchWriteItem</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 BatchWriteItemInput {
    7         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchWriteItemInput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
    8     10   
    /// <ul>
    9     11   
    /// <li>
   10     12   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
   11     13   
    /// <ul>
   12     14   
    /// <li>
   13     15   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
   14     16   
    /// </ul></li>
   15     17   
    /// <li>
   16     18   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
   17     19   
    /// <ul>
   18     20   
    /// <li>
   19     21   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
   20     22   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
   21     23   
    /// </ul></li>
   22     24   
    /// </ul>
   23     25   
    pub request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
   24         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
   25     27   
    /// <ul>
   26     28   
    /// <li>
   27     29   
    /// <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>
   28     30   
    /// <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>
   29     31   
    /// <li>
   30     32   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
   31     33   
    /// <li>
   32     34   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
   33     35   
    /// </ul>
   34     36   
    pub return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
   35         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
          37  +
    /// /* StructureGenerator.kt:231 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
   36     38   
    pub return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
          39  +
    /* StructureGenerator.kt:201 */
   37     40   
}
          41  +
/* StructureGenerator.kt:135 */
   38     42   
impl BatchWriteItemInput {
   39         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
          43  +
    /// /* StructureGenerator.kt:231 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
   40     44   
    /// <ul>
   41     45   
    /// <li>
   42     46   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
   43     47   
    /// <ul>
   44     48   
    /// <li>
   45     49   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
   46     50   
    /// </ul></li>
   47     51   
    /// <li>
   48     52   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
   49     53   
    /// <ul>
   50     54   
    /// <li>
   51     55   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
   52     56   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
   53     57   
    /// </ul></li>
   54     58   
    /// </ul>
          59  +
    /* StructureGenerator.kt:166 */
   55     60   
    pub fn request_items(
   56     61   
        &self,
   57     62   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>> {
          63  +
        /* StructureGenerator.kt:170 */
   58     64   
        self.request_items.as_ref()
          65  +
        /* StructureGenerator.kt:166 */
   59     66   
    }
   60         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
          67  +
    /// /* StructureGenerator.kt:231 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
   61     68   
    /// <ul>
   62     69   
    /// <li>
   63     70   
    /// <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>
   64     71   
    /// <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>
   65     72   
    /// <li>
   66     73   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
   67     74   
    /// <li>
   68     75   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
   69     76   
    /// </ul>
          77  +
    /* StructureGenerator.kt:166 */
   70     78   
    pub fn return_consumed_capacity(&self) -> ::std::option::Option<&crate::types::ReturnConsumedCapacity> {
          79  +
        /* StructureGenerator.kt:170 */
   71     80   
        self.return_consumed_capacity.as_ref()
          81  +
        /* StructureGenerator.kt:166 */
   72     82   
    }
   73         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
          83  +
    /// /* StructureGenerator.kt:231 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
          84  +
    /* StructureGenerator.kt:166 */
   74     85   
    pub fn return_item_collection_metrics(&self) -> ::std::option::Option<&crate::types::ReturnItemCollectionMetrics> {
          86  +
        /* StructureGenerator.kt:170 */
   75     87   
        self.return_item_collection_metrics.as_ref()
          88  +
        /* StructureGenerator.kt:166 */
   76     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   77     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   78     93   
impl BatchWriteItemInput {
   79         -
    /// Creates a new builder-style object to manufacture [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
          95  +
    /* BuilderGenerator.kt:175 */
   80     96   
    pub fn builder() -> crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   81     98   
        crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   82    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   83    102   
}
   84    103   
   85         -
/// A builder for [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
         105  +
/* RustType.kt:516 */
   86    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   87    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   88    110   
pub struct BatchWriteItemInputBuilder {
         111  +
    /* BuilderGenerator.kt:275 */
   89    112   
    pub(crate) request_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
   90         -
    pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) return_consumed_capacity: ::std::option::Option<crate::types::ReturnConsumedCapacity>,
         114  +
    /* BuilderGenerator.kt:275 */
   91    115   
    pub(crate) return_item_collection_metrics: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>,
         116  +
    /* BuilderGenerator.kt:345 */
   92    117   
}
         118  +
/* BuilderGenerator.kt:355 */
   93    119   
impl BatchWriteItemInputBuilder {
   94         -
    /// Adds a key-value pair to `request_items`.
         120  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `request_items`.
         121  +
    /* BuilderGenerator.kt:437 */
   95    122   
    ///
   96         -
    /// To override the contents of this collection use [`set_request_items`](Self::set_request_items).
         123  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_request_items`](Self::set_request_items).
         124  +
    /* BuilderGenerator.kt:439 */
   97    125   
    ///
   98         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         126  +
    /// /* BuilderGenerator.kt:440 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
   99    127   
    /// <ul>
  100    128   
    /// <li>
  101    129   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  102    130   
    /// <ul>
  103    131   
    /// <li>
  104    132   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  105    133   
    /// </ul></li>
  106    134   
    /// <li>
  107    135   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  108    136   
    /// <ul>
  109    137   
    /// <li>
  110    138   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  111    139   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  112    140   
    /// </ul></li>
  113    141   
    /// </ul>
         142  +
    /* BuilderGenerator.kt:445 */
  114    143   
    pub fn request_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::WriteRequest>) -> Self {
         144  +
        /* BuilderGenerator.kt:448 */
  115    145   
        let mut hash_map = self.request_items.unwrap_or_default();
  116    146   
        hash_map.insert(k.into(), v);
  117    147   
        self.request_items = ::std::option::Option::Some(hash_map);
  118    148   
        self
         149  +
        /* BuilderGenerator.kt:445 */
  119    150   
    }
  120         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         151  +
    /// /* BuilderGenerator.kt:312 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
  121    152   
    /// <ul>
  122    153   
    /// <li>
  123    154   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  124    155   
    /// <ul>
  125    156   
    /// <li>
  126    157   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  127    158   
    /// </ul></li>
  128    159   
    /// <li>
  129    160   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  130    161   
    /// <ul>
  131    162   
    /// <li>
  132    163   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  133    164   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  134    165   
    /// </ul></li>
  135    166   
    /// </ul>
         167  +
    /* BuilderGenerator.kt:314 */
  136    168   
    pub fn set_request_items(
  137    169   
        mut self,
  138    170   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
  139    171   
    ) -> Self {
         172  +
        /* BuilderGenerator.kt:315 */
  140    173   
        self.request_items = input;
  141    174   
        self
         175  +
        /* BuilderGenerator.kt:314 */
  142    176   
    }
  143         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         177  +
    /// /* BuilderGenerator.kt:334 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
  144    178   
    /// <ul>
  145    179   
    /// <li>
  146    180   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  147    181   
    /// <ul>
  148    182   
    /// <li>
  149    183   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  150    184   
    /// </ul></li>
  151    185   
    /// <li>
  152    186   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  153    187   
    /// <ul>
  154    188   
    /// <li>
  155    189   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  156    190   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  157    191   
    /// </ul></li>
  158    192   
    /// </ul>
         193  +
    /* BuilderGenerator.kt:336 */
  159    194   
    pub fn get_request_items(
  160    195   
        &self,
  161    196   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>> {
         197  +
        /* BuilderGenerator.kt:337 */
  162    198   
        &self.request_items
         199  +
        /* BuilderGenerator.kt:336 */
  163    200   
    }
  164         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         201  +
    /// /* BuilderGenerator.kt:286 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  165    202   
    /// <ul>
  166    203   
    /// <li>
  167    204   
    /// <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>
  168    205   
    /// <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>
  169    206   
    /// <li>
  170    207   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  171    208   
    /// <li>
  172    209   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  173    210   
    /// </ul>
         211  +
    /* BuilderGenerator.kt:291 */
  174    212   
    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
         213  +
        /* BuilderGenerator.kt:292 */
  175    214   
        self.return_consumed_capacity = ::std::option::Option::Some(input);
         215  +
        /* BuilderGenerator.kt:293 */
  176    216   
        self
         217  +
        /* BuilderGenerator.kt:291 */
  177    218   
    }
  178         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         219  +
    /// /* BuilderGenerator.kt:312 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  179    220   
    /// <ul>
  180    221   
    /// <li>
  181    222   
    /// <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>
  182    223   
    /// <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>
  183    224   
    /// <li>
  184    225   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  185    226   
    /// <li>
  186    227   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  187    228   
    /// </ul>
         229  +
    /* BuilderGenerator.kt:314 */
  188    230   
    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
         231  +
        /* BuilderGenerator.kt:315 */
  189    232   
        self.return_consumed_capacity = input;
  190    233   
        self
         234  +
        /* BuilderGenerator.kt:314 */
  191    235   
    }
  192         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         236  +
    /// /* BuilderGenerator.kt:334 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  193    237   
    /// <ul>
  194    238   
    /// <li>
  195    239   
    /// <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>
  196    240   
    /// <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>
  197    241   
    /// <li>
  198    242   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  199    243   
    /// <li>
  200    244   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  201    245   
    /// </ul>
         246  +
    /* BuilderGenerator.kt:336 */
  202    247   
    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
         248  +
        /* BuilderGenerator.kt:337 */
  203    249   
        &self.return_consumed_capacity
         250  +
        /* BuilderGenerator.kt:336 */
  204    251   
    }
  205         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         252  +
    /// /* BuilderGenerator.kt:286 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         253  +
    /* BuilderGenerator.kt:291 */
  206    254   
    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
         255  +
        /* BuilderGenerator.kt:292 */
  207    256   
        self.return_item_collection_metrics = ::std::option::Option::Some(input);
         257  +
        /* BuilderGenerator.kt:293 */
  208    258   
        self
         259  +
        /* BuilderGenerator.kt:291 */
  209    260   
    }
  210         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         261  +
    /// /* BuilderGenerator.kt:312 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         262  +
    /* BuilderGenerator.kt:314 */
  211    263   
    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
         264  +
        /* BuilderGenerator.kt:315 */
  212    265   
        self.return_item_collection_metrics = input;
  213    266   
        self
         267  +
        /* BuilderGenerator.kt:314 */
  214    268   
    }
  215         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         269  +
    /// /* BuilderGenerator.kt:334 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         270  +
    /* BuilderGenerator.kt:336 */
  216    271   
    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
         272  +
        /* BuilderGenerator.kt:337 */
  217    273   
        &self.return_item_collection_metrics
         274  +
        /* BuilderGenerator.kt:336 */
  218    275   
    }
  219         -
    /// Consumes the builder and constructs a [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
         276  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchWriteItemInput`](crate::operation::batch_write_item::BatchWriteItemInput).
         277  +
    /* BuilderGenerator.kt:253 */
  220    278   
    pub fn build(
  221    279   
        self,
  222    280   
    ) -> ::std::result::Result<crate::operation::batch_write_item::BatchWriteItemInput, ::aws_smithy_types::error::operation::BuildError> {
  223         -
        ::std::result::Result::Ok(crate::operation::batch_write_item::BatchWriteItemInput {
  224         -
            request_items: self.request_items,
  225         -
            return_consumed_capacity: self.return_consumed_capacity,
  226         -
            return_item_collection_metrics: self.return_item_collection_metrics,
  227         -
        })
         281  +
        /* BuilderGenerator.kt:254 */
         282  +
        ::std::result::Result::Ok(
         283  +
            /* BuilderGenerator.kt:477 */
         284  +
            crate::operation::batch_write_item::BatchWriteItemInput {
         285  +
                /* BuilderGenerator.kt:481 */ request_items: self.request_items,
         286  +
                /* BuilderGenerator.kt:481 */
         287  +
                return_consumed_capacity: self.return_consumed_capacity,
         288  +
                /* BuilderGenerator.kt:481 */
         289  +
                return_item_collection_metrics: self.return_item_collection_metrics,
         290  +
                /* BuilderGenerator.kt:477 */
         291  +
            }, /* BuilderGenerator.kt:254 */
         292  +
        )
         293  +
        /* BuilderGenerator.kt:253 */
  228    294   
    }
         295  +
    /* BuilderGenerator.kt:355 */
  229    296   
}

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

@@ -1,1 +295,365 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the output of a <code>BatchWriteItem</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the output of a <code>BatchWriteItem</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 BatchWriteItemOutput {
    7         -
    /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct BatchWriteItemOutput {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
    8     10   
    /// <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p>
    9     11   
    /// <ul>
   10     12   
    /// <li>
   11     13   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
   12     14   
    /// <ul>
   13     15   
    /// <li>
   14     16   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p></li>
   15     17   
    /// </ul></li>
   16     18   
    /// <li>
   17     19   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
   18     20   
    /// <ul>
   19     21   
    /// <li>
   20     22   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p>
   21     23   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
   22     24   
    /// </ul></li>
   23     25   
    /// </ul>
   24     26   
    /// <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
   25     27   
    pub unprocessed_items: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
   26         -
    /// <p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
   27     29   
    /// <p>Each entry consists of the following subelements:</p>
   28     30   
    /// <ul>
   29     31   
    /// <li>
   30     32   
    /// <p><code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p></li>
   31     33   
    /// <li>
   32     34   
    /// <p><code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   33     35   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p></li>
   34     36   
    /// </ul>
   35     37   
    pub item_collection_metrics:
   36     38   
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ItemCollectionMetrics>>>,
   37         -
    /// <p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
          39  +
    /// /* StructureGenerator.kt:231 */<p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
   38     40   
    /// <p>Each element consists of:</p>
   39     41   
    /// <ul>
   40     42   
    /// <li>
   41     43   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
   42     44   
    /// <li>
   43     45   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
   44     46   
    /// </ul>
   45     47   
    pub consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
          48  +
    /* StructureGenerator.kt:201 */
   46     49   
}
          50  +
/* StructureGenerator.kt:135 */
   47     51   
impl BatchWriteItemOutput {
   48         -
    /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
          52  +
    /// /* StructureGenerator.kt:231 */<p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
   49     53   
    /// <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p>
   50     54   
    /// <ul>
   51     55   
    /// <li>
   52     56   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
   53     57   
    /// <ul>
   54     58   
    /// <li>
   55     59   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p></li>
   56     60   
    /// </ul></li>
   57     61   
    /// <li>
   58     62   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
   59     63   
    /// <ul>
   60     64   
    /// <li>
   61     65   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p>
   62     66   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
   63     67   
    /// </ul></li>
   64     68   
    /// </ul>
   65     69   
    /// <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
          70  +
    /* StructureGenerator.kt:166 */
   66     71   
    pub fn unprocessed_items(
   67     72   
        &self,
   68     73   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>> {
          74  +
        /* StructureGenerator.kt:170 */
   69     75   
        self.unprocessed_items.as_ref()
          76  +
        /* StructureGenerator.kt:166 */
   70     77   
    }
   71         -
    /// <p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
          78  +
    /// /* StructureGenerator.kt:231 */<p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
   72     79   
    /// <p>Each entry consists of the following subelements:</p>
   73     80   
    /// <ul>
   74     81   
    /// <li>
   75     82   
    /// <p><code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p></li>
   76     83   
    /// <li>
   77     84   
    /// <p><code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   78     85   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p></li>
   79     86   
    /// </ul>
          87  +
    /* StructureGenerator.kt:166 */
   80     88   
    pub fn item_collection_metrics(
   81     89   
        &self,
   82     90   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ItemCollectionMetrics>>> {
          91  +
        /* StructureGenerator.kt:170 */
   83     92   
        self.item_collection_metrics.as_ref()
          93  +
        /* StructureGenerator.kt:166 */
   84     94   
    }
   85         -
    /// <p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
          95  +
    /// /* StructureGenerator.kt:231 */<p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
   86     96   
    /// <p>Each element consists of:</p>
   87     97   
    /// <ul>
   88     98   
    /// <li>
   89     99   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
   90    100   
    /// <li>
   91    101   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
   92    102   
    /// </ul>
   93         -
    ///
   94         -
    /// 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()`.
         103  +
    /// /* StructureGenerator.kt:162 */
         104  +
    /// /* 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()`.
         105  +
    /* StructureGenerator.kt:166 */
   95    106   
    pub fn consumed_capacity(&self) -> &[crate::types::ConsumedCapacity] {
   96         -
        self.consumed_capacity.as_deref().unwrap_or_default()
         107  +
        /* StructureGenerator.kt:169 */
         108  +
        self.consumed_capacity
         109  +
            .as_deref()
         110  +
            /* StructureGenerator.kt:175 */
         111  +
            .unwrap_or_default()
         112  +
        /* StructureGenerator.kt:166 */
   97    113   
    }
         114  +
    /* StructureGenerator.kt:135 */
   98    115   
}
         116  +
/* ClientCodegenVisitor.kt:237 */
   99    117   
impl BatchWriteItemOutput {
  100         -
    /// Creates a new builder-style object to manufacture [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         118  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         119  +
    /* BuilderGenerator.kt:175 */
  101    120   
    pub fn builder() -> crate::operation::batch_write_item::builders::BatchWriteItemOutputBuilder {
         121  +
        /* BuilderGenerator.kt:176 */
  102    122   
        crate::operation::batch_write_item::builders::BatchWriteItemOutputBuilder::default()
         123  +
        /* BuilderGenerator.kt:175 */
  103    124   
    }
         125  +
    /* ClientCodegenVisitor.kt:237 */
  104    126   
}
  105    127   
  106         -
/// A builder for [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         128  +
/// /* BuilderGenerator.kt:342 */A builder for [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         129  +
/* RustType.kt:516 */
  107    130   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         131  +
/* RustType.kt:516 */
  108    132   
#[non_exhaustive]
         133  +
/* BuilderGenerator.kt:345 */
  109    134   
pub struct BatchWriteItemOutputBuilder {
         135  +
    /* BuilderGenerator.kt:275 */
  110    136   
    pub(crate) unprocessed_items:
  111    137   
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
         138  +
    /* BuilderGenerator.kt:275 */
  112    139   
    pub(crate) item_collection_metrics:
  113    140   
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ItemCollectionMetrics>>>,
         141  +
    /* BuilderGenerator.kt:275 */
  114    142   
    pub(crate) consumed_capacity: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>,
         143  +
    /* BuilderGenerator.kt:345 */
  115    144   
}
         145  +
/* BuilderGenerator.kt:355 */
  116    146   
impl BatchWriteItemOutputBuilder {
  117         -
    /// Adds a key-value pair to `unprocessed_items`.
         147  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `unprocessed_items`.
         148  +
    /* BuilderGenerator.kt:437 */
  118    149   
    ///
  119         -
    /// To override the contents of this collection use [`set_unprocessed_items`](Self::set_unprocessed_items).
         150  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_unprocessed_items`](Self::set_unprocessed_items).
         151  +
    /* BuilderGenerator.kt:439 */
  120    152   
    ///
  121         -
    /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         153  +
    /// /* BuilderGenerator.kt:440 */<p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  122    154   
    /// <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p>
  123    155   
    /// <ul>
  124    156   
    /// <li>
  125    157   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  126    158   
    /// <ul>
  127    159   
    /// <li>
  128    160   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p></li>
  129    161   
    /// </ul></li>
  130    162   
    /// <li>
  131    163   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  132    164   
    /// <ul>
  133    165   
    /// <li>
  134    166   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p>
  135    167   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  136    168   
    /// </ul></li>
  137    169   
    /// </ul>
  138    170   
    /// <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
         171  +
    /* BuilderGenerator.kt:445 */
  139    172   
    pub fn unprocessed_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::WriteRequest>) -> Self {
         173  +
        /* BuilderGenerator.kt:448 */
  140    174   
        let mut hash_map = self.unprocessed_items.unwrap_or_default();
  141    175   
        hash_map.insert(k.into(), v);
  142    176   
        self.unprocessed_items = ::std::option::Option::Some(hash_map);
  143    177   
        self
         178  +
        /* BuilderGenerator.kt:445 */
  144    179   
    }
  145         -
    /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         180  +
    /// /* BuilderGenerator.kt:312 */<p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  146    181   
    /// <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p>
  147    182   
    /// <ul>
  148    183   
    /// <li>
  149    184   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  150    185   
    /// <ul>
  151    186   
    /// <li>
  152    187   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p></li>
  153    188   
    /// </ul></li>
  154    189   
    /// <li>
  155    190   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  156    191   
    /// <ul>
  157    192   
    /// <li>
  158    193   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p>
  159    194   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  160    195   
    /// </ul></li>
  161    196   
    /// </ul>
  162    197   
    /// <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
         198  +
    /* BuilderGenerator.kt:314 */
  163    199   
    pub fn set_unprocessed_items(
  164    200   
        mut self,
  165    201   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
  166    202   
    ) -> Self {
         203  +
        /* BuilderGenerator.kt:315 */
  167    204   
        self.unprocessed_items = input;
  168    205   
        self
         206  +
        /* BuilderGenerator.kt:314 */
  169    207   
    }
  170         -
    /// <p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
         208  +
    /// /* BuilderGenerator.kt:334 */<p>A map of tables and requests against those tables that were not processed. The <code>UnprocessedItems</code> value is in the same form as <code>RequestItems</code>, so you can provide this value directly to a subsequent <code>BatchGetItem</code> operation. For more information, see <code>RequestItems</code> in the Request Parameters section.</p>
  171    209   
    /// <p>Each <code>UnprocessedItems</code> entry consists of a table name and, for that table, a list of operations to perform (<code>DeleteRequest</code> or <code>PutRequest</code>).</p>
  172    210   
    /// <ul>
  173    211   
    /// <li>
  174    212   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  175    213   
    /// <ul>
  176    214   
    /// <li>
  177    215   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value.</p></li>
  178    216   
    /// </ul></li>
  179    217   
    /// <li>
  180    218   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  181    219   
    /// <ul>
  182    220   
    /// <li>
  183    221   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values will be rejected with a <code>ValidationException</code> exception.</p>
  184    222   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  185    223   
    /// </ul></li>
  186    224   
    /// </ul>
  187    225   
    /// <p>If there are no unprocessed items remaining, the response contains an empty <code>UnprocessedItems</code> map.</p>
         226  +
    /* BuilderGenerator.kt:336 */
  188    227   
    pub fn get_unprocessed_items(
  189    228   
        &self,
  190    229   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>> {
         230  +
        /* BuilderGenerator.kt:337 */
  191    231   
        &self.unprocessed_items
         232  +
        /* BuilderGenerator.kt:336 */
  192    233   
    }
  193         -
    /// Adds a key-value pair to `item_collection_metrics`.
         234  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `item_collection_metrics`.
         235  +
    /* BuilderGenerator.kt:437 */
  194    236   
    ///
  195         -
    /// To override the contents of this collection use [`set_item_collection_metrics`](Self::set_item_collection_metrics).
         237  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_item_collection_metrics`](Self::set_item_collection_metrics).
         238  +
    /* BuilderGenerator.kt:439 */
  196    239   
    ///
  197         -
    /// <p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
         240  +
    /// /* BuilderGenerator.kt:440 */<p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
  198    241   
    /// <p>Each entry consists of the following subelements:</p>
  199    242   
    /// <ul>
  200    243   
    /// <li>
  201    244   
    /// <p><code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p></li>
  202    245   
    /// <li>
  203    246   
    /// <p><code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
  204    247   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p></li>
  205    248   
    /// </ul>
         249  +
    /* BuilderGenerator.kt:445 */
  206    250   
    pub fn item_collection_metrics(
  207    251   
        mut self,
  208    252   
        k: impl ::std::convert::Into<::std::string::String>,
  209    253   
        v: ::std::vec::Vec<crate::types::ItemCollectionMetrics>,
  210    254   
    ) -> Self {
         255  +
        /* BuilderGenerator.kt:448 */
  211    256   
        let mut hash_map = self.item_collection_metrics.unwrap_or_default();
  212    257   
        hash_map.insert(k.into(), v);
  213    258   
        self.item_collection_metrics = ::std::option::Option::Some(hash_map);
  214    259   
        self
         260  +
        /* BuilderGenerator.kt:445 */
  215    261   
    }
  216         -
    /// <p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
         262  +
    /// /* BuilderGenerator.kt:312 */<p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
  217    263   
    /// <p>Each entry consists of the following subelements:</p>
  218    264   
    /// <ul>
  219    265   
    /// <li>
  220    266   
    /// <p><code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p></li>
  221    267   
    /// <li>
  222    268   
    /// <p><code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
  223    269   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p></li>
  224    270   
    /// </ul>
         271  +
    /* BuilderGenerator.kt:314 */
  225    272   
    pub fn set_item_collection_metrics(
  226    273   
        mut self,
  227    274   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ItemCollectionMetrics>>>,
  228    275   
    ) -> Self {
         276  +
        /* BuilderGenerator.kt:315 */
  229    277   
        self.item_collection_metrics = input;
  230    278   
        self
         279  +
        /* BuilderGenerator.kt:314 */
  231    280   
    }
  232         -
    /// <p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
         281  +
    /// /* BuilderGenerator.kt:334 */<p>A list of tables that were processed by <code>BatchWriteItem</code> and, for each table, information about any item collections that were affected by individual <code>DeleteItem</code> or <code>PutItem</code> operations.</p>
  233    282   
    /// <p>Each entry consists of the following subelements:</p>
  234    283   
    /// <ul>
  235    284   
    /// <li>
  236    285   
    /// <p><code>ItemCollectionKey</code> - The partition key value of the item collection. This is the same as the partition key value of the item.</p></li>
  237    286   
    /// <li>
  238    287   
    /// <p><code>SizeEstimateRangeGB</code> - An estimate of item collection size, expressed in GB. This is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on the table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
  239    288   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p></li>
  240    289   
    /// </ul>
         290  +
    /* BuilderGenerator.kt:336 */
  241    291   
    pub fn get_item_collection_metrics(
  242    292   
        &self,
  243    293   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ItemCollectionMetrics>>> {
         294  +
        /* BuilderGenerator.kt:337 */
  244    295   
        &self.item_collection_metrics
         296  +
        /* BuilderGenerator.kt:336 */
  245    297   
    }
  246         -
    /// Appends an item to `consumed_capacity`.
         298  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `consumed_capacity`.
         299  +
    /* BuilderGenerator.kt:411 */
  247    300   
    ///
  248         -
    /// To override the contents of this collection use [`set_consumed_capacity`](Self::set_consumed_capacity).
         301  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_consumed_capacity`](Self::set_consumed_capacity).
         302  +
    /* BuilderGenerator.kt:413 */
  249    303   
    ///
  250         -
    /// <p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
         304  +
    /// /* BuilderGenerator.kt:414 */<p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
  251    305   
    /// <p>Each element consists of:</p>
  252    306   
    /// <ul>
  253    307   
    /// <li>
  254    308   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  255    309   
    /// <li>
  256    310   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  257    311   
    /// </ul>
         312  +
    /* BuilderGenerator.kt:418 */
  258    313   
    pub fn consumed_capacity(mut self, input: crate::types::ConsumedCapacity) -> Self {
         314  +
        /* BuilderGenerator.kt:419 */
  259    315   
        let mut v = self.consumed_capacity.unwrap_or_default();
  260    316   
        v.push(input);
  261    317   
        self.consumed_capacity = ::std::option::Option::Some(v);
  262    318   
        self
         319  +
        /* BuilderGenerator.kt:418 */
  263    320   
    }
  264         -
    /// <p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
         321  +
    /// /* BuilderGenerator.kt:312 */<p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
  265    322   
    /// <p>Each element consists of:</p>
  266    323   
    /// <ul>
  267    324   
    /// <li>
  268    325   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  269    326   
    /// <li>
  270    327   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  271    328   
    /// </ul>
         329  +
    /* BuilderGenerator.kt:314 */
  272    330   
    pub fn set_consumed_capacity(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>>) -> Self {
         331  +
        /* BuilderGenerator.kt:315 */
  273    332   
        self.consumed_capacity = input;
  274    333   
        self
         334  +
        /* BuilderGenerator.kt:314 */
  275    335   
    }
  276         -
    /// <p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
         336  +
    /// /* BuilderGenerator.kt:334 */<p>The capacity units consumed by the entire <code>BatchWriteItem</code> operation.</p>
  277    337   
    /// <p>Each element consists of:</p>
  278    338   
    /// <ul>
  279    339   
    /// <li>
  280    340   
    /// <p><code>TableName</code> - The table that consumed the provisioned throughput.</p></li>
  281    341   
    /// <li>
  282    342   
    /// <p><code>CapacityUnits</code> - The total number of capacity units consumed.</p></li>
  283    343   
    /// </ul>
         344  +
    /* BuilderGenerator.kt:336 */
  284    345   
    pub fn get_consumed_capacity(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConsumedCapacity>> {
         346  +
        /* BuilderGenerator.kt:337 */
  285    347   
        &self.consumed_capacity
         348  +
        /* BuilderGenerator.kt:336 */
  286    349   
    }
  287         -
    /// Consumes the builder and constructs a [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         350  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`BatchWriteItemOutput`](crate::operation::batch_write_item::BatchWriteItemOutput).
         351  +
    /* BuilderGenerator.kt:253 */
  288    352   
    pub fn build(self) -> crate::operation::batch_write_item::BatchWriteItemOutput {
         353  +
        /* BuilderGenerator.kt:477 */
  289    354   
        crate::operation::batch_write_item::BatchWriteItemOutput {
  290         -
            unprocessed_items: self.unprocessed_items,
         355  +
            /* BuilderGenerator.kt:481 */ unprocessed_items: self.unprocessed_items,
         356  +
            /* BuilderGenerator.kt:481 */
  291    357   
            item_collection_metrics: self.item_collection_metrics,
         358  +
            /* BuilderGenerator.kt:481 */
  292    359   
            consumed_capacity: self.consumed_capacity,
         360  +
            /* BuilderGenerator.kt:477 */
  293    361   
        }
         362  +
        /* BuilderGenerator.kt:253 */
  294    363   
    }
         364  +
    /* BuilderGenerator.kt:355 */
  295    365   
}

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

@@ -1,1 +262,283 @@
    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_write_item::_batch_write_item_output::BatchWriteItemOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::batch_write_item::_batch_write_item_input::BatchWriteItemInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder {
    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_write_item::BatchWriteItemOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::batch_write_item::BatchWriteItemError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.batch_write_item();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `BatchWriteItem`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `BatchWriteItem`.
   24     27   
///
   25         -
/// <p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data, which can comprise as many as 25 put or delete requests. Individual items to be written can be as large as 400 KB.</p><note>
          28  +
/// /* FluentBuilderGenerator.kt:130 */<p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data, which can comprise as many as 25 put or delete requests. Individual items to be written can be as large as 400 KB.</p><note>
   26     29   
/// <p><code>BatchWriteItem</code> cannot update items. To update items, use the <code>UpdateItem</code> action.</p>
   27     30   
/// </note>
   28     31   
/// <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified in <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a whole is not. If any requested operations fail because the table's provisioned throughput is exceeded or an internal processing failure occurs, the failed operations are returned in the <code>UnprocessedItems</code> response parameter. You can investigate and optionally resend the requests. Typically, you would call <code>BatchWriteItem</code> in a loop. Each iteration would check for unprocessed items and submit a new <code>BatchWriteItem</code> request with those unprocessed items until all items have been processed.</p>
   29     32   
/// <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>BatchWriteItem</code> returns a <code>ProvisionedThroughputExceededException</code>.</p><important>
   30     33   
/// <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>
   31     34   
/// <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   32     35   
/// </important>
   33     36   
/// <p>With <code>BatchWriteItem</code>, you can efficiently write or delete large amounts of data, such as from Amazon EMR, or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, <code>BatchWriteItem</code> does not behave in the same way as individual <code>PutItem</code> and <code>DeleteItem</code> calls would. For example, you cannot specify conditions on individual put and delete requests, and <code>BatchWriteItem</code> does not return deleted items in the response.</p>
   34     37   
/// <p>If you use a programming language that supports concurrency, you can use threads to write items in parallel. Your application must include the necessary logic to manage the threads. With languages that don't support threading, you must update or delete the specified items one at a time. In both situations, <code>BatchWriteItem</code> performs the specified put and delete operations in parallel, giving you the power of the thread pool approach without having to introduce complexity into your application.</p>
   35     38   
/// <p>Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.</p>
   36     39   
/// <p>If one or more of the following is true, DynamoDB rejects the entire batch write operation:</p>
   37     40   
/// <ul>
   38     41   
/// <li>
   39     42   
/// <p>One or more tables specified in the <code>BatchWriteItem</code> request does not exist.</p></li>
   40     43   
/// <li>
   41     44   
/// <p>Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.</p></li>
   42     45   
/// <li>
   43     46   
/// <p>You try to perform multiple operations on the same item in the same <code>BatchWriteItem</code> request. For example, you cannot put and delete the same item in the same <code>BatchWriteItem</code> request.</p></li>
   44     47   
/// <li>
   45     48   
/// <p>Your request contains at least two items with identical hash and range keys (which essentially is two put operations).</p></li>
   46     49   
/// <li>
   47     50   
/// <p>There are more than 25 requests in the batch.</p></li>
   48     51   
/// <li>
   49     52   
/// <p>Any individual item in a batch exceeds 400 KB.</p></li>
   50     53   
/// <li>
   51     54   
/// <p>The total request size exceeds 16 MB.</p></li>
   52     55   
/// </ul>
          56  +
/* RustType.kt:516 */
   53     57   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          58  +
/* FluentBuilderGenerator.kt:270 */
   54     59   
pub struct BatchWriteItemFluentBuilder {
   55     60   
    handle: ::std::sync::Arc<crate::client::Handle>,
   56     61   
    inner: crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder,
   57     62   
    config_override: ::std::option::Option<crate::config::Builder>,
   58     63   
}
          64  +
/* FluentBuilderGenerator.kt:381 */
   59     65   
impl
   60     66   
    crate::client::customize::internal::CustomizableSend<
   61     67   
        crate::operation::batch_write_item::BatchWriteItemOutput,
   62     68   
        crate::operation::batch_write_item::BatchWriteItemError,
   63     69   
    > for BatchWriteItemFluentBuilder
   64     70   
{
   65     71   
    fn send(
   66     72   
        self,
   67     73   
        config_override: crate::config::Builder,
   68     74   
    ) -> crate::client::customize::internal::BoxFuture<
   69     75   
        crate::client::customize::internal::SendResult<
   70     76   
            crate::operation::batch_write_item::BatchWriteItemOutput,
   71     77   
            crate::operation::batch_write_item::BatchWriteItemError,
   72     78   
        >,
   73     79   
    > {
   74     80   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   75     81   
    }
   76     82   
}
          83  +
/* FluentBuilderGenerator.kt:282 */
   77     84   
impl BatchWriteItemFluentBuilder {
          85  +
    /* FluentBuilderGenerator.kt:288 */
   78     86   
    /// Creates a new `BatchWriteItemFluentBuilder`.
   79     87   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   80     88   
        Self {
   81     89   
            handle,
   82     90   
            inner: ::std::default::Default::default(),
   83     91   
            config_override: ::std::option::Option::None,
   84     92   
        }
   85     93   
    }
          94  +
    /* FluentBuilderGenerator.kt:301 */
   86     95   
    /// Access the BatchWriteItem as a reference.
   87     96   
    pub fn as_input(&self) -> &crate::operation::batch_write_item::builders::BatchWriteItemInputBuilder {
   88     97   
        &self.inner
   89     98   
    }
          99  +
    /* FluentBuilderGenerator.kt:145 */
   90    100   
    /// Sends the request and returns the response.
   91    101   
    ///
   92    102   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   93    103   
    /// can be matched against.
   94    104   
    ///
   95    105   
    /// By default, any retryable failures will be retried twice. Retry behavior
   96    106   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   97    107   
    /// set when configuring the client.
   98    108   
    pub async fn send(
   99    109   
        self,
  100    110   
    ) -> ::std::result::Result<
  101    111   
        crate::operation::batch_write_item::BatchWriteItemOutput,
  102    112   
        ::aws_smithy_runtime_api::client::result::SdkError<
  103    113   
            crate::operation::batch_write_item::BatchWriteItemError,
  104    114   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
  105    115   
        >,
  106    116   
    > {
  107    117   
        let input = self
  108    118   
            .inner
  109    119   
            .build()
  110    120   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  111    121   
        let runtime_plugins = crate::operation::batch_write_item::BatchWriteItem::operation_runtime_plugins(
  112    122   
            self.handle.runtime_plugins.clone(),
  113    123   
            &self.handle.conf,
  114    124   
            self.config_override,
  115    125   
        );
  116    126   
        crate::operation::batch_write_item::BatchWriteItem::orchestrate(&runtime_plugins, input).await
  117    127   
    }
  118    128   
  119    129   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  120    130   
    pub fn customize(
  121    131   
        self,
  122    132   
    ) -> crate::client::customize::CustomizableOperation<
  123    133   
        crate::operation::batch_write_item::BatchWriteItemOutput,
  124    134   
        crate::operation::batch_write_item::BatchWriteItemError,
  125    135   
        Self,
  126    136   
    > {
  127    137   
        crate::client::customize::CustomizableOperation::new(self)
  128    138   
    }
         139  +
    /* FluentBuilderGenerator.kt:315 */
  129    140   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  130    141   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  131    142   
        self
  132    143   
    }
  133    144   
  134    145   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  135    146   
        self.config_override = config_override;
  136    147   
        self
  137    148   
    }
  138         -
    ///
         149  +
    /// /* FluentBuilderGenerator.kt:466 */
  139    150   
    /// Adds a key-value pair to `RequestItems`.
  140    151   
    ///
  141    152   
    /// To override the contents of this collection use [`set_request_items`](Self::set_request_items).
  142    153   
    ///
  143         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         154  +
    /// /* FluentBuilderGenerator.kt:473 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
  144    155   
    /// <ul>
  145    156   
    /// <li>
  146    157   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  147    158   
    /// <ul>
  148    159   
    /// <li>
  149    160   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  150    161   
    /// </ul></li>
  151    162   
    /// <li>
  152    163   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  153    164   
    /// <ul>
  154    165   
    /// <li>
  155    166   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  156    167   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  157    168   
    /// </ul></li>
  158    169   
    /// </ul>
         170  +
    /* FluentBuilderGenerator.kt:475 */
  159    171   
    pub fn request_items(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::WriteRequest>) -> Self {
  160    172   
        self.inner = self.inner.request_items(k.into(), v);
  161    173   
        self
  162    174   
    }
  163         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         175  +
    /// /* FluentBuilderGenerator.kt:498 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
  164    176   
    /// <ul>
  165    177   
    /// <li>
  166    178   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  167    179   
    /// <ul>
  168    180   
    /// <li>
  169    181   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  170    182   
    /// </ul></li>
  171    183   
    /// <li>
  172    184   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  173    185   
    /// <ul>
  174    186   
    /// <li>
  175    187   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  176    188   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  177    189   
    /// </ul></li>
  178    190   
    /// </ul>
         191  +
    /* FluentBuilderGenerator.kt:500 */
  179    192   
    pub fn set_request_items(
  180    193   
        mut self,
  181    194   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>>,
  182    195   
    ) -> Self {
  183    196   
        self.inner = self.inner.set_request_items(input);
  184    197   
        self
  185    198   
    }
  186         -
    /// <p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
         199  +
    /// /* FluentBuilderGenerator.kt:518 */<p>A map of one or more table names and, for each table, a list of operations to be performed (<code>DeleteRequest</code> or <code>PutRequest</code>). Each element in the map consists of the following:</p>
  187    200   
    /// <ul>
  188    201   
    /// <li>
  189    202   
    /// <p><code>DeleteRequest</code> - Perform a <code>DeleteItem</code> operation on the specified item. The item to be deleted is identified by a <code>Key</code> subelement:</p>
  190    203   
    /// <ul>
  191    204   
    /// <li>
  192    205   
    /// <p><code>Key</code> - A map of primary key attribute values that uniquely identify the item. Each entry in this map consists of an attribute name and an attribute value. 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 a value for the partition key. For a composite primary key, you must provide values for <i>both</i> the partition key and the sort key.</p></li>
  193    206   
    /// </ul></li>
  194    207   
    /// <li>
  195    208   
    /// <p><code>PutRequest</code> - Perform a <code>PutItem</code> operation on the specified item. The item to be put is identified by an <code>Item</code> subelement:</p>
  196    209   
    /// <ul>
  197    210   
    /// <li>
  198    211   
    /// <p><code>Item</code> - A map of attributes and their values. Each entry in this map consists of an attribute name and an attribute value. Attribute values must not be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests that contain empty values are rejected with a <code>ValidationException</code> exception.</p>
  199    212   
    /// <p>If you specify any attributes that are part of an index key, then the data types for those attributes must match those of the schema in the table's attribute definition.</p></li>
  200    213   
    /// </ul></li>
  201    214   
    /// </ul>
         215  +
    /* FluentBuilderGenerator.kt:520 */
  202    216   
    pub fn get_request_items(
  203    217   
        &self,
  204    218   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::WriteRequest>>> {
  205    219   
        self.inner.get_request_items()
  206    220   
    }
  207         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         221  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  208    222   
    /// <ul>
  209    223   
    /// <li>
  210    224   
    /// <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>
  211    225   
    /// <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>
  212    226   
    /// <li>
  213    227   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  214    228   
    /// <li>
  215    229   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  216    230   
    /// </ul>
         231  +
    /* FluentBuilderGenerator.kt:500 */
  217    232   
    pub fn return_consumed_capacity(mut self, input: crate::types::ReturnConsumedCapacity) -> Self {
  218    233   
        self.inner = self.inner.return_consumed_capacity(input);
  219    234   
        self
  220    235   
    }
  221         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         236  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  222    237   
    /// <ul>
  223    238   
    /// <li>
  224    239   
    /// <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>
  225    240   
    /// <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>
  226    241   
    /// <li>
  227    242   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  228    243   
    /// <li>
  229    244   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  230    245   
    /// </ul>
         246  +
    /* FluentBuilderGenerator.kt:500 */
  231    247   
    pub fn set_return_consumed_capacity(mut self, input: ::std::option::Option<crate::types::ReturnConsumedCapacity>) -> Self {
  232    248   
        self.inner = self.inner.set_return_consumed_capacity(input);
  233    249   
        self
  234    250   
    }
  235         -
    /// <p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
         251  +
    /// /* FluentBuilderGenerator.kt:518 */<p>Determines the level of detail about provisioned throughput consumption that is returned in the response:</p>
  236    252   
    /// <ul>
  237    253   
    /// <li>
  238    254   
    /// <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>
  239    255   
    /// <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>
  240    256   
    /// <li>
  241    257   
    /// <p><code>TOTAL</code> - The response includes only the aggregate <code>ConsumedCapacity</code> for the operation.</p></li>
  242    258   
    /// <li>
  243    259   
    /// <p><code>NONE</code> - No <code>ConsumedCapacity</code> details are included in the response.</p></li>
  244    260   
    /// </ul>
         261  +
    /* FluentBuilderGenerator.kt:520 */
  245    262   
    pub fn get_return_consumed_capacity(&self) -> &::std::option::Option<crate::types::ReturnConsumedCapacity> {
  246    263   
        self.inner.get_return_consumed_capacity()
  247    264   
    }
  248         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         265  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         266  +
    /* FluentBuilderGenerator.kt:500 */
  249    267   
    pub fn return_item_collection_metrics(mut self, input: crate::types::ReturnItemCollectionMetrics) -> Self {
  250    268   
        self.inner = self.inner.return_item_collection_metrics(input);
  251    269   
        self
  252    270   
    }
  253         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         271  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         272  +
    /* FluentBuilderGenerator.kt:500 */
  254    273   
    pub fn set_return_item_collection_metrics(mut self, input: ::std::option::Option<crate::types::ReturnItemCollectionMetrics>) -> Self {
  255    274   
        self.inner = self.inner.set_return_item_collection_metrics(input);
  256    275   
        self
  257    276   
    }
  258         -
    /// <p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         277  +
    /// /* FluentBuilderGenerator.kt:518 */<p>Determines whether item collection metrics are returned. If set to <code>SIZE</code>, the response includes statistics about item collections, if any, that were modified during the operation are returned in the response. If set to <code>NONE</code> (the default), no statistics are returned.</p>
         278  +
    /* FluentBuilderGenerator.kt:520 */
  259    279   
    pub fn get_return_item_collection_metrics(&self) -> &::std::option::Option<crate::types::ReturnItemCollectionMetrics> {
  260    280   
        self.inner.get_return_item_collection_metrics()
  261    281   
    }
         282  +
    /* FluentBuilderGenerator.kt:282 */
  262    283   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/operation/create_backup.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 `CreateBackup`.
           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 CreateBackup;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl CreateBackup {
    7         -
    /// Creates a new `CreateBackup`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `CreateBackup`
          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::create_backup::CreateBackupInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::create_backup::CreateBackupOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::create_backup::CreateBackupError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +404,643 @@
   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 CreateBackup {
   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("CreateBackup");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            CreateBackupRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            CreateBackupResponseDeserializer,
   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("CreateBackup", "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("CreateBackup")
  114    125   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  115    126   
            .with_interceptor(CreateBackupEndpointParamsInterceptor)
  116    127   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  117    128   
                crate::operation::create_backup::CreateBackupError,
  118    129   
            >::new())
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  120    131   
                crate::operation::create_backup::CreateBackupError,
  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 CreateBackupResponseDeserializer;
  129    141   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateBackupResponseDeserializer {
  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_create_backup::de_create_backup_http_error(status, headers, body)
  142    154   
        } else {
  143    155   
            crate::protocol_serde::shape_create_backup::de_create_backup_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 CreateBackupRequestSerializer;
  150    163   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateBackupRequestSerializer {
  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::create_backup::CreateBackupInput>()
  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::create_backup::CreateBackupInput,
  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::create_backup::CreateBackupInput,
  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.CreateBackup",
  188    201   
            );
  189    202   
            builder
  190    203   
        };
  191    204   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_backup::ser_create_backup_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 CreateBackupEndpointParamsInterceptor;
  201    215   
  202    216   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateBackupEndpointParamsInterceptor {
  203    217   
    fn name(&self) -> &'static str {
  204    218   
        "CreateBackupEndpointParamsInterceptor"
  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::<CreateBackupInput>()
  220    234   
            .ok_or("failed to downcast to CreateBackupInput")?;
  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 `CreateBackupError` operation.
         250  +
/* RustType.kt:516 */
  235    251   
#[non_exhaustive]
         252  +
/* RustType.kt:516 */
  236    253   
#[derive(::std::fmt::Debug)]
  237         -
pub enum CreateBackupError {
  238         -
    /// <p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
         254  +
pub /* OperationErrorGenerator.kt:81 */ enum CreateBackupError {
         255  +
    /// /* OperationErrorGenerator.kt:83 */<p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
         256  +
    /* OperationErrorGenerator.kt:86 */
  239    257   
    BackupInUseError(crate::types::error::BackupInUseError),
  240         -
    /// <p>Backups have not yet been enabled for this table.</p>
         258  +
    /// /* OperationErrorGenerator.kt:83 */<p>Backups have not yet been enabled for this table.</p>
         259  +
    /* OperationErrorGenerator.kt:86 */
  241    260   
    ContinuousBackupsUnavailableError(crate::types::error::ContinuousBackupsUnavailableError),
  242         -
    /// <p>An error occurred on the server side.</p>
         261  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         262  +
    /* OperationErrorGenerator.kt:86 */
  243    263   
    InternalServerError(crate::types::error::InternalServerError),
         264  +
    /* OperationErrorGenerator.kt:83 */
  244    265   
    #[allow(missing_docs)] // documentation missing in model
         266  +
    /* OperationErrorGenerator.kt:86 */
  245    267   
    InvalidEndpointError(crate::types::error::InvalidEndpointError),
  246         -
    /// <p>There is no limit to the number of daily on-demand backups that can be taken.</p>
         268  +
    /// /* OperationErrorGenerator.kt:83 */<p>There is no limit to the number of daily on-demand backups that can be taken.</p>
  247    269   
    /// <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>.</p>
  248    270   
    /// <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p>
  249    271   
    /// <p>There is a soft account quota of 256 tables.</p>
         272  +
    /* OperationErrorGenerator.kt:86 */
  250    273   
    LimitExceededError(crate::types::error::LimitExceededError),
  251         -
    /// <p>A target table with the specified name is either being created or deleted.</p>
         274  +
    /// /* OperationErrorGenerator.kt:83 */<p>A target table with the specified name is either being created or deleted.</p>
         275  +
    /* OperationErrorGenerator.kt:86 */
  252    276   
    TableInUseError(crate::types::error::TableInUseError),
  253         -
    /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
         277  +
    /// /* OperationErrorGenerator.kt:83 */<p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
         278  +
    /* OperationErrorGenerator.kt:86 */
  254    279   
    TableNotFoundError(crate::types::error::TableNotFoundError),
         280  +
    /* OperationErrorGenerator.kt:88 */
  255    281   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  256    282   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  257    283   
    variable wildcard pattern and check `.code()`:
  258    284   
     \
  259    285   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  260    286   
     \
  261    287   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateBackupError) for what information is available for the error.")]
  262    288   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         289  +
    /* OperationErrorGenerator.kt:81 */
  263    290   
}
         291  +
/* OperationErrorGenerator.kt:218 */
  264    292   
impl CreateBackupError {
         293  +
    /* OperationErrorGenerator.kt:219 */
  265    294   
    /// Creates the `CreateBackupError::Unhandled` variant from any error type.
  266    295   
    pub fn unhandled(
  267    296   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  268    297   
    ) -> Self {
  269    298   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  270    299   
            source: err.into(),
  271    300   
            meta: ::std::default::Default::default(),
  272    301   
        })
  273    302   
    }
  274    303   
  275    304   
    /// Creates the `CreateBackupError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  276    305   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  277    306   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  278    307   
            source: err.clone().into(),
  279    308   
            meta: err,
  280    309   
        })
  281    310   
    }
  282         -
    ///
         311  +
    /// /* OperationErrorGenerator.kt:236 */
  283    312   
    /// Returns error metadata, which includes the error code, message,
  284    313   
    /// request ID, and potentially additional information.
  285    314   
    ///
         315  +
    /* OperationErrorGenerator.kt:242 */
  286    316   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         317  +
        /* OperationErrorGenerator.kt:243 */
  287    318   
        match self {
         319  +
            /* OperationErrorGenerator.kt:246 */
  288    320   
            Self::BackupInUseError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         321  +
            /* OperationErrorGenerator.kt:246 */
  289    322   
            Self::ContinuousBackupsUnavailableError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         323  +
            /* OperationErrorGenerator.kt:246 */
  290    324   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         325  +
            /* OperationErrorGenerator.kt:246 */
  291    326   
            Self::InvalidEndpointError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         327  +
            /* OperationErrorGenerator.kt:246 */
  292    328   
            Self::LimitExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  293         -
            Self::TableInUseError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         329  +
            /* OperationErrorGenerator.kt:246 */ Self::TableInUseError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         330  +
            /* OperationErrorGenerator.kt:246 */
  294    331   
            Self::TableNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  295         -
            Self::Unhandled(e) => &e.meta,
         332  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         333  +
            /* OperationErrorGenerator.kt:243 */
  296    334   
        }
         335  +
        /* OperationErrorGenerator.kt:242 */
  297    336   
    }
         337  +
    /* OperationErrorGenerator.kt:257 */
  298    338   
    /// Returns `true` if the error kind is `CreateBackupError::BackupInUseError`.
         339  +
    /* OperationErrorGenerator.kt:258 */
  299    340   
    pub fn is_backup_in_use_error(&self) -> bool {
         341  +
        /* OperationErrorGenerator.kt:259 */
  300    342   
        matches!(self, Self::BackupInUseError(_))
         343  +
        /* OperationErrorGenerator.kt:258 */
  301    344   
    }
         345  +
    /* OperationErrorGenerator.kt:257 */
  302    346   
    /// Returns `true` if the error kind is `CreateBackupError::ContinuousBackupsUnavailableError`.
         347  +
    /* OperationErrorGenerator.kt:258 */
  303    348   
    pub fn is_continuous_backups_unavailable_error(&self) -> bool {
         349  +
        /* OperationErrorGenerator.kt:259 */
  304    350   
        matches!(self, Self::ContinuousBackupsUnavailableError(_))
         351  +
        /* OperationErrorGenerator.kt:258 */
  305    352   
    }
         353  +
    /* OperationErrorGenerator.kt:257 */
  306    354   
    /// Returns `true` if the error kind is `CreateBackupError::InternalServerError`.
         355  +
    /* OperationErrorGenerator.kt:258 */
  307    356   
    pub fn is_internal_server_error(&self) -> bool {
         357  +
        /* OperationErrorGenerator.kt:259 */
  308    358   
        matches!(self, Self::InternalServerError(_))
         359  +
        /* OperationErrorGenerator.kt:258 */
  309    360   
    }
         361  +
    /* OperationErrorGenerator.kt:257 */
  310    362   
    /// Returns `true` if the error kind is `CreateBackupError::InvalidEndpointError`.
         363  +
    /* OperationErrorGenerator.kt:258 */
  311    364   
    pub fn is_invalid_endpoint_error(&self) -> bool {
         365  +
        /* OperationErrorGenerator.kt:259 */
  312    366   
        matches!(self, Self::InvalidEndpointError(_))
         367  +
        /* OperationErrorGenerator.kt:258 */
  313    368   
    }
         369  +
    /* OperationErrorGenerator.kt:257 */
  314    370   
    /// Returns `true` if the error kind is `CreateBackupError::LimitExceededError`.
         371  +
    /* OperationErrorGenerator.kt:258 */
  315    372   
    pub fn is_limit_exceeded_error(&self) -> bool {
         373  +
        /* OperationErrorGenerator.kt:259 */
  316    374   
        matches!(self, Self::LimitExceededError(_))
         375  +
        /* OperationErrorGenerator.kt:258 */
  317    376   
    }
         377  +
    /* OperationErrorGenerator.kt:257 */
  318    378   
    /// Returns `true` if the error kind is `CreateBackupError::TableInUseError`.
         379  +
    /* OperationErrorGenerator.kt:258 */
  319    380   
    pub fn is_table_in_use_error(&self) -> bool {
         381  +
        /* OperationErrorGenerator.kt:259 */
  320    382   
        matches!(self, Self::TableInUseError(_))
         383  +
        /* OperationErrorGenerator.kt:258 */
  321    384   
    }
         385  +
    /* OperationErrorGenerator.kt:257 */
  322    386   
    /// Returns `true` if the error kind is `CreateBackupError::TableNotFoundError`.
         387  +
    /* OperationErrorGenerator.kt:258 */
  323    388   
    pub fn is_table_not_found_error(&self) -> bool {
         389  +
        /* OperationErrorGenerator.kt:259 */
  324    390   
        matches!(self, Self::TableNotFoundError(_))
         391  +
        /* OperationErrorGenerator.kt:258 */
  325    392   
    }
         393  +
    /* OperationErrorGenerator.kt:218 */
  326    394   
}
         395  +
/* OperationErrorGenerator.kt:269 */
  327    396   
impl ::std::error::Error for CreateBackupError {
         397  +
    /* OperationErrorGenerator.kt:270 */
  328    398   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         399  +
        /* OperationErrorGenerator.kt:318 */
  329    400   
        match self {
  330         -
            Self::BackupInUseError(_inner) => ::std::option::Option::Some(_inner),
  331         -
            Self::ContinuousBackupsUnavailableError(_inner) => ::std::option::Option::Some(_inner),
  332         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  333         -
            Self::InvalidEndpointError(_inner) => ::std::option::Option::Some(_inner),
  334         -
            Self::LimitExceededError(_inner) => ::std::option::Option::Some(_inner),
  335         -
            Self::TableInUseError(_inner) => ::std::option::Option::Some(_inner),
  336         -
            Self::TableNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  337         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         401  +
            /* OperationErrorGenerator.kt:321 */
         402  +
            Self::BackupInUseError(_inner) =>
         403  +
            /* OperationErrorGenerator.kt:283 */
         404  +
            {
         405  +
                ::std::option::Option::Some(_inner)
         406  +
            }
         407  +
            ,
         408  +
            /* OperationErrorGenerator.kt:321 */
         409  +
            Self::ContinuousBackupsUnavailableError(_inner) =>
         410  +
            /* OperationErrorGenerator.kt:283 */
         411  +
            {
         412  +
                ::std::option::Option::Some(_inner)
         413  +
            }
         414  +
            ,
         415  +
            /* OperationErrorGenerator.kt:321 */
         416  +
            Self::InternalServerError(_inner) =>
         417  +
            /* OperationErrorGenerator.kt:283 */
         418  +
            {
         419  +
                ::std::option::Option::Some(_inner)
         420  +
            }
         421  +
            ,
         422  +
            /* OperationErrorGenerator.kt:321 */
         423  +
            Self::InvalidEndpointError(_inner) =>
         424  +
            /* OperationErrorGenerator.kt:283 */
         425  +
            {
         426  +
                ::std::option::Option::Some(_inner)
         427  +
            }
         428  +
            ,
         429  +
            /* OperationErrorGenerator.kt:321 */
         430  +
            Self::LimitExceededError(_inner) =>
         431  +
            /* OperationErrorGenerator.kt:283 */
         432  +
            {
         433  +
                ::std::option::Option::Some(_inner)
         434  +
            }
         435  +
            ,
         436  +
            /* OperationErrorGenerator.kt:321 */
         437  +
            Self::TableInUseError(_inner) =>
         438  +
            /* OperationErrorGenerator.kt:283 */
         439  +
            {
         440  +
                ::std::option::Option::Some(_inner)
         441  +
            }
         442  +
            ,
         443  +
            /* OperationErrorGenerator.kt:321 */
         444  +
            Self::TableNotFoundError(_inner) =>
         445  +
            /* OperationErrorGenerator.kt:283 */
         446  +
            {
         447  +
                ::std::option::Option::Some(_inner)
         448  +
            }
         449  +
            ,
         450  +
            /* OperationErrorGenerator.kt:326 */
         451  +
            Self::Unhandled(_inner) => {
         452  +
                /* OperationErrorGenerator.kt:279 */
         453  +
                ::std::option::Option::Some(&*_inner.source)
         454  +
                /* OperationErrorGenerator.kt:326 */
         455  +
            } /* OperationErrorGenerator.kt:318 */
  338    456   
        }
         457  +
        /* OperationErrorGenerator.kt:270 */
  339    458   
    }
         459  +
    /* OperationErrorGenerator.kt:269 */
  340    460   
}
         461  +
/* OperationErrorGenerator.kt:133 */
  341    462   
impl ::std::fmt::Display for CreateBackupError {
         463  +
    /* OperationErrorGenerator.kt:134 */
  342    464   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         465  +
        /* OperationErrorGenerator.kt:318 */
  343    466   
        match self {
  344         -
            Self::BackupInUseError(_inner) => _inner.fmt(f),
  345         -
            Self::ContinuousBackupsUnavailableError(_inner) => _inner.fmt(f),
  346         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  347         -
            Self::InvalidEndpointError(_inner) => _inner.fmt(f),
  348         -
            Self::LimitExceededError(_inner) => _inner.fmt(f),
  349         -
            Self::TableInUseError(_inner) => _inner.fmt(f),
  350         -
            Self::TableNotFoundError(_inner) => _inner.fmt(f),
         467  +
            /* OperationErrorGenerator.kt:321 */
         468  +
            Self::BackupInUseError(_inner) =>
         469  +
            /* OperationErrorGenerator.kt:151 */
         470  +
            {
         471  +
                _inner.fmt(f)
         472  +
            }
         473  +
            ,
         474  +
            /* OperationErrorGenerator.kt:321 */
         475  +
            Self::ContinuousBackupsUnavailableError(_inner) =>
         476  +
            /* OperationErrorGenerator.kt:151 */
         477  +
            {
         478  +
                _inner.fmt(f)
         479  +
            }
         480  +
            ,
         481  +
            /* OperationErrorGenerator.kt:321 */
         482  +
            Self::InternalServerError(_inner) =>
         483  +
            /* OperationErrorGenerator.kt:151 */
         484  +
            {
         485  +
                _inner.fmt(f)
         486  +
            }
         487  +
            ,
         488  +
            /* OperationErrorGenerator.kt:321 */
         489  +
            Self::InvalidEndpointError(_inner) =>
         490  +
            /* OperationErrorGenerator.kt:151 */
         491  +
            {
         492  +
                _inner.fmt(f)
         493  +
            }
         494  +
            ,
         495  +
            /* OperationErrorGenerator.kt:321 */
         496  +
            Self::LimitExceededError(_inner) =>
         497  +
            /* OperationErrorGenerator.kt:151 */
         498  +
            {
         499  +
                _inner.fmt(f)
         500  +
            }
         501  +
            ,
         502  +
            /* OperationErrorGenerator.kt:321 */
         503  +
            Self::TableInUseError(_inner) =>
         504  +
            /* OperationErrorGenerator.kt:151 */
         505  +
            {
         506  +
                _inner.fmt(f)
         507  +
            }
         508  +
            ,
         509  +
            /* OperationErrorGenerator.kt:321 */
         510  +
            Self::TableNotFoundError(_inner) =>
         511  +
            /* OperationErrorGenerator.kt:151 */
         512  +
            {
         513  +
                _inner.fmt(f)
         514  +
            }
         515  +
            ,
         516  +
            /* OperationErrorGenerator.kt:326 */
  351    517   
            Self::Unhandled(_inner) => {
         518  +
                /* OperationErrorGenerator.kt:139 */
  352    519   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  353    520   
                    write!(f, "unhandled error ({code})")
  354    521   
                } else {
  355    522   
                    f.write_str("unhandled error")
  356    523   
                }
  357         -
            }
         524  +
                /* OperationErrorGenerator.kt:326 */
         525  +
            } /* OperationErrorGenerator.kt:318 */
  358    526   
        }
         527  +
        /* OperationErrorGenerator.kt:134 */
  359    528   
    }
         529  +
    /* OperationErrorGenerator.kt:133 */
  360    530   
}
         531  +
/* OperationErrorGenerator.kt:182 */
  361    532   
impl ::aws_smithy_types::retry::ProvideErrorKind for CreateBackupError {
         533  +
    /* OperationErrorGenerator.kt:186 */
  362    534   
    fn code(&self) -> ::std::option::Option<&str> {
         535  +
        /* OperationErrorGenerator.kt:187 */
  363    536   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         537  +
        /* OperationErrorGenerator.kt:186 */
  364    538   
    }
         539  +
    /* OperationErrorGenerator.kt:190 */
  365    540   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         541  +
        /* OperationErrorGenerator.kt:197 */
  366    542   
        ::std::option::Option::None
         543  +
        /* OperationErrorGenerator.kt:190 */
  367    544   
    }
         545  +
    /* OperationErrorGenerator.kt:182 */
  368    546   
}
         547  +
/* OperationErrorGenerator.kt:163 */
  369    548   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateBackupError {
         549  +
    /* OperationErrorGenerator.kt:164 */
  370    550   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         551  +
        /* OperationErrorGenerator.kt:318 */
  371    552   
        match self {
  372         -
            Self::BackupInUseError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  373         -
            Self::ContinuousBackupsUnavailableError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  374         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  375         -
            Self::InvalidEndpointError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  376         -
            Self::LimitExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  377         -
            Self::TableInUseError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  378         -
            Self::TableNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  379         -
            Self::Unhandled(_inner) => &_inner.meta,
         553  +
            /* OperationErrorGenerator.kt:321 */
         554  +
            Self::BackupInUseError(_inner) =>
         555  +
            /* OperationErrorGenerator.kt:169 */
         556  +
            {
         557  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         558  +
            }
         559  +
            ,
         560  +
            /* OperationErrorGenerator.kt:321 */
         561  +
            Self::ContinuousBackupsUnavailableError(_inner) =>
         562  +
            /* OperationErrorGenerator.kt:169 */
         563  +
            {
         564  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         565  +
            }
         566  +
            ,
         567  +
            /* OperationErrorGenerator.kt:321 */
         568  +
            Self::InternalServerError(_inner) =>
         569  +
            /* OperationErrorGenerator.kt:169 */
         570  +
            {
         571  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         572  +
            }
         573  +
            ,
         574  +
            /* OperationErrorGenerator.kt:321 */
         575  +
            Self::InvalidEndpointError(_inner) =>
         576  +
            /* OperationErrorGenerator.kt:169 */
         577  +
            {
         578  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         579  +
            }
         580  +
            ,
         581  +
            /* OperationErrorGenerator.kt:321 */
         582  +
            Self::LimitExceededError(_inner) =>
         583  +
            /* OperationErrorGenerator.kt:169 */
         584  +
            {
         585  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         586  +
            }
         587  +
            ,
         588  +
            /* OperationErrorGenerator.kt:321 */
         589  +
            Self::TableInUseError(_inner) =>
         590  +
            /* OperationErrorGenerator.kt:169 */
         591  +
            {
         592  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         593  +
            }
         594  +
            ,
         595  +
            /* OperationErrorGenerator.kt:321 */
         596  +
            Self::TableNotFoundError(_inner) =>
         597  +
            /* OperationErrorGenerator.kt:169 */
         598  +
            {
         599  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         600  +
            }
         601  +
            ,
         602  +
            /* OperationErrorGenerator.kt:326 */
         603  +
            Self::Unhandled(_inner) => {
         604  +
                /* OperationErrorGenerator.kt:168 */
         605  +
                &_inner.meta
         606  +
                /* OperationErrorGenerator.kt:326 */
         607  +
            } /* OperationErrorGenerator.kt:318 */
  380    608   
        }
         609  +
        /* OperationErrorGenerator.kt:164 */
  381    610   
    }
         611  +
    /* OperationErrorGenerator.kt:163 */
  382    612   
}
         613  +
/* OperationErrorGenerator.kt:109 */
  383    614   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateBackupError {
         615  +
    /* OperationErrorGenerator.kt:110 */
  384    616   
    fn create_unhandled_error(
  385    617   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  386    618   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  387    619   
    ) -> Self {
         620  +
        /* OperationErrorGenerator.kt:121 */
  388    621   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  389    622   
            source,
  390    623   
            meta: meta.unwrap_or_default(),
  391    624   
        })
         625  +
        /* OperationErrorGenerator.kt:110 */
  392    626   
    }
         627  +
    /* OperationErrorGenerator.kt:109 */
  393    628   
}
  394    629   
         630  +
/* CodegenDelegator.kt:255 */
  395    631   
pub use crate::operation::create_backup::_create_backup_output::CreateBackupOutput;
  396    632   
         633  +
/* CodegenDelegator.kt:255 */
  397    634   
pub use crate::operation::create_backup::_create_backup_input::CreateBackupInput;
  398    635   
         636  +
/* RustModule.kt:172 */
  399    637   
mod _create_backup_input;
  400    638   
         639  +
/* RustModule.kt:172 */
  401    640   
mod _create_backup_output;
  402    641   
  403         -
/// Builders
         642  +
/// /* CodegenDelegator.kt:51 */Builders
  404    643   
pub mod builders;

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

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

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

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

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

@@ -1,1 +155,173 @@
    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::create_backup::_create_backup_output::CreateBackupOutputBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::operation::create_backup::_create_backup_input::CreateBackupInputBuilder;
    5      7   
           8  +
/* FluentBuilderGenerator.kt:408 */
    6      9   
impl crate::operation::create_backup::builders::CreateBackupInputBuilder {
    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::create_backup::CreateBackupOutput,
   13     16   
        ::aws_smithy_runtime_api::client::result::SdkError<
   14     17   
            crate::operation::create_backup::CreateBackupError,
   15     18   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   16     19   
        >,
   17     20   
    > {
   18     21   
        let mut fluent_builder = client.create_backup();
   19     22   
        fluent_builder.inner = self;
   20     23   
        fluent_builder.send().await
   21     24   
    }
   22     25   
}
   23         -
/// Fluent builder constructing a request to `CreateBackup`.
          26  +
/// /* FluentBuilderGenerator.kt:129 */Fluent builder constructing a request to `CreateBackup`.
   24     27   
///
   25         -
/// <p>Creates a backup for an existing table.</p>
          28  +
/// /* FluentBuilderGenerator.kt:130 */<p>Creates a backup for an existing table.</p>
   26     29   
/// <p>Each time you create an on-demand backup, the entire table data is backed up. There is no limit to the number of on-demand backups that can be taken.</p>
   27     30   
/// <p>When you create an on-demand backup, a time marker of the request is cataloged, and the backup is created asynchronously, by applying all changes until the time of the request to the last full table snapshot. Backup requests are processed instantaneously and become available for restore within minutes.</p>
   28     31   
/// <p>You can call <code>CreateBackup</code> at a maximum rate of 50 times per second.</p>
   29     32   
/// <p>All backups in DynamoDB work without consuming any provisioned throughput on the table.</p>
   30     33   
/// <p>If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed to contain all data committed to the table up to 14:24:00, and data committed after 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 and 14:26:00. On-demand backup does not support causal consistency.</p>
   31     34   
/// <p>Along with data, the following are also included on the backups:</p>
   32     35   
/// <ul>
   33     36   
/// <li>
   34     37   
/// <p>Global secondary indexes (GSIs)</p></li>
   35     38   
/// <li>
   36     39   
/// <p>Local secondary indexes (LSIs)</p></li>
   37     40   
/// <li>
   38     41   
/// <p>Streams</p></li>
   39     42   
/// <li>
   40     43   
/// <p>Provisioned read and write capacity</p></li>
   41     44   
/// </ul>
          45  +
/* RustType.kt:516 */
   42     46   
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          47  +
/* FluentBuilderGenerator.kt:270 */
   43     48   
pub struct CreateBackupFluentBuilder {
   44     49   
    handle: ::std::sync::Arc<crate::client::Handle>,
   45     50   
    inner: crate::operation::create_backup::builders::CreateBackupInputBuilder,
   46     51   
    config_override: ::std::option::Option<crate::config::Builder>,
   47     52   
}
          53  +
/* FluentBuilderGenerator.kt:381 */
   48     54   
impl
   49     55   
    crate::client::customize::internal::CustomizableSend<
   50     56   
        crate::operation::create_backup::CreateBackupOutput,
   51     57   
        crate::operation::create_backup::CreateBackupError,
   52     58   
    > for CreateBackupFluentBuilder
   53     59   
{
   54     60   
    fn send(
   55     61   
        self,
   56     62   
        config_override: crate::config::Builder,
   57     63   
    ) -> crate::client::customize::internal::BoxFuture<
   58     64   
        crate::client::customize::internal::SendResult<
   59     65   
            crate::operation::create_backup::CreateBackupOutput,
   60     66   
            crate::operation::create_backup::CreateBackupError,
   61     67   
        >,
   62     68   
    > {
   63     69   
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
   64     70   
    }
   65     71   
}
          72  +
/* FluentBuilderGenerator.kt:282 */
   66     73   
impl CreateBackupFluentBuilder {
          74  +
    /* FluentBuilderGenerator.kt:288 */
   67     75   
    /// Creates a new `CreateBackupFluentBuilder`.
   68     76   
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
   69     77   
        Self {
   70     78   
            handle,
   71     79   
            inner: ::std::default::Default::default(),
   72     80   
            config_override: ::std::option::Option::None,
   73     81   
        }
   74     82   
    }
          83  +
    /* FluentBuilderGenerator.kt:301 */
   75     84   
    /// Access the CreateBackup as a reference.
   76     85   
    pub fn as_input(&self) -> &crate::operation::create_backup::builders::CreateBackupInputBuilder {
   77     86   
        &self.inner
   78     87   
    }
          88  +
    /* FluentBuilderGenerator.kt:145 */
   79     89   
    /// Sends the request and returns the response.
   80     90   
    ///
   81     91   
    /// If an error occurs, an `SdkError` will be returned with additional details that
   82     92   
    /// can be matched against.
   83     93   
    ///
   84     94   
    /// By default, any retryable failures will be retried twice. Retry behavior
   85     95   
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
   86     96   
    /// set when configuring the client.
   87     97   
    pub async fn send(
   88     98   
        self,
   89     99   
    ) -> ::std::result::Result<
   90    100   
        crate::operation::create_backup::CreateBackupOutput,
   91    101   
        ::aws_smithy_runtime_api::client::result::SdkError<
   92    102   
            crate::operation::create_backup::CreateBackupError,
   93    103   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   94    104   
        >,
   95    105   
    > {
   96    106   
        let input = self
   97    107   
            .inner
   98    108   
            .build()
   99    109   
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
  100    110   
        let runtime_plugins = crate::operation::create_backup::CreateBackup::operation_runtime_plugins(
  101    111   
            self.handle.runtime_plugins.clone(),
  102    112   
            &self.handle.conf,
  103    113   
            self.config_override,
  104    114   
        );
  105    115   
        crate::operation::create_backup::CreateBackup::orchestrate(&runtime_plugins, input).await
  106    116   
    }
  107    117   
  108    118   
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
  109    119   
    pub fn customize(
  110    120   
        self,
  111    121   
    ) -> crate::client::customize::CustomizableOperation<
  112    122   
        crate::operation::create_backup::CreateBackupOutput,
  113    123   
        crate::operation::create_backup::CreateBackupError,
  114    124   
        Self,
  115    125   
    > {
  116    126   
        crate::client::customize::CustomizableOperation::new(self)
  117    127   
    }
         128  +
    /* FluentBuilderGenerator.kt:315 */
  118    129   
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
  119    130   
        self.set_config_override(::std::option::Option::Some(config_override.into()));
  120    131   
        self
  121    132   
    }
  122    133   
  123    134   
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
  124    135   
        self.config_override = config_override;
  125    136   
        self
  126    137   
    }
  127         -
    /// <p>The name of the table.</p>
         138  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The name of the table.</p>
         139  +
    /* FluentBuilderGenerator.kt:500 */
  128    140   
    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  129    141   
        self.inner = self.inner.table_name(input.into());
  130    142   
        self
  131    143   
    }
  132         -
    /// <p>The name of the table.</p>
         144  +
    /// /* FluentBuilderGenerator.kt:498 */<p>The name of the table.</p>
         145  +
    /* FluentBuilderGenerator.kt:500 */
  133    146   
    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  134    147   
        self.inner = self.inner.set_table_name(input);
  135    148   
        self
  136    149   
    }
  137         -
    /// <p>The name of the table.</p>
         150  +
    /// /* FluentBuilderGenerator.kt:518 */<p>The name of the table.</p>
         151  +
    /* FluentBuilderGenerator.kt:520 */
  138    152   
    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
  139    153   
        self.inner.get_table_name()
  140    154   
    }
  141         -
    /// <p>Specified name for the backup.</p>
         155  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Specified name for the backup.</p>
         156  +
    /* FluentBuilderGenerator.kt:500 */
  142    157   
    pub fn backup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
  143    158   
        self.inner = self.inner.backup_name(input.into());
  144    159   
        self
  145    160   
    }
  146         -
    /// <p>Specified name for the backup.</p>
         161  +
    /// /* FluentBuilderGenerator.kt:498 */<p>Specified name for the backup.</p>
         162  +
    /* FluentBuilderGenerator.kt:500 */
  147    163   
    pub fn set_backup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  148    164   
        self.inner = self.inner.set_backup_name(input);
  149    165   
        self
  150    166   
    }
  151         -
    /// <p>Specified name for the backup.</p>
         167  +
    /// /* FluentBuilderGenerator.kt:518 */<p>Specified name for the backup.</p>
         168  +
    /* FluentBuilderGenerator.kt:520 */
  152    169   
    pub fn get_backup_name(&self) -> &::std::option::Option<::std::string::String> {
  153    170   
        self.inner.get_backup_name()
  154    171   
    }
         172  +
    /* FluentBuilderGenerator.kt:282 */
  155    173   
}

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

@@ -1,1 +40,49 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* OperationGenerator.kt:77 */
    2      3   
/// Orchestration and serialization glue logic for `CreateGlobalTable`.
           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 CreateGlobalTable;
          10  +
/* OperationGenerator.kt:85 */
    6     11   
impl CreateGlobalTable {
    7         -
    /// Creates a new `CreateGlobalTable`
          12  +
    /// /* OperationGenerator.kt:86 */Creates a new `CreateGlobalTable`
          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::create_global_table::CreateGlobalTableInput,
   14     23   
    ) -> ::std::result::Result<
   15     24   
        crate::operation::create_global_table::CreateGlobalTableOutput,
   16     25   
        ::aws_smithy_runtime_api::client::result::SdkError<
   17     26   
            crate::operation::create_global_table::CreateGlobalTableError,
   18     27   
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
   19     28   
        >,
   20     29   
    > {
@@ -57,66 +387,579 @@
   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 CreateGlobalTable {
   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("CreateGlobalTable");
   91    102   
   92    103   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
   93    104   
            CreateGlobalTableRequestSerializer,
   94    105   
        ));
   95    106   
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
   96    107   
            CreateGlobalTableResponseDeserializer,
   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   
            "CreateGlobalTable",
  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("CreateGlobalTable")
  117    128   
            .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
  118    129   
            .with_interceptor(CreateGlobalTableEndpointParamsInterceptor)
  119    130   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
  120    131   
                crate::operation::create_global_table::CreateGlobalTableError,
  121    132   
            >::new())
  122    133   
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
  123    134   
                crate::operation::create_global_table::CreateGlobalTableError,
  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 CreateGlobalTableResponseDeserializer;
  132    144   
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateGlobalTableResponseDeserializer {
  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_create_global_table::de_create_global_table_http_error(status, headers, body)
  145    157   
        } else {
  146    158   
            crate::protocol_serde::shape_create_global_table::de_create_global_table_http_response(status, headers, body)
  147    159   
        };
  148    160   
        crate::protocol_serde::type_erase_result(parse_result)
  149    161   
    }
  150    162   
}
         163  +
/* RequestSerializerGenerator.kt:67 */
  151    164   
#[derive(Debug)]
  152    165   
struct CreateGlobalTableRequestSerializer;
  153    166   
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateGlobalTableRequestSerializer {
  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::create_global_table::CreateGlobalTableInput>()
  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::create_global_table::CreateGlobalTableInput,
  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::create_global_table::CreateGlobalTableInput,
  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.CreateGlobalTable",
  191    204   
            );
  192    205   
            builder
  193    206   
        };
  194    207   
        let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_create_global_table::ser_create_global_table_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 CreateGlobalTableEndpointParamsInterceptor;
  204    218   
  205    219   
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateGlobalTableEndpointParamsInterceptor {
  206    220   
    fn name(&self) -> &'static str {
  207    221   
        "CreateGlobalTableEndpointParamsInterceptor"
  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::<CreateGlobalTableInput>()
  223    237   
            .ok_or("failed to downcast to CreateGlobalTableInput")?;
  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 `CreateGlobalTableError` operation.
         253  +
/* RustType.kt:516 */
  238    254   
#[non_exhaustive]
         255  +
/* RustType.kt:516 */
  239    256   
#[derive(::std::fmt::Debug)]
  240         -
pub enum CreateGlobalTableError {
  241         -
    /// <p>The specified global table already exists.</p>
         257  +
pub /* OperationErrorGenerator.kt:81 */ enum CreateGlobalTableError {
         258  +
    /// /* OperationErrorGenerator.kt:83 */<p>The specified global table already exists.</p>
         259  +
    /* OperationErrorGenerator.kt:86 */
  242    260   
    GlobalTableAlreadyExistsError(crate::types::error::GlobalTableAlreadyExistsError),
  243         -
    /// <p>An error occurred on the server side.</p>
         261  +
    /// /* OperationErrorGenerator.kt:83 */<p>An error occurred on the server side.</p>
         262  +
    /* OperationErrorGenerator.kt:86 */
  244    263   
    InternalServerError(crate::types::error::InternalServerError),
         264  +
    /* OperationErrorGenerator.kt:83 */
  245    265   
    #[allow(missing_docs)] // documentation missing in model
         266  +
    /* OperationErrorGenerator.kt:86 */
  246    267   
    InvalidEndpointError(crate::types::error::InvalidEndpointError),
  247         -
    /// <p>There is no limit to the number of daily on-demand backups that can be taken.</p>
         268  +
    /// /* OperationErrorGenerator.kt:83 */<p>There is no limit to the number of daily on-demand backups that can be taken.</p>
  248    269   
    /// <p>Up to 50 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>.</p>
  249    270   
    /// <p>The only exception is when you are creating a table with one or more secondary indexes. You can have up to 25 such requests running at a time; however, if the table or index specifications are complex, DynamoDB might temporarily reduce the number of concurrent operations.</p>
  250    271   
    /// <p>There is a soft account quota of 256 tables.</p>
         272  +
    /* OperationErrorGenerator.kt:86 */
  251    273   
    LimitExceededError(crate::types::error::LimitExceededError),
  252         -
    /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
         274  +
    /// /* OperationErrorGenerator.kt:83 */<p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account.</p>
         275  +
    /* OperationErrorGenerator.kt:86 */
  253    276   
    TableNotFoundError(crate::types::error::TableNotFoundError),
         277  +
    /* OperationErrorGenerator.kt:88 */
  254    278   
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
  255    279   
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
  256    280   
    variable wildcard pattern and check `.code()`:
  257    281   
     \
  258    282   
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
  259    283   
     \
  260    284   
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateGlobalTableError) for what information is available for the error.")]
  261    285   
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         286  +
    /* OperationErrorGenerator.kt:81 */
  262    287   
}
         288  +
/* OperationErrorGenerator.kt:218 */
  263    289   
impl CreateGlobalTableError {
         290  +
    /* OperationErrorGenerator.kt:219 */
  264    291   
    /// Creates the `CreateGlobalTableError::Unhandled` variant from any error type.
  265    292   
    pub fn unhandled(
  266    293   
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
  267    294   
    ) -> Self {
  268    295   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  269    296   
            source: err.into(),
  270    297   
            meta: ::std::default::Default::default(),
  271    298   
        })
  272    299   
    }
  273    300   
  274    301   
    /// Creates the `CreateGlobalTableError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
  275    302   
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
  276    303   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  277    304   
            source: err.clone().into(),
  278    305   
            meta: err,
  279    306   
        })
  280    307   
    }
  281         -
    ///
         308  +
    /// /* OperationErrorGenerator.kt:236 */
  282    309   
    /// Returns error metadata, which includes the error code, message,
  283    310   
    /// request ID, and potentially additional information.
  284    311   
    ///
         312  +
    /* OperationErrorGenerator.kt:242 */
  285    313   
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         314  +
        /* OperationErrorGenerator.kt:243 */
  286    315   
        match self {
         316  +
            /* OperationErrorGenerator.kt:246 */
  287    317   
            Self::GlobalTableAlreadyExistsError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         318  +
            /* OperationErrorGenerator.kt:246 */
  288    319   
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         320  +
            /* OperationErrorGenerator.kt:246 */
  289    321   
            Self::InvalidEndpointError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         322  +
            /* OperationErrorGenerator.kt:246 */
  290    323   
            Self::LimitExceededError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         324  +
            /* OperationErrorGenerator.kt:246 */
  291    325   
            Self::TableNotFoundError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
  292         -
            Self::Unhandled(e) => &e.meta,
         326  +
            /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
         327  +
            /* OperationErrorGenerator.kt:243 */
  293    328   
        }
         329  +
        /* OperationErrorGenerator.kt:242 */
  294    330   
    }
         331  +
    /* OperationErrorGenerator.kt:257 */
  295    332   
    /// Returns `true` if the error kind is `CreateGlobalTableError::GlobalTableAlreadyExistsError`.
         333  +
    /* OperationErrorGenerator.kt:258 */
  296    334   
    pub fn is_global_table_already_exists_error(&self) -> bool {
         335  +
        /* OperationErrorGenerator.kt:259 */
  297    336   
        matches!(self, Self::GlobalTableAlreadyExistsError(_))
         337  +
        /* OperationErrorGenerator.kt:258 */
  298    338   
    }
         339  +
    /* OperationErrorGenerator.kt:257 */
  299    340   
    /// Returns `true` if the error kind is `CreateGlobalTableError::InternalServerError`.
         341  +
    /* OperationErrorGenerator.kt:258 */
  300    342   
    pub fn is_internal_server_error(&self) -> bool {
         343  +
        /* OperationErrorGenerator.kt:259 */
  301    344   
        matches!(self, Self::InternalServerError(_))
         345  +
        /* OperationErrorGenerator.kt:258 */
  302    346   
    }
         347  +
    /* OperationErrorGenerator.kt:257 */
  303    348   
    /// Returns `true` if the error kind is `CreateGlobalTableError::InvalidEndpointError`.
         349  +
    /* OperationErrorGenerator.kt:258 */
  304    350   
    pub fn is_invalid_endpoint_error(&self) -> bool {
         351  +
        /* OperationErrorGenerator.kt:259 */
  305    352   
        matches!(self, Self::InvalidEndpointError(_))
         353  +
        /* OperationErrorGenerator.kt:258 */
  306    354   
    }
         355  +
    /* OperationErrorGenerator.kt:257 */
  307    356   
    /// Returns `true` if the error kind is `CreateGlobalTableError::LimitExceededError`.
         357  +
    /* OperationErrorGenerator.kt:258 */
  308    358   
    pub fn is_limit_exceeded_error(&self) -> bool {
         359  +
        /* OperationErrorGenerator.kt:259 */
  309    360   
        matches!(self, Self::LimitExceededError(_))
         361  +
        /* OperationErrorGenerator.kt:258 */
  310    362   
    }
         363  +
    /* OperationErrorGenerator.kt:257 */
  311    364   
    /// Returns `true` if the error kind is `CreateGlobalTableError::TableNotFoundError`.
         365  +
    /* OperationErrorGenerator.kt:258 */
  312    366   
    pub fn is_table_not_found_error(&self) -> bool {
         367  +
        /* OperationErrorGenerator.kt:259 */
  313    368   
        matches!(self, Self::TableNotFoundError(_))
         369  +
        /* OperationErrorGenerator.kt:258 */
  314    370   
    }
         371  +
    /* OperationErrorGenerator.kt:218 */
  315    372   
}
         373  +
/* OperationErrorGenerator.kt:269 */
  316    374   
impl ::std::error::Error for CreateGlobalTableError {
         375  +
    /* OperationErrorGenerator.kt:270 */
  317    376   
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         377  +
        /* OperationErrorGenerator.kt:318 */
  318    378   
        match self {
  319         -
            Self::GlobalTableAlreadyExistsError(_inner) => ::std::option::Option::Some(_inner),
  320         -
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
  321         -
            Self::InvalidEndpointError(_inner) => ::std::option::Option::Some(_inner),
  322         -
            Self::LimitExceededError(_inner) => ::std::option::Option::Some(_inner),
  323         -
            Self::TableNotFoundError(_inner) => ::std::option::Option::Some(_inner),
  324         -
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         379  +
            /* OperationErrorGenerator.kt:321 */
         380  +
            Self::GlobalTableAlreadyExistsError(_inner) =>
         381  +
            /* OperationErrorGenerator.kt:283 */
         382  +
            {
         383  +
                ::std::option::Option::Some(_inner)
         384  +
            }
         385  +
            ,
         386  +
            /* OperationErrorGenerator.kt:321 */
         387  +
            Self::InternalServerError(_inner) =>
         388  +
            /* OperationErrorGenerator.kt:283 */
         389  +
            {
         390  +
                ::std::option::Option::Some(_inner)
         391  +
            }
         392  +
            ,
         393  +
            /* OperationErrorGenerator.kt:321 */
         394  +
            Self::InvalidEndpointError(_inner) =>
         395  +
            /* OperationErrorGenerator.kt:283 */
         396  +
            {
         397  +
                ::std::option::Option::Some(_inner)
         398  +
            }
         399  +
            ,
         400  +
            /* OperationErrorGenerator.kt:321 */
         401  +
            Self::LimitExceededError(_inner) =>
         402  +
            /* OperationErrorGenerator.kt:283 */
         403  +
            {
         404  +
                ::std::option::Option::Some(_inner)
         405  +
            }
         406  +
            ,
         407  +
            /* OperationErrorGenerator.kt:321 */
         408  +
            Self::TableNotFoundError(_inner) =>
         409  +
            /* OperationErrorGenerator.kt:283 */
         410  +
            {
         411  +
                ::std::option::Option::Some(_inner)
         412  +
            }
         413  +
            ,
         414  +
            /* OperationErrorGenerator.kt:326 */
         415  +
            Self::Unhandled(_inner) => {
         416  +
                /* OperationErrorGenerator.kt:279 */
         417  +
                ::std::option::Option::Some(&*_inner.source)
         418  +
                /* OperationErrorGenerator.kt:326 */
         419  +
            } /* OperationErrorGenerator.kt:318 */
  325    420   
        }
         421  +
        /* OperationErrorGenerator.kt:270 */
  326    422   
    }
         423  +
    /* OperationErrorGenerator.kt:269 */
  327    424   
}
         425  +
/* OperationErrorGenerator.kt:133 */
  328    426   
impl ::std::fmt::Display for CreateGlobalTableError {
         427  +
    /* OperationErrorGenerator.kt:134 */
  329    428   
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         429  +
        /* OperationErrorGenerator.kt:318 */
  330    430   
        match self {
  331         -
            Self::GlobalTableAlreadyExistsError(_inner) => _inner.fmt(f),
  332         -
            Self::InternalServerError(_inner) => _inner.fmt(f),
  333         -
            Self::InvalidEndpointError(_inner) => _inner.fmt(f),
  334         -
            Self::LimitExceededError(_inner) => _inner.fmt(f),
  335         -
            Self::TableNotFoundError(_inner) => _inner.fmt(f),
         431  +
            /* OperationErrorGenerator.kt:321 */
         432  +
            Self::GlobalTableAlreadyExistsError(_inner) =>
         433  +
            /* OperationErrorGenerator.kt:151 */
         434  +
            {
         435  +
                _inner.fmt(f)
         436  +
            }
         437  +
            ,
         438  +
            /* OperationErrorGenerator.kt:321 */
         439  +
            Self::InternalServerError(_inner) =>
         440  +
            /* OperationErrorGenerator.kt:151 */
         441  +
            {
         442  +
                _inner.fmt(f)
         443  +
            }
         444  +
            ,
         445  +
            /* OperationErrorGenerator.kt:321 */
         446  +
            Self::InvalidEndpointError(_inner) =>
         447  +
            /* OperationErrorGenerator.kt:151 */
         448  +
            {
         449  +
                _inner.fmt(f)
         450  +
            }
         451  +
            ,
         452  +
            /* OperationErrorGenerator.kt:321 */
         453  +
            Self::LimitExceededError(_inner) =>
         454  +
            /* OperationErrorGenerator.kt:151 */
         455  +
            {
         456  +
                _inner.fmt(f)
         457  +
            }
         458  +
            ,
         459  +
            /* OperationErrorGenerator.kt:321 */
         460  +
            Self::TableNotFoundError(_inner) =>
         461  +
            /* OperationErrorGenerator.kt:151 */
         462  +
            {
         463  +
                _inner.fmt(f)
         464  +
            }
         465  +
            ,
         466  +
            /* OperationErrorGenerator.kt:326 */
  336    467   
            Self::Unhandled(_inner) => {
         468  +
                /* OperationErrorGenerator.kt:139 */
  337    469   
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
  338    470   
                    write!(f, "unhandled error ({code})")
  339    471   
                } else {
  340    472   
                    f.write_str("unhandled error")
  341    473   
                }
  342         -
            }
         474  +
                /* OperationErrorGenerator.kt:326 */
         475  +
            } /* OperationErrorGenerator.kt:318 */
  343    476   
        }
         477  +
        /* OperationErrorGenerator.kt:134 */
  344    478   
    }
         479  +
    /* OperationErrorGenerator.kt:133 */
  345    480   
}
         481  +
/* OperationErrorGenerator.kt:182 */
  346    482   
impl ::aws_smithy_types::retry::ProvideErrorKind for CreateGlobalTableError {
         483  +
    /* OperationErrorGenerator.kt:186 */
  347    484   
    fn code(&self) -> ::std::option::Option<&str> {
         485  +
        /* OperationErrorGenerator.kt:187 */
  348    486   
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         487  +
        /* OperationErrorGenerator.kt:186 */
  349    488   
    }
         489  +
    /* OperationErrorGenerator.kt:190 */
  350    490   
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         491  +
        /* OperationErrorGenerator.kt:197 */
  351    492   
        ::std::option::Option::None
         493  +
        /* OperationErrorGenerator.kt:190 */
  352    494   
    }
         495  +
    /* OperationErrorGenerator.kt:182 */
  353    496   
}
         497  +
/* OperationErrorGenerator.kt:163 */
  354    498   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateGlobalTableError {
         499  +
    /* OperationErrorGenerator.kt:164 */
  355    500   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         501  +
        /* OperationErrorGenerator.kt:318 */
  356    502   
        match self {
  357         -
            Self::GlobalTableAlreadyExistsError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  358         -
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  359         -
            Self::InvalidEndpointError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  360         -
            Self::LimitExceededError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  361         -
            Self::TableNotFoundError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
  362         -
            Self::Unhandled(_inner) => &_inner.meta,
         503  +
            /* OperationErrorGenerator.kt:321 */
         504  +
            Self::GlobalTableAlreadyExistsError(_inner) =>
         505  +
            /* OperationErrorGenerator.kt:169 */
         506  +
            {
         507  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         508  +
            }
         509  +
            ,
         510  +
            /* OperationErrorGenerator.kt:321 */
         511  +
            Self::InternalServerError(_inner) =>
         512  +
            /* OperationErrorGenerator.kt:169 */
         513  +
            {
         514  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         515  +
            }
         516  +
            ,
         517  +
            /* OperationErrorGenerator.kt:321 */
         518  +
            Self::InvalidEndpointError(_inner) =>
         519  +
            /* OperationErrorGenerator.kt:169 */
         520  +
            {
         521  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         522  +
            }
         523  +
            ,
         524  +
            /* OperationErrorGenerator.kt:321 */
         525  +
            Self::LimitExceededError(_inner) =>
         526  +
            /* OperationErrorGenerator.kt:169 */
         527  +
            {
         528  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         529  +
            }
         530  +
            ,
         531  +
            /* OperationErrorGenerator.kt:321 */
         532  +
            Self::TableNotFoundError(_inner) =>
         533  +
            /* OperationErrorGenerator.kt:169 */
         534  +
            {
         535  +
                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
         536  +
            }
         537  +
            ,
         538  +
            /* OperationErrorGenerator.kt:326 */
         539  +
            Self::Unhandled(_inner) => {
         540  +
                /* OperationErrorGenerator.kt:168 */
         541  +
                &_inner.meta
         542  +
                /* OperationErrorGenerator.kt:326 */
         543  +
            } /* OperationErrorGenerator.kt:318 */
  363    544   
        }
         545  +
        /* OperationErrorGenerator.kt:164 */
  364    546   
    }
         547  +
    /* OperationErrorGenerator.kt:163 */
  365    548   
}
         549  +
/* OperationErrorGenerator.kt:109 */
  366    550   
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateGlobalTableError {
         551  +
    /* OperationErrorGenerator.kt:110 */
  367    552   
    fn create_unhandled_error(
  368    553   
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
  369    554   
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
  370    555   
    ) -> Self {
         556  +
        /* OperationErrorGenerator.kt:121 */
  371    557   
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
  372    558   
            source,
  373    559   
            meta: meta.unwrap_or_default(),
  374    560   
        })
         561  +
        /* OperationErrorGenerator.kt:110 */
  375    562   
    }
         563  +
    /* OperationErrorGenerator.kt:109 */
  376    564   
}
  377    565   
         566  +
/* CodegenDelegator.kt:255 */
  378    567   
pub use crate::operation::create_global_table::_create_global_table_output::CreateGlobalTableOutput;
  379    568   
         569  +
/* CodegenDelegator.kt:255 */
  380    570   
pub use crate::operation::create_global_table::_create_global_table_input::CreateGlobalTableInput;
  381    571   
         572  +
/* RustModule.kt:172 */
  382    573   
mod _create_global_table_input;
  383    574   
         575  +
/* RustModule.kt:172 */
  384    576   
mod _create_global_table_output;
  385    577   
  386         -
/// Builders
         578  +
/// /* CodegenDelegator.kt:51 */Builders
  387    579   
pub mod builders;