Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

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

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

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

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

@@ -1,1 +94,156 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Describes a Kinesis data stream destination.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Describes a Kinesis data stream destination.</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 KinesisDataStreamDestination {
    7         -
    /// <p>The ARN for a specific Kinesis data stream.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct KinesisDataStreamDestination {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The ARN for a specific Kinesis data stream.</p>
    8     10   
    pub stream_arn: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The current status of replication.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The current status of replication.</p>
   10     12   
    pub destination_status: ::std::option::Option<crate::types::DestinationStatus>,
   11         -
    /// <p>The human-readable string that corresponds to the replica status.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The human-readable string that corresponds to the replica status.</p>
   12     14   
    pub destination_status_description: ::std::option::Option<::std::string::String>,
          15  +
    /* StructureGenerator.kt:201 */
   13     16   
}
          17  +
/* StructureGenerator.kt:135 */
   14     18   
impl KinesisDataStreamDestination {
   15         -
    /// <p>The ARN for a specific Kinesis data stream.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The ARN for a specific Kinesis data stream.</p>
          20  +
    /* StructureGenerator.kt:166 */
   16     21   
    pub fn stream_arn(&self) -> ::std::option::Option<&str> {
          22  +
        /* StructureGenerator.kt:169 */
   17     23   
        self.stream_arn.as_deref()
          24  +
        /* StructureGenerator.kt:166 */
   18     25   
    }
   19         -
    /// <p>The current status of replication.</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>The current status of replication.</p>
          27  +
    /* StructureGenerator.kt:166 */
   20     28   
    pub fn destination_status(&self) -> ::std::option::Option<&crate::types::DestinationStatus> {
          29  +
        /* StructureGenerator.kt:170 */
   21     30   
        self.destination_status.as_ref()
          31  +
        /* StructureGenerator.kt:166 */
   22     32   
    }
   23         -
    /// <p>The human-readable string that corresponds to the replica status.</p>
          33  +
    /// /* StructureGenerator.kt:231 */<p>The human-readable string that corresponds to the replica status.</p>
          34  +
    /* StructureGenerator.kt:166 */
   24     35   
    pub fn destination_status_description(&self) -> ::std::option::Option<&str> {
          36  +
        /* StructureGenerator.kt:169 */
   25     37   
        self.destination_status_description.as_deref()
          38  +
        /* StructureGenerator.kt:166 */
   26     39   
    }
          40  +
    /* StructureGenerator.kt:135 */
   27     41   
}
          42  +
/* ClientCodegenVisitor.kt:237 */
   28     43   
impl KinesisDataStreamDestination {
   29         -
    /// Creates a new builder-style object to manufacture [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
          44  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
          45  +
    /* BuilderGenerator.kt:175 */
   30     46   
    pub fn builder() -> crate::types::builders::KinesisDataStreamDestinationBuilder {
          47  +
        /* BuilderGenerator.kt:176 */
   31     48   
        crate::types::builders::KinesisDataStreamDestinationBuilder::default()
          49  +
        /* BuilderGenerator.kt:175 */
   32     50   
    }
          51  +
    /* ClientCodegenVisitor.kt:237 */
   33     52   
}
   34     53   
   35         -
/// A builder for [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
          54  +
/// /* BuilderGenerator.kt:342 */A builder for [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
          55  +
/* RustType.kt:516 */
   36     56   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          57  +
/* RustType.kt:516 */
   37     58   
#[non_exhaustive]
          59  +
/* BuilderGenerator.kt:345 */
   38     60   
pub struct KinesisDataStreamDestinationBuilder {
   39         -
    pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
   40         -
    pub(crate) destination_status: ::std::option::Option<crate::types::DestinationStatus>,
          61  +
    /* BuilderGenerator.kt:275 */ pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
          62  +
    /* BuilderGenerator.kt:275 */ pub(crate) destination_status: ::std::option::Option<crate::types::DestinationStatus>,
          63  +
    /* BuilderGenerator.kt:275 */
   41     64   
    pub(crate) destination_status_description: ::std::option::Option<::std::string::String>,
          65  +
    /* BuilderGenerator.kt:345 */
   42     66   
}
          67  +
/* BuilderGenerator.kt:355 */
   43     68   
impl KinesisDataStreamDestinationBuilder {
   44         -
    /// <p>The ARN for a specific Kinesis data stream.</p>
          69  +
    /// /* BuilderGenerator.kt:286 */<p>The ARN for a specific Kinesis data stream.</p>
          70  +
    /* BuilderGenerator.kt:291 */
   45     71   
    pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          72  +
        /* BuilderGenerator.kt:292 */
   46     73   
        self.stream_arn = ::std::option::Option::Some(input.into());
          74  +
        /* BuilderGenerator.kt:293 */
   47     75   
        self
          76  +
        /* BuilderGenerator.kt:291 */
   48     77   
    }
   49         -
    /// <p>The ARN for a specific Kinesis data stream.</p>
          78  +
    /// /* BuilderGenerator.kt:312 */<p>The ARN for a specific Kinesis data stream.</p>
          79  +
    /* BuilderGenerator.kt:314 */
   50     80   
    pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          81  +
        /* BuilderGenerator.kt:315 */
   51     82   
        self.stream_arn = input;
   52     83   
        self
          84  +
        /* BuilderGenerator.kt:314 */
   53     85   
    }
   54         -
    /// <p>The ARN for a specific Kinesis data stream.</p>
          86  +
    /// /* BuilderGenerator.kt:334 */<p>The ARN for a specific Kinesis data stream.</p>
          87  +
    /* BuilderGenerator.kt:336 */
   55     88   
    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
          89  +
        /* BuilderGenerator.kt:337 */
   56     90   
        &self.stream_arn
          91  +
        /* BuilderGenerator.kt:336 */
   57     92   
    }
   58         -
    /// <p>The current status of replication.</p>
          93  +
    /// /* BuilderGenerator.kt:286 */<p>The current status of replication.</p>
          94  +
    /* BuilderGenerator.kt:291 */
   59     95   
    pub fn destination_status(mut self, input: crate::types::DestinationStatus) -> Self {
          96  +
        /* BuilderGenerator.kt:292 */
   60     97   
        self.destination_status = ::std::option::Option::Some(input);
          98  +
        /* BuilderGenerator.kt:293 */
   61     99   
        self
         100  +
        /* BuilderGenerator.kt:291 */
   62    101   
    }
   63         -
    /// <p>The current status of replication.</p>
         102  +
    /// /* BuilderGenerator.kt:312 */<p>The current status of replication.</p>
         103  +
    /* BuilderGenerator.kt:314 */
   64    104   
    pub fn set_destination_status(mut self, input: ::std::option::Option<crate::types::DestinationStatus>) -> Self {
         105  +
        /* BuilderGenerator.kt:315 */
   65    106   
        self.destination_status = input;
   66    107   
        self
         108  +
        /* BuilderGenerator.kt:314 */
   67    109   
    }
   68         -
    /// <p>The current status of replication.</p>
         110  +
    /// /* BuilderGenerator.kt:334 */<p>The current status of replication.</p>
         111  +
    /* BuilderGenerator.kt:336 */
   69    112   
    pub fn get_destination_status(&self) -> &::std::option::Option<crate::types::DestinationStatus> {
         113  +
        /* BuilderGenerator.kt:337 */
   70    114   
        &self.destination_status
         115  +
        /* BuilderGenerator.kt:336 */
   71    116   
    }
   72         -
    /// <p>The human-readable string that corresponds to the replica status.</p>
         117  +
    /// /* BuilderGenerator.kt:286 */<p>The human-readable string that corresponds to the replica status.</p>
         118  +
    /* BuilderGenerator.kt:291 */
   73    119   
    pub fn destination_status_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         120  +
        /* BuilderGenerator.kt:292 */
   74    121   
        self.destination_status_description = ::std::option::Option::Some(input.into());
         122  +
        /* BuilderGenerator.kt:293 */
   75    123   
        self
         124  +
        /* BuilderGenerator.kt:291 */
   76    125   
    }
   77         -
    /// <p>The human-readable string that corresponds to the replica status.</p>
         126  +
    /// /* BuilderGenerator.kt:312 */<p>The human-readable string that corresponds to the replica status.</p>
         127  +
    /* BuilderGenerator.kt:314 */
   78    128   
    pub fn set_destination_status_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         129  +
        /* BuilderGenerator.kt:315 */
   79    130   
        self.destination_status_description = input;
   80    131   
        self
         132  +
        /* BuilderGenerator.kt:314 */
   81    133   
    }
   82         -
    /// <p>The human-readable string that corresponds to the replica status.</p>
         134  +
    /// /* BuilderGenerator.kt:334 */<p>The human-readable string that corresponds to the replica status.</p>
         135  +
    /* BuilderGenerator.kt:336 */
   83    136   
    pub fn get_destination_status_description(&self) -> &::std::option::Option<::std::string::String> {
         137  +
        /* BuilderGenerator.kt:337 */
   84    138   
        &self.destination_status_description
         139  +
        /* BuilderGenerator.kt:336 */
   85    140   
    }
   86         -
    /// Consumes the builder and constructs a [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
         141  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`KinesisDataStreamDestination`](crate::types::KinesisDataStreamDestination).
         142  +
    /* BuilderGenerator.kt:253 */
   87    143   
    pub fn build(self) -> crate::types::KinesisDataStreamDestination {
         144  +
        /* BuilderGenerator.kt:477 */
   88    145   
        crate::types::KinesisDataStreamDestination {
   89         -
            stream_arn: self.stream_arn,
         146  +
            /* BuilderGenerator.kt:481 */ stream_arn: self.stream_arn,
         147  +
            /* BuilderGenerator.kt:481 */
   90    148   
            destination_status: self.destination_status,
         149  +
            /* BuilderGenerator.kt:481 */
   91    150   
            destination_status_description: self.destination_status_description,
         151  +
            /* BuilderGenerator.kt:477 */
   92    152   
        }
         153  +
        /* BuilderGenerator.kt:253 */
   93    154   
    }
         155  +
    /* BuilderGenerator.kt:355 */
   94    156   
}

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

