Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +169,249 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the properties of a global secondary index for the table when the backup was created.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the properties of a global secondary index for the table when the backup was created.</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 GlobalSecondaryIndexInfo {
    7         -
    /// <p>The name of the global secondary index.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct GlobalSecondaryIndexInfo {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index.</p>
    8     10   
    pub index_name: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
   10     12   
    /// <ul>
   11     13   
    /// <li>
   12     14   
    /// <p><code>HASH</code> - partition key</p></li>
   13     15   
    /// <li>
   14     16   
    /// <p><code>RANGE</code> - sort key</p></li>
   15     17   
    /// </ul><note>
   16     18   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   17     19   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   18     20   
    /// </note>
   19     21   
    pub key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
   20         -
    /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
          22  +
    /// /* StructureGenerator.kt:231 */<p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
   21     23   
    pub projection: ::std::option::Option<crate::types::Projection>,
   22         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          24  +
    /// /* StructureGenerator.kt:231 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   23     25   
    pub provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
          26  +
    /* StructureGenerator.kt:201 */
   24     27   
}
          28  +
/* StructureGenerator.kt:135 */
   25     29   
impl GlobalSecondaryIndexInfo {
   26         -
    /// <p>The name of the global secondary index.</p>
          30  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index.</p>
          31  +
    /* StructureGenerator.kt:166 */
   27     32   
    pub fn index_name(&self) -> ::std::option::Option<&str> {
          33  +
        /* StructureGenerator.kt:169 */
   28     34   
        self.index_name.as_deref()
          35  +
        /* StructureGenerator.kt:166 */
   29     36   
    }
   30         -
    /// <p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
          37  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
   31     38   
    /// <ul>
   32     39   
    /// <li>
   33     40   
    /// <p><code>HASH</code> - partition key</p></li>
   34     41   
    /// <li>
   35     42   
    /// <p><code>RANGE</code> - sort key</p></li>
   36     43   
    /// </ul><note>
   37     44   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   38     45   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   39     46   
    /// </note>
   40         -
    ///
   41         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.key_schema.is_none()`.
          47  +
    /// /* StructureGenerator.kt:162 */
          48  +
    /// /* 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 `.key_schema.is_none()`.
          49  +
    /* StructureGenerator.kt:166 */
   42     50   
    pub fn key_schema(&self) -> &[crate::types::KeySchemaElement] {
   43         -
        self.key_schema.as_deref().unwrap_or_default()
   44         -
    }
   45         -
    /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
          51  +
        /* StructureGenerator.kt:169 */
          52  +
        self.key_schema
          53  +
            .as_deref()
          54  +
            /* StructureGenerator.kt:175 */
          55  +
            .unwrap_or_default()
          56  +
        /* StructureGenerator.kt:166 */
          57  +
    }
          58  +
    /// /* StructureGenerator.kt:231 */<p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
          59  +
    /* StructureGenerator.kt:166 */
   46     60   
    pub fn projection(&self) -> ::std::option::Option<&crate::types::Projection> {
          61  +
        /* StructureGenerator.kt:170 */
   47     62   
        self.projection.as_ref()
          63  +
        /* StructureGenerator.kt:166 */
   48     64   
    }
   49         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          65  +
    /// /* StructureGenerator.kt:231 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          66  +
    /* StructureGenerator.kt:166 */
   50     67   
    pub fn provisioned_throughput(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughput> {
          68  +
        /* StructureGenerator.kt:170 */
   51     69   
        self.provisioned_throughput.as_ref()
          70  +
        /* StructureGenerator.kt:166 */
   52     71   
    }
          72  +
    /* StructureGenerator.kt:135 */
   53     73   
}
          74  +
/* ClientCodegenVisitor.kt:237 */
   54     75   
impl GlobalSecondaryIndexInfo {
   55         -
    /// Creates a new builder-style object to manufacture [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
          76  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
          77  +
    /* BuilderGenerator.kt:175 */
   56     78   
    pub fn builder() -> crate::types::builders::GlobalSecondaryIndexInfoBuilder {
          79  +
        /* BuilderGenerator.kt:176 */
   57     80   
        crate::types::builders::GlobalSecondaryIndexInfoBuilder::default()
          81  +
        /* BuilderGenerator.kt:175 */
   58     82   
    }
          83  +
    /* ClientCodegenVisitor.kt:237 */
   59     84   
}
   60     85   
   61         -
/// A builder for [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
          86  +
/// /* BuilderGenerator.kt:342 */A builder for [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
          87  +
/* RustType.kt:516 */
   62     88   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          89  +
/* RustType.kt:516 */
   63     90   
#[non_exhaustive]
          91  +
/* BuilderGenerator.kt:345 */
   64     92   
pub struct GlobalSecondaryIndexInfoBuilder {
   65         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
   66         -
    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
   67         -
    pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          93  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
          94  +
    /* BuilderGenerator.kt:275 */ pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
          95  +
    /* BuilderGenerator.kt:275 */ pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          96  +
    /* BuilderGenerator.kt:275 */
   68     97   
    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
          98  +
    /* BuilderGenerator.kt:345 */
   69     99   
}
         100  +
/* BuilderGenerator.kt:355 */
   70    101   
impl GlobalSecondaryIndexInfoBuilder {
   71         -
    /// <p>The name of the global secondary index.</p>
         102  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the global secondary index.</p>
         103  +
    /* BuilderGenerator.kt:291 */
   72    104   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         105  +
        /* BuilderGenerator.kt:292 */
   73    106   
        self.index_name = ::std::option::Option::Some(input.into());
         107  +
        /* BuilderGenerator.kt:293 */
   74    108   
        self
         109  +
        /* BuilderGenerator.kt:291 */
   75    110   
    }
   76         -
    /// <p>The name of the global secondary index.</p>
         111  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the global secondary index.</p>
         112  +
    /* BuilderGenerator.kt:314 */
   77    113   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         114  +
        /* BuilderGenerator.kt:315 */
   78    115   
        self.index_name = input;
   79    116   
        self
         117  +
        /* BuilderGenerator.kt:314 */
   80    118   
    }
   81         -
    /// <p>The name of the global secondary index.</p>
         119  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the global secondary index.</p>
         120  +
    /* BuilderGenerator.kt:336 */
   82    121   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
         122  +
        /* BuilderGenerator.kt:337 */
   83    123   
        &self.index_name
         124  +
        /* BuilderGenerator.kt:336 */
   84    125   
    }
   85         -
    /// Appends an item to `key_schema`.
         126  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `key_schema`.
         127  +
    /* BuilderGenerator.kt:411 */
   86    128   
    ///
   87         -
    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         129  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         130  +
    /* BuilderGenerator.kt:413 */
   88    131   
    ///
   89         -
    /// <p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
         132  +
    /// /* BuilderGenerator.kt:414 */<p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
   90    133   
    /// <ul>
   91    134   
    /// <li>
   92    135   
    /// <p><code>HASH</code> - partition key</p></li>
   93    136   
    /// <li>
   94    137   
    /// <p><code>RANGE</code> - sort key</p></li>
   95    138   
    /// </ul><note>
   96    139   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   97    140   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   98    141   
    /// </note>
         142  +
    /* BuilderGenerator.kt:418 */
   99    143   
    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
         144  +
        /* BuilderGenerator.kt:419 */
  100    145   
        let mut v = self.key_schema.unwrap_or_default();
  101    146   
        v.push(input);
  102    147   
        self.key_schema = ::std::option::Option::Some(v);
  103    148   
        self
         149  +
        /* BuilderGenerator.kt:418 */
  104    150   
    }
  105         -
    /// <p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
         151  +
    /// /* BuilderGenerator.kt:312 */<p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
  106    152   
    /// <ul>
  107    153   
    /// <li>
  108    154   
    /// <p><code>HASH</code> - partition key</p></li>
  109    155   
    /// <li>
  110    156   
    /// <p><code>RANGE</code> - sort key</p></li>
  111    157   
    /// </ul><note>
  112    158   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
  113    159   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
  114    160   
    /// </note>
         161  +
    /* BuilderGenerator.kt:314 */
  115    162   
    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
         163  +
        /* BuilderGenerator.kt:315 */
  116    164   
        self.key_schema = input;
  117    165   
        self
         166  +
        /* BuilderGenerator.kt:314 */
  118    167   
    }
  119         -
    /// <p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
         168  +
    /// /* BuilderGenerator.kt:334 */<p>The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:</p>
  120    169   
    /// <ul>
  121    170   
    /// <li>
  122    171   
    /// <p><code>HASH</code> - partition key</p></li>
  123    172   
    /// <li>
  124    173   
    /// <p><code>RANGE</code> - sort key</p></li>
  125    174   
    /// </ul><note>
  126    175   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
  127    176   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
  128    177   
    /// </note>
         178  +
    /* BuilderGenerator.kt:336 */
  129    179   
    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
         180  +
        /* BuilderGenerator.kt:337 */
  130    181   
        &self.key_schema
         182  +
        /* BuilderGenerator.kt:336 */
  131    183   
    }
  132         -
    /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         184  +
    /// /* BuilderGenerator.kt:286 */<p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         185  +
    /* BuilderGenerator.kt:291 */
  133    186   
    pub fn projection(mut self, input: crate::types::Projection) -> Self {
         187  +
        /* BuilderGenerator.kt:292 */
  134    188   
        self.projection = ::std::option::Option::Some(input);
         189  +
        /* BuilderGenerator.kt:293 */
  135    190   
        self
         191  +
        /* BuilderGenerator.kt:291 */
  136    192   
    }
  137         -
    /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         193  +
    /// /* BuilderGenerator.kt:312 */<p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         194  +
    /* BuilderGenerator.kt:314 */
  138    195   
    pub fn set_projection(mut self, input: ::std::option::Option<crate::types::Projection>) -> Self {
         196  +
        /* BuilderGenerator.kt:315 */
  139    197   
        self.projection = input;
  140    198   
        self
         199  +
        /* BuilderGenerator.kt:314 */
  141    200   
    }
  142         -
    /// <p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         201  +
    /// /* BuilderGenerator.kt:334 */<p>Represents attributes that are copied (projected) from the table into the global secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         202  +
    /* BuilderGenerator.kt:336 */
  143    203   
    pub fn get_projection(&self) -> &::std::option::Option<crate::types::Projection> {
         204  +
        /* BuilderGenerator.kt:337 */
  144    205   
        &self.projection
         206  +
        /* BuilderGenerator.kt:336 */
  145    207   
    }
  146         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         208  +
    /// /* BuilderGenerator.kt:286 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         209  +
    /* BuilderGenerator.kt:291 */
  147    210   
    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
         211  +
        /* BuilderGenerator.kt:292 */
  148    212   
        self.provisioned_throughput = ::std::option::Option::Some(input);
         213  +
        /* BuilderGenerator.kt:293 */
  149    214   
        self
         215  +
        /* BuilderGenerator.kt:291 */
  150    216   
    }
  151         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         217  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         218  +
    /* BuilderGenerator.kt:314 */
  152    219   
    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
         220  +
        /* BuilderGenerator.kt:315 */
  153    221   
        self.provisioned_throughput = input;
  154    222   
        self
         223  +
        /* BuilderGenerator.kt:314 */
  155    224   
    }
  156         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         225  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         226  +
    /* BuilderGenerator.kt:336 */
  157    227   
    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
         228  +
        /* BuilderGenerator.kt:337 */
  158    229   
        &self.provisioned_throughput
         230  +
        /* BuilderGenerator.kt:336 */
  159    231   
    }
  160         -
    /// Consumes the builder and constructs a [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
         232  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GlobalSecondaryIndexInfo`](crate::types::GlobalSecondaryIndexInfo).
         233  +
    /* BuilderGenerator.kt:253 */
  161    234   
    pub fn build(self) -> crate::types::GlobalSecondaryIndexInfo {
         235  +
        /* BuilderGenerator.kt:477 */
  162    236   
        crate::types::GlobalSecondaryIndexInfo {
  163         -
            index_name: self.index_name,
         237  +
            /* BuilderGenerator.kt:481 */ index_name: self.index_name,
         238  +
            /* BuilderGenerator.kt:481 */
  164    239   
            key_schema: self.key_schema,
         240  +
            /* BuilderGenerator.kt:481 */
  165    241   
            projection: self.projection,
         242  +
            /* BuilderGenerator.kt:481 */
  166    243   
            provisioned_throughput: self.provisioned_throughput,
         244  +
            /* BuilderGenerator.kt:477 */
  167    245   
        }
         246  +
        /* BuilderGenerator.kt:253 */
  168    247   
    }
         248  +
    /* BuilderGenerator.kt:355 */
  169    249   
}

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