@@ -1,1 +168,226 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the properties of a local secondary index.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the properties of a local secondary index.</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 LocalSecondaryIndex {
    7         -
    /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct LocalSecondaryIndex {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the local 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 complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for the local secondary index, consisting 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::vec::Vec<crate::types::KeySchemaElement>,
   20         -
    /// <p>Represents attributes that are copied (projected) from the table into the local 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 local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
   21     23   
    pub projection: crate::types::Projection,
          24  +
    /* StructureGenerator.kt:201 */
   22     25   
}
          26  +
/* StructureGenerator.kt:135 */
   23     27   
impl LocalSecondaryIndex {
   24         -
    /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
          29  +
    /* StructureGenerator.kt:166 */
   25     30   
    pub fn index_name(&self) -> &str {
          31  +
        /* StructureGenerator.kt:171 */
   26     32   
        use std::ops::Deref;
   27     33   
        self.index_name.deref()
          34  +
        /* StructureGenerator.kt:166 */
   28     35   
    }
   29         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
          36  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</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_schema(&self) -> &[crate::types::KeySchemaElement] {
          48  +
        /* StructureGenerator.kt:171 */
   40     49   
        use std::ops::Deref;
   41     50   
        self.key_schema.deref()
          51  +
        /* StructureGenerator.kt:166 */
   42     52   
    }
   43         -
    /// <p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
          53  +
    /// /* StructureGenerator.kt:231 */<p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
          54  +
    /* StructureGenerator.kt:166 */
   44     55   
    pub fn projection(&self) -> &crate::types::Projection {
          56  +
        /* StructureGenerator.kt:172 */
   45     57   
        &self.projection
          58  +
        /* StructureGenerator.kt:166 */
   46     59   
    }
          60  +
    /* StructureGenerator.kt:135 */
   47     61   
}
          62  +
/* ClientCodegenVisitor.kt:237 */
   48     63   
impl LocalSecondaryIndex {
   49         -
    /// Creates a new builder-style object to manufacture [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
          64  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
          65  +
    /* BuilderGenerator.kt:175 */
   50     66   
    pub fn builder() -> crate::types::builders::LocalSecondaryIndexBuilder {
          67  +
        /* BuilderGenerator.kt:176 */
   51     68   
        crate::types::builders::LocalSecondaryIndexBuilder::default()
          69  +
        /* BuilderGenerator.kt:175 */
   52     70   
    }
          71  +
    /* ClientCodegenVisitor.kt:237 */
   53     72   
}
   54     73   
   55         -
/// A builder for [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
          74  +
/// /* BuilderGenerator.kt:342 */A builder for [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
          75  +
/* RustType.kt:516 */
   56     76   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          77  +
/* RustType.kt:516 */
   57     78   
#[non_exhaustive]
          79  +
/* BuilderGenerator.kt:345 */
   58     80   
pub struct LocalSecondaryIndexBuilder {
   59         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
   60         -
    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
   61         -
    pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          81  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
          82  +
    /* BuilderGenerator.kt:275 */ pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
          83  +
    /* BuilderGenerator.kt:275 */ pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          84  +
    /* BuilderGenerator.kt:345 */
   62     85   
}
          86  +
/* BuilderGenerator.kt:355 */
   63     87   
impl LocalSecondaryIndexBuilder {
   64         -
    /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
   65         -
    /// This field is required.
          88  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
          89  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          90  +
    /* BuilderGenerator.kt:291 */
   66     91   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          92  +
        /* BuilderGenerator.kt:292 */
   67     93   
        self.index_name = ::std::option::Option::Some(input.into());
          94  +
        /* BuilderGenerator.kt:293 */
   68     95   
        self
          96  +
        /* BuilderGenerator.kt:291 */
   69     97   
    }
   70         -
    /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
          98  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
          99  +
    /* BuilderGenerator.kt:314 */
   71    100   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         101  +
        /* BuilderGenerator.kt:315 */
   72    102   
        self.index_name = input;
   73    103   
        self
         104  +
        /* BuilderGenerator.kt:314 */
   74    105   
    }
   75         -
    /// <p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
         106  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the local secondary index. The name must be unique among all other indexes on this table.</p>
         107  +
    /* BuilderGenerator.kt:336 */
   76    108   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
         109  +
        /* BuilderGenerator.kt:337 */
   77    110   
        &self.index_name
         111  +
        /* BuilderGenerator.kt:336 */
   78    112   
    }
   79         -
    /// Appends an item to `key_schema`.
         113  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `key_schema`.
         114  +
    /* BuilderGenerator.kt:411 */
   80    115   
    ///
   81         -
    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         116  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         117  +
    /* BuilderGenerator.kt:413 */
   82    118   
    ///
   83         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         119  +
    /// /* BuilderGenerator.kt:414 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
   84    120   
    /// <ul>
   85    121   
    /// <li>
   86    122   
    /// <p><code>HASH</code> - partition key</p></li>
   87    123   
    /// <li>
   88    124   
    /// <p><code>RANGE</code> - sort key</p></li>
   89    125   
    /// </ul><note>
   90    126   
    /// <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>
   91    127   
    /// <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>
   92    128   
    /// </note>
         129  +
    /* BuilderGenerator.kt:418 */
   93    130   
    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
         131  +
        /* BuilderGenerator.kt:419 */
   94    132   
        let mut v = self.key_schema.unwrap_or_default();
   95    133   
        v.push(input);
   96    134   
        self.key_schema = ::std::option::Option::Some(v);
   97    135   
        self
         136  +
        /* BuilderGenerator.kt:418 */
   98    137   
    }
   99         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         138  +
    /// /* BuilderGenerator.kt:312 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
  100    139   
    /// <ul>
  101    140   
    /// <li>
  102    141   
    /// <p><code>HASH</code> - partition key</p></li>
  103    142   
    /// <li>
  104    143   
    /// <p><code>RANGE</code> - sort key</p></li>
  105    144   
    /// </ul><note>
  106    145   
    /// <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>
  107    146   
    /// <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>
  108    147   
    /// </note>
         148  +
    /* BuilderGenerator.kt:314 */
  109    149   
    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
         150  +
        /* BuilderGenerator.kt:315 */
  110    151   
        self.key_schema = input;
  111    152   
        self
         153  +
        /* BuilderGenerator.kt:314 */
  112    154   
    }
  113         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         155  +
    /// /* BuilderGenerator.kt:334 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
  114    156   
    /// <ul>
  115    157   
    /// <li>
  116    158   
    /// <p><code>HASH</code> - partition key</p></li>
  117    159   
    /// <li>
  118    160   
    /// <p><code>RANGE</code> - sort key</p></li>
  119    161   
    /// </ul><note>
  120    162   
    /// <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>
  121    163   
    /// <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>
  122    164   
    /// </note>
         165  +
    /* BuilderGenerator.kt:336 */
  123    166   
    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
         167  +
        /* BuilderGenerator.kt:337 */
  124    168   
        &self.key_schema
         169  +
        /* BuilderGenerator.kt:336 */
  125    170   
    }
  126         -
    /// <p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
  127         -
    /// This field is required.
         171  +
    /// /* BuilderGenerator.kt:286 */<p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         172  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         173  +
    /* BuilderGenerator.kt:291 */
  128    174   
    pub fn projection(mut self, input: crate::types::Projection) -> Self {
         175  +
        /* BuilderGenerator.kt:292 */
  129    176   
        self.projection = ::std::option::Option::Some(input);
         177  +
        /* BuilderGenerator.kt:293 */
  130    178   
        self
         179  +
        /* BuilderGenerator.kt:291 */
  131    180   
    }
  132         -
    /// <p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         181  +
    /// /* BuilderGenerator.kt:312 */<p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         182  +
    /* BuilderGenerator.kt:314 */
  133    183   
    pub fn set_projection(mut self, input: ::std::option::Option<crate::types::Projection>) -> Self {
         184  +
        /* BuilderGenerator.kt:315 */
  134    185   
        self.projection = input;
  135    186   
        self
         187  +
        /* BuilderGenerator.kt:314 */
  136    188   
    }
  137         -
    /// <p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         189  +
    /// /* BuilderGenerator.kt:334 */<p>Represents attributes that are copied (projected) from the table into the local secondary index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
         190  +
    /* BuilderGenerator.kt:336 */
  138    191   
    pub fn get_projection(&self) -> &::std::option::Option<crate::types::Projection> {
         192  +
        /* BuilderGenerator.kt:337 */
  139    193   
        &self.projection
         194  +
        /* BuilderGenerator.kt:336 */
  140    195   
    }
  141         -
    /// Consumes the builder and constructs a [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
  142         -
    /// This method will fail if any of the following fields are not set:
  143         -
    /// - [`index_name`](crate::types::builders::LocalSecondaryIndexBuilder::index_name)
  144         -
    /// - [`key_schema`](crate::types::builders::LocalSecondaryIndexBuilder::key_schema)
  145         -
    /// - [`projection`](crate::types::builders::LocalSecondaryIndexBuilder::projection)
         196  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`LocalSecondaryIndex`](crate::types::LocalSecondaryIndex).
         197  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         198  +
    /// /* BuilderGenerator.kt:246 */- [`index_name`](crate::types::builders::LocalSecondaryIndexBuilder::index_name)
         199  +
    /// /* BuilderGenerator.kt:246 */- [`key_schema`](crate::types::builders::LocalSecondaryIndexBuilder::key_schema)
         200  +
    /// /* BuilderGenerator.kt:246 */- [`projection`](crate::types::builders::LocalSecondaryIndexBuilder::projection)
         201  +
    /* BuilderGenerator.kt:253 */
  146    202   
    pub fn build(self) -> ::std::result::Result<crate::types::LocalSecondaryIndex, ::aws_smithy_types::error::operation::BuildError> {
  147         -
        ::std::result::Result::Ok(crate::types::LocalSecondaryIndex {
  148         -
            index_name: self.index_name.ok_or_else(|| {
  149         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  150         -
                    "index_name",
  151         -
                    "index_name was not specified but it is required when building LocalSecondaryIndex",
  152         -
                )
  153         -
            })?,
  154         -
            key_schema: self.key_schema.ok_or_else(|| {
  155         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  156         -
                    "key_schema",
  157         -
                    "key_schema was not specified but it is required when building LocalSecondaryIndex",
  158         -
                )
  159         -
            })?,
  160         -
            projection: self.projection.ok_or_else(|| {
  161         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  162         -
                    "projection",
  163         -
                    "projection was not specified but it is required when building LocalSecondaryIndex",
  164         -
                )
  165         -
            })?,
  166         -
        })
         203  +
        /* BuilderGenerator.kt:254 */
         204  +
        ::std::result::Result::Ok(
         205  +
            /* BuilderGenerator.kt:477 */crate::types::LocalSecondaryIndex {
         206  +
                /* BuilderGenerator.kt:481 */index_name: self.index_name
         207  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         208  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("index_name", "index_name was not specified but it is required when building LocalSecondaryIndex")
         209  +
                    /* BuilderGenerator.kt:494 */)?
         210  +
                ,
         211  +
                /* BuilderGenerator.kt:481 */key_schema: self.key_schema
         212  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         213  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("key_schema", "key_schema was not specified but it is required when building LocalSecondaryIndex")
         214  +
                    /* BuilderGenerator.kt:494 */)?
         215  +
                ,
         216  +
                /* BuilderGenerator.kt:481 */projection: self.projection
         217  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         218  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("projection", "projection was not specified but it is required when building LocalSecondaryIndex")
         219  +
                    /* BuilderGenerator.kt:494 */)?
         220  +
                ,
         221  +
            /* BuilderGenerator.kt:477 */}
         222  +
        /* BuilderGenerator.kt:254 */)
         223  +
        /* BuilderGenerator.kt:253 */
  167    224   
    }
         225  +
    /* BuilderGenerator.kt:355 */
  168    226   
}

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

@@ -1,1 +213,326 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the properties of a local secondary index.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the properties of a local secondary index.</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 LocalSecondaryIndexDescription {
    7         -
    /// <p>Represents the name of the local secondary index.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct LocalSecondaryIndexDescription {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Represents the name of the local secondary index.</p>
    8     10   
    pub index_name: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for the local secondary index, consisting 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>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          24  +
    /// /* StructureGenerator.kt:231 */<p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
   23     25   
    pub index_size_bytes: i64,
   24         -
    /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
   25     27   
    pub item_count: i64,
   26         -
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
   27     29   
    pub index_arn: ::std::option::Option<::std::string::String>,
          30  +
    /* StructureGenerator.kt:201 */
   28     31   
}
          32  +
/* StructureGenerator.kt:135 */
   29     33   
impl LocalSecondaryIndexDescription {
   30         -
    /// <p>Represents the name of the local secondary index.</p>
          34  +
    /// /* StructureGenerator.kt:231 */<p>Represents the name of the local secondary index.</p>
          35  +
    /* StructureGenerator.kt:166 */
   31     36   
    pub fn index_name(&self) -> ::std::option::Option<&str> {
          37  +
        /* StructureGenerator.kt:169 */
   32     38   
        self.index_name.as_deref()
          39  +
        /* StructureGenerator.kt:166 */
   33     40   
    }
   34         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
          41  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
   35     42   
    /// <ul>
   36     43   
    /// <li>
   37     44   
    /// <p><code>HASH</code> - partition key</p></li>
   38     45   
    /// <li>
   39     46   
    /// <p><code>RANGE</code> - sort key</p></li>
   40     47   
    /// </ul><note>
   41     48   
    /// <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>
   42     49   
    /// <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>
   43     50   
    /// </note>
   44         -
    ///
   45         -
    /// 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()`.
          51  +
    /// /* StructureGenerator.kt:162 */
          52  +
    /// /* 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()`.
          53  +
    /* StructureGenerator.kt:166 */
   46     54   
    pub fn key_schema(&self) -> &[crate::types::KeySchemaElement] {
   47         -
        self.key_schema.as_deref().unwrap_or_default()
          55  +
        /* StructureGenerator.kt:169 */
          56  +
        self.key_schema
          57  +
            .as_deref()
          58  +
            /* StructureGenerator.kt:175 */
          59  +
            .unwrap_or_default()
          60  +
        /* StructureGenerator.kt:166 */
   48     61   
    }
   49         -
    /// <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>
          62  +
    /// /* 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>
          63  +
    /* StructureGenerator.kt:166 */
   50     64   
    pub fn projection(&self) -> ::std::option::Option<&crate::types::Projection> {
          65  +
        /* StructureGenerator.kt:170 */
   51     66   
        self.projection.as_ref()
          67  +
        /* StructureGenerator.kt:166 */
   52     68   
    }
   53         -
    /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          69  +
    /// /* StructureGenerator.kt:231 */<p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          70  +
    /* StructureGenerator.kt:166 */
   54     71   
    pub fn index_size_bytes(&self) -> i64 {
          72  +
        /* StructureGenerator.kt:168 */
   55     73   
        self.index_size_bytes
          74  +
        /* StructureGenerator.kt:166 */
   56     75   
    }
   57         -
    /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          76  +
    /// /* StructureGenerator.kt:231 */<p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
          77  +
    /* StructureGenerator.kt:166 */
   58     78   
    pub fn item_count(&self) -> i64 {
          79  +
        /* StructureGenerator.kt:168 */
   59     80   
        self.item_count
          81  +
        /* StructureGenerator.kt:166 */
   60     82   
    }
   61         -
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
          83  +
    /// /* StructureGenerator.kt:231 */<p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
          84  +
    /* StructureGenerator.kt:166 */
   62     85   
    pub fn index_arn(&self) -> ::std::option::Option<&str> {
          86  +
        /* StructureGenerator.kt:169 */
   63     87   
        self.index_arn.as_deref()
          88  +
        /* StructureGenerator.kt:166 */
   64     89   
    }
          90  +
    /* StructureGenerator.kt:135 */
   65     91   
}
          92  +
/* ClientCodegenVisitor.kt:237 */
   66     93   
impl LocalSecondaryIndexDescription {
   67         -
    /// Creates a new builder-style object to manufacture [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
          94  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
          95  +
    /* BuilderGenerator.kt:175 */
   68     96   
    pub fn builder() -> crate::types::builders::LocalSecondaryIndexDescriptionBuilder {
          97  +
        /* BuilderGenerator.kt:176 */
   69     98   
        crate::types::builders::LocalSecondaryIndexDescriptionBuilder::default()
          99  +
        /* BuilderGenerator.kt:175 */
   70    100   
    }
         101  +
    /* ClientCodegenVisitor.kt:237 */
   71    102   
}
   72    103   
   73         -