@@ -1,1 +162,224 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents one of the following:</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents one of the following:</p>
    4      4   
/// <ul>
    5      5   
/// <li>
    6      6   
/// <p>A new global secondary index to be added to an existing table.</p></li>
    7      7   
/// <li>
    8      8   
/// <p>New provisioned throughput parameters for an existing global secondary index.</p></li>
    9      9   
/// <li>
   10     10   
/// <p>An existing global secondary index to be removed from an existing table.</p></li>
   11     11   
/// </ul>
          12  +
/* RustType.kt:516 */
   12     13   
#[non_exhaustive]
          14  +
/* RustType.kt:516 */
   13     15   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   14         -
pub struct GlobalSecondaryIndexUpdate {
   15         -
    /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
          16  +
pub /* StructureGenerator.kt:201 */ struct GlobalSecondaryIndexUpdate {
          17  +
    /// /* StructureGenerator.kt:231 */<p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
   16     18   
    pub update: ::std::option::Option<crate::types::UpdateGlobalSecondaryIndexAction>,
   17         -
    /// <p>The parameters required for creating a global secondary index on an existing table:</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The parameters required for creating a global secondary index on an existing table:</p>
   18     20   
    /// <ul>
   19     21   
    /// <li>
   20     22   
    /// <p><code>IndexName </code></p></li>
   21     23   
    /// <li>
   22     24   
    /// <p><code>KeySchema </code></p></li>
   23     25   
    /// <li>
   24     26   
    /// <p><code>AttributeDefinitions </code></p></li>
   25     27   
    /// <li>
   26     28   
    /// <p><code>Projection </code></p></li>
   27     29   
    /// <li>
   28     30   
    /// <p><code>ProvisionedThroughput </code></p></li>
   29     31   
    /// </ul>
   30     32   
    pub create: ::std::option::Option<crate::types::CreateGlobalSecondaryIndexAction>,
   31         -
    /// <p>The name of an existing global secondary index to be removed.</p>
          33  +
    /// /* StructureGenerator.kt:231 */<p>The name of an existing global secondary index to be removed.</p>
   32     34   
    pub delete: ::std::option::Option<crate::types::DeleteGlobalSecondaryIndexAction>,
          35  +
    /* StructureGenerator.kt:201 */
   33     36   
}
          37  +
/* StructureGenerator.kt:135 */
   34     38   
impl GlobalSecondaryIndexUpdate {
   35         -
    /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
          39  +
    /// /* StructureGenerator.kt:231 */<p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
          40  +
    /* StructureGenerator.kt:166 */
   36     41   
    pub fn update(&self) -> ::std::option::Option<&crate::types::UpdateGlobalSecondaryIndexAction> {
          42  +
        /* StructureGenerator.kt:170 */
   37     43   
        self.update.as_ref()
          44  +
        /* StructureGenerator.kt:166 */
   38     45   
    }
   39         -
    /// <p>The parameters required for creating a global secondary index on an existing table:</p>
          46  +
    /// /* StructureGenerator.kt:231 */<p>The parameters required for creating a global secondary index on an existing table:</p>
   40     47   
    /// <ul>
   41     48   
    /// <li>
   42     49   
    /// <p><code>IndexName </code></p></li>
   43     50   
    /// <li>
   44     51   
    /// <p><code>KeySchema </code></p></li>
   45     52   
    /// <li>
   46     53   
    /// <p><code>AttributeDefinitions </code></p></li>
   47     54   
    /// <li>
   48     55   
    /// <p><code>Projection </code></p></li>
   49     56   
    /// <li>
   50     57   
    /// <p><code>ProvisionedThroughput </code></p></li>
   51     58   
    /// </ul>
          59  +
    /* StructureGenerator.kt:166 */
   52     60   
    pub fn create(&self) -> ::std::option::Option<&crate::types::CreateGlobalSecondaryIndexAction> {
          61  +
        /* StructureGenerator.kt:170 */
   53     62   
        self.create.as_ref()
          63  +
        /* StructureGenerator.kt:166 */
   54     64   
    }
   55         -
    /// <p>The name of an existing global secondary index to be removed.</p>
          65  +
    /// /* StructureGenerator.kt:231 */<p>The name of an existing global secondary index to be removed.</p>
          66  +
    /* StructureGenerator.kt:166 */
   56     67   
    pub fn delete(&self) -> ::std::option::Option<&crate::types::DeleteGlobalSecondaryIndexAction> {
          68  +
        /* StructureGenerator.kt:170 */
   57     69   
        self.delete.as_ref()
          70  +
        /* StructureGenerator.kt:166 */
   58     71   
    }
          72  +
    /* StructureGenerator.kt:135 */
   59     73   
}
          74  +
/* ClientCodegenVisitor.kt:237 */
   60     75   
impl GlobalSecondaryIndexUpdate {
   61         -
    /// Creates a new builder-style object to manufacture [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
          76  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
          77  +
    /* BuilderGenerator.kt:175 */
   62     78   
    pub fn builder() -> crate::types::builders::GlobalSecondaryIndexUpdateBuilder {
          79  +
        /* BuilderGenerator.kt:176 */
   63     80   
        crate::types::builders::GlobalSecondaryIndexUpdateBuilder::default()
          81  +
        /* BuilderGenerator.kt:175 */
   64     82   
    }
          83  +
    /* ClientCodegenVisitor.kt:237 */
   65     84   
}
   66     85   
   67         -
/// A builder for [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
          86  +
/// /* BuilderGenerator.kt:342 */A builder for [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
          87  +
/* RustType.kt:516 */
   68     88   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          89  +
/* RustType.kt:516 */
   69     90   
#[non_exhaustive]
          91  +
/* BuilderGenerator.kt:345 */
   70     92   
pub struct GlobalSecondaryIndexUpdateBuilder {
   71         -
    pub(crate) update: ::std::option::Option<crate::types::UpdateGlobalSecondaryIndexAction>,
   72         -
    pub(crate) create: ::std::option::Option<crate::types::CreateGlobalSecondaryIndexAction>,
          93  +
    /* BuilderGenerator.kt:275 */ pub(crate) update: ::std::option::Option<crate::types::UpdateGlobalSecondaryIndexAction>,
          94  +
    /* BuilderGenerator.kt:275 */ pub(crate) create: ::std::option::Option<crate::types::CreateGlobalSecondaryIndexAction>,
          95  +
    /* BuilderGenerator.kt:275 */
   73     96   
    pub(crate) delete: ::std::option::Option<crate::types::DeleteGlobalSecondaryIndexAction>,
          97  +
    /* BuilderGenerator.kt:345 */
   74     98   
}
          99  +
/* BuilderGenerator.kt:355 */
   75    100   
impl GlobalSecondaryIndexUpdateBuilder {
   76         -
    /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         101  +
    /// /* BuilderGenerator.kt:286 */<p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         102  +
    /* BuilderGenerator.kt:291 */
   77    103   
    pub fn update(mut self, input: crate::types::UpdateGlobalSecondaryIndexAction) -> Self {
         104  +
        /* BuilderGenerator.kt:292 */
   78    105   
        self.update = ::std::option::Option::Some(input);
         106  +
        /* BuilderGenerator.kt:293 */
   79    107   
        self
         108  +
        /* BuilderGenerator.kt:291 */
   80    109   
    }
   81         -
    /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         110  +
    /// /* BuilderGenerator.kt:312 */<p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         111  +
    /* BuilderGenerator.kt:314 */
   82    112   
    pub fn set_update(mut self, input: ::std::option::Option<crate::types::UpdateGlobalSecondaryIndexAction>) -> Self {
         113  +
        /* BuilderGenerator.kt:315 */
   83    114   
        self.update = input;
   84    115   
        self
         116  +
        /* BuilderGenerator.kt:314 */
   85    117   
    }
   86         -
    /// <p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         118  +
    /// /* BuilderGenerator.kt:334 */<p>The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.</p>
         119  +
    /* BuilderGenerator.kt:336 */
   87    120   
    pub fn get_update(&self) -> &::std::option::Option<crate::types::UpdateGlobalSecondaryIndexAction> {
         121  +
        /* BuilderGenerator.kt:337 */
   88    122   
        &self.update
         123  +
        /* BuilderGenerator.kt:336 */
   89    124   
    }
   90         -
    /// <p>The parameters required for creating a global secondary index on an existing table:</p>
         125  +
    /// /* BuilderGenerator.kt:286 */<p>The parameters required for creating a global secondary index on an existing table:</p>
   91    126   
    /// <ul>
   92    127   
    /// <li>
   93    128   
    /// <p><code>IndexName </code></p></li>
   94    129   
    /// <li>
   95    130   
    /// <p><code>KeySchema </code></p></li>
   96    131   
    /// <li>
   97    132   
    /// <p><code>AttributeDefinitions </code></p></li>
   98    133   
    /// <li>
   99    134   
    /// <p><code>Projection </code></p></li>
  100    135   
    /// <li>
  101    136   
    /// <p><code>ProvisionedThroughput </code></p></li>
  102    137   
    /// </ul>
         138  +
    /* BuilderGenerator.kt:291 */
  103    139   
    pub fn create(mut self, input: crate::types::CreateGlobalSecondaryIndexAction) -> Self {
         140  +
        /* BuilderGenerator.kt:292 */
  104    141   
        self.create = ::std::option::Option::Some(input);
         142  +
        /* BuilderGenerator.kt:293 */
  105    143   
        self
         144  +
        /* BuilderGenerator.kt:291 */
  106    145   
    }
  107         -
    /// <p>The parameters required for creating a global secondary index on an existing table:</p>
         146  +
    /// /* BuilderGenerator.kt:312 */<p>The parameters required for creating a global secondary index on an existing table:</p>
  108    147   
    /// <ul>
  109    148   
    /// <li>
  110    149   
    /// <p><code>IndexName </code></p></li>
  111    150   
    /// <li>
  112    151   
    /// <p><code>KeySchema </code></p></li>
  113    152   
    /// <li>
  114    153   
    /// <p><code>AttributeDefinitions </code></p></li>
  115    154   
    /// <li>
  116    155   
    /// <p><code>Projection </code></p></li>
  117    156   
    /// <li>
  118    157   
    /// <p><code>ProvisionedThroughput </code></p></li>
  119    158   
    /// </ul>
         159  +
    /* BuilderGenerator.kt:314 */
  120    160   
    pub fn set_create(mut self, input: ::std::option::Option<crate::types::CreateGlobalSecondaryIndexAction>) -> Self {
         161  +
        /* BuilderGenerator.kt:315 */
  121    162   
        self.create = input;
  122    163   
        self
         164  +
        /* BuilderGenerator.kt:314 */
  123    165   
    }
  124         -
    /// <p>The parameters required for creating a global secondary index on an existing table:</p>
         166  +
    /// /* BuilderGenerator.kt:334 */<p>The parameters required for creating a global secondary index on an existing table:</p>
  125    167   
    /// <ul>
  126    168   
    /// <li>
  127    169   
    /// <p><code>IndexName </code></p></li>
  128    170   
    /// <li>
  129    171   
    /// <p><code>KeySchema </code></p></li>
  130    172   
    /// <li>
  131    173   
    /// <p><code>AttributeDefinitions </code></p></li>
  132    174   
    /// <li>
  133    175   
    /// <p><code>Projection </code></p></li>
  134    176   
    /// <li>
  135    177   
    /// <p><code>ProvisionedThroughput </code></p></li>
  136    178   
    /// </ul>
         179  +
    /* BuilderGenerator.kt:336 */
  137    180   
    pub fn get_create(&self) -> &::std::option::Option<crate::types::CreateGlobalSecondaryIndexAction> {
         181  +
        /* BuilderGenerator.kt:337 */
  138    182   
        &self.create
         183  +
        /* BuilderGenerator.kt:336 */
  139    184   
    }
  140         -
    /// <p>The name of an existing global secondary index to be removed.</p>
         185  +
    /// /* BuilderGenerator.kt:286 */<p>The name of an existing global secondary index to be removed.</p>
         186  +
    /* BuilderGenerator.kt:291 */
  141    187   
    pub fn delete(mut self, input: crate::types::DeleteGlobalSecondaryIndexAction) -> Self {
         188  +
        /* BuilderGenerator.kt:292 */
  142    189   
        self.delete = ::std::option::Option::Some(input);
         190  +
        /* BuilderGenerator.kt:293 */
  143    191   
        self
         192  +
        /* BuilderGenerator.kt:291 */
  144    193   
    }
  145         -
    /// <p>The name of an existing global secondary index to be removed.</p>
         194  +
    /// /* BuilderGenerator.kt:312 */<p>The name of an existing global secondary index to be removed.</p>
         195  +
    /* BuilderGenerator.kt:314 */
  146    196   
    pub fn set_delete(mut self, input: ::std::option::Option<crate::types::DeleteGlobalSecondaryIndexAction>) -> Self {
         197  +
        /* BuilderGenerator.kt:315 */
  147    198   
        self.delete = input;
  148    199   
        self
         200  +
        /* BuilderGenerator.kt:314 */
  149    201   
    }
  150         -
    /// <p>The name of an existing global secondary index to be removed.</p>
         202  +
    /// /* BuilderGenerator.kt:334 */<p>The name of an existing global secondary index to be removed.</p>
         203  +
    /* BuilderGenerator.kt:336 */
  151    204   
    pub fn get_delete(&self) -> &::std::option::Option<crate::types::DeleteGlobalSecondaryIndexAction> {
         205  +
        /* BuilderGenerator.kt:337 */
  152    206   
        &self.delete
         207  +
        /* BuilderGenerator.kt:336 */
  153    208   
    }
  154         -
    /// Consumes the builder and constructs a [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
         209  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GlobalSecondaryIndexUpdate`](crate::types::GlobalSecondaryIndexUpdate).
         210  +
    /* BuilderGenerator.kt:253 */
  155    211   
    pub fn build(self) -> crate::types::GlobalSecondaryIndexUpdate {
         212  +
        /* BuilderGenerator.kt:477 */
  156    213   
        crate::types::GlobalSecondaryIndexUpdate {
  157         -
            update: self.update,
         214  +
            /* BuilderGenerator.kt:481 */ update: self.update,
         215  +
            /* BuilderGenerator.kt:481 */
  158    216   
            create: self.create,
         217  +
            /* BuilderGenerator.kt:481 */
  159    218   
            delete: self.delete,
         219  +
            /* BuilderGenerator.kt:477 */
  160    220   
        }
         221  +
        /* BuilderGenerator.kt:253 */
  161    222   
    }
         223  +
    /* BuilderGenerator.kt:355 */
  162    224   
}

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

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

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

@@ -1,1 +196,290 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Contains details about the global table.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Contains details about the global table.</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 GlobalTableDescription {
    7         -
    /// <p>The Regions where the global table has replicas.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct GlobalTableDescription {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The Regions where the global table has replicas.</p>
    8     10   
    pub replication_group: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaDescription>>,
    9         -
    /// <p>The unique identifier of the global table.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The unique identifier of the global table.</p>
   10     12   
    pub global_table_arn: ::std::option::Option<::std::string::String>,
   11         -
    /// <p>The creation time of the global table.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The creation time of the global table.</p>
   12     14   
    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   13         -
    /// <p>The current state of the global table:</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>The current state of the global table:</p>
   14     16   
    /// <ul>
   15     17   
    /// <li>
   16     18   
    /// <p><code>CREATING</code> - The global table is being created.</p></li>
   17     19   
    /// <li>
   18     20   
    /// <p><code>UPDATING</code> - The global table is being updated.</p></li>
   19     21   
    /// <li>
   20     22   
    /// <p><code>DELETING</code> - The global table is being deleted.</p></li>
   21     23   
    /// <li>
   22     24   
    /// <p><code>ACTIVE</code> - The global table is ready for use.</p></li>
   23     25   
    /// </ul>
   24     26   
    pub global_table_status: ::std::option::Option<crate::types::GlobalTableStatus>,
   25         -
    /// <p>The global table name.</p>
          27  +
    /// /* StructureGenerator.kt:231 */<p>The global table name.</p>
   26     28   
    pub global_table_name: ::std::option::Option<::std::string::String>,
          29  +
    /* StructureGenerator.kt:201 */
   27     30   
}
          31  +
/* StructureGenerator.kt:135 */
   28     32   
impl GlobalTableDescription {
   29         -
    /// <p>The Regions where the global table has replicas.</p>
   30         -
    ///
   31         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.replication_group.is_none()`.
          33  +
    /// /* StructureGenerator.kt:231 */<p>The Regions where the global table has replicas.</p>
          34  +
    /// /* StructureGenerator.kt:162 */
          35  +
    /// /* 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 `.replication_group.is_none()`.
          36  +
    /* StructureGenerator.kt:166 */
   32     37   
    pub fn replication_group(&self) -> &[crate::types::ReplicaDescription] {
   33         -
        self.replication_group.as_deref().unwrap_or_default()
          38  +
        /* StructureGenerator.kt:169 */
          39  +
        self.replication_group
          40  +
            .as_deref()
          41  +
            /* StructureGenerator.kt:175 */
          42  +
            .unwrap_or_default()
          43  +
        /* StructureGenerator.kt:166 */
   34     44   
    }
   35         -
    /// <p>The unique identifier of the global table.</p>
          45  +
    /// /* StructureGenerator.kt:231 */<p>The unique identifier of the global table.</p>
          46  +
    /* StructureGenerator.kt:166 */
   36     47   
    pub fn global_table_arn(&self) -> ::std::option::Option<&str> {
          48  +
        /* StructureGenerator.kt:169 */
   37     49   
        self.global_table_arn.as_deref()
          50  +
        /* StructureGenerator.kt:166 */
   38     51   
    }
   39         -
    /// <p>The creation time of the global table.</p>
          52  +
    /// /* StructureGenerator.kt:231 */<p>The creation time of the global table.</p>
          53  +
    /* StructureGenerator.kt:166 */
   40     54   
    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          55  +
        /* StructureGenerator.kt:170 */
   41     56   
        self.creation_date_time.as_ref()
          57  +
        /* StructureGenerator.kt:166 */
   42     58   
    }
   43         -
    /// <p>The current state of the global table:</p>
          59  +
    /// /* StructureGenerator.kt:231 */<p>The current state of the global table:</p>
   44     60   
    /// <ul>
   45     61   
    /// <li>
   46     62   
    /// <p><code>CREATING</code> - The global table is being created.</p></li>
   47     63   
    /// <li>
   48     64   
    /// <p><code>UPDATING</code> - The global table is being updated.</p></li>
   49     65   
    /// <li>
   50     66   
    /// <p><code>DELETING</code> - The global table is being deleted.</p></li>
   51     67   
    /// <li>
   52     68   
    /// <p><code>ACTIVE</code> - The global table is ready for use.</p></li>
   53     69   
    /// </ul>
          70  +
    /* StructureGenerator.kt:166 */
   54     71   
    pub fn global_table_status(&self) -> ::std::option::Option<&crate::types::GlobalTableStatus> {
          72  +
        /* StructureGenerator.kt:170 */
   55     73   
        self.global_table_status.as_ref()
          74  +
        /* StructureGenerator.kt:166 */
   56     75   
    }
   57         -
    /// <p>The global table name.</p>
          76  +
    /// /* StructureGenerator.kt:231 */<p>The global table name.</p>
          77  +
    /* StructureGenerator.kt:166 */
   58     78   
    pub fn global_table_name(&self) -> ::std::option::Option<&str> {
          79  +
        /* StructureGenerator.kt:169 */
   59     80   
        self.global_table_name.as_deref()
          81  +
        /* StructureGenerator.kt:166 */
   60     82   
    }
          83  +
    /* StructureGenerator.kt:135 */
   61     84   
}
          85  +