/// A builder for [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
         104  +
/// /* BuilderGenerator.kt:342 */A builder for [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
         105  +
/* RustType.kt:516 */
   74    106   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
         107  +
/* RustType.kt:516 */
   75    108   
#[non_exhaustive]
         109  +
/* BuilderGenerator.kt:345 */
   76    110   
pub struct LocalSecondaryIndexDescriptionBuilder {
   77         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
   78         -
    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
   79         -
    pub(crate) projection: ::std::option::Option<crate::types::Projection>,
   80         -
    pub(crate) index_size_bytes: ::std::option::Option<i64>,
   81         -
    pub(crate) item_count: ::std::option::Option<i64>,
   82         -
    pub(crate) index_arn: ::std::option::Option<::std::string::String>,
         111  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
         112  +
    /* BuilderGenerator.kt:275 */ pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
         113  +
    /* BuilderGenerator.kt:275 */ pub(crate) projection: ::std::option::Option<crate::types::Projection>,
         114  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_size_bytes: ::std::option::Option<i64>,
         115  +
    /* BuilderGenerator.kt:275 */ pub(crate) item_count: ::std::option::Option<i64>,
         116  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_arn: ::std::option::Option<::std::string::String>,
         117  +
    /* BuilderGenerator.kt:345 */
   83    118   
}
         119  +
/* BuilderGenerator.kt:355 */
   84    120   
impl LocalSecondaryIndexDescriptionBuilder {
   85         -
    /// <p>Represents the name of the local secondary index.</p>
         121  +
    /// /* BuilderGenerator.kt:286 */<p>Represents the name of the local secondary index.</p>
         122  +
    /* BuilderGenerator.kt:291 */
   86    123   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         124  +
        /* BuilderGenerator.kt:292 */
   87    125   
        self.index_name = ::std::option::Option::Some(input.into());
         126  +
        /* BuilderGenerator.kt:293 */
   88    127   
        self
         128  +
        /* BuilderGenerator.kt:291 */
   89    129   
    }
   90         -
    /// <p>Represents the name of the local secondary index.</p>
         130  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the name of the local secondary index.</p>
         131  +
    /* BuilderGenerator.kt:314 */
   91    132   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        /* BuilderGenerator.kt:315 */
   92    134   
        self.index_name = input;
   93    135   
        self
         136  +
        /* BuilderGenerator.kt:314 */
   94    137   
    }
   95         -
    /// <p>Represents the name of the local secondary index.</p>
         138  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the name of the local secondary index.</p>
         139  +
    /* BuilderGenerator.kt:336 */
   96    140   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
         141  +
        /* BuilderGenerator.kt:337 */
   97    142   
        &self.index_name
         143  +
        /* BuilderGenerator.kt:336 */
   98    144   
    }
   99         -
    /// Appends an item to `key_schema`.
         145  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `key_schema`.
         146  +
    /* BuilderGenerator.kt:411 */
  100    147   
    ///
  101         -
    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         148  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         149  +
    /* BuilderGenerator.kt:413 */
  102    150   
    ///
  103         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         151  +
    /// /* BuilderGenerator.kt:414 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
  104    152   
    /// <ul>
  105    153   
    /// <li>
  106    154   
    /// <p><code>HASH</code> - partition key</p></li>
  107    155   
    /// <li>
  108    156   
    /// <p><code>RANGE</code> - sort key</p></li>
  109    157   
    /// </ul><note>
  110    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>
  111    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>
  112    160   
    /// </note>
         161  +
    /* BuilderGenerator.kt:418 */
  113    162   
    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
         163  +
        /* BuilderGenerator.kt:419 */
  114    164   
        let mut v = self.key_schema.unwrap_or_default();
  115    165   
        v.push(input);
  116    166   
        self.key_schema = ::std::option::Option::Some(v);
  117    167   
        self
         168  +
        /* BuilderGenerator.kt:418 */
  118    169   
    }
  119         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         170  +
    /// /* BuilderGenerator.kt:312 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
  120    171   
    /// <ul>
  121    172   
    /// <li>
  122    173   
    /// <p><code>HASH</code> - partition key</p></li>
  123    174   
    /// <li>
  124    175   
    /// <p><code>RANGE</code> - sort key</p></li>
  125    176   
    /// </ul><note>
  126    177   
    /// <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    178   
    /// <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    179   
    /// </note>
         180  +
    /* BuilderGenerator.kt:314 */
  129    181   
    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
         182  +
        /* BuilderGenerator.kt:315 */
  130    183   
        self.key_schema = input;
  131    184   
        self
         185  +
        /* BuilderGenerator.kt:314 */
  132    186   
    }
  133         -
    /// <p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
         187  +
    /// /* BuilderGenerator.kt:334 */<p>The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:</p>
  134    188   
    /// <ul>
  135    189   
    /// <li>
  136    190   
    /// <p><code>HASH</code> - partition key</p></li>
  137    191   
    /// <li>
  138    192   
    /// <p><code>RANGE</code> - sort key</p></li>
  139    193   
    /// </ul><note>
  140    194   
    /// <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>
  141    195   
    /// <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>
  142    196   
    /// </note>
         197  +
    /* BuilderGenerator.kt:336 */
  143    198   
    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
         199  +
        /* BuilderGenerator.kt:337 */
  144    200   
        &self.key_schema
         201  +
        /* BuilderGenerator.kt:336 */
  145    202   
    }
  146         -
    /// <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>
         203  +
    /// /* 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>
         204  +
    /* BuilderGenerator.kt:291 */
  147    205   
    pub fn projection(mut self, input: crate::types::Projection) -> Self {
         206  +
        /* BuilderGenerator.kt:292 */
  148    207   
        self.projection = ::std::option::Option::Some(input);
         208  +
        /* BuilderGenerator.kt:293 */
  149    209   
        self
         210  +
        /* BuilderGenerator.kt:291 */
  150    211   
    }
  151         -
    /// <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>
         212  +
    /// /* 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>
         213  +
    /* BuilderGenerator.kt:314 */
  152    214   
    pub fn set_projection(mut self, input: ::std::option::Option<crate::types::Projection>) -> Self {
         215  +
        /* BuilderGenerator.kt:315 */
  153    216   
        self.projection = input;
  154    217   
        self
         218  +
        /* BuilderGenerator.kt:314 */
  155    219   
    }
  156         -
    /// <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>
         220  +
    /// /* 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>
         221  +
    /* BuilderGenerator.kt:336 */
  157    222   
    pub fn get_projection(&self) -> &::std::option::Option<crate::types::Projection> {
         223  +
        /* BuilderGenerator.kt:337 */
  158    224   
        &self.projection
         225  +
        /* BuilderGenerator.kt:336 */
  159    226   
    }
  160         -
    /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         227  +
    /// /* BuilderGenerator.kt:286 */<p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         228  +
    /* BuilderGenerator.kt:291 */
  161    229   
    pub fn index_size_bytes(mut self, input: i64) -> Self {
         230  +
        /* BuilderGenerator.kt:292 */
  162    231   
        self.index_size_bytes = ::std::option::Option::Some(input);
         232  +
        /* BuilderGenerator.kt:293 */
  163    233   
        self
         234  +
        /* BuilderGenerator.kt:291 */
  164    235   
    }
  165         -
    /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         236  +
    /// /* BuilderGenerator.kt:312 */<p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         237  +
    /* BuilderGenerator.kt:314 */
  166    238   
    pub fn set_index_size_bytes(mut self, input: ::std::option::Option<i64>) -> Self {
         239  +
        /* BuilderGenerator.kt:315 */
  167    240   
        self.index_size_bytes = input;
  168    241   
        self
         242  +
        /* BuilderGenerator.kt:314 */
  169    243   
    }
  170         -
    /// <p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         244  +
    /// /* BuilderGenerator.kt:334 */<p>The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         245  +
    /* BuilderGenerator.kt:336 */
  171    246   
    pub fn get_index_size_bytes(&self) -> &::std::option::Option<i64> {
         247  +
        /* BuilderGenerator.kt:337 */
  172    248   
        &self.index_size_bytes
         249  +
        /* BuilderGenerator.kt:336 */
  173    250   
    }
  174         -
    /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         251  +
    /// /* BuilderGenerator.kt:286 */<p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         252  +
    /* BuilderGenerator.kt:291 */
  175    253   
    pub fn item_count(mut self, input: i64) -> Self {
         254  +
        /* BuilderGenerator.kt:292 */
  176    255   
        self.item_count = ::std::option::Option::Some(input);
         256  +
        /* BuilderGenerator.kt:293 */
  177    257   
        self
         258  +
        /* BuilderGenerator.kt:291 */
  178    259   
    }
  179         -
    /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         260  +
    /// /* BuilderGenerator.kt:312 */<p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         261  +
    /* BuilderGenerator.kt:314 */
  180    262   
    pub fn set_item_count(mut self, input: ::std::option::Option<i64>) -> Self {
         263  +
        /* BuilderGenerator.kt:315 */
  181    264   
        self.item_count = input;
  182    265   
        self
         266  +
        /* BuilderGenerator.kt:314 */
  183    267   
    }
  184         -
    /// <p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         268  +
    /// /* BuilderGenerator.kt:334 */<p>The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.</p>
         269  +
    /* BuilderGenerator.kt:336 */
  185    270   
    pub fn get_item_count(&self) -> &::std::option::Option<i64> {
         271  +
        /* BuilderGenerator.kt:337 */
  186    272   
        &self.item_count
         273  +
        /* BuilderGenerator.kt:336 */
  187    274   
    }
  188         -
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         275  +
    /// /* BuilderGenerator.kt:286 */<p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         276  +
    /* BuilderGenerator.kt:291 */
  189    277   
    pub fn index_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         278  +
        /* BuilderGenerator.kt:292 */
  190    279   
        self.index_arn = ::std::option::Option::Some(input.into());
         280  +
        /* BuilderGenerator.kt:293 */
  191    281   
        self
         282  +
        /* BuilderGenerator.kt:291 */
  192    283   
    }
  193         -
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         284  +
    /// /* BuilderGenerator.kt:312 */<p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         285  +
    /* BuilderGenerator.kt:314 */
  194    286   
    pub fn set_index_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         287  +
        /* BuilderGenerator.kt:315 */
  195    288   
        self.index_arn = input;
  196    289   
        self
         290  +
        /* BuilderGenerator.kt:314 */
  197    291   
    }
  198         -
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         292  +
    /// /* BuilderGenerator.kt:334 */<p>The Amazon Resource Name (ARN) that uniquely identifies the index.</p>
         293  +
    /* BuilderGenerator.kt:336 */
  199    294   
    pub fn get_index_arn(&self) -> &::std::option::Option<::std::string::String> {
         295  +
        /* BuilderGenerator.kt:337 */
  200    296   
        &self.index_arn
         297  +
        /* BuilderGenerator.kt:336 */
  201    298   
    }
  202         -
    /// Consumes the builder and constructs a [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
         299  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`LocalSecondaryIndexDescription`](crate::types::LocalSecondaryIndexDescription).
         300  +
    /* BuilderGenerator.kt:253 */
  203    301   
    pub fn build(self) -> crate::types::LocalSecondaryIndexDescription {
         302  +
        /* BuilderGenerator.kt:477 */
  204    303   
        crate::types::LocalSecondaryIndexDescription {
  205         -
            index_name: self.index_name,
         304  +
            /* BuilderGenerator.kt:481 */ index_name: self.index_name,
         305  +
            /* BuilderGenerator.kt:481 */
  206    306   
            key_schema: self.key_schema,
         307  +
            /* BuilderGenerator.kt:481 */
  207    308   
            projection: self.projection,
  208         -
            index_size_bytes: self.index_size_bytes.unwrap_or_default(),
  209         -
            item_count: self.item_count.unwrap_or_default(),
         309  +
            /* BuilderGenerator.kt:481 */
         310  +
            index_size_bytes: self
         311  +
                .index_size_bytes
         312  +
                /* BuilderGenerator.kt:487 */
         313  +
                .unwrap_or_default(),
         314  +
            /* BuilderGenerator.kt:481 */
         315  +
            item_count: self
         316  +
                .item_count
         317  +
                /* BuilderGenerator.kt:487 */
         318  +
                .unwrap_or_default(),
         319  +
            /* BuilderGenerator.kt:481 */
  210    320   
            index_arn: self.index_arn,
         321  +
            /* BuilderGenerator.kt:477 */
  211    322   
        }
         323  +
        /* BuilderGenerator.kt:253 */
  212    324   
    }
         325  +
    /* BuilderGenerator.kt:355 */
  213    326   
}

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

@@ -1,1 +147,212 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the properties of a local 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 local 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 LocalSecondaryIndexInfo {
    7         -
    /// <p>Represents the name of the local secondary index.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct LocalSecondaryIndexInfo {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Represents the name of the local secondary index.</p>
    8     10   
    pub index_name: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The complete key schema for a local 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 local 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>,
          24  +
    /* StructureGenerator.kt:201 */
   22     25   
}
          26  +
/* StructureGenerator.kt:135 */
   23     27   
impl LocalSecondaryIndexInfo {
   24         -
    /// <p>Represents the name of the local secondary index.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>Represents the name of the local secondary index.</p>
          29  +
    /* StructureGenerator.kt:166 */
   25     30   
    pub fn index_name(&self) -> ::std::option::Option<&str> {
          31  +
        /* StructureGenerator.kt:169 */
   26     32   
        self.index_name.as_deref()
          33  +
        /* StructureGenerator.kt:166 */
   27     34   
    }
   28         -
    /// <p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
          35  +
    /// /* StructureGenerator.kt:231 */<p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
   29     36   
    /// <ul>
   30     37   
    /// <li>
   31     38   
    /// <p><code>HASH</code> - partition key</p></li>
   32     39   
    /// <li>
   33     40   
    /// <p><code>RANGE</code> - sort key</p></li>
   34     41   
    /// </ul><note>
   35     42   
    /// <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>
   36     43   
    /// <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>
   37     44   
    /// </note>
   38         -
    ///
   39         -
    /// 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()`.
          45  +
    /// /* StructureGenerator.kt:162 */
          46  +
    /// /* 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()`.
          47  +
    /* StructureGenerator.kt:166 */
   40     48   
    pub fn key_schema(&self) -> &[crate::types::KeySchemaElement] {
   41         -
        self.key_schema.as_deref().unwrap_or_default()
          49  +
        /* StructureGenerator.kt:169 */
          50  +
        self.key_schema
          51  +
            .as_deref()
          52  +
            /* StructureGenerator.kt:175 */
          53  +
            .unwrap_or_default()
          54  +
        /* StructureGenerator.kt:166 */
   42     55   
    }
   43         -
    /// <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>
          56  +
    /// /* 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>
          57  +
    /* StructureGenerator.kt:166 */
   44     58   
    pub fn projection(&self) -> ::std::option::Option<&crate::types::Projection> {
          59  +
        /* StructureGenerator.kt:170 */
   45     60   
        self.projection.as_ref()
          61  +
        /* StructureGenerator.kt:166 */
   46     62   
    }
          63  +
    /* StructureGenerator.kt:135 */
   47     64   
}
          65  +
/* ClientCodegenVisitor.kt:237 */
   48     66   
impl LocalSecondaryIndexInfo {
   49         -
    /// Creates a new builder-style object to manufacture [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
          67  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
          68  +
    /* BuilderGenerator.kt:175 */
   50     69   
    pub fn builder() -> crate::types::builders::LocalSecondaryIndexInfoBuilder {
          70  +
        /* BuilderGenerator.kt:176 */
   51     71   
        crate::types::builders::LocalSecondaryIndexInfoBuilder::default()
          72  +
        /* BuilderGenerator.kt:175 */
   52     73   
    }
          74  +
    /* ClientCodegenVisitor.kt:237 */
   53     75   
}
   54     76   
   55         -
/// A builder for [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
          77  +
/// /* BuilderGenerator.kt:342 */A builder for [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
          78  +
/* RustType.kt:516 */
   56     79   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          80  +
/* RustType.kt:516 */
   57     81   
#[non_exhaustive]
          82  +
/* BuilderGenerator.kt:345 */
   58     83   
pub struct LocalSecondaryIndexInfoBuilder {
   59         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
   60         -
    pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
   61         -
    pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          84  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
          85  +
    /* BuilderGenerator.kt:275 */ pub(crate) key_schema: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>,
          86  +
    /* BuilderGenerator.kt:275 */ pub(crate) projection: ::std::option::Option<crate::types::Projection>,
          87  +
    /* BuilderGenerator.kt:345 */
   62     88   
}
          89  +
/* BuilderGenerator.kt:355 */
   63     90   