/* ClientCodegenVisitor.kt:237 */
   62     86   
impl GlobalTableDescription {
   63         -
    /// Creates a new builder-style object to manufacture [`GlobalTableDescription`](crate::types::GlobalTableDescription).
          87  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GlobalTableDescription`](crate::types::GlobalTableDescription).
          88  +
    /* BuilderGenerator.kt:175 */
   64     89   
    pub fn builder() -> crate::types::builders::GlobalTableDescriptionBuilder {
          90  +
        /* BuilderGenerator.kt:176 */
   65     91   
        crate::types::builders::GlobalTableDescriptionBuilder::default()
          92  +
        /* BuilderGenerator.kt:175 */
   66     93   
    }
          94  +
    /* ClientCodegenVisitor.kt:237 */
   67     95   
}
   68     96   
   69         -
/// A builder for [`GlobalTableDescription`](crate::types::GlobalTableDescription).
          97  +
/// /* BuilderGenerator.kt:342 */A builder for [`GlobalTableDescription`](crate::types::GlobalTableDescription).
          98  +
/* RustType.kt:516 */
   70     99   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         100  +
/* RustType.kt:516 */
   71    101   
#[non_exhaustive]
         102  +
/* BuilderGenerator.kt:345 */
   72    103   
pub struct GlobalTableDescriptionBuilder {
   73         -
    pub(crate) replication_group: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaDescription>>,
   74         -
    pub(crate) global_table_arn: ::std::option::Option<::std::string::String>,
   75         -
    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   76         -
    pub(crate) global_table_status: ::std::option::Option<crate::types::GlobalTableStatus>,
         104  +
    /* BuilderGenerator.kt:275 */ pub(crate) replication_group: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaDescription>>,
         105  +
    /* BuilderGenerator.kt:275 */ pub(crate) global_table_arn: ::std::option::Option<::std::string::String>,
         106  +
    /* BuilderGenerator.kt:275 */ pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
         107  +
    /* BuilderGenerator.kt:275 */ pub(crate) global_table_status: ::std::option::Option<crate::types::GlobalTableStatus>,
         108  +
    /* BuilderGenerator.kt:275 */
   77    109   
    pub(crate) global_table_name: ::std::option::Option<::std::string::String>,
         110  +
    /* BuilderGenerator.kt:345 */
   78    111   
}
         112  +
/* BuilderGenerator.kt:355 */
   79    113   
impl GlobalTableDescriptionBuilder {
   80         -
    /// Appends an item to `replication_group`.
         114  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `replication_group`.
         115  +
    /* BuilderGenerator.kt:411 */
   81    116   
    ///
   82         -
    /// To override the contents of this collection use [`set_replication_group`](Self::set_replication_group).
         117  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_replication_group`](Self::set_replication_group).
         118  +
    /* BuilderGenerator.kt:413 */
   83    119   
    ///
   84         -
    /// <p>The Regions where the global table has replicas.</p>
         120  +
    /// /* BuilderGenerator.kt:414 */<p>The Regions where the global table has replicas.</p>
         121  +
    /* BuilderGenerator.kt:418 */
   85    122   
    pub fn replication_group(mut self, input: crate::types::ReplicaDescription) -> Self {
         123  +
        /* BuilderGenerator.kt:419 */
   86    124   
        let mut v = self.replication_group.unwrap_or_default();
   87    125   
        v.push(input);
   88    126   
        self.replication_group = ::std::option::Option::Some(v);
   89    127   
        self
         128  +
        /* BuilderGenerator.kt:418 */
   90    129   
    }
   91         -
    /// <p>The Regions where the global table has replicas.</p>
         130  +
    /// /* BuilderGenerator.kt:312 */<p>The Regions where the global table has replicas.</p>
         131  +
    /* BuilderGenerator.kt:314 */
   92    132   
    pub fn set_replication_group(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaDescription>>) -> Self {
         133  +
        /* BuilderGenerator.kt:315 */
   93    134   
        self.replication_group = input;
   94    135   
        self
         136  +
        /* BuilderGenerator.kt:314 */
   95    137   
    }
   96         -
    /// <p>The Regions where the global table has replicas.</p>
         138  +
    /// /* BuilderGenerator.kt:334 */<p>The Regions where the global table has replicas.</p>
         139  +
    /* BuilderGenerator.kt:336 */
   97    140   
    pub fn get_replication_group(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaDescription>> {
         141  +
        /* BuilderGenerator.kt:337 */
   98    142   
        &self.replication_group
         143  +
        /* BuilderGenerator.kt:336 */
   99    144   
    }
  100         -
    /// <p>The unique identifier of the global table.</p>
         145  +
    /// /* BuilderGenerator.kt:286 */<p>The unique identifier of the global table.</p>
         146  +
    /* BuilderGenerator.kt:291 */
  101    147   
    pub fn global_table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         148  +
        /* BuilderGenerator.kt:292 */
  102    149   
        self.global_table_arn = ::std::option::Option::Some(input.into());
         150  +
        /* BuilderGenerator.kt:293 */
  103    151   
        self
         152  +
        /* BuilderGenerator.kt:291 */
  104    153   
    }
  105         -
    /// <p>The unique identifier of the global table.</p>
         154  +
    /// /* BuilderGenerator.kt:312 */<p>The unique identifier of the global table.</p>
         155  +
    /* BuilderGenerator.kt:314 */
  106    156   
    pub fn set_global_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         157  +
        /* BuilderGenerator.kt:315 */
  107    158   
        self.global_table_arn = input;
  108    159   
        self
         160  +
        /* BuilderGenerator.kt:314 */
  109    161   
    }
  110         -
    /// <p>The unique identifier of the global table.</p>
         162  +
    /// /* BuilderGenerator.kt:334 */<p>The unique identifier of the global table.</p>
         163  +
    /* BuilderGenerator.kt:336 */
  111    164   
    pub fn get_global_table_arn(&self) -> &::std::option::Option<::std::string::String> {
         165  +
        /* BuilderGenerator.kt:337 */
  112    166   
        &self.global_table_arn
         167  +
        /* BuilderGenerator.kt:336 */
  113    168   
    }
  114         -
    /// <p>The creation time of the global table.</p>
         169  +
    /// /* BuilderGenerator.kt:286 */<p>The creation time of the global table.</p>
         170  +
    /* BuilderGenerator.kt:291 */
  115    171   
    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         172  +
        /* BuilderGenerator.kt:292 */
  116    173   
        self.creation_date_time = ::std::option::Option::Some(input);
         174  +
        /* BuilderGenerator.kt:293 */
  117    175   
        self
         176  +
        /* BuilderGenerator.kt:291 */
  118    177   
    }
  119         -
    /// <p>The creation time of the global table.</p>
         178  +
    /// /* BuilderGenerator.kt:312 */<p>The creation time of the global table.</p>
         179  +
    /* BuilderGenerator.kt:314 */
  120    180   
    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         181  +
        /* BuilderGenerator.kt:315 */
  121    182   
        self.creation_date_time = input;
  122    183   
        self
         184  +
        /* BuilderGenerator.kt:314 */
  123    185   
    }
  124         -
    /// <p>The creation time of the global table.</p>
         186  +
    /// /* BuilderGenerator.kt:334 */<p>The creation time of the global table.</p>
         187  +
    /* BuilderGenerator.kt:336 */
  125    188   
    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         189  +
        /* BuilderGenerator.kt:337 */
  126    190   
        &self.creation_date_time
         191  +
        /* BuilderGenerator.kt:336 */
  127    192   
    }
  128         -
    /// <p>The current state of the global table:</p>
         193  +
    /// /* BuilderGenerator.kt:286 */<p>The current state of the global table:</p>
  129    194   
    /// <ul>
  130    195   
    /// <li>
  131    196   
    /// <p><code>CREATING</code> - The global table is being created.</p></li>
  132    197   
    /// <li>
  133    198   
    /// <p><code>UPDATING</code> - The global table is being updated.</p></li>
  134    199   
    /// <li>
  135    200   
    /// <p><code>DELETING</code> - The global table is being deleted.</p></li>
  136    201   
    /// <li>
  137    202   
    /// <p><code>ACTIVE</code> - The global table is ready for use.</p></li>
  138    203   
    /// </ul>
         204  +
    /* BuilderGenerator.kt:291 */
  139    205   
    pub fn global_table_status(mut self, input: crate::types::GlobalTableStatus) -> Self {
         206  +
        /* BuilderGenerator.kt:292 */
  140    207   
        self.global_table_status = ::std::option::Option::Some(input);
         208  +
        /* BuilderGenerator.kt:293 */
  141    209   
        self
         210  +
        /* BuilderGenerator.kt:291 */
  142    211   
    }
  143         -
    /// <p>The current state of the global table:</p>
         212  +
    /// /* BuilderGenerator.kt:312 */<p>The current state of the global table:</p>
  144    213   
    /// <ul>
  145    214   
    /// <li>
  146    215   
    /// <p><code>CREATING</code> - The global table is being created.</p></li>
  147    216   
    /// <li>
  148    217   
    /// <p><code>UPDATING</code> - The global table is being updated.</p></li>
  149    218   
    /// <li>
  150    219   
    /// <p><code>DELETING</code> - The global table is being deleted.</p></li>
  151    220   
    /// <li>
  152    221   
    /// <p><code>ACTIVE</code> - The global table is ready for use.</p></li>
  153    222   
    /// </ul>
         223  +
    /* BuilderGenerator.kt:314 */
  154    224   
    pub fn set_global_table_status(mut self, input: ::std::option::Option<crate::types::GlobalTableStatus>) -> Self {
         225  +
        /* BuilderGenerator.kt:315 */
  155    226   
        self.global_table_status = input;
  156    227   
        self
         228  +
        /* BuilderGenerator.kt:314 */
  157    229   
    }
  158         -
    /// <p>The current state of the global table:</p>
         230  +
    /// /* BuilderGenerator.kt:334 */<p>The current state of the global table:</p>
  159    231   
    /// <ul>
  160    232   
    /// <li>
  161    233   
    /// <p><code>CREATING</code> - The global table is being created.</p></li>
  162    234   
    /// <li>
  163    235   
    /// <p><code>UPDATING</code> - The global table is being updated.</p></li>
  164    236   
    /// <li>
  165    237   
    /// <p><code>DELETING</code> - The global table is being deleted.</p></li>
  166    238   
    /// <li>
  167    239   
    /// <p><code>ACTIVE</code> - The global table is ready for use.</p></li>
  168    240   
    /// </ul>
         241  +
    /* BuilderGenerator.kt:336 */
  169    242   
    pub fn get_global_table_status(&self) -> &::std::option::Option<crate::types::GlobalTableStatus> {
         243  +
        /* BuilderGenerator.kt:337 */
  170    244   
        &self.global_table_status
         245  +
        /* BuilderGenerator.kt:336 */
  171    246   
    }
  172         -
    /// <p>The global table name.</p>
         247  +
    /// /* BuilderGenerator.kt:286 */<p>The global table name.</p>
         248  +
    /* BuilderGenerator.kt:291 */
  173    249   
    pub fn global_table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         250  +
        /* BuilderGenerator.kt:292 */
  174    251   
        self.global_table_name = ::std::option::Option::Some(input.into());
         252  +
        /* BuilderGenerator.kt:293 */
  175    253   
        self
         254  +
        /* BuilderGenerator.kt:291 */
  176    255   
    }
  177         -
    /// <p>The global table name.</p>
         256  +
    /// /* BuilderGenerator.kt:312 */<p>The global table name.</p>
         257  +
    /* BuilderGenerator.kt:314 */
  178    258   
    pub fn set_global_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         259  +
        /* BuilderGenerator.kt:315 */
  179    260   
        self.global_table_name = input;
  180    261   
        self
         262  +
        /* BuilderGenerator.kt:314 */
  181    263   
    }
  182         -
    /// <p>The global table name.</p>
         264  +
    /// /* BuilderGenerator.kt:334 */<p>The global table name.</p>
         265  +
    /* BuilderGenerator.kt:336 */
  183    266   
    pub fn get_global_table_name(&self) -> &::std::option::Option<::std::string::String> {
         267  +
        /* BuilderGenerator.kt:337 */
  184    268   
        &self.global_table_name
         269  +
        /* BuilderGenerator.kt:336 */
  185    270   
    }
  186         -
    /// Consumes the builder and constructs a [`GlobalTableDescription`](crate::types::GlobalTableDescription).
         271  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GlobalTableDescription`](crate::types::GlobalTableDescription).
         272  +
    /* BuilderGenerator.kt:253 */
  187    273   
    pub fn build(self) -> crate::types::GlobalTableDescription {
         274  +
        /* BuilderGenerator.kt:477 */
  188    275   
        crate::types::GlobalTableDescription {
  189         -
            replication_group: self.replication_group,
         276  +
            /* BuilderGenerator.kt:481 */ replication_group: self.replication_group,
         277  +
            /* BuilderGenerator.kt:481 */
  190    278   
            global_table_arn: self.global_table_arn,
         279  +
            /* BuilderGenerator.kt:481 */
  191    280   
            creation_date_time: self.creation_date_time,
         281  +
            /* BuilderGenerator.kt:481 */
  192    282   
            global_table_status: self.global_table_status,
         283  +
            /* BuilderGenerator.kt:481 */
  193    284   
            global_table_name: self.global_table_name,
         285  +
            /* BuilderGenerator.kt:477 */
  194    286   
        }
         287  +
        /* BuilderGenerator.kt:253 */
  195    288   
    }
         289  +
    /* BuilderGenerator.kt:355 */
  196    290   
}

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

@@ -1,1 +108,170 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the settings of a global secondary index for a global table that will be modified.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the settings of a global secondary index for a global table that will be modified.</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 GlobalTableGlobalSecondaryIndexSettingsUpdate {
    7         -
    /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct GlobalTableGlobalSecondaryIndexSettingsUpdate {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
    8     10   
    pub index_name: ::std::string::String,
    9         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
   10     12   
    pub provisioned_write_capacity_units: ::std::option::Option<i64>,
   11         -
    /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
   12     14   
    pub provisioned_write_capacity_auto_scaling_settings_update: ::std::option::Option<crate::types::AutoScalingSettingsUpdate>,
          15  +
    /* StructureGenerator.kt:201 */
   13     16   
}
          17  +
/* StructureGenerator.kt:135 */
   14     18   
impl GlobalTableGlobalSecondaryIndexSettingsUpdate {
   15         -
    /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          20  +
    /* StructureGenerator.kt:166 */
   16     21   
    pub fn index_name(&self) -> &str {
          22  +
        /* StructureGenerator.kt:171 */
   17     23   
        use std::ops::Deref;
   18     24   
        self.index_name.deref()
          25  +
        /* StructureGenerator.kt:166 */
   19     26   
    }
   20         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
          27  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
          28  +
    /* StructureGenerator.kt:166 */
   21     29   
    pub fn provisioned_write_capacity_units(&self) -> ::std::option::Option<i64> {
          30  +
        /* StructureGenerator.kt:168 */
   22     31   
        self.provisioned_write_capacity_units
          32  +
        /* StructureGenerator.kt:166 */
   23     33   
    }
   24         -
    /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
          34  +
    /// /* StructureGenerator.kt:231 */<p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
          35  +
    /* StructureGenerator.kt:166 */
   25     36   
    pub fn provisioned_write_capacity_auto_scaling_settings_update(&self) -> ::std::option::Option<&crate::types::AutoScalingSettingsUpdate> {
          37  +
        /* StructureGenerator.kt:170 */
   26     38   
        self.provisioned_write_capacity_auto_scaling_settings_update.as_ref()
          39  +
        /* StructureGenerator.kt:166 */
   27     40   
    }
          41  +
    /* StructureGenerator.kt:135 */
   28     42   
}
          43  +
/* ClientCodegenVisitor.kt:237 */
   29     44   
impl GlobalTableGlobalSecondaryIndexSettingsUpdate {
   30         -
    /// Creates a new builder-style object to manufacture [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
          45  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
          46  +
    /* BuilderGenerator.kt:175 */
   31     47   
    pub fn builder() -> crate::types::builders::GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder {
          48  +
        /* BuilderGenerator.kt:176 */
   32     49   
        crate::types::builders::GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder::default()
          50  +
        /* BuilderGenerator.kt:175 */
   33     51   
    }
          52  +
    /* ClientCodegenVisitor.kt:237 */
   34     53   
}
   35     54   
   36         -
/// A builder for [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
          55  +
/// /* BuilderGenerator.kt:342 */A builder for [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
          56  +
/* RustType.kt:516 */
   37     57   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          58  +
/* RustType.kt:516 */
   38     59   
#[non_exhaustive]
          60  +
/* BuilderGenerator.kt:345 */
   39     61   
pub struct GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder {
   40         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
   41         -
    pub(crate) provisioned_write_capacity_units: ::std::option::Option<i64>,
          62  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
          63  +
    /* BuilderGenerator.kt:275 */ pub(crate) provisioned_write_capacity_units: ::std::option::Option<i64>,
          64  +
    /* BuilderGenerator.kt:275 */
   42     65   
    pub(crate) provisioned_write_capacity_auto_scaling_settings_update: ::std::option::Option<crate::types::AutoScalingSettingsUpdate>,
          66  +
    /* BuilderGenerator.kt:345 */
   43     67   
}
          68  +
/* BuilderGenerator.kt:355 */
   44     69   
impl GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder {
   45         -
    /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
   46         -
    /// This field is required.
          70  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          71  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          72  +
    /* BuilderGenerator.kt:291 */
   47     73   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          74  +
        /* BuilderGenerator.kt:292 */
   48     75   
        self.index_name = ::std::option::Option::Some(input.into());
          76  +
        /* BuilderGenerator.kt:293 */
   49     77   
        self
          78  +
        /* BuilderGenerator.kt:291 */
   50     79   
    }
   51         -
    /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          80  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          81  +
    /* BuilderGenerator.kt:314 */
   52     82   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          83  +
        /* BuilderGenerator.kt:315 */
   53     84   
        self.index_name = input;
   54     85   
        self
          86  +
        /* BuilderGenerator.kt:314 */
   55     87   
    }
   56         -
    /// <p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          88  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the global secondary index. The name must be unique among all other indexes on this table.</p>
          89  +
    /* BuilderGenerator.kt:336 */
   57     90   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
          91  +
        /* BuilderGenerator.kt:337 */
   58     92   
        &self.index_name
          93  +
        /* BuilderGenerator.kt:336 */
   59     94   
    }
   60         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
          95  +
    /// /* BuilderGenerator.kt:286 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
          96  +
    /* BuilderGenerator.kt:291 */
   61     97   
    pub fn provisioned_write_capacity_units(mut self, input: i64) -> Self {
          98  +
        /* BuilderGenerator.kt:292 */
   62     99   
        self.provisioned_write_capacity_units = ::std::option::Option::Some(input);
         100  +
        /* BuilderGenerator.kt:293 */
   63    101   
        self
         102  +
        /* BuilderGenerator.kt:291 */
   64    103   
    }
   65         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
         104  +
    /// /* BuilderGenerator.kt:312 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
         105  +
    /* BuilderGenerator.kt:314 */
   66    106   
    pub fn set_provisioned_write_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
         107  +
        /* BuilderGenerator.kt:315 */
   67    108   
        self.provisioned_write_capacity_units = input;
   68    109   
        self
         110  +
        /* BuilderGenerator.kt:314 */
   69    111   
    }
   70         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
         112  +
    /// /* BuilderGenerator.kt:334 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException.</code></p>
         113  +
    /* BuilderGenerator.kt:336 */
   71    114   
    pub fn get_provisioned_write_capacity_units(&self) -> &::std::option::Option<i64> {
         115  +
        /* BuilderGenerator.kt:337 */
   72    116   
        &self.provisioned_write_capacity_units
         117  +
        /* BuilderGenerator.kt:336 */
   73    118   
    }
   74         -
    /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         119  +
    /// /* BuilderGenerator.kt:286 */<p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         120  +
    /* BuilderGenerator.kt:291 */
   75    121   
    pub fn provisioned_write_capacity_auto_scaling_settings_update(mut self, input: crate::types::AutoScalingSettingsUpdate) -> Self {
         122  +
        /* BuilderGenerator.kt:292 */
   76    123   
        self.provisioned_write_capacity_auto_scaling_settings_update = ::std::option::Option::Some(input);
         124  +
        /* BuilderGenerator.kt:293 */
   77    125   
        self
         126  +
        /* BuilderGenerator.kt:291 */
   78    127   
    }
   79         -
    /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         128  +
    /// /* BuilderGenerator.kt:312 */<p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         129  +
    /* BuilderGenerator.kt:314 */
   80    130   
    pub fn set_provisioned_write_capacity_auto_scaling_settings_update(
   81    131   
        mut self,
   82    132   
        input: ::std::option::Option<crate::types::AutoScalingSettingsUpdate>,
   83    133   
    ) -> Self {
         134  +
        /* BuilderGenerator.kt:315 */
   84    135   
        self.provisioned_write_capacity_auto_scaling_settings_update = input;
   85    136   
        self
         137  +
        /* BuilderGenerator.kt:314 */
   86    138   
    }
   87         -
    /// <p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         139  +
    /// /* BuilderGenerator.kt:334 */<p>Auto scaling settings for managing a global secondary index's write capacity units.</p>
         140  +
    /* BuilderGenerator.kt:336 */
   88    141   
    pub fn get_provisioned_write_capacity_auto_scaling_settings_update(&self) -> &::std::option::Option<crate::types::AutoScalingSettingsUpdate> {
         142  +
        /* BuilderGenerator.kt:337 */
   89    143   
        &self.provisioned_write_capacity_auto_scaling_settings_update
         144  +
        /* BuilderGenerator.kt:336 */
   90    145   
    }
   91         -
    /// Consumes the builder and constructs a [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
   92         -
    /// This method will fail if any of the following fields are not set:
   93         -
    /// - [`index_name`](crate::types::builders::GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder::index_name)
         146  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`GlobalTableGlobalSecondaryIndexSettingsUpdate`](crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate).
         147  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         148  +
    /// /* BuilderGenerator.kt:246 */- [`index_name`](crate::types::builders::GlobalTableGlobalSecondaryIndexSettingsUpdateBuilder::index_name)
         149  +
    /* BuilderGenerator.kt:253 */
   94    150   
    pub fn build(
   95    151   
        self,
   96    152   
    ) -> ::std::result::Result<crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate, ::aws_smithy_types::error::operation::BuildError> {
   97         -
        ::std::result::Result::Ok(crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate {
   98         -
            index_name: self.index_name.ok_or_else(|| {
   99         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  100         -
                    "index_name",
  101         -
                    "index_name was not specified but it is required when building GlobalTableGlobalSecondaryIndexSettingsUpdate",
  102         -
                )
  103         -
            })?,
  104         -
            provisioned_write_capacity_units: self.provisioned_write_capacity_units,
  105         -
            provisioned_write_capacity_auto_scaling_settings_update: self.provisioned_write_capacity_auto_scaling_settings_update,
  106         -
        })
         153  +
        /* BuilderGenerator.kt:254 */
         154  +
        ::std::result::Result::Ok(
         155  +
            /* BuilderGenerator.kt:477 */crate::types::GlobalTableGlobalSecondaryIndexSettingsUpdate {
         156  +
                /* BuilderGenerator.kt:481 */index_name: self.index_name
         157  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         158  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("index_name", "index_name was not specified but it is required when building GlobalTableGlobalSecondaryIndexSettingsUpdate")
         159  +
                    /* BuilderGenerator.kt:494 */)?
         160  +
                ,
         161  +
                /* BuilderGenerator.kt:481 */provisioned_write_capacity_units: self.provisioned_write_capacity_units
         162  +
                ,
         163  +
                /* BuilderGenerator.kt:481 */provisioned_write_capacity_auto_scaling_settings_update: self.provisioned_write_capacity_auto_scaling_settings_update
         164  +
                ,
         165  +
            /* BuilderGenerator.kt:477 */}
         166  +
        /* BuilderGenerator.kt:254 */)
         167  +
        /* BuilderGenerator.kt:253 */
  107    168   
    }
         169  +
    /* BuilderGenerator.kt:355 */
  108    170   
}

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

@@ -1,1 +120,144 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// When writing a match expression against `GlobalTableStatus`, it is important to ensure
           2  +
/* ClientEnumGenerator.kt:234 */
           3  +
/// /* ClientEnumGenerator.kt:234 */When writing a match expression against `GlobalTableStatus`, it is important to ensure
    4      4   
/// your code is forward-compatible. That is, if a match arm handles a case for a
    5      5   
/// feature that is supported by the service but has not been represented as an enum
    6      6   
/// variant in a current version of SDK, your code should continue to work when you
    7      7   
/// upgrade SDK to a future version in which the enum does include a variant for that
    8      8   
/// feature.
    9         -
///
   10         -
/// Here is an example of how you can make a match expression forward-compatible:
   11         -
///
   12         -
/// ```text
           9  +