impl LocalSecondaryIndexInfoBuilder {
   64         -
    /// <p>Represents the name of the local secondary index.</p>
          91  +
    /// /* BuilderGenerator.kt:286 */<p>Represents the name of the local secondary index.</p>
          92  +
    /* BuilderGenerator.kt:291 */
   65     93   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:292 */
   66     95   
        self.index_name = ::std::option::Option::Some(input.into());
          96  +
        /* BuilderGenerator.kt:293 */
   67     97   
        self
          98  +
        /* BuilderGenerator.kt:291 */
   68     99   
    }
   69         -
    /// <p>Represents the name of the local secondary index.</p>
         100  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the name of the local secondary index.</p>
         101  +
    /* BuilderGenerator.kt:314 */
   70    102   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         103  +
        /* BuilderGenerator.kt:315 */
   71    104   
        self.index_name = input;
   72    105   
        self
         106  +
        /* BuilderGenerator.kt:314 */
   73    107   
    }
   74         -
    /// <p>Represents the name of the local secondary index.</p>
         108  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the name of the local secondary index.</p>
         109  +
    /* BuilderGenerator.kt:336 */
   75    110   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
         111  +
        /* BuilderGenerator.kt:337 */
   76    112   
        &self.index_name
         113  +
        /* BuilderGenerator.kt:336 */
   77    114   
    }
   78         -
    /// Appends an item to `key_schema`.
         115  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `key_schema`.
         116  +
    /* BuilderGenerator.kt:411 */
   79    117   
    ///
   80         -
    /// To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         118  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_key_schema`](Self::set_key_schema).
         119  +
    /* BuilderGenerator.kt:413 */
   81    120   
    ///
   82         -
    /// <p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
         121  +
    /// /* BuilderGenerator.kt:414 */<p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
   83    122   
    /// <ul>
   84    123   
    /// <li>
   85    124   
    /// <p><code>HASH</code> - partition key</p></li>
   86    125   
    /// <li>
   87    126   
    /// <p><code>RANGE</code> - sort key</p></li>
   88    127   
    /// </ul><note>
   89    128   
    /// <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>
   90    129   
    /// <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>
   91    130   
    /// </note>
         131  +
    /* BuilderGenerator.kt:418 */
   92    132   
    pub fn key_schema(mut self, input: crate::types::KeySchemaElement) -> Self {
         133  +
        /* BuilderGenerator.kt:419 */
   93    134   
        let mut v = self.key_schema.unwrap_or_default();
   94    135   
        v.push(input);
   95    136   
        self.key_schema = ::std::option::Option::Some(v);
   96    137   
        self
         138  +
        /* BuilderGenerator.kt:418 */
   97    139   
    }
   98         -
    /// <p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
         140  +
    /// /* BuilderGenerator.kt:312 */<p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
   99    141   
    /// <ul>
  100    142   
    /// <li>
  101    143   
    /// <p><code>HASH</code> - partition key</p></li>
  102    144   
    /// <li>
  103    145   
    /// <p><code>RANGE</code> - sort key</p></li>
  104    146   
    /// </ul><note>
  105    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>
  106    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>
  107    149   
    /// </note>
         150  +
    /* BuilderGenerator.kt:314 */
  108    151   
    pub fn set_key_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>>) -> Self {
         152  +
        /* BuilderGenerator.kt:315 */
  109    153   
        self.key_schema = input;
  110    154   
        self
         155  +
        /* BuilderGenerator.kt:314 */
  111    156   
    }
  112         -
    /// <p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
         157  +
    /// /* BuilderGenerator.kt:334 */<p>The complete key schema for a local secondary index, which consists of one or more pairs of attribute names and key types:</p>
  113    158   
    /// <ul>
  114    159   
    /// <li>
  115    160   
    /// <p><code>HASH</code> - partition key</p></li>
  116    161   
    /// <li>
  117    162   
    /// <p><code>RANGE</code> - sort key</p></li>
  118    163   
    /// </ul><note>
  119    164   
    /// <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>
  120    165   
    /// <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>
  121    166   
    /// </note>
         167  +
    /* BuilderGenerator.kt:336 */
  122    168   
    pub fn get_key_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeySchemaElement>> {
         169  +
        /* BuilderGenerator.kt:337 */
  123    170   
        &self.key_schema
         171  +
        /* BuilderGenerator.kt:336 */
  124    172   
    }
  125         -
    /// <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>
         173  +
    /// /* 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>
         174  +
    /* BuilderGenerator.kt:291 */
  126    175   
    pub fn projection(mut self, input: crate::types::Projection) -> Self {
         176  +
        /* BuilderGenerator.kt:292 */
  127    177   
        self.projection = ::std::option::Option::Some(input);
         178  +
        /* BuilderGenerator.kt:293 */
  128    179   
        self
         180  +
        /* BuilderGenerator.kt:291 */
  129    181   
    }
  130         -
    /// <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>
         182  +
    /// /* 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>
         183  +
    /* BuilderGenerator.kt:314 */
  131    184   
    pub fn set_projection(mut self, input: ::std::option::Option<crate::types::Projection>) -> Self {
         185  +
        /* BuilderGenerator.kt:315 */
  132    186   
        self.projection = input;
  133    187   
        self
         188  +
        /* BuilderGenerator.kt:314 */
  134    189   
    }
  135         -
    /// <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>
         190  +
    /// /* 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>
         191  +
    /* BuilderGenerator.kt:336 */
  136    192   
    pub fn get_projection(&self) -> &::std::option::Option<crate::types::Projection> {
         193  +
        /* BuilderGenerator.kt:337 */
  137    194   
        &self.projection
         195  +
        /* BuilderGenerator.kt:336 */
  138    196   
    }
  139         -
    /// Consumes the builder and constructs a [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
         197  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`LocalSecondaryIndexInfo`](crate::types::LocalSecondaryIndexInfo).
         198  +
    /* BuilderGenerator.kt:253 */
  140    199   
    pub fn build(self) -> crate::types::LocalSecondaryIndexInfo {
         200  +
        /* BuilderGenerator.kt:477 */
  141    201   
        crate::types::LocalSecondaryIndexInfo {
  142         -
            index_name: self.index_name,
         202  +
            /* BuilderGenerator.kt:481 */ index_name: self.index_name,
         203  +
            /* BuilderGenerator.kt:481 */
  143    204   
            key_schema: self.key_schema,
         205  +
            /* BuilderGenerator.kt:481 */
  144    206   
            projection: self.projection,
         207  +
            /* BuilderGenerator.kt:477 */
  145    208   
        }
         209  +
        /* BuilderGenerator.kt:253 */
  146    210   
    }
         211  +
    /* BuilderGenerator.kt:355 */
  147    212   
}

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

@@ -1,1 +89,141 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents a PartiQL statment that uses parameters.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents a PartiQL statment that uses parameters.</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 ParameterizedStatement {
    7         -
    /// <p>A PartiQL statment that uses parameters.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ParameterizedStatement {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A PartiQL statment that uses parameters.</p>
    8     10   
    pub statement: ::std::string::String,
    9         -
    /// <p>The parameter values.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The parameter values.</p>
   10     12   
    pub parameters: ::std::option::Option<::std::vec::Vec<crate::types::AttributeValue>>,
          13  +
    /* StructureGenerator.kt:201 */
   11     14   
}
          15  +
/* StructureGenerator.kt:135 */
   12     16   
impl ParameterizedStatement {
   13         -
    /// <p>A PartiQL statment that uses parameters.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>A PartiQL statment that uses parameters.</p>
          18  +
    /* StructureGenerator.kt:166 */
   14     19   
    pub fn statement(&self) -> &str {
          20  +
        /* StructureGenerator.kt:171 */
   15     21   
        use std::ops::Deref;
   16     22   
        self.statement.deref()
          23  +
        /* StructureGenerator.kt:166 */
   17     24   
    }
   18         -
    /// <p>The parameter values.</p>
   19         -
    ///
   20         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.parameters.is_none()`.
          25  +
    /// /* StructureGenerator.kt:231 */<p>The parameter values.</p>
          26  +
    /// /* StructureGenerator.kt:162 */
          27  +
    /// /* 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 `.parameters.is_none()`.
          28  +
    /* StructureGenerator.kt:166 */
   21     29   
    pub fn parameters(&self) -> &[crate::types::AttributeValue] {
   22         -
        self.parameters.as_deref().unwrap_or_default()
          30  +
        /* StructureGenerator.kt:169 */
          31  +
        self.parameters
          32  +
            .as_deref()
          33  +
            /* StructureGenerator.kt:175 */
          34  +
            .unwrap_or_default()
          35  +
        /* StructureGenerator.kt:166 */
   23     36   
    }
          37  +
    /* StructureGenerator.kt:135 */
   24     38   
}
          39  +
/* ClientCodegenVisitor.kt:237 */
   25     40   
impl ParameterizedStatement {
   26         -
    /// Creates a new builder-style object to manufacture [`ParameterizedStatement`](crate::types::ParameterizedStatement).
          41  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ParameterizedStatement`](crate::types::ParameterizedStatement).
          42  +
    /* BuilderGenerator.kt:175 */
   27     43   
    pub fn builder() -> crate::types::builders::ParameterizedStatementBuilder {
          44  +
        /* BuilderGenerator.kt:176 */
   28     45   
        crate::types::builders::ParameterizedStatementBuilder::default()
          46  +
        /* BuilderGenerator.kt:175 */
   29     47   
    }
          48  +
    /* ClientCodegenVisitor.kt:237 */
   30     49   
}
   31     50   
   32         -
/// A builder for [`ParameterizedStatement`](crate::types::ParameterizedStatement).
          51  +
/// /* BuilderGenerator.kt:342 */A builder for [`ParameterizedStatement`](crate::types::ParameterizedStatement).
          52  +
/* RustType.kt:516 */
   33     53   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          54  +
/* RustType.kt:516 */
   34     55   
#[non_exhaustive]
          56  +
/* BuilderGenerator.kt:345 */
   35     57   
pub struct ParameterizedStatementBuilder {
   36         -
    pub(crate) statement: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:275 */ pub(crate) statement: ::std::option::Option<::std::string::String>,
          59  +
    /* BuilderGenerator.kt:275 */
   37     60   
    pub(crate) parameters: ::std::option::Option<::std::vec::Vec<crate::types::AttributeValue>>,
          61  +
    /* BuilderGenerator.kt:345 */
   38     62   
}
          63  +
/* BuilderGenerator.kt:355 */
   39     64   
impl ParameterizedStatementBuilder {
   40         -
    /// <p>A PartiQL statment that uses parameters.</p>
   41         -
    /// This field is required.
          65  +
    /// /* BuilderGenerator.kt:286 */<p>A PartiQL statment that uses parameters.</p>
          66  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          67  +
    /* BuilderGenerator.kt:291 */
   42     68   
    pub fn statement(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          69  +
        /* BuilderGenerator.kt:292 */
   43     70   
        self.statement = ::std::option::Option::Some(input.into());
          71  +
        /* BuilderGenerator.kt:293 */
   44     72   
        self
          73  +
        /* BuilderGenerator.kt:291 */
   45     74   
    }
   46         -
    /// <p>A PartiQL statment that uses parameters.</p>
          75  +
    /// /* BuilderGenerator.kt:312 */<p>A PartiQL statment that uses parameters.</p>
          76  +
    /* BuilderGenerator.kt:314 */
   47     77   
    pub fn set_statement(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          78  +
        /* BuilderGenerator.kt:315 */
   48     79   
        self.statement = input;
   49     80   
        self
          81  +
        /* BuilderGenerator.kt:314 */
   50     82   
    }
   51         -
    /// <p>A PartiQL statment that uses parameters.</p>
          83  +
    /// /* BuilderGenerator.kt:334 */<p>A PartiQL statment that uses parameters.</p>
          84  +
    /* BuilderGenerator.kt:336 */
   52     85   
    pub fn get_statement(&self) -> &::std::option::Option<::std::string::String> {
          86  +
        /* BuilderGenerator.kt:337 */
   53     87   
        &self.statement
          88  +
        /* BuilderGenerator.kt:336 */
   54     89   
    }
   55         -
    /// Appends an item to `parameters`.
          90  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `parameters`.
          91  +
    /* BuilderGenerator.kt:411 */
   56     92   
    ///
   57         -
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
          93  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_parameters`](Self::set_parameters).
          94  +
    /* BuilderGenerator.kt:413 */
   58     95   
    ///
   59         -
    /// <p>The parameter values.</p>
          96  +
    /// /* BuilderGenerator.kt:414 */<p>The parameter values.</p>
          97  +
    /* BuilderGenerator.kt:418 */
   60     98   
    pub fn parameters(mut self, input: crate::types::AttributeValue) -> Self {
          99  +
        /* BuilderGenerator.kt:419 */
   61    100   
        let mut v = self.parameters.unwrap_or_default();
   62    101   
        v.push(input);
   63    102   
        self.parameters = ::std::option::Option::Some(v);
   64    103   
        self
         104  +
        /* BuilderGenerator.kt:418 */
   65    105   
    }
   66         -
    /// <p>The parameter values.</p>
         106  +
    /// /* BuilderGenerator.kt:312 */<p>The parameter values.</p>
         107  +
    /* BuilderGenerator.kt:314 */
   67    108   
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttributeValue>>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   68    110   
        self.parameters = input;
   69    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   70    113   
    }
   71         -
    /// <p>The parameter values.</p>
         114  +
    /// /* BuilderGenerator.kt:334 */<p>The parameter values.</p>
         115  +
    /* BuilderGenerator.kt:336 */
   72    116   
    pub fn get_parameters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttributeValue>> {
         117  +
        /* BuilderGenerator.kt:337 */
   73    118   
        &self.parameters
         119  +
        /* BuilderGenerator.kt:336 */
   74    120   
    }
   75         -
    /// Consumes the builder and constructs a [`ParameterizedStatement`](crate::types::ParameterizedStatement).
   76         -
    /// This method will fail if any of the following fields are not set:
   77         -
    /// - [`statement`](crate::types::builders::ParameterizedStatementBuilder::statement)
         121  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ParameterizedStatement`](crate::types::ParameterizedStatement).
         122  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         123  +
    /// /* BuilderGenerator.kt:246 */- [`statement`](crate::types::builders::ParameterizedStatementBuilder::statement)
         124  +
    /* BuilderGenerator.kt:253 */
   78    125   
    pub fn build(self) -> ::std::result::Result<crate::types::ParameterizedStatement, ::aws_smithy_types::error::operation::BuildError> {
   79         -
        ::std::result::Result::Ok(crate::types::ParameterizedStatement {
   80         -
            statement: self.statement.ok_or_else(|| {
   81         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   82         -
                    "statement",
   83         -
                    "statement was not specified but it is required when building ParameterizedStatement",
   84         -
                )
   85         -
            })?,
   86         -
            parameters: self.parameters,
   87         -
        })
         126  +
        /* BuilderGenerator.kt:254 */
         127  +
        ::std::result::Result::Ok(
         128  +
            /* BuilderGenerator.kt:477 */crate::types::ParameterizedStatement {
         129  +
                /* BuilderGenerator.kt:481 */statement: self.statement
         130  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         131  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("statement", "statement was not specified but it is required when building ParameterizedStatement")
         132  +
                    /* BuilderGenerator.kt:494 */)?
         133  +
                ,
         134  +
                /* BuilderGenerator.kt:481 */parameters: self.parameters
         135  +
                ,
         136  +
            /* BuilderGenerator.kt:477 */}
         137  +
        /* BuilderGenerator.kt:254 */)
         138  +
        /* BuilderGenerator.kt:253 */
   88    139   
    }
         140  +
    /* BuilderGenerator.kt:355 */
   89    141   
}

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

@@ -1,1 +134,196 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The description of the point in time settings applied to the table.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The description of the point in time settings applied to the 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 PointInTimeRecoveryDescription {
    7         -
    /// <p>The current state of point in time recovery:</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct PointInTimeRecoveryDescription {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The current state of point in time recovery:</p>
    8     10   
    /// <ul>
    9     11   
    /// <li>
   10     12   
    /// <p><code>ENABLING</code> - Point in time recovery is being enabled.</p></li>
   11     13   
    /// <li>
   12     14   
    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
   13     15   
    /// <li>
   14     16   
    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
   15     17   
    /// </ul>
   16     18   
    pub point_in_time_recovery_status: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>,
   17         -
    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
   18     20   
    pub earliest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   19         -
    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
          21  +
    /// /* StructureGenerator.kt:231 */<p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
   20     22   
    pub latest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          23  +
    /* StructureGenerator.kt:201 */
   21     24   
}
          25  +
/* StructureGenerator.kt:135 */
   22     26   
impl PointInTimeRecoveryDescription {
   23         -
    /// <p>The current state of point in time recovery:</p>
          27  +
    /// /* StructureGenerator.kt:231 */<p>The current state of point in time recovery:</p>
   24     28   
    /// <ul>
   25     29   
    /// <li>
   26     30   
    /// <p><code>ENABLING</code> - Point in time recovery is being enabled.</p></li>
   27     31   
    /// <li>
   28     32   
    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
   29     33   
    /// <li>
   30     34   
    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
   31     35   
    /// </ul>
          36  +
    /* StructureGenerator.kt:166 */
   32     37   
    pub fn point_in_time_recovery_status(&self) -> ::std::option::Option<&crate::types::PointInTimeRecoveryStatus> {
          38  +
        /* StructureGenerator.kt:170 */
   33     39   
        self.point_in_time_recovery_status.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   34     41   
    }
   35         -
    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
          42  +
    /// /* StructureGenerator.kt:231 */<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
          43  +
    /* StructureGenerator.kt:166 */
   36     44   
    pub fn earliest_restorable_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          45  +
        /* StructureGenerator.kt:170 */
   37     46   
        self.earliest_restorable_date_time.as_ref()
          47  +
        /* StructureGenerator.kt:166 */
   38     48   
    }
   39         -
    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
          49  +
    /// /* StructureGenerator.kt:231 */<p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
          50  +
    /* StructureGenerator.kt:166 */
   40     51   
    pub fn latest_restorable_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          52  +
        /* StructureGenerator.kt:170 */
   41     53   
        self.latest_restorable_date_time.as_ref()
          54  +
        /* StructureGenerator.kt:166 */
   42     55   
    }
          56  +
    /* StructureGenerator.kt:135 */
   43     57   
}
          58  +