/// /* ClientEnumGenerator.kt:244 */
          10  +
/// /* ClientEnumGenerator.kt:245 */Here is an example of how you can make a match expression forward-compatible:
          11  +
/// /* ClientEnumGenerator.kt:246 */
          12  +
/// /* ClientEnumGenerator.kt:247 */```text
          13  +
/* ClientEnumGenerator.kt:248 */
   13     14   
/// # let globaltablestatus = unimplemented!();
          15  +
/* ClientEnumGenerator.kt:249 */
   14     16   
/// match globaltablestatus {
          17  +
/* ClientEnumGenerator.kt:251 */
   15     18   
///     GlobalTableStatus::Active => { /* ... */ },
          19  +
/* ClientEnumGenerator.kt:251 */
   16     20   
///     GlobalTableStatus::Creating => { /* ... */ },
          21  +
/* ClientEnumGenerator.kt:251 */
   17     22   
///     GlobalTableStatus::Deleting => { /* ... */ },
          23  +
/* ClientEnumGenerator.kt:251 */
   18     24   
///     GlobalTableStatus::Updating => { /* ... */ },
          25  +
/* ClientEnumGenerator.kt:253 */
   19     26   
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          27  +
/* ClientEnumGenerator.kt:254 */
   20     28   
///     _ => { /* ... */ },
          29  +