/* ClientCodegenVisitor.kt:237 */
   44     59   
impl PointInTimeRecoveryDescription {
   45         -
    /// Creates a new builder-style object to manufacture [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
          60  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
          61  +
    /* BuilderGenerator.kt:175 */
   46     62   
    pub fn builder() -> crate::types::builders::PointInTimeRecoveryDescriptionBuilder {
          63  +
        /* BuilderGenerator.kt:176 */
   47     64   
        crate::types::builders::PointInTimeRecoveryDescriptionBuilder::default()
          65  +
        /* BuilderGenerator.kt:175 */
   48     66   
    }
          67  +
    /* ClientCodegenVisitor.kt:237 */
   49     68   
}
   50     69   
   51         -
/// A builder for [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
          70  +
/// /* BuilderGenerator.kt:342 */A builder for [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
          71  +
/* RustType.kt:516 */
   52     72   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          73  +
/* RustType.kt:516 */
   53     74   
#[non_exhaustive]
          75  +
/* BuilderGenerator.kt:345 */
   54     76   
pub struct PointInTimeRecoveryDescriptionBuilder {
   55         -
    pub(crate) point_in_time_recovery_status: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>,
   56         -
    pub(crate) earliest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) point_in_time_recovery_status: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>,
          78  +
    /* BuilderGenerator.kt:275 */ pub(crate) earliest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          79  +
    /* BuilderGenerator.kt:275 */
   57     80   
    pub(crate) latest_restorable_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          81  +
    /* BuilderGenerator.kt:345 */
   58     82   
}
          83  +
/* BuilderGenerator.kt:355 */
   59     84   
impl PointInTimeRecoveryDescriptionBuilder {
   60         -
    /// <p>The current state of point in time recovery:</p>
          85  +
    /// /* BuilderGenerator.kt:286 */<p>The current state of point in time recovery:</p>
   61     86   
    /// <ul>
   62     87   
    /// <li>
   63     88   
    /// <p><code>ENABLING</code> - Point in time recovery is being enabled.</p></li>
   64     89   
    /// <li>
   65     90   
    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
   66     91   
    /// <li>
   67     92   
    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
   68     93   
    /// </ul>
          94  +
    /* BuilderGenerator.kt:291 */
   69     95   
    pub fn point_in_time_recovery_status(mut self, input: crate::types::PointInTimeRecoveryStatus) -> Self {
          96  +
        /* BuilderGenerator.kt:292 */
   70     97   
        self.point_in_time_recovery_status = ::std::option::Option::Some(input);
          98  +
        /* BuilderGenerator.kt:293 */
   71     99   
        self
         100  +
        /* BuilderGenerator.kt:291 */
   72    101   
    }
   73         -
    /// <p>The current state of point in time recovery:</p>
         102  +
    /// /* BuilderGenerator.kt:312 */<p>The current state of point in time recovery:</p>
   74    103   
    /// <ul>
   75    104   
    /// <li>
   76    105   
    /// <p><code>ENABLING</code> - Point in time recovery is being enabled.</p></li>
   77    106   
    /// <li>
   78    107   
    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
   79    108   
    /// <li>
   80    109   
    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
   81    110   
    /// </ul>
         111  +
    /* BuilderGenerator.kt:314 */
   82    112   
    pub fn set_point_in_time_recovery_status(mut self, input: ::std::option::Option<crate::types::PointInTimeRecoveryStatus>) -> Self {
         113  +
        /* BuilderGenerator.kt:315 */
   83    114   
        self.point_in_time_recovery_status = input;
   84    115   
        self
         116  +
        /* BuilderGenerator.kt:314 */
   85    117   
    }
   86         -
    /// <p>The current state of point in time recovery:</p>
         118  +
    /// /* BuilderGenerator.kt:334 */<p>The current state of point in time recovery:</p>
   87    119   
    /// <ul>
   88    120   
    /// <li>
   89    121   
    /// <p><code>ENABLING</code> - Point in time recovery is being enabled.</p></li>
   90    122   
    /// <li>
   91    123   
    /// <p><code>ENABLED</code> - Point in time recovery is enabled.</p></li>
   92    124   
    /// <li>
   93    125   
    /// <p><code>DISABLED</code> - Point in time recovery is disabled.</p></li>
   94    126   
    /// </ul>
         127  +
    /* BuilderGenerator.kt:336 */
   95    128   
    pub fn get_point_in_time_recovery_status(&self) -> &::std::option::Option<crate::types::PointInTimeRecoveryStatus> {
         129  +
        /* BuilderGenerator.kt:337 */
   96    130   
        &self.point_in_time_recovery_status
         131  +
        /* BuilderGenerator.kt:336 */
   97    132   
    }
   98         -
    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         133  +
    /// /* BuilderGenerator.kt:286 */<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         134  +
    /* BuilderGenerator.kt:291 */
   99    135   
    pub fn earliest_restorable_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         136  +
        /* BuilderGenerator.kt:292 */
  100    137   
        self.earliest_restorable_date_time = ::std::option::Option::Some(input);
         138  +
        /* BuilderGenerator.kt:293 */
  101    139   
        self
         140  +
        /* BuilderGenerator.kt:291 */
  102    141   
    }
  103         -
    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         142  +
    /// /* BuilderGenerator.kt:312 */<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         143  +
    /* BuilderGenerator.kt:314 */
  104    144   
    pub fn set_earliest_restorable_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         145  +
        /* BuilderGenerator.kt:315 */
  105    146   
        self.earliest_restorable_date_time = input;
  106    147   
        self
         148  +
        /* BuilderGenerator.kt:314 */
  107    149   
    }
  108         -
    /// <p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         150  +
    /// /* BuilderGenerator.kt:334 */<p>Specifies the earliest point in time you can restore your table to. You can restore your table to any point in time during the last 35 days.</p>
         151  +
    /* BuilderGenerator.kt:336 */
  109    152   
    pub fn get_earliest_restorable_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         153  +
        /* BuilderGenerator.kt:337 */
  110    154   
        &self.earliest_restorable_date_time
         155  +
        /* BuilderGenerator.kt:336 */
  111    156   
    }
  112         -
    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         157  +
    /// /* BuilderGenerator.kt:286 */<p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         158  +
    /* BuilderGenerator.kt:291 */
  113    159   
    pub fn latest_restorable_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         160  +
        /* BuilderGenerator.kt:292 */
  114    161   
        self.latest_restorable_date_time = ::std::option::Option::Some(input);
         162  +
        /* BuilderGenerator.kt:293 */
  115    163   
        self
         164  +
        /* BuilderGenerator.kt:291 */
  116    165   
    }
  117         -
    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         166  +
    /// /* BuilderGenerator.kt:312 */<p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         167  +
    /* BuilderGenerator.kt:314 */
  118    168   
    pub fn set_latest_restorable_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         169  +
        /* BuilderGenerator.kt:315 */
  119    170   
        self.latest_restorable_date_time = input;
  120    171   
        self
         172  +
        /* BuilderGenerator.kt:314 */
  121    173   
    }
  122         -
    /// <p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         174  +
    /// /* BuilderGenerator.kt:334 */<p><code>LatestRestorableDateTime</code> is typically 5 minutes before the current time.</p>
         175  +
    /* BuilderGenerator.kt:336 */
  123    176   
    pub fn get_latest_restorable_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         177  +
        /* BuilderGenerator.kt:337 */
  124    178   
        &self.latest_restorable_date_time
         179  +
        /* BuilderGenerator.kt:336 */
  125    180   
    }
  126         -
    /// Consumes the builder and constructs a [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
         181  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PointInTimeRecoveryDescription`](crate::types::PointInTimeRecoveryDescription).
         182  +
    /* BuilderGenerator.kt:253 */
  127    183   
    pub fn build(self) -> crate::types::PointInTimeRecoveryDescription {
         184  +
        /* BuilderGenerator.kt:477 */
  128    185   
        crate::types::PointInTimeRecoveryDescription {
  129         -
            point_in_time_recovery_status: self.point_in_time_recovery_status,
         186  +
            /* BuilderGenerator.kt:481 */ point_in_time_recovery_status: self.point_in_time_recovery_status,
         187  +
            /* BuilderGenerator.kt:481 */
  130    188   
            earliest_restorable_date_time: self.earliest_restorable_date_time,
         189  +
            /* BuilderGenerator.kt:481 */
  131    190   
            latest_restorable_date_time: self.latest_restorable_date_time,
         191  +
            /* BuilderGenerator.kt:477 */
  132    192   
        }
         193  +
        /* BuilderGenerator.kt:253 */
  133    194   
    }
         195  +
    /* BuilderGenerator.kt:355 */
  134    196   
}