/* ClientEnumGenerator.kt:255 */
   21     30   
/// }
   22         -
/// ```
   23         -
/// The above code demonstrates that when `globaltablestatus` represents
          31  +
/// /* ClientEnumGenerator.kt:256 */```
          32  +
/// /* ClientEnumGenerator.kt:257 */The above code demonstrates that when `globaltablestatus` represents
   24     33   
/// `NewFeature`, the execution path will lead to the second last match arm,
   25     34   
/// even though the enum does not contain a variant `GlobalTableStatus::NewFeature`
   26     35   
/// in the current version of SDK. The reason is that the variable `other`,
   27     36   
/// created by the `@` operator, is bound to
   28     37   
/// `GlobalTableStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
   29     38   
/// and calling `as_str` on it yields `"NewFeature"`.
   30     39   
/// This match expression is forward-compatible when executed with a newer
   31     40   
/// version of SDK where the variant `GlobalTableStatus::NewFeature` is defined.
   32     41   
/// Specifically, when `globaltablestatus` represents `NewFeature`,
   33     42   
/// the execution path will hit the second last match arm as before by virtue of
   34     43   
/// calling `as_str` on `GlobalTableStatus::NewFeature` also yielding `"NewFeature"`.
   35         -
///
   36         -
/// Explicitly matching on the `Unknown` variant should
          44  +
/// /* ClientEnumGenerator.kt:273 */
          45  +
/// /* ClientEnumGenerator.kt:274 */Explicitly matching on the `Unknown` variant should
   37     46   
/// be avoided for two reasons:
   38     47   
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
   39     48   
/// - It might inadvertently shadow other intended match arms.
   40         -
///
          49  +
/// /* ClientEnumGenerator.kt:282 */
          50  +
/* EnumGenerator.kt:154 */
   41     51   
#[allow(missing_docs)] // documentation missing in model
          52  +
/* RustType.kt:516 */
   42     53   
#[non_exhaustive]
          54  +
/* RustType.kt:516 */
   43     55   
#[derive(
   44     56   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   45     57   
)]
   46         -
pub enum GlobalTableStatus {
   47         -
    #[allow(missing_docs)] // documentation missing in model
          58  +
pub /* EnumGenerator.kt:267 */ enum GlobalTableStatus {
          59  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          60  +
    /* EnumGenerator.kt:143 */
   48     61   
    Active,
   49         -
    #[allow(missing_docs)] // documentation missing in model
          62  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          63  +
    /* EnumGenerator.kt:143 */
   50     64   
    Creating,
   51         -
    #[allow(missing_docs)] // documentation missing in model
          65  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          66  +
    /* EnumGenerator.kt:143 */
   52     67   
    Deleting,
   53         -
    #[allow(missing_docs)] // documentation missing in model
          68  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          69  +
    /* EnumGenerator.kt:143 */
   54     70   
    Updating,
   55         -
    /// `Unknown` contains new variants that have been added since this code was generated.
          71  +
    /// /* ClientEnumGenerator.kt:175 */`Unknown` contains new variants that have been added since this code was generated.
          72  +
    /* ClientEnumGenerator.kt:176 */
   56     73   
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
   57         -
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          74  +
    /* ClientEnumGenerator.kt:179 */
          75  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), /* EnumGenerator.kt:267 */
   58     76   
}
          77  +
/* ClientEnumGenerator.kt:42 */
   59     78   
impl ::std::convert::From<&str> for GlobalTableStatus {
   60     79   
    fn from(s: &str) -> Self {
   61     80   
        match s {
   62     81   
            "ACTIVE" => GlobalTableStatus::Active,
   63     82   
            "CREATING" => GlobalTableStatus::Creating,
   64     83   
            "DELETING" => GlobalTableStatus::Deleting,
   65     84   
            "UPDATING" => GlobalTableStatus::Updating,
   66     85   
            other => GlobalTableStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
   67     86   
        }
   68     87   
    }
   69     88   
}
          89  +
/* ClientEnumGenerator.kt:68 */
   70     90   
impl ::std::str::FromStr for GlobalTableStatus {
   71     91   
    type Err = ::std::convert::Infallible;
   72     92   
   73     93   
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
   74     94   
        ::std::result::Result::Ok(GlobalTableStatus::from(s))
   75     95   
    }
   76     96   
}
          97  +
/* EnumGenerator.kt:274 */
   77     98   
impl GlobalTableStatus {
   78     99   
    /// Returns the `&str` value of the enum member.
   79    100   
    pub fn as_str(&self) -> &str {
   80    101   
        match self {
   81    102   
            GlobalTableStatus::Active => "ACTIVE",
   82    103   
            GlobalTableStatus::Creating => "CREATING",
   83    104   
            GlobalTableStatus::Deleting => "DELETING",
   84    105   
            GlobalTableStatus::Updating => "UPDATING",
   85    106   
            GlobalTableStatus::Unknown(value) => value.as_str(),
   86    107   
        }
   87    108   
    }
   88    109   
    /// Returns all the `&str` representations of the enum members.
   89    110   
    pub const fn values() -> &'static [&'static str] {
   90    111   
        &["ACTIVE", "CREATING", "DELETING", "UPDATING"]
   91    112   
    }
   92    113   
}
         114  +
/* EnumGenerator.kt:223 */
   93    115   
impl ::std::convert::AsRef<str> for GlobalTableStatus {
   94    116   
    fn as_ref(&self) -> &str {
   95    117   
        self.as_str()
   96    118   
    }
   97    119   
}
         120  +
/* ClientEnumGenerator.kt:117 */
   98    121   
impl GlobalTableStatus {
   99    122   
    /// Parses the enum value while disallowing unknown variants.
  100    123   
    ///
  101    124   
    /// Unknown variants will result in an error.
  102    125   
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
  103    126   
        match Self::from(value) {
  104    127   
            #[allow(deprecated)]
  105    128   
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
  106    129   
            known => Ok(known),
  107    130   
        }
  108    131   
    }
  109    132   
}
         133  +
/* ClientEnumGenerator.kt:136 */
  110    134   
impl ::std::fmt::Display for GlobalTableStatus {
  111    135   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  112    136   
        match self {
  113    137   
            GlobalTableStatus::Active => write!(f, "ACTIVE"),
  114    138   
            GlobalTableStatus::Creating => write!(f, "CREATING"),
  115    139   
            GlobalTableStatus::Deleting => write!(f, "DELETING"),
  116    140   
            GlobalTableStatus::Updating => write!(f, "UPDATING"),
  117    141   
            GlobalTableStatus::Unknown(value) => write!(f, "{}", value),
  118    142   
        }
  119    143   
    }

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

@@ -1,1 +120,144 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// When writing a match expression against `IndexStatus`, it is important to ensure
           2  +
/* ClientEnumGenerator.kt:234 */
           3  +
/// /* ClientEnumGenerator.kt:234 */When writing a match expression against `IndexStatus`, it is important to ensure
    4      4   
/// your code is forward-compatible. That is, if a match arm handles a case for a
    5      5   
/// feature that is supported by the service but has not been represented as an enum
    6      6   
/// variant in a current version of SDK, your code should continue to work when you
    7      7   
/// upgrade SDK to a future version in which the enum does include a variant for that
    8      8   
/// feature.
    9         -
///
   10         -
/// Here is an example of how you can make a match expression forward-compatible:
   11         -
///
   12         -
/// ```text
           9  +
/// /* ClientEnumGenerator.kt:244 */
          10  +
/// /* ClientEnumGenerator.kt:245 */Here is an example of how you can make a match expression forward-compatible:
          11  +
/// /* ClientEnumGenerator.kt:246 */
          12  +
/// /* ClientEnumGenerator.kt:247 */```text
          13  +
/* ClientEnumGenerator.kt:248 */
   13     14   
/// # let indexstatus = unimplemented!();
          15  +
/* ClientEnumGenerator.kt:249 */
   14     16   
/// match indexstatus {
          17  +
/* ClientEnumGenerator.kt:251 */
   15     18   
///     IndexStatus::Active => { /* ... */ },
          19  +
/* ClientEnumGenerator.kt:251 */
   16     20   
///     IndexStatus::Creating => { /* ... */ },
          21  +
/* ClientEnumGenerator.kt:251 */
   17     22   
///     IndexStatus::Deleting => { /* ... */ },
          23  +
/* ClientEnumGenerator.kt:251 */
   18     24   
///     IndexStatus::Updating => { /* ... */ },
          25  +
/* ClientEnumGenerator.kt:253 */
   19     26   
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
          27  +
/* ClientEnumGenerator.kt:254 */
   20     28   
///     _ => { /* ... */ },
          29  +
/* ClientEnumGenerator.kt:255 */
   21     30   
/// }
   22         -
/// ```
   23         -
/// The above code demonstrates that when `indexstatus` represents
          31  +
/// /* ClientEnumGenerator.kt:256 */```
          32  +
/// /* ClientEnumGenerator.kt:257 */The above code demonstrates that when `indexstatus` represents
   24     33   
/// `NewFeature`, the execution path will lead to the second last match arm,
   25     34   
/// even though the enum does not contain a variant `IndexStatus::NewFeature`
   26     35   
/// in the current version of SDK. The reason is that the variable `other`,
   27     36   
/// created by the `@` operator, is bound to
   28     37   
/// `IndexStatus::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
   29     38   
/// and calling `as_str` on it yields `"NewFeature"`.
   30     39   
/// This match expression is forward-compatible when executed with a newer
   31     40   
/// version of SDK where the variant `IndexStatus::NewFeature` is defined.
   32     41   
/// Specifically, when `indexstatus` represents `NewFeature`,
   33     42   
/// the execution path will hit the second last match arm as before by virtue of
   34     43   
/// calling `as_str` on `IndexStatus::NewFeature` also yielding `"NewFeature"`.
   35         -
///
   36         -
/// Explicitly matching on the `Unknown` variant should
          44  +
/// /* ClientEnumGenerator.kt:273 */
          45  +
/// /* ClientEnumGenerator.kt:274 */Explicitly matching on the `Unknown` variant should
   37     46   
/// be avoided for two reasons:
   38     47   
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
   39     48   
/// - It might inadvertently shadow other intended match arms.
   40         -
///
          49  +
/// /* ClientEnumGenerator.kt:282 */
          50  +
/* EnumGenerator.kt:154 */
   41     51   
#[allow(missing_docs)] // documentation missing in model
          52  +
/* RustType.kt:516 */
   42     53   
#[non_exhaustive]
          54  +
/* RustType.kt:516 */
   43     55   
#[derive(
   44     56   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::Ord, ::std::cmp::PartialEq, ::std::cmp::PartialOrd, ::std::fmt::Debug, ::std::hash::Hash,
   45     57   
)]
   46         -
pub enum IndexStatus {
   47         -
    #[allow(missing_docs)] // documentation missing in model
          58  +
pub /* EnumGenerator.kt:267 */ enum IndexStatus {
          59  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          60  +
    /* EnumGenerator.kt:143 */
   48     61   
    Active,
   49         -
    #[allow(missing_docs)] // documentation missing in model
          62  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          63  +
    /* EnumGenerator.kt:143 */
   50     64   
    Creating,
   51         -
    #[allow(missing_docs)] // documentation missing in model
          65  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          66  +
    /* EnumGenerator.kt:143 */
   52     67   
    Deleting,
   53         -
    #[allow(missing_docs)] // documentation missing in model
          68  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          69  +
    /* EnumGenerator.kt:143 */
   54     70   
    Updating,
   55         -
    /// `Unknown` contains new variants that have been added since this code was generated.
          71  +
    /// /* ClientEnumGenerator.kt:175 */`Unknown` contains new variants that have been added since this code was generated.
          72  +
    /* ClientEnumGenerator.kt:176 */
   56     73   
    #[deprecated(note = "Don't directly match on `Unknown`. See the docs on this enum for the correct way to handle unknown variants.")]
   57         -
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue),
          74  +
    /* ClientEnumGenerator.kt:179 */
          75  +
    Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue), /* EnumGenerator.kt:267 */
   58     76   
}
          77  +
/* ClientEnumGenerator.kt:42 */
   59     78   
impl ::std::convert::From<&str> for IndexStatus {
   60     79   
    fn from(s: &str) -> Self {
   61     80   
        match s {
   62     81   
            "ACTIVE" => IndexStatus::Active,
   63     82   
            "CREATING" => IndexStatus::Creating,
   64     83   
            "DELETING" => IndexStatus::Deleting,
   65     84   
            "UPDATING" => IndexStatus::Updating,
   66     85   
            other => IndexStatus::Unknown(crate::primitives::sealed_enum_unknown::UnknownVariantValue(other.to_owned())),
   67     86   
        }
   68     87   
    }
   69     88   
}
          89  +
/* ClientEnumGenerator.kt:68 */
   70     90   
impl ::std::str::FromStr for IndexStatus {
   71     91   
    type Err = ::std::convert::Infallible;
   72     92   
   73     93   
    fn from_str(s: &str) -> ::std::result::Result<Self, <Self as ::std::str::FromStr>::Err> {
   74     94   
        ::std::result::Result::Ok(IndexStatus::from(s))
   75     95   
    }
   76     96   
}
          97  +
/* EnumGenerator.kt:274 */
   77     98   
impl IndexStatus {
   78     99   
    /// Returns the `&str` value of the enum member.
   79    100   
    pub fn as_str(&self) -> &str {
   80    101   
        match self {
   81    102   
            IndexStatus::Active => "ACTIVE",
   82    103   
            IndexStatus::Creating => "CREATING",
   83    104   
            IndexStatus::Deleting => "DELETING",
   84    105   
            IndexStatus::Updating => "UPDATING",
   85    106   
            IndexStatus::Unknown(value) => value.as_str(),
   86    107   
        }
   87    108   
    }
   88    109   
    /// Returns all the `&str` representations of the enum members.
   89    110   
    pub const fn values() -> &'static [&'static str] {
   90    111   
        &["ACTIVE", "CREATING", "DELETING", "UPDATING"]
   91    112   
    }
   92    113   
}
         114  +
/* EnumGenerator.kt:223 */
   93    115   
impl ::std::convert::AsRef<str> for IndexStatus {
   94    116   
    fn as_ref(&self) -> &str {
   95    117   
        self.as_str()
   96    118   
    }
   97    119   
}
         120  +
/* ClientEnumGenerator.kt:117 */
   98    121   
impl IndexStatus {
   99    122   
    /// Parses the enum value while disallowing unknown variants.
  100    123   
    ///
  101    124   
    /// Unknown variants will result in an error.
  102    125   
    pub fn try_parse(value: &str) -> ::std::result::Result<Self, crate::error::UnknownVariantError> {
  103    126   
        match Self::from(value) {
  104    127   
            #[allow(deprecated)]
  105    128   
            Self::Unknown(_) => ::std::result::Result::Err(crate::error::UnknownVariantError::new(value)),
  106    129   
            known => Ok(known),
  107    130   
        }
  108    131   
    }
  109    132   
}
         133  +
/* ClientEnumGenerator.kt:136 */
  110    134   
impl ::std::fmt::Display for IndexStatus {
  111    135   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  112    136   
        match self {
  113    137   
            IndexStatus::Active => write!(f, "ACTIVE"),
  114    138   
            IndexStatus::Creating => write!(f, "CREATING"),
  115    139   
            IndexStatus::Deleting => write!(f, "DELETING"),
  116    140   
            IndexStatus::Updating => write!(f, "UPDATING"),
  117    141   
            IndexStatus::Unknown(value) => write!(f, "{}", value),
  118    142   
        }
  119    143   
    }

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

@@ -1,1 +96,150 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Information about item collections, if any, that were affected by the operation. <code>ItemCollectionMetrics</code> is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Information about item collections, if any, that were affected by the operation. <code>ItemCollectionMetrics</code> is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response.</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 ItemCollectionMetrics {
    7         -
    /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ItemCollectionMetrics {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
    8     10   
    pub item_collection_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
    9         -
    /// <p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   10     12   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
   11     13   
    pub size_estimate_range_gb: ::std::option::Option<::std::vec::Vec<f64>>,
          14  +
    /* StructureGenerator.kt:201 */
   12     15   
}
          16  +
/* StructureGenerator.kt:135 */
   13     17   
impl ItemCollectionMetrics {
   14         -
    /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          18  +
    /// /* StructureGenerator.kt:231 */<p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          19  +
    /* StructureGenerator.kt:166 */
   15     20   
    pub fn item_collection_key(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          21  +
        /* StructureGenerator.kt:170 */
   16     22   
        self.item_collection_key.as_ref()
          23  +
        /* StructureGenerator.kt:166 */
   17     24   
    }
   18         -
    /// <p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
          25  +
    /// /* StructureGenerator.kt:231 */<p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   19     26   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
   20         -
    ///
   21         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.size_estimate_range_gb.is_none()`.
          27  +
    /// /* StructureGenerator.kt:162 */
          28  +
    /// /* 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 `.size_estimate_range_gb.is_none()`.
          29  +
    /* StructureGenerator.kt:166 */
   22     30   
    pub fn size_estimate_range_gb(&self) -> &[f64] {
   23         -
        self.size_estimate_range_gb.as_deref().unwrap_or_default()
          31  +
        /* StructureGenerator.kt:169 */
          32  +
        self.size_estimate_range_gb
          33  +
            .as_deref()
          34  +
            /* StructureGenerator.kt:175 */
          35  +
            .unwrap_or_default()
          36  +
        /* StructureGenerator.kt:166 */
   24     37   
    }
          38  +
    /* StructureGenerator.kt:135 */
   25     39   
}
          40  +
/* ClientCodegenVisitor.kt:237 */
   26     41   
impl ItemCollectionMetrics {
   27         -
    /// Creates a new builder-style object to manufacture [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
          42  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
          43  +
    /* BuilderGenerator.kt:175 */
   28     44   
    pub fn builder() -> crate::types::builders::ItemCollectionMetricsBuilder {
          45  +
        /* BuilderGenerator.kt:176 */
   29     46   
        crate::types::builders::ItemCollectionMetricsBuilder::default()
          47  +
        /* BuilderGenerator.kt:175 */
   30     48   
    }
          49  +
    /* ClientCodegenVisitor.kt:237 */
   31     50   
}
   32     51   
   33         -
/// A builder for [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
          52  +
/// /* BuilderGenerator.kt:342 */A builder for [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
          53  +
/* RustType.kt:516 */
   34     54   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          55  +
/* RustType.kt:516 */
   35     56   
#[non_exhaustive]
          57  +
/* BuilderGenerator.kt:345 */
   36     58   
pub struct ItemCollectionMetricsBuilder {
          59  +
    /* BuilderGenerator.kt:275 */
   37     60   
    pub(crate) item_collection_key: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
          61  +
    /* BuilderGenerator.kt:275 */
   38     62   
    pub(crate) size_estimate_range_gb: ::std::option::Option<::std::vec::Vec<f64>>,
          63  +
    /* BuilderGenerator.kt:345 */
   39     64   
}
          65  +
/* BuilderGenerator.kt:355 */
   40     66   
impl ItemCollectionMetricsBuilder {
   41         -
    /// Adds a key-value pair to `item_collection_key`.
          67  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `item_collection_key`.
          68  +
    /* BuilderGenerator.kt:437 */
   42     69   
    ///
   43         -
    /// To override the contents of this collection use [`set_item_collection_key`](Self::set_item_collection_key).
          70  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_item_collection_key`](Self::set_item_collection_key).
          71  +
    /* BuilderGenerator.kt:439 */
   44     72   
    ///
   45         -
    /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          73  +
    /// /* BuilderGenerator.kt:440 */<p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          74  +
    /* BuilderGenerator.kt:445 */
   46     75   
    pub fn item_collection_key(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
          76  +
        /* BuilderGenerator.kt:448 */
   47     77   
        let mut hash_map = self.item_collection_key.unwrap_or_default();
   48     78   
        hash_map.insert(k.into(), v);
   49     79   
        self.item_collection_key = ::std::option::Option::Some(hash_map);
   50     80   
        self
          81  +
        /* BuilderGenerator.kt:445 */
   51     82   
    }
   52         -
    /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          83  +
    /// /* BuilderGenerator.kt:312 */<p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          84  +
    /* BuilderGenerator.kt:314 */
   53     85   
    pub fn set_item_collection_key(
   54     86   
        mut self,
   55     87   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   56     88   
    ) -> Self {
          89  +
        /* BuilderGenerator.kt:315 */
   57     90   
        self.item_collection_key = input;
   58     91   
        self
          92  +
        /* BuilderGenerator.kt:314 */
   59     93   
    }
   60         -
    /// <p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          94  +
    /// /* BuilderGenerator.kt:334 */<p>The partition key value of the item collection. This value is the same as the partition key value of the item.</p>
          95  +
    /* BuilderGenerator.kt:336 */
   61     96   
    pub fn get_item_collection_key(
   62     97   
        &self,
   63     98   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          99  +
        /* BuilderGenerator.kt:337 */
   64    100   
        &self.item_collection_key
         101  +
        /* BuilderGenerator.kt:336 */
   65    102   
    }
   66         -
    /// Appends an item to `size_estimate_range_gb`.
         103  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `size_estimate_range_gb`.
         104  +
    /* BuilderGenerator.kt:411 */
   67    105   
    ///
   68         -
    /// To override the contents of this collection use [`set_size_estimate_range_gb`](Self::set_size_estimate_range_gb).
         106  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_size_estimate_range_gb`](Self::set_size_estimate_range_gb).
         107  +
    /* BuilderGenerator.kt:413 */
   69    108   
    ///
   70         -
    /// <p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
         109  +
    /// /* BuilderGenerator.kt:414 */<p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   71    110   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
         111  +
    /* BuilderGenerator.kt:418 */
   72    112   
    pub fn size_estimate_range_gb(mut self, input: f64) -> Self {
         113  +
        /* BuilderGenerator.kt:419 */
   73    114   
        let mut v = self.size_estimate_range_gb.unwrap_or_default();
   74    115   
        v.push(input);
   75    116   
        self.size_estimate_range_gb = ::std::option::Option::Some(v);
   76    117   
        self
         118  +
        /* BuilderGenerator.kt:418 */
   77    119   
    }
   78         -
    /// <p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
         120  +
    /// /* BuilderGenerator.kt:312 */<p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   79    121   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
         122  +
    /* BuilderGenerator.kt:314 */
   80    123   
    pub fn set_size_estimate_range_gb(mut self, input: ::std::option::Option<::std::vec::Vec<f64>>) -> Self {
         124  +
        /* BuilderGenerator.kt:315 */
   81    125   
        self.size_estimate_range_gb = input;
   82    126   
        self
         127  +
        /* BuilderGenerator.kt:314 */
   83    128   
    }
   84         -
    /// <p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
         129  +
    /// /* BuilderGenerator.kt:334 */<p>An estimate of item collection size, in gigabytes. This value 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 that table. Use this estimate to measure whether a local secondary index is approaching its size limit.</p>
   85    130   
    /// <p>The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.</p>
         131  +
    /* BuilderGenerator.kt:336 */
   86    132   
    pub fn get_size_estimate_range_gb(&self) -> &::std::option::Option<::std::vec::Vec<f64>> {
         133  +
        /* BuilderGenerator.kt:337 */
   87    134   
        &self.size_estimate_range_gb
         135  +
        /* BuilderGenerator.kt:336 */
   88    136   
    }
   89         -
    /// Consumes the builder and constructs a [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
         137  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ItemCollectionMetrics`](crate::types::ItemCollectionMetrics).
         138  +
    /* BuilderGenerator.kt:253 */
   90    139   
    pub fn build(self) -> crate::types::ItemCollectionMetrics {
         140  +
        /* BuilderGenerator.kt:477 */
   91    141   
        crate::types::ItemCollectionMetrics {
   92         -
            item_collection_key: self.item_collection_key,
         142  +
            /* BuilderGenerator.kt:481 */ item_collection_key: self.item_collection_key,
         143  +
            /* BuilderGenerator.kt:481 */
   93    144   
            size_estimate_range_gb: self.size_estimate_range_gb,
         145  +
            /* BuilderGenerator.kt:477 */
   94    146   
        }
         147  +
        /* BuilderGenerator.kt:253 */
   95    148   
    }
         149  +
    /* BuilderGenerator.kt:355 */
   96    150   
}

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

@@ -1,1 +57,94 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Details for the requested item.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Details for the requested item.</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 ItemResponse {
    7         -
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ItemResponse {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Map of attribute data consisting of the data type and attribute value.</p>
    8     10   
    pub item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl ItemResponse {
   11         -
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Map of attribute data consisting of the data type and attribute value.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn item(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          18  +
        /* StructureGenerator.kt:170 */
   13     19   
        self.item.as_ref()
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl ItemResponse {
   17         -
    /// Creates a new builder-style object to manufacture [`ItemResponse`](crate::types::ItemResponse).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ItemResponse`](crate::types::ItemResponse).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::ItemResponseBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::ItemResponseBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`ItemResponse`](crate::types::ItemResponse).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`ItemResponse`](crate::types::ItemResponse).
          37  +
/* RustType.kt:516 */
   24     38   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          39  +
/* RustType.kt:516 */
   25     40   
#[non_exhaustive]
          41  +
/* BuilderGenerator.kt:345 */
   26     42   
pub struct ItemResponseBuilder {
          43  +
    /* BuilderGenerator.kt:275 */
   27     44   
    pub(crate) item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
          45  +
    /* BuilderGenerator.kt:345 */
   28     46   
}
          47  +
/* BuilderGenerator.kt:355 */
   29     48   
impl ItemResponseBuilder {
   30         -
    /// Adds a key-value pair to `item`.
          49  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `item`.
          50  +
    /* BuilderGenerator.kt:437 */
   31     51   
    ///
   32         -
    /// To override the contents of this collection use [`set_item`](Self::set_item).
          52  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_item`](Self::set_item).
          53  +
    /* BuilderGenerator.kt:439 */
   33     54   
    ///
   34         -
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
          55  +
    /// /* BuilderGenerator.kt:440 */<p>Map of attribute data consisting of the data type and attribute value.</p>
          56  +
    /* BuilderGenerator.kt:445 */
   35     57   
    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
          58  +
        /* BuilderGenerator.kt:448 */
   36     59   
        let mut hash_map = self.item.unwrap_or_default();
   37     60   
        hash_map.insert(k.into(), v);
   38     61   
        self.item = ::std::option::Option::Some(hash_map);
   39     62   
        self
          63  +
        /* BuilderGenerator.kt:445 */
   40     64   
    }
   41         -
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
          65  +
    /// /* BuilderGenerator.kt:312 */<p>Map of attribute data consisting of the data type and attribute value.</p>
          66  +
    /* BuilderGenerator.kt:314 */
   42     67   
    pub fn set_item(
   43     68   
        mut self,
   44     69   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   45     70   
    ) -> Self {
          71  +
        /* BuilderGenerator.kt:315 */
   46     72   
        self.item = input;
   47     73   
        self
          74  +
        /* BuilderGenerator.kt:314 */
   48     75   
    }
   49         -
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
          76  +
    /// /* BuilderGenerator.kt:334 */<p>Map of attribute data consisting of the data type and attribute value.</p>
          77  +
    /* BuilderGenerator.kt:336 */
   50     78   
    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          79  +
        /* BuilderGenerator.kt:337 */
   51     80   
        &self.item
          81  +
        /* BuilderGenerator.kt:336 */
   52     82   
    }
   53         -
    /// Consumes the builder and constructs a [`ItemResponse`](crate::types::ItemResponse).
          83  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ItemResponse`](crate::types::ItemResponse).
          84  +
    /* BuilderGenerator.kt:253 */
   54     85   
    pub fn build(self) -> crate::types::ItemResponse {
   55         -
        crate::types::ItemResponse { item: self.item }
          86  +
        /* BuilderGenerator.kt:477 */
          87  +
        crate::types::ItemResponse {
          88  +
            /* BuilderGenerator.kt:481 */ item: self.item,
          89  +
            /* BuilderGenerator.kt:477 */
          90  +
        }
          91  +
        /* BuilderGenerator.kt:253 */
   56     92   
    }
          93  +
    /* BuilderGenerator.kt:355 */
   57     94   
}

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

@@ -1,1 +135,180 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents <i>a single element</i> of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents <i>a single element</i> of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.</p>
    4      4   
/// <p>A <code>KeySchemaElement</code> represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one <code>KeySchemaElement</code> (for the partition key). A composite primary key would require one <code>KeySchemaElement</code> for the partition key, and another <code>KeySchemaElement</code> for the sort key.</p>
    5      5   
/// <p>A <code>KeySchemaElement</code> must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.</p>
           6  +
/* RustType.kt:516 */
    6      7   
#[non_exhaustive]
           8  +
/* RustType.kt:516 */
    7      9   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    8         -
pub struct KeySchemaElement {
    9         -
    /// <p>The name of a key attribute.</p>
          10  +
pub /* StructureGenerator.kt:201 */ struct KeySchemaElement {
          11  +
    /// /* StructureGenerator.kt:231 */<p>The name of a key attribute.</p>
   10     12   
    pub attribute_name: ::std::string::String,
   11         -
    /// <p>The role that this key attribute will assume:</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The role that this key attribute will assume:</p>
   12     14   
    /// <ul>
   13     15   
    /// <li>
   14     16   
    /// <p><code>HASH</code> - partition key</p></li>
   15     17   
    /// <li>
   16     18   
    /// <p><code>RANGE</code> - sort key</p></li>
   17     19   
    /// </ul><note>
   18     20   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   19     21   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   20     22   
    /// </note>
   21     23   
    pub key_type: crate::types::KeyType,
          24  +
    /* StructureGenerator.kt:201 */
   22     25   
}
          26  +
/* StructureGenerator.kt:135 */
   23     27   
impl KeySchemaElement {
   24         -
    /// <p>The name of a key attribute.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The name of a key attribute.</p>
          29  +
    /* StructureGenerator.kt:166 */
   25     30   
    pub fn attribute_name(&self) -> &str {
          31  +
        /* StructureGenerator.kt:171 */
   26     32   
        use std::ops::Deref;
   27     33   
        self.attribute_name.deref()
          34  +
        /* StructureGenerator.kt:166 */
   28     35   
    }
   29         -
    /// <p>The role that this key attribute will assume:</p>
          36  +
    /// /* StructureGenerator.kt:231 */<p>The role that this key attribute will assume:</p>
   30     37   
    /// <ul>
   31     38   
    /// <li>
   32     39   
    /// <p><code>HASH</code> - partition key</p></li>
   33     40   
    /// <li>
   34     41   
    /// <p><code>RANGE</code> - sort key</p></li>
   35     42   
    /// </ul><note>
   36     43   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   37     44   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   38     45   
    /// </note>
          46  +
    /* StructureGenerator.kt:166 */
   39     47   
    pub fn key_type(&self) -> &crate::types::KeyType {
          48  +
        /* StructureGenerator.kt:172 */
   40     49   
        &self.key_type
          50  +
        /* StructureGenerator.kt:166 */
   41     51   
    }
          52  +
    /* StructureGenerator.kt:135 */
   42     53   
}
          54  +
/* ClientCodegenVisitor.kt:237 */
   43     55   
impl KeySchemaElement {
   44         -
    /// Creates a new builder-style object to manufacture [`KeySchemaElement`](crate::types::KeySchemaElement).
          56  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`KeySchemaElement`](crate::types::KeySchemaElement).
          57  +
    /* BuilderGenerator.kt:175 */
   45     58   
    pub fn builder() -> crate::types::builders::KeySchemaElementBuilder {
          59  +
        /* BuilderGenerator.kt:176 */
   46     60   
        crate::types::builders::KeySchemaElementBuilder::default()
          61  +
        /* BuilderGenerator.kt:175 */
   47     62   
    }
          63  +
    /* ClientCodegenVisitor.kt:237 */
   48     64   
}
   49     65   
   50         -
/// A builder for [`KeySchemaElement`](crate::types::KeySchemaElement).
          66  +
/// /* BuilderGenerator.kt:342 */A builder for [`KeySchemaElement`](crate::types::KeySchemaElement).
          67  +
/* RustType.kt:516 */
   51     68   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          69  +
/* RustType.kt:516 */
   52     70   
#[non_exhaustive]
          71  +
/* BuilderGenerator.kt:345 */
   53     72   
pub struct KeySchemaElementBuilder {
   54         -
    pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
   55         -
    pub(crate) key_type: ::std::option::Option<crate::types::KeyType>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          74  +
    /* BuilderGenerator.kt:275 */ pub(crate) key_type: ::std::option::Option<crate::types::KeyType>,
          75  +
    /* BuilderGenerator.kt:345 */
   56     76   
}
          77  +
/* BuilderGenerator.kt:355 */
   57     78   
impl KeySchemaElementBuilder {
   58         -
    /// <p>The name of a key attribute.</p>
   59         -
    /// This field is required.
          79  +
    /// /* BuilderGenerator.kt:286 */<p>The name of a key attribute.</p>
          80  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          81  +
    /* BuilderGenerator.kt:291 */
   60     82   
    pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          83  +
        /* BuilderGenerator.kt:292 */
   61     84   
        self.attribute_name = ::std::option::Option::Some(input.into());
          85  +
        /* BuilderGenerator.kt:293 */
   62     86   
        self
          87  +
        /* BuilderGenerator.kt:291 */
   63     88   
    }
   64         -
    /// <p>The name of a key attribute.</p>
          89  +
    /// /* BuilderGenerator.kt:312 */<p>The name of a key attribute.</p>
          90  +
    /* BuilderGenerator.kt:314 */
   65     91   
    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          92  +
        /* BuilderGenerator.kt:315 */
   66     93   
        self.attribute_name = input;
   67     94   
        self
          95  +
        /* BuilderGenerator.kt:314 */
   68     96   
    }
   69         -
    /// <p>The name of a key attribute.</p>
          97  +
    /// /* BuilderGenerator.kt:334 */<p>The name of a key attribute.</p>
          98  +
    /* BuilderGenerator.kt:336 */
   70     99   
    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
         100  +
        /* BuilderGenerator.kt:337 */
   71    101   
        &self.attribute_name
         102  +
        /* BuilderGenerator.kt:336 */
   72    103   
    }
   73         -
    /// <p>The role that this key attribute will assume:</p>
         104  +
    /// /* BuilderGenerator.kt:286 */<p>The role that this key attribute will assume:</p>
   74    105   
    /// <ul>
   75    106   
    /// <li>
   76    107   
    /// <p><code>HASH</code> - partition key</p></li>
   77    108   
    /// <li>
   78    109   
    /// <p><code>RANGE</code> - sort key</p></li>
   79    110   
    /// </ul><note>
   80    111   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   81    112   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   82    113   
    /// </note>
   83         -
    /// This field is required.
         114  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         115  +
    /* BuilderGenerator.kt:291 */
   84    116   
    pub fn key_type(mut self, input: crate::types::KeyType) -> Self {
         117  +
        /* BuilderGenerator.kt:292 */
   85    118   
        self.key_type = ::std::option::Option::Some(input);
         119  +
        /* BuilderGenerator.kt:293 */
   86    120   
        self
         121  +
        /* BuilderGenerator.kt:291 */
   87    122   
    }
   88         -
    /// <p>The role that this key attribute will assume:</p>
         123  +
    /// /* BuilderGenerator.kt:312 */<p>The role that this key attribute will assume:</p>
   89    124   
    /// <ul>
   90    125   
    /// <li>
   91    126   
    /// <p><code>HASH</code> - partition key</p></li>
   92    127   
    /// <li>
   93    128   
    /// <p><code>RANGE</code> - sort key</p></li>
   94    129   
    /// </ul><note>
   95    130   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
   96    131   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
   97    132   
    /// </note>
         133  +
    /* BuilderGenerator.kt:314 */
   98    134   
    pub fn set_key_type(mut self, input: ::std::option::Option<crate::types::KeyType>) -> Self {
         135  +
        /* BuilderGenerator.kt:315 */
   99    136   
        self.key_type = input;
  100    137   
        self
         138  +
        /* BuilderGenerator.kt:314 */
  101    139   
    }
  102         -
    /// <p>The role that this key attribute will assume:</p>
         140  +
    /// /* BuilderGenerator.kt:334 */<p>The role that this key attribute will assume:</p>
  103    141   
    /// <ul>
  104    142   
    /// <li>
  105    143   
    /// <p><code>HASH</code> - partition key</p></li>
  106    144   
    /// <li>
  107    145   
    /// <p><code>RANGE</code> - sort key</p></li>
  108    146   
    /// </ul><note>
  109    147   
    /// <p>The partition key of an item is also known as its <i>hash attribute</i>. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.</p>
  110    148   
    /// <p>The sort key of an item is also known as its <i>range attribute</i>. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.</p>
  111    149   
    /// </note>
         150  +
    /* BuilderGenerator.kt:336 */
  112    151   
    pub fn get_key_type(&self) -> &::std::option::Option<crate::types::KeyType> {
         152  +
        /* BuilderGenerator.kt:337 */
  113    153   
        &self.key_type
         154  +
        /* BuilderGenerator.kt:336 */
  114    155   
    }
  115         -
    /// Consumes the builder and constructs a [`KeySchemaElement`](crate::types::KeySchemaElement).
  116         -
    /// This method will fail if any of the following fields are not set:
  117         -
    /// - [`attribute_name`](crate::types::builders::KeySchemaElementBuilder::attribute_name)
  118         -
    /// - [`key_type`](crate::types::builders::KeySchemaElementBuilder::key_type)
         156  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`KeySchemaElement`](crate::types::KeySchemaElement).
         157  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         158  +
    /// /* BuilderGenerator.kt:246 */- [`attribute_name`](crate::types::builders::KeySchemaElementBuilder::attribute_name)
         159  +
    /// /* BuilderGenerator.kt:246 */- [`key_type`](crate::types::builders::KeySchemaElementBuilder::key_type)
         160  +
    /* BuilderGenerator.kt:253 */
  119    161   
    pub fn build(self) -> ::std::result::Result<crate::types::KeySchemaElement, ::aws_smithy_types::error::operation::BuildError> {
  120         -
        ::std::result::Result::Ok(crate::types::KeySchemaElement {
  121         -
            attribute_name: self.attribute_name.ok_or_else(|| {
  122         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  123         -
                    "attribute_name",
  124         -
                    "attribute_name was not specified but it is required when building KeySchemaElement",
  125         -
                )
  126         -
            })?,
  127         -
            key_type: self.key_type.ok_or_else(|| {
  128         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  129         -
                    "key_type",
  130         -
                    "key_type was not specified but it is required when building KeySchemaElement",
  131         -
                )
  132         -
            })?,
  133         -
        })
         162  +
        /* BuilderGenerator.kt:254 */
         163  +
        ::std::result::Result::Ok(
         164  +
            /* BuilderGenerator.kt:477 */crate::types::KeySchemaElement {
         165  +
                /* BuilderGenerator.kt:481 */attribute_name: self.attribute_name
         166  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         167  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("attribute_name", "attribute_name was not specified but it is required when building KeySchemaElement")
         168  +
                    /* BuilderGenerator.kt:494 */)?
         169  +
                ,
         170  +
                /* BuilderGenerator.kt:481 */key_type: self.key_type
         171  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         172  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("key_type", "key_type was not specified but it is required when building KeySchemaElement")
         173  +
                    /* BuilderGenerator.kt:494 */)?
         174  +
                ,
         175  +
            /* BuilderGenerator.kt:477 */}
         176  +
        /* BuilderGenerator.kt:254 */)
         177  +
        /* BuilderGenerator.kt:253 */
  134    178   
    }
         179  +
    /* BuilderGenerator.kt:355 */
  135    180   
}