Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

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

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

@@ -1,1 +88,136 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Describes a tag. A tag is a key-value pair. You can add up to 50 tags to a single DynamoDB table.</p>
    4      4   
/// <p>AWS-assigned tag names and values are automatically assigned the <code>aws:</code> prefix, which the user cannot assign. AWS-assigned tag names do not count towards the tag limit of 50. User-assigned tag names have the prefix <code>user:</code> in the Cost Allocation Report. You cannot backdate the application of a tag.</p>
    5      5   
/// <p>For an overview on tagging DynamoDB resources, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html">Tagging for DynamoDB</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
           6  +
/* RustType.kt:516 */
    6      7   
#[non_exhaustive]
           8  +
/* RustType.kt:516 */
    7      9   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    8         -
pub struct Tag {
    9         -
    /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          10  +
pub /* StructureGenerator.kt:201 */ struct Tag {
          11  +
    /// /* StructureGenerator.kt:231 */<p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
   10     12   
    pub key: ::std::string::String,
   11         -
    /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The value of the tag. Tag values are case-sensitive and can be null.</p>
   12     14   
    pub value: ::std::string::String,
          15  +
    /* StructureGenerator.kt:201 */
   13     16   
}
          17  +
/* StructureGenerator.kt:135 */
   14     18   
impl Tag {
   15         -
    /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          20  +
    /* StructureGenerator.kt:166 */
   16     21   
    pub fn key(&self) -> &str {
          22  +
        /* StructureGenerator.kt:171 */
   17     23   
        use std::ops::Deref;
   18     24   
        self.key.deref()
          25  +
        /* StructureGenerator.kt:166 */
   19     26   
    }
   20         -
    /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          27  +
    /// /* StructureGenerator.kt:231 */<p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          28  +
    /* StructureGenerator.kt:166 */
   21     29   
    pub fn value(&self) -> &str {
          30  +
        /* StructureGenerator.kt:171 */
   22     31   
        use std::ops::Deref;
   23     32   
        self.value.deref()
          33  +
        /* StructureGenerator.kt:166 */
   24     34   
    }
          35  +
    /* StructureGenerator.kt:135 */
   25     36   
}
          37  +
/* ClientCodegenVisitor.kt:237 */
   26     38   
impl Tag {
   27         -
    /// Creates a new builder-style object to manufacture [`Tag`](crate::types::Tag).
          39  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Tag`](crate::types::Tag).
          40  +
    /* BuilderGenerator.kt:175 */
   28     41   
    pub fn builder() -> crate::types::builders::TagBuilder {
          42  +
        /* BuilderGenerator.kt:176 */
   29     43   
        crate::types::builders::TagBuilder::default()
          44  +
        /* BuilderGenerator.kt:175 */
   30     45   
    }
          46  +
    /* ClientCodegenVisitor.kt:237 */
   31     47   
}
   32     48   
   33         -
/// A builder for [`Tag`](crate::types::Tag).
          49  +
/// /* BuilderGenerator.kt:342 */A builder for [`Tag`](crate::types::Tag).
          50  +
/* RustType.kt:516 */
   34     51   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          52  +
/* RustType.kt:516 */
   35     53   
#[non_exhaustive]
          54  +
/* BuilderGenerator.kt:345 */
   36     55   
pub struct TagBuilder {
   37         -
    pub(crate) key: ::std::option::Option<::std::string::String>,
   38         -
    pub(crate) value: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */ pub(crate) key: ::std::option::Option<::std::string::String>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) value: ::std::option::Option<::std::string::String>,
          58  +
    /* BuilderGenerator.kt:345 */
   39     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   40     61   
impl TagBuilder {
   41         -
    /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
   42         -
    /// This field is required.
          62  +
    /// /* BuilderGenerator.kt:286 */<p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          63  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          64  +
    /* BuilderGenerator.kt:291 */
   43     65   
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   44     67   
        self.key = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   45     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   46     71   
    }
   47         -
    /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          72  +
    /// /* BuilderGenerator.kt:312 */<p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          73  +
    /* BuilderGenerator.kt:314 */
   48     74   
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          75  +
        /* BuilderGenerator.kt:315 */
   49     76   
        self.key = input;
   50     77   
        self
          78  +
        /* BuilderGenerator.kt:314 */
   51     79   
    }
   52         -
    /// <p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          80  +
    /// /* BuilderGenerator.kt:334 */<p>The key of the tag. Tag keys are case sensitive. Each DynamoDB table can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>
          81  +
    /* BuilderGenerator.kt:336 */
   53     82   
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
          83  +
        /* BuilderGenerator.kt:337 */
   54     84   
        &self.key
          85  +
        /* BuilderGenerator.kt:336 */
   55     86   
    }
   56         -
    /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
   57         -
    /// This field is required.
          87  +
    /// /* BuilderGenerator.kt:286 */<p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          88  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          89  +
    /* BuilderGenerator.kt:291 */
   58     90   
    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          91  +
        /* BuilderGenerator.kt:292 */
   59     92   
        self.value = ::std::option::Option::Some(input.into());
          93  +
        /* BuilderGenerator.kt:293 */
   60     94   
        self
          95  +
        /* BuilderGenerator.kt:291 */
   61     96   
    }
   62         -
    /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          97  +
    /// /* BuilderGenerator.kt:312 */<p>The value of the tag. Tag values are case-sensitive and can be null.</p>
          98  +
    /* BuilderGenerator.kt:314 */
   63     99   
    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         100  +
        /* BuilderGenerator.kt:315 */
   64    101   
        self.value = input;
   65    102   
        self
         103  +
        /* BuilderGenerator.kt:314 */
   66    104   
    }
   67         -
    /// <p>The value of the tag. Tag values are case-sensitive and can be null.</p>
         105  +
    /// /* BuilderGenerator.kt:334 */<p>The value of the tag. Tag values are case-sensitive and can be null.</p>
         106  +
    /* BuilderGenerator.kt:336 */
   68    107   
    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
         108  +
        /* BuilderGenerator.kt:337 */
   69    109   
        &self.value
         110  +
        /* BuilderGenerator.kt:336 */
   70    111   
    }
   71         -
    /// Consumes the builder and constructs a [`Tag`](crate::types::Tag).
   72         -
    /// This method will fail if any of the following fields are not set:
   73         -
    /// - [`key`](crate::types::builders::TagBuilder::key)
   74         -
    /// - [`value`](crate::types::builders::TagBuilder::value)
         112  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Tag`](crate::types::Tag).
         113  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         114  +
    /// /* BuilderGenerator.kt:246 */- [`key`](crate::types::builders::TagBuilder::key)
         115  +
    /// /* BuilderGenerator.kt:246 */- [`value`](crate::types::builders::TagBuilder::value)
         116  +
    /* BuilderGenerator.kt:253 */
   75    117   
    pub fn build(self) -> ::std::result::Result<crate::types::Tag, ::aws_smithy_types::error::operation::BuildError> {
   76         -
        ::std::result::Result::Ok(crate::types::Tag {
   77         -
            key: self.key.ok_or_else(|| {
   78         -
                ::aws_smithy_types::error::operation::BuildError::missing_field("key", "key was not specified but it is required when building Tag")
   79         -
            })?,
   80         -
            value: self.value.ok_or_else(|| {
   81         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   82         -
                    "value",
   83         -
                    "value was not specified but it is required when building Tag",
   84         -
                )
   85         -
            })?,
   86         -
        })
         118  +
        /* BuilderGenerator.kt:254 */
         119  +
        ::std::result::Result::Ok(
         120  +
            /* BuilderGenerator.kt:477 */crate::types::Tag {
         121  +
                /* BuilderGenerator.kt:481 */key: self.key
         122  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         123  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("key", "key was not specified but it is required when building Tag")
         124  +
                    /* BuilderGenerator.kt:494 */)?
         125  +
                ,
         126  +
                /* BuilderGenerator.kt:481 */value: self.value
         127  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         128  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("value", "value was not specified but it is required when building Tag")
         129  +
                    /* BuilderGenerator.kt:494 */)?
         130  +
                ,
         131  +
            /* BuilderGenerator.kt:477 */}
         132  +
        /* BuilderGenerator.kt:254 */)
         133  +
        /* BuilderGenerator.kt:253 */
   87    134   
    }
         135  +
    /* BuilderGenerator.kt:355 */
   88    136   
}

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

@@ -1,1 +72,119 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The description of the Time to Live (TTL) status on the specified table.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The description of the Time to Live (TTL) status on the specified 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 TimeToLiveDescription {
    7         -
    /// <p>The TTL status for the table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct TimeToLiveDescription {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The TTL status for the table.</p>
    8     10   
    pub time_to_live_status: ::std::option::Option<crate::types::TimeToLiveStatus>,
    9         -
    /// <p>The name of the TTL attribute for items in the table.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The name of the TTL attribute for items in the table.</p>
   10     12   
    pub attribute_name: ::std::option::Option<::std::string::String>,
          13  +
    /* StructureGenerator.kt:201 */
   11     14   
}
          15  +
/* StructureGenerator.kt:135 */
   12     16   
impl TimeToLiveDescription {
   13         -
    /// <p>The TTL status for the table.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>The TTL status for the table.</p>
          18  +
    /* StructureGenerator.kt:166 */
   14     19   
    pub fn time_to_live_status(&self) -> ::std::option::Option<&crate::types::TimeToLiveStatus> {
          20  +
        /* StructureGenerator.kt:170 */
   15     21   
        self.time_to_live_status.as_ref()
          22  +
        /* StructureGenerator.kt:166 */
   16     23   
    }
   17         -
    /// <p>The name of the TTL attribute for items in the table.</p>
          24  +
    /// /* StructureGenerator.kt:231 */<p>The name of the TTL attribute for items in the table.</p>
          25  +
    /* StructureGenerator.kt:166 */
   18     26   
    pub fn attribute_name(&self) -> ::std::option::Option<&str> {
          27  +
        /* StructureGenerator.kt:169 */
   19     28   
        self.attribute_name.as_deref()
          29  +
        /* StructureGenerator.kt:166 */
   20     30   
    }
          31  +
    /* StructureGenerator.kt:135 */
   21     32   
}
          33  +
/* ClientCodegenVisitor.kt:237 */
   22     34   
impl TimeToLiveDescription {
   23         -
    /// Creates a new builder-style object to manufacture [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
          35  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
          36  +
    /* BuilderGenerator.kt:175 */
   24     37   
    pub fn builder() -> crate::types::builders::TimeToLiveDescriptionBuilder {
          38  +
        /* BuilderGenerator.kt:176 */
   25     39   
        crate::types::builders::TimeToLiveDescriptionBuilder::default()
          40  +
        /* BuilderGenerator.kt:175 */
   26     41   
    }
          42  +
    /* ClientCodegenVisitor.kt:237 */
   27     43   
}
   28     44   
   29         -
/// A builder for [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
          45  +
/// /* BuilderGenerator.kt:342 */A builder for [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
          46  +
/* RustType.kt:516 */
   30     47   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          48  +
/* RustType.kt:516 */
   31     49   
#[non_exhaustive]
          50  +
/* BuilderGenerator.kt:345 */
   32     51   
pub struct TimeToLiveDescriptionBuilder {
   33         -
    pub(crate) time_to_live_status: ::std::option::Option<crate::types::TimeToLiveStatus>,
   34         -
    pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          52  +
    /* BuilderGenerator.kt:275 */ pub(crate) time_to_live_status: ::std::option::Option<crate::types::TimeToLiveStatus>,
          53  +
    /* BuilderGenerator.kt:275 */ pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          54  +
    /* BuilderGenerator.kt:345 */
   35     55   
}
          56  +
/* BuilderGenerator.kt:355 */
   36     57   
impl TimeToLiveDescriptionBuilder {
   37         -
    /// <p>The TTL status for the table.</p>
          58  +
    /// /* BuilderGenerator.kt:286 */<p>The TTL status for the table.</p>
          59  +
    /* BuilderGenerator.kt:291 */
   38     60   
    pub fn time_to_live_status(mut self, input: crate::types::TimeToLiveStatus) -> Self {
          61  +
        /* BuilderGenerator.kt:292 */
   39     62   
        self.time_to_live_status = ::std::option::Option::Some(input);
          63  +
        /* BuilderGenerator.kt:293 */
   40     64   
        self
          65  +
        /* BuilderGenerator.kt:291 */
   41     66   
    }
   42         -
    /// <p>The TTL status for the table.</p>
          67  +
    /// /* BuilderGenerator.kt:312 */<p>The TTL status for the table.</p>
          68  +
    /* BuilderGenerator.kt:314 */
   43     69   
    pub fn set_time_to_live_status(mut self, input: ::std::option::Option<crate::types::TimeToLiveStatus>) -> Self {
          70  +
        /* BuilderGenerator.kt:315 */
   44     71   
        self.time_to_live_status = input;
   45     72   
        self
          73  +
        /* BuilderGenerator.kt:314 */
   46     74   
    }
   47         -
    /// <p>The TTL status for the table.</p>
          75  +
    /// /* BuilderGenerator.kt:334 */<p>The TTL status for the table.</p>
          76  +
    /* BuilderGenerator.kt:336 */
   48     77   
    pub fn get_time_to_live_status(&self) -> &::std::option::Option<crate::types::TimeToLiveStatus> {
          78  +
        /* BuilderGenerator.kt:337 */
   49     79   
        &self.time_to_live_status
          80  +
        /* BuilderGenerator.kt:336 */
   50     81   
    }
   51         -
    /// <p>The name of the TTL attribute for items in the table.</p>
          82  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the TTL attribute for items in the table.</p>
          83  +
    /* BuilderGenerator.kt:291 */
   52     84   
    pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   53     86   
        self.attribute_name = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   54     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   55     90   
    }
   56         -
    /// <p>The name of the TTL attribute for items in the table.</p>
          91  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the TTL attribute for items in the table.</p>
          92  +
    /* BuilderGenerator.kt:314 */
   57     93   
    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          94  +
        /* BuilderGenerator.kt:315 */
   58     95   
        self.attribute_name = input;
   59     96   
        self
          97  +
        /* BuilderGenerator.kt:314 */
   60     98   
    }
   61         -
    /// <p>The name of the TTL attribute for items in the table.</p>
          99  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the TTL attribute for items in the table.</p>
         100  +
    /* BuilderGenerator.kt:336 */
   62    101   
    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
         102  +
        /* BuilderGenerator.kt:337 */
   63    103   
        &self.attribute_name
         104  +
        /* BuilderGenerator.kt:336 */
   64    105   
    }
   65         -
    /// Consumes the builder and constructs a [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
         106  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TimeToLiveDescription`](crate::types::TimeToLiveDescription).
         107  +
    /* BuilderGenerator.kt:253 */
   66    108   
    pub fn build(self) -> crate::types::TimeToLiveDescription {
         109  +
        /* BuilderGenerator.kt:477 */
   67    110   
        crate::types::TimeToLiveDescription {
   68         -
            time_to_live_status: self.time_to_live_status,
         111  +
            /* BuilderGenerator.kt:481 */ time_to_live_status: self.time_to_live_status,
         112  +
            /* BuilderGenerator.kt:481 */
   69    113   
            attribute_name: self.attribute_name,
         114  +
            /* BuilderGenerator.kt:477 */
   70    115   
        }
         116  +
        /* BuilderGenerator.kt:253 */
   71    117   
    }
         118  +
    /* BuilderGenerator.kt:355 */
   72    119   
}

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

@@ -1,1 +88,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the settings used to enable or disable Time to Live (TTL) for the specified table.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the settings used to enable or disable Time to Live (TTL) for the specified 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 TimeToLiveSpecification {
    7         -
    /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct TimeToLiveSpecification {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
    8     10   
    pub enabled: bool,
    9         -
    /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
   10     12   
    pub attribute_name: ::std::string::String,
          13  +
    /* StructureGenerator.kt:201 */
   11     14   
}
          15  +
/* StructureGenerator.kt:135 */
   12     16   
impl TimeToLiveSpecification {
   13         -
    /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          18  +
    /* StructureGenerator.kt:166 */
   14     19   
    pub fn enabled(&self) -> bool {
          20  +
        /* StructureGenerator.kt:168 */
   15     21   
        self.enabled
          22  +
        /* StructureGenerator.kt:166 */
   16     23   
    }
   17         -
    /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          24  +
    /// /* StructureGenerator.kt:231 */<p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          25  +
    /* StructureGenerator.kt:166 */
   18     26   
    pub fn attribute_name(&self) -> &str {
          27  +
        /* StructureGenerator.kt:171 */
   19     28   
        use std::ops::Deref;
   20     29   
        self.attribute_name.deref()
          30  +
        /* StructureGenerator.kt:166 */
   21     31   
    }
          32  +
    /* StructureGenerator.kt:135 */
   22     33   
}
          34  +
/* ClientCodegenVisitor.kt:237 */
   23     35   
impl TimeToLiveSpecification {
   24         -
    /// Creates a new builder-style object to manufacture [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
          36  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
          37  +
    /* BuilderGenerator.kt:175 */
   25     38   
    pub fn builder() -> crate::types::builders::TimeToLiveSpecificationBuilder {
          39  +
        /* BuilderGenerator.kt:176 */
   26     40   
        crate::types::builders::TimeToLiveSpecificationBuilder::default()
          41  +
        /* BuilderGenerator.kt:175 */
   27     42   
    }
          43  +
    /* ClientCodegenVisitor.kt:237 */
   28     44   
}
   29     45   
   30         -
/// A builder for [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
          46  +
/// /* BuilderGenerator.kt:342 */A builder for [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
          47  +
/* RustType.kt:516 */
   31     48   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          49  +
/* RustType.kt:516 */
   32     50   
#[non_exhaustive]
          51  +
/* BuilderGenerator.kt:345 */
   33     52   
pub struct TimeToLiveSpecificationBuilder {
   34         -
    pub(crate) enabled: ::std::option::Option<bool>,
   35         -
    pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          53  +
    /* BuilderGenerator.kt:275 */ pub(crate) enabled: ::std::option::Option<bool>,
          54  +
    /* BuilderGenerator.kt:275 */ pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
          55  +
    /* BuilderGenerator.kt:345 */
   36     56   
}
          57  +
/* BuilderGenerator.kt:355 */
   37     58   
impl TimeToLiveSpecificationBuilder {
   38         -
    /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
   39         -
    /// This field is required.
          59  +
    /// /* BuilderGenerator.kt:286 */<p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          60  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          61  +
    /* BuilderGenerator.kt:291 */
   40     62   
    pub fn enabled(mut self, input: bool) -> Self {
          63  +
        /* BuilderGenerator.kt:292 */
   41     64   
        self.enabled = ::std::option::Option::Some(input);
          65  +
        /* BuilderGenerator.kt:293 */
   42     66   
        self
          67  +
        /* BuilderGenerator.kt:291 */
   43     68   
    }
   44         -
    /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          69  +
    /// /* BuilderGenerator.kt:312 */<p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          70  +
    /* BuilderGenerator.kt:314 */
   45     71   
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
          72  +
        /* BuilderGenerator.kt:315 */
   46     73   
        self.enabled = input;
   47     74   
        self
          75  +
        /* BuilderGenerator.kt:314 */
   48     76   
    }
   49         -
    /// <p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          77  +
    /// /* BuilderGenerator.kt:334 */<p>Indicates whether TTL is to be enabled (true) or disabled (false) on the table.</p>
          78  +
    /* BuilderGenerator.kt:336 */
   50     79   
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
          80  +
        /* BuilderGenerator.kt:337 */
   51     81   
        &self.enabled
          82  +
        /* BuilderGenerator.kt:336 */
   52     83   
    }
   53         -
    /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
   54         -
    /// This field is required.
          84  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          85  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          86  +
    /* BuilderGenerator.kt:291 */
   55     87   
    pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          88  +
        /* BuilderGenerator.kt:292 */
   56     89   
        self.attribute_name = ::std::option::Option::Some(input.into());
          90  +
        /* BuilderGenerator.kt:293 */
   57     91   
        self
          92  +
        /* BuilderGenerator.kt:291 */
   58     93   
    }
   59         -
    /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          94  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
          95  +
    /* BuilderGenerator.kt:314 */
   60     96   
    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          97  +
        /* BuilderGenerator.kt:315 */
   61     98   
        self.attribute_name = input;
   62     99   
        self
         100  +
        /* BuilderGenerator.kt:314 */
   63    101   
    }
   64         -
    /// <p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
         102  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the TTL attribute used to store the expiration time for items in the table.</p>
         103  +
    /* BuilderGenerator.kt:336 */
   65    104   
    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
         105  +
        /* BuilderGenerator.kt:337 */
   66    106   
        &self.attribute_name
         107  +
        /* BuilderGenerator.kt:336 */
   67    108   
    }
   68         -
    /// Consumes the builder and constructs a [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
   69         -
    /// This method will fail if any of the following fields are not set:
   70         -
    /// - [`enabled`](crate::types::builders::TimeToLiveSpecificationBuilder::enabled)
   71         -
    /// - [`attribute_name`](crate::types::builders::TimeToLiveSpecificationBuilder::attribute_name)
         109  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TimeToLiveSpecification`](crate::types::TimeToLiveSpecification).
         110  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         111  +
    /// /* BuilderGenerator.kt:246 */- [`enabled`](crate::types::builders::TimeToLiveSpecificationBuilder::enabled)
         112  +
    /// /* BuilderGenerator.kt:246 */- [`attribute_name`](crate::types::builders::TimeToLiveSpecificationBuilder::attribute_name)
         113  +
    /* BuilderGenerator.kt:253 */
   72    114   
    pub fn build(self) -> ::std::result::Result<crate::types::TimeToLiveSpecification, ::aws_smithy_types::error::operation::BuildError> {
   73         -
        ::std::result::Result::Ok(crate::types::TimeToLiveSpecification {
   74         -
            enabled: self.enabled.ok_or_else(|| {
   75         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   76         -
                    "enabled",
   77         -
                    "enabled was not specified but it is required when building TimeToLiveSpecification",
   78         -
                )
   79         -
            })?,
   80         -
            attribute_name: self.attribute_name.ok_or_else(|| {
   81         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   82         -
                    "attribute_name",
   83         -
                    "attribute_name was not specified but it is required when building TimeToLiveSpecification",
   84         -
                )
   85         -
            })?,
   86         -
        })
         115  +
        /* BuilderGenerator.kt:254 */
         116  +
        ::std::result::Result::Ok(
         117  +
            /* BuilderGenerator.kt:477 */crate::types::TimeToLiveSpecification {
         118  +
                /* BuilderGenerator.kt:481 */enabled: self.enabled
         119  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         120  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("enabled", "enabled was not specified but it is required when building TimeToLiveSpecification")
         121  +
                    /* BuilderGenerator.kt:494 */)?
         122  +
                ,
         123  +
                /* BuilderGenerator.kt:481 */attribute_name: self.attribute_name
         124  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         125  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("attribute_name", "attribute_name was not specified but it is required when building TimeToLiveSpecification")
         126  +
                    /* BuilderGenerator.kt:494 */)?
         127  +
                ,
         128  +
            /* BuilderGenerator.kt:477 */}
         129  +
        /* BuilderGenerator.kt:254 */)
         130  +
        /* BuilderGenerator.kt:253 */
   87    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   88    133   
}

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

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

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

@@ -1,1 +58,91 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Specifies an item to be retrieved as part of the transaction.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Specifies an item to be retrieved as part of the transaction.</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 TransactGetItem {
    7         -
    /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct TransactGetItem {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
    8     10   
    pub get: crate::types::Get,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl TransactGetItem {
   11         -
    /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn get(&self) -> &crate::types::Get {
          18  +
        /* StructureGenerator.kt:172 */
   13     19   
        &self.get
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl TransactGetItem {
   17         -
    /// Creates a new builder-style object to manufacture [`TransactGetItem`](crate::types::TransactGetItem).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TransactGetItem`](crate::types::TransactGetItem).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::TransactGetItemBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::TransactGetItemBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`TransactGetItem`](crate::types::TransactGetItem).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`TransactGetItem`](crate::types::TransactGetItem).
          37  +
/* RustType.kt:516 */
   24     38   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          39  +
/* RustType.kt:516 */
   25     40   
#[non_exhaustive]
          41  +
/* BuilderGenerator.kt:345 */
   26     42   
pub struct TransactGetItemBuilder {
   27         -
    pub(crate) get: ::std::option::Option<crate::types::Get>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) get: ::std::option::Option<crate::types::Get>,
          44  +
    /* BuilderGenerator.kt:345 */
   28     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   29     47   
impl TransactGetItemBuilder {
   30         -
    /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
   31         -
    /// This field is required.
          48  +
    /// /* BuilderGenerator.kt:286 */<p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          49  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          50  +
    /* BuilderGenerator.kt:291 */
   32     51   
    pub fn get(mut self, input: crate::types::Get) -> Self {
          52  +
        /* BuilderGenerator.kt:292 */
   33     53   
        self.get = ::std::option::Option::Some(input);
          54  +
        /* BuilderGenerator.kt:293 */
   34     55   
        self
          56  +
        /* BuilderGenerator.kt:291 */
   35     57   
    }
   36         -
    /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          58  +
    /// /* BuilderGenerator.kt:312 */<p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          59  +
    /* BuilderGenerator.kt:314 */
   37     60   
    pub fn set_get(mut self, input: ::std::option::Option<crate::types::Get>) -> Self {
          61  +
        /* BuilderGenerator.kt:315 */
   38     62   
        self.get = input;
   39     63   
        self
          64  +
        /* BuilderGenerator.kt:314 */
   40     65   
    }
   41         -
    /// <p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          66  +
    /// /* BuilderGenerator.kt:334 */<p>Contains the primary key that identifies the item to get, together with the name of the table that contains the item, and optionally the specific attributes of the item to retrieve.</p>
          67  +
    /* BuilderGenerator.kt:336 */
   42     68   
    pub fn get_get(&self) -> &::std::option::Option<crate::types::Get> {
          69  +
        /* BuilderGenerator.kt:337 */
   43     70   
        &self.get
          71  +
        /* BuilderGenerator.kt:336 */
   44     72   
    }
   45         -
    /// Consumes the builder and constructs a [`TransactGetItem`](crate::types::TransactGetItem).
   46         -
    /// This method will fail if any of the following fields are not set:
   47         -
    /// - [`get`](crate::types::builders::TransactGetItemBuilder::get)
          73  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TransactGetItem`](crate::types::TransactGetItem).
          74  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          75  +
    /// /* BuilderGenerator.kt:246 */- [`get`](crate::types::builders::TransactGetItemBuilder::get)
          76  +
    /* BuilderGenerator.kt:253 */
   48     77   
    pub fn build(self) -> ::std::result::Result<crate::types::TransactGetItem, ::aws_smithy_types::error::operation::BuildError> {
   49         -
        ::std::result::Result::Ok(crate::types::TransactGetItem {
   50         -
            get: self.get.ok_or_else(|| {
   51         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   52         -
                    "get",
   53         -
                    "get was not specified but it is required when building TransactGetItem",
   54         -
                )
   55         -
            })?,
   56         -
        })
          78  +
        /* BuilderGenerator.kt:254 */
          79  +
        ::std::result::Result::Ok(
          80  +
            /* BuilderGenerator.kt:477 */crate::types::TransactGetItem {
          81  +
                /* BuilderGenerator.kt:481 */get: self.get
          82  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          83  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("get", "get was not specified but it is required when building TransactGetItem")
          84  +
                    /* BuilderGenerator.kt:494 */)?
          85  +
                ,
          86  +
            /* BuilderGenerator.kt:477 */}
          87  +
        /* BuilderGenerator.kt:254 */)
          88  +
        /* BuilderGenerator.kt:253 */
   57     89   
    }
          90  +
    /* BuilderGenerator.kt:355 */
   58     91   
}

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

@@ -1,1 +116,191 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>A list of requests that can perform update, put, delete, or check operations on multiple items in one or more tables atomically.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>A list of requests that can perform update, put, delete, or check operations on multiple items in one or more tables atomically.</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 TransactWriteItem {
    7         -
    /// <p>A request to perform a check item operation.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct TransactWriteItem {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a check item operation.</p>
    8     10   
    pub condition_check: ::std::option::Option<crate::types::ConditionCheck>,
    9         -
    /// <p>A request to perform a <code>PutItem</code> operation.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a <code>PutItem</code> operation.</p>
   10     12   
    pub put: ::std::option::Option<crate::types::Put>,
   11         -
    /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a <code>DeleteItem</code> operation.</p>
   12     14   
    pub delete: ::std::option::Option<crate::types::Delete>,
   13         -
    /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform an <code>UpdateItem</code> operation.</p>
   14     16   
    pub update: ::std::option::Option<crate::types::Update>,
          17  +
    /* StructureGenerator.kt:201 */
   15     18   
}
          19  +
/* StructureGenerator.kt:135 */
   16     20   
impl TransactWriteItem {
   17         -
    /// <p>A request to perform a check item operation.</p>
          21  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a check item operation.</p>
          22  +
    /* StructureGenerator.kt:166 */
   18     23   
    pub fn condition_check(&self) -> ::std::option::Option<&crate::types::ConditionCheck> {
          24  +
        /* StructureGenerator.kt:170 */
   19     25   
        self.condition_check.as_ref()
          26  +
        /* StructureGenerator.kt:166 */
   20     27   
    }
   21         -
    /// <p>A request to perform a <code>PutItem</code> operation.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a <code>PutItem</code> operation.</p>
          29  +
    /* StructureGenerator.kt:166 */
   22     30   
    pub fn put(&self) -> ::std::option::Option<&crate::types::Put> {
          31  +
        /* StructureGenerator.kt:170 */
   23     32   
        self.put.as_ref()
          33  +
        /* StructureGenerator.kt:166 */
   24     34   
    }
   25         -
    /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
          35  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform a <code>DeleteItem</code> operation.</p>
          36  +
    /* StructureGenerator.kt:166 */
   26     37   
    pub fn delete(&self) -> ::std::option::Option<&crate::types::Delete> {
          38  +
        /* StructureGenerator.kt:170 */
   27     39   
        self.delete.as_ref()
          40  +
        /* StructureGenerator.kt:166 */
   28     41   
    }
   29         -
    /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
          42  +
    /// /* StructureGenerator.kt:231 */<p>A request to perform an <code>UpdateItem</code> operation.</p>
          43  +
    /* StructureGenerator.kt:166 */
   30     44   
    pub fn update(&self) -> ::std::option::Option<&crate::types::Update> {
          45  +
        /* StructureGenerator.kt:170 */
   31     46   
        self.update.as_ref()
          47  +
        /* StructureGenerator.kt:166 */
   32     48   
    }
          49  +
    /* StructureGenerator.kt:135 */
   33     50   
}
          51  +
/* ClientCodegenVisitor.kt:237 */
   34     52   
impl TransactWriteItem {
   35         -
    /// Creates a new builder-style object to manufacture [`TransactWriteItem`](crate::types::TransactWriteItem).
          53  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`TransactWriteItem`](crate::types::TransactWriteItem).
          54  +
    /* BuilderGenerator.kt:175 */
   36     55   
    pub fn builder() -> crate::types::builders::TransactWriteItemBuilder {
          56  +
        /* BuilderGenerator.kt:176 */
   37     57   
        crate::types::builders::TransactWriteItemBuilder::default()
          58  +
        /* BuilderGenerator.kt:175 */
   38     59   
    }
          60  +
    /* ClientCodegenVisitor.kt:237 */
   39     61   
}
   40     62   
   41         -
/// A builder for [`TransactWriteItem`](crate::types::TransactWriteItem).
          63  +
/// /* BuilderGenerator.kt:342 */A builder for [`TransactWriteItem`](crate::types::TransactWriteItem).
          64  +
/* RustType.kt:516 */
   42     65   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          66  +
/* RustType.kt:516 */
   43     67   
#[non_exhaustive]
          68  +
/* BuilderGenerator.kt:345 */
   44     69   
pub struct TransactWriteItemBuilder {
   45         -
    pub(crate) condition_check: ::std::option::Option<crate::types::ConditionCheck>,
   46         -
    pub(crate) put: ::std::option::Option<crate::types::Put>,
   47         -
    pub(crate) delete: ::std::option::Option<crate::types::Delete>,
   48         -
    pub(crate) update: ::std::option::Option<crate::types::Update>,
          70  +
    /* BuilderGenerator.kt:275 */ pub(crate) condition_check: ::std::option::Option<crate::types::ConditionCheck>,
          71  +
    /* BuilderGenerator.kt:275 */ pub(crate) put: ::std::option::Option<crate::types::Put>,
          72  +
    /* BuilderGenerator.kt:275 */ pub(crate) delete: ::std::option::Option<crate::types::Delete>,
          73  +
    /* BuilderGenerator.kt:275 */ pub(crate) update: ::std::option::Option<crate::types::Update>,
          74  +
    /* BuilderGenerator.kt:345 */
   49     75   
}
          76  +
/* BuilderGenerator.kt:355 */
   50     77   
impl TransactWriteItemBuilder {
   51         -
    /// <p>A request to perform a check item operation.</p>
          78  +
    /// /* BuilderGenerator.kt:286 */<p>A request to perform a check item operation.</p>
          79  +
    /* BuilderGenerator.kt:291 */
   52     80   
    pub fn condition_check(mut self, input: crate::types::ConditionCheck) -> Self {
          81  +
        /* BuilderGenerator.kt:292 */
   53     82   
        self.condition_check = ::std::option::Option::Some(input);
          83  +
        /* BuilderGenerator.kt:293 */
   54     84   
        self
          85  +
        /* BuilderGenerator.kt:291 */
   55     86   
    }
   56         -
    /// <p>A request to perform a check item operation.</p>
          87  +
    /// /* BuilderGenerator.kt:312 */<p>A request to perform a check item operation.</p>
          88  +
    /* BuilderGenerator.kt:314 */
   57     89   
    pub fn set_condition_check(mut self, input: ::std::option::Option<crate::types::ConditionCheck>) -> Self {
          90  +
        /* BuilderGenerator.kt:315 */
   58     91   
        self.condition_check = input;
   59     92   
        self
          93  +
        /* BuilderGenerator.kt:314 */
   60     94   
    }
   61         -
    /// <p>A request to perform a check item operation.</p>
          95  +
    /// /* BuilderGenerator.kt:334 */<p>A request to perform a check item operation.</p>
          96  +
    /* BuilderGenerator.kt:336 */
   62     97   
    pub fn get_condition_check(&self) -> &::std::option::Option<crate::types::ConditionCheck> {
          98  +
        /* BuilderGenerator.kt:337 */
   63     99   
        &self.condition_check
         100  +
        /* BuilderGenerator.kt:336 */
   64    101   
    }
   65         -
    /// <p>A request to perform a <code>PutItem</code> operation.</p>
         102  +
    /// /* BuilderGenerator.kt:286 */<p>A request to perform a <code>PutItem</code> operation.</p>
         103  +
    /* BuilderGenerator.kt:291 */
   66    104   
    pub fn put(mut self, input: crate::types::Put) -> Self {
         105  +
        /* BuilderGenerator.kt:292 */
   67    106   
        self.put = ::std::option::Option::Some(input);
         107  +
        /* BuilderGenerator.kt:293 */
   68    108   
        self
         109  +
        /* BuilderGenerator.kt:291 */
   69    110   
    }
   70         -
    /// <p>A request to perform a <code>PutItem</code> operation.</p>
         111  +
    /// /* BuilderGenerator.kt:312 */<p>A request to perform a <code>PutItem</code> operation.</p>
         112  +
    /* BuilderGenerator.kt:314 */
   71    113   
    pub fn set_put(mut self, input: ::std::option::Option<crate::types::Put>) -> Self {
         114  +
        /* BuilderGenerator.kt:315 */
   72    115   
        self.put = input;
   73    116   
        self
         117  +
        /* BuilderGenerator.kt:314 */
   74    118   
    }
   75         -
    /// <p>A request to perform a <code>PutItem</code> operation.</p>
         119  +
    /// /* BuilderGenerator.kt:334 */<p>A request to perform a <code>PutItem</code> operation.</p>
         120  +
    /* BuilderGenerator.kt:336 */
   76    121   
    pub fn get_put(&self) -> &::std::option::Option<crate::types::Put> {
         122  +
        /* BuilderGenerator.kt:337 */
   77    123   
        &self.put
         124  +
        /* BuilderGenerator.kt:336 */
   78    125   
    }
   79         -
    /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
         126  +
    /// /* BuilderGenerator.kt:286 */<p>A request to perform a <code>DeleteItem</code> operation.</p>
         127  +
    /* BuilderGenerator.kt:291 */
   80    128   
    pub fn delete(mut self, input: crate::types::Delete) -> Self {
         129  +
        /* BuilderGenerator.kt:292 */
   81    130   
        self.delete = ::std::option::Option::Some(input);
         131  +
        /* BuilderGenerator.kt:293 */
   82    132   
        self
         133  +
        /* BuilderGenerator.kt:291 */
   83    134   
    }
   84         -
    /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
         135  +
    /// /* BuilderGenerator.kt:312 */<p>A request to perform a <code>DeleteItem</code> operation.</p>
         136  +
    /* BuilderGenerator.kt:314 */
   85    137   
    pub fn set_delete(mut self, input: ::std::option::Option<crate::types::Delete>) -> Self {
         138  +
        /* BuilderGenerator.kt:315 */
   86    139   
        self.delete = input;
   87    140   
        self
         141  +
        /* BuilderGenerator.kt:314 */
   88    142   
    }
   89         -
    /// <p>A request to perform a <code>DeleteItem</code> operation.</p>
         143  +
    /// /* BuilderGenerator.kt:334 */<p>A request to perform a <code>DeleteItem</code> operation.</p>
         144  +
    /* BuilderGenerator.kt:336 */
   90    145   
    pub fn get_delete(&self) -> &::std::option::Option<crate::types::Delete> {
         146  +
        /* BuilderGenerator.kt:337 */
   91    147   
        &self.delete
         148  +
        /* BuilderGenerator.kt:336 */
   92    149   
    }
   93         -
    /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
         150  +
    /// /* BuilderGenerator.kt:286 */<p>A request to perform an <code>UpdateItem</code> operation.</p>
         151  +
    /* BuilderGenerator.kt:291 */
   94    152   
    pub fn update(mut self, input: crate::types::Update) -> Self {
         153  +
        /* BuilderGenerator.kt:292 */
   95    154   
        self.update = ::std::option::Option::Some(input);
         155  +
        /* BuilderGenerator.kt:293 */
   96    156   
        self
         157  +
        /* BuilderGenerator.kt:291 */
   97    158   
    }
   98         -
    /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
         159  +
    /// /* BuilderGenerator.kt:312 */<p>A request to perform an <code>UpdateItem</code> operation.</p>
         160  +
    /* BuilderGenerator.kt:314 */
   99    161   
    pub fn set_update(mut self, input: ::std::option::Option<crate::types::Update>) -> Self {
         162  +
        /* BuilderGenerator.kt:315 */
  100    163   
        self.update = input;
  101    164   
        self
         165  +
        /* BuilderGenerator.kt:314 */
  102    166   
    }
  103         -
    /// <p>A request to perform an <code>UpdateItem</code> operation.</p>
         167  +
    /// /* BuilderGenerator.kt:334 */<p>A request to perform an <code>UpdateItem</code> operation.</p>
         168  +
    /* BuilderGenerator.kt:336 */
  104    169   
    pub fn get_update(&self) -> &::std::option::Option<crate::types::Update> {
         170  +
        /* BuilderGenerator.kt:337 */
  105    171   
        &self.update
         172  +
        /* BuilderGenerator.kt:336 */
  106    173   
    }
  107         -
    /// Consumes the builder and constructs a [`TransactWriteItem`](crate::types::TransactWriteItem).
         174  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`TransactWriteItem`](crate::types::TransactWriteItem).
         175  +
    /* BuilderGenerator.kt:253 */
  108    176   
    pub fn build(self) -> crate::types::TransactWriteItem {
         177  +
        /* BuilderGenerator.kt:477 */
  109    178   
        crate::types::TransactWriteItem {
  110         -
            condition_check: self.condition_check,
         179  +
            /* BuilderGenerator.kt:481 */ condition_check: self.condition_check,
         180  +
            /* BuilderGenerator.kt:481 */
  111    181   
            put: self.put,
         182  +
            /* BuilderGenerator.kt:481 */
  112    183   
            delete: self.delete,
         184  +
            /* BuilderGenerator.kt:481 */
  113    185   
            update: self.update,
         186  +
            /* BuilderGenerator.kt:477 */
  114    187   
        }
         188  +
        /* BuilderGenerator.kt:253 */
  115    189   
    }
         190  +
    /* BuilderGenerator.kt:355 */
  116    191   
}

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

@@ -1,1 +242,362 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents a request to perform an <code>UpdateItem</code> operation.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct Update {
    7         -
    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct Update {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
    8     10   
    pub key: ::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>,
    9         -
    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
   10     12   
    pub update_expression: ::std::string::String,
   11         -
    /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
   12     14   
    pub table_name: ::std::string::String,
   13         -
    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
   14     16   
    pub condition_expression: ::std::option::Option<::std::string::String>,
   15         -
    /// <p>One or more substitution tokens for attribute names in an expression.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression.</p>
   16     18   
    pub expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
   17         -
    /// <p>One or more values that can be substituted in an expression.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>One or more values that can be substituted in an expression.</p>
   18     20   
    pub expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   19         -
    /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
          21  +
    /// /* StructureGenerator.kt:231 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
   20     22   
    pub return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
          23  +
    /* StructureGenerator.kt:201 */
   21     24   
}
          25  +
/* StructureGenerator.kt:135 */
   22     26   
impl Update {
   23         -
    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
          27  +
    /// /* StructureGenerator.kt:231 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
          28  +
    /* StructureGenerator.kt:166 */
   24     29   
    pub fn key(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::AttributeValue> {
          30  +
        /* StructureGenerator.kt:172 */
   25     31   
        &self.key
          32  +
        /* StructureGenerator.kt:166 */
   26     33   
    }
   27         -
    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
          34  +
    /// /* StructureGenerator.kt:231 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
          35  +
    /* StructureGenerator.kt:166 */
   28     36   
    pub fn update_expression(&self) -> &str {
          37  +
        /* StructureGenerator.kt:171 */
   29     38   
        use std::ops::Deref;
   30     39   
        self.update_expression.deref()
          40  +
        /* StructureGenerator.kt:166 */
   31     41   
    }
   32         -
    /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
          42  +
    /// /* StructureGenerator.kt:231 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
          43  +
    /* StructureGenerator.kt:166 */
   33     44   
    pub fn table_name(&self) -> &str {
          45  +
        /* StructureGenerator.kt:171 */
   34     46   
        use std::ops::Deref;
   35     47   
        self.table_name.deref()
          48  +
        /* StructureGenerator.kt:166 */
   36     49   
    }
   37         -
    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
          50  +
    /// /* StructureGenerator.kt:231 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
          51  +
    /* StructureGenerator.kt:166 */
   38     52   
    pub fn condition_expression(&self) -> ::std::option::Option<&str> {
          53  +
        /* StructureGenerator.kt:169 */
   39     54   
        self.condition_expression.as_deref()
          55  +
        /* StructureGenerator.kt:166 */
   40     56   
    }
   41         -
    /// <p>One or more substitution tokens for attribute names in an expression.</p>
          57  +
    /// /* StructureGenerator.kt:231 */<p>One or more substitution tokens for attribute names in an expression.</p>
          58  +
    /* StructureGenerator.kt:166 */
   42     59   
    pub fn expression_attribute_names(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
          60  +
        /* StructureGenerator.kt:170 */
   43     61   
        self.expression_attribute_names.as_ref()
          62  +
        /* StructureGenerator.kt:166 */
   44     63   
    }
   45         -
    /// <p>One or more values that can be substituted in an expression.</p>
          64  +
    /// /* StructureGenerator.kt:231 */<p>One or more values that can be substituted in an expression.</p>
          65  +
    /* StructureGenerator.kt:166 */
   46     66   
    pub fn expression_attribute_values(
   47     67   
        &self,
   48     68   
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          69  +
        /* StructureGenerator.kt:170 */
   49     70   
        self.expression_attribute_values.as_ref()
          71  +
        /* StructureGenerator.kt:166 */
   50     72   
    }
   51         -
    /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
          73  +
    /// /* StructureGenerator.kt:231 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
          74  +
    /* StructureGenerator.kt:166 */
   52     75   
    pub fn return_values_on_condition_check_failure(&self) -> ::std::option::Option<&crate::types::ReturnValuesOnConditionCheckFailure> {
          76  +
        /* StructureGenerator.kt:170 */
   53     77   
        self.return_values_on_condition_check_failure.as_ref()
          78  +
        /* StructureGenerator.kt:166 */
   54     79   
    }
          80  +
    /* StructureGenerator.kt:135 */
   55     81   
}
          82  +
/* ClientCodegenVisitor.kt:237 */
   56     83   
impl Update {
   57         -
    /// Creates a new builder-style object to manufacture [`Update`](crate::types::Update).
          84  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Update`](crate::types::Update).
          85  +
    /* BuilderGenerator.kt:175 */
   58     86   
    pub fn builder() -> crate::types::builders::UpdateBuilder {
          87  +
        /* BuilderGenerator.kt:176 */
   59     88   
        crate::types::builders::UpdateBuilder::default()
          89  +
        /* BuilderGenerator.kt:175 */
   60     90   
    }
          91  +
    /* ClientCodegenVisitor.kt:237 */
   61     92   
}
   62     93   
   63         -
/// A builder for [`Update`](crate::types::Update).
          94  +
/// /* BuilderGenerator.kt:342 */A builder for [`Update`](crate::types::Update).
          95  +
/* RustType.kt:516 */
   64     96   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          97  +
/* RustType.kt:516 */
   65     98   
#[non_exhaustive]
          99  +
/* BuilderGenerator.kt:345 */
   66    100   
pub struct UpdateBuilder {
         101  +
    /* BuilderGenerator.kt:275 */
   67    102   
    pub(crate) key: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   68         -
    pub(crate) update_expression: ::std::option::Option<::std::string::String>,
   69         -
    pub(crate) table_name: ::std::option::Option<::std::string::String>,
   70         -
    pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
         103  +
    /* BuilderGenerator.kt:275 */ pub(crate) update_expression: ::std::option::Option<::std::string::String>,
         104  +
    /* BuilderGenerator.kt:275 */ pub(crate) table_name: ::std::option::Option<::std::string::String>,
         105  +
    /* BuilderGenerator.kt:275 */ pub(crate) condition_expression: ::std::option::Option<::std::string::String>,
         106  +
    /* BuilderGenerator.kt:275 */
   71    107   
    pub(crate) expression_attribute_names: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         108  +
    /* BuilderGenerator.kt:275 */
   72    109   
    pub(crate) expression_attribute_values: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
         110  +
    /* BuilderGenerator.kt:275 */
   73    111   
    pub(crate) return_values_on_condition_check_failure: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
         112  +
    /* BuilderGenerator.kt:345 */
   74    113   
}
         114  +
/* BuilderGenerator.kt:355 */
   75    115   
impl UpdateBuilder {
   76         -
    /// Adds a key-value pair to `key`.
         116  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `key`.
         117  +
    /* BuilderGenerator.kt:437 */
   77    118   
    ///
   78         -
    /// To override the contents of this collection use [`set_key`](Self::set_key).
         119  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_key`](Self::set_key).
         120  +
    /* BuilderGenerator.kt:439 */
   79    121   
    ///
   80         -
    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         122  +
    /// /* BuilderGenerator.kt:440 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         123  +
    /* BuilderGenerator.kt:445 */
   81    124   
    pub fn key(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
         125  +
        /* BuilderGenerator.kt:448 */
   82    126   
        let mut hash_map = self.key.unwrap_or_default();
   83    127   
        hash_map.insert(k.into(), v);
   84    128   
        self.key = ::std::option::Option::Some(hash_map);
   85    129   
        self
         130  +
        /* BuilderGenerator.kt:445 */
   86    131   
    }
   87         -
    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         132  +
    /// /* BuilderGenerator.kt:312 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         133  +
    /* BuilderGenerator.kt:314 */
   88    134   
    pub fn set_key(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>) -> Self {
         135  +
        /* BuilderGenerator.kt:315 */
   89    136   
        self.key = input;
   90    137   
        self
         138  +
        /* BuilderGenerator.kt:314 */
   91    139   
    }
   92         -
    /// <p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         140  +
    /// /* BuilderGenerator.kt:334 */<p>The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.</p>
         141  +
    /* BuilderGenerator.kt:336 */
   93    142   
    pub fn get_key(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
         143  +
        /* BuilderGenerator.kt:337 */
   94    144   
        &self.key
         145  +
        /* BuilderGenerator.kt:336 */
   95    146   
    }
   96         -
    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
   97         -
    /// This field is required.
         147  +
    /// /* BuilderGenerator.kt:286 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
         148  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         149  +
    /* BuilderGenerator.kt:291 */
   98    150   
    pub fn update_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         151  +
        /* BuilderGenerator.kt:292 */
   99    152   
        self.update_expression = ::std::option::Option::Some(input.into());
         153  +
        /* BuilderGenerator.kt:293 */
  100    154   
        self
         155  +
        /* BuilderGenerator.kt:291 */
  101    156   
    }
  102         -
    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
         157  +
    /// /* BuilderGenerator.kt:312 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
         158  +
    /* BuilderGenerator.kt:314 */
  103    159   
    pub fn set_update_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         160  +
        /* BuilderGenerator.kt:315 */
  104    161   
        self.update_expression = input;
  105    162   
        self
         163  +
        /* BuilderGenerator.kt:314 */
  106    164   
    }
  107         -
    /// <p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
         165  +
    /// /* BuilderGenerator.kt:334 */<p>An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.</p>
         166  +
    /* BuilderGenerator.kt:336 */
  108    167   
    pub fn get_update_expression(&self) -> &::std::option::Option<::std::string::String> {
         168  +
        /* BuilderGenerator.kt:337 */
  109    169   
        &self.update_expression
         170  +
        /* BuilderGenerator.kt:336 */
  110    171   
    }
  111         -
    /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
  112         -
    /// This field is required.
         172  +
    /// /* BuilderGenerator.kt:286 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
         173  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         174  +
    /* BuilderGenerator.kt:291 */
  113    175   
    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         176  +
        /* BuilderGenerator.kt:292 */
  114    177   
        self.table_name = ::std::option::Option::Some(input.into());
         178  +
        /* BuilderGenerator.kt:293 */
  115    179   
        self
         180  +
        /* BuilderGenerator.kt:291 */
  116    181   
    }
  117         -
    /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
         182  +
    /// /* BuilderGenerator.kt:312 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
         183  +
    /* BuilderGenerator.kt:314 */
  118    184   
    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         185  +
        /* BuilderGenerator.kt:315 */
  119    186   
        self.table_name = input;
  120    187   
        self
         188  +
        /* BuilderGenerator.kt:314 */
  121    189   
    }
  122         -
    /// <p>Name of the table for the <code>UpdateItem</code> request.</p>
         190  +
    /// /* BuilderGenerator.kt:334 */<p>Name of the table for the <code>UpdateItem</code> request.</p>
         191  +
    /* BuilderGenerator.kt:336 */
  123    192   
    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
         193  +
        /* BuilderGenerator.kt:337 */
  124    194   
        &self.table_name
         195  +
        /* BuilderGenerator.kt:336 */
  125    196   
    }
  126         -
    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         197  +
    /// /* BuilderGenerator.kt:286 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         198  +
    /* BuilderGenerator.kt:291 */
  127    199   
    pub fn condition_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         200  +
        /* BuilderGenerator.kt:292 */
  128    201   
        self.condition_expression = ::std::option::Option::Some(input.into());
         202  +
        /* BuilderGenerator.kt:293 */
  129    203   
        self
         204  +
        /* BuilderGenerator.kt:291 */
  130    205   
    }
  131         -
    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         206  +
    /// /* BuilderGenerator.kt:312 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         207  +
    /* BuilderGenerator.kt:314 */
  132    208   
    pub fn set_condition_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         209  +
        /* BuilderGenerator.kt:315 */
  133    210   
        self.condition_expression = input;
  134    211   
        self
         212  +
        /* BuilderGenerator.kt:314 */
  135    213   
    }
  136         -
    /// <p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         214  +
    /// /* BuilderGenerator.kt:334 */<p>A condition that must be satisfied in order for a conditional update to succeed.</p>
         215  +
    /* BuilderGenerator.kt:336 */
  137    216   
    pub fn get_condition_expression(&self) -> &::std::option::Option<::std::string::String> {
         217  +
        /* BuilderGenerator.kt:337 */
  138    218   
        &self.condition_expression
         219  +
        /* BuilderGenerator.kt:336 */
  139    220   
    }
  140         -
    /// Adds a key-value pair to `expression_attribute_names`.
         221  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `expression_attribute_names`.
         222  +
    /* BuilderGenerator.kt:437 */
  141    223   
    ///
  142         -
    /// To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
         224  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_expression_attribute_names`](Self::set_expression_attribute_names).
         225  +
    /* BuilderGenerator.kt:439 */
  143    226   
    ///
  144         -
    /// <p>One or more substitution tokens for attribute names in an expression.</p>
         227  +
    /// /* BuilderGenerator.kt:440 */<p>One or more substitution tokens for attribute names in an expression.</p>
         228  +
    /* BuilderGenerator.kt:445 */
  145    229   
    pub fn expression_attribute_names(
  146    230   
        mut self,
  147    231   
        k: impl ::std::convert::Into<::std::string::String>,
  148    232   
        v: impl ::std::convert::Into<::std::string::String>,
  149    233   
    ) -> Self {
         234  +
        /* BuilderGenerator.kt:448 */
  150    235   
        let mut hash_map = self.expression_attribute_names.unwrap_or_default();
  151    236   
        hash_map.insert(k.into(), v.into());
  152    237   
        self.expression_attribute_names = ::std::option::Option::Some(hash_map);
  153    238   
        self
         239  +
        /* BuilderGenerator.kt:445 */
  154    240   
    }
  155         -
    /// <p>One or more substitution tokens for attribute names in an expression.</p>
         241  +
    /// /* BuilderGenerator.kt:312 */<p>One or more substitution tokens for attribute names in an expression.</p>
         242  +
    /* BuilderGenerator.kt:314 */
  156    243   
    pub fn set_expression_attribute_names(
  157    244   
        mut self,
  158    245   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  159    246   
    ) -> Self {
         247  +
        /* BuilderGenerator.kt:315 */
  160    248   
        self.expression_attribute_names = input;
  161    249   
        self
         250  +
        /* BuilderGenerator.kt:314 */
  162    251   
    }
  163         -
    /// <p>One or more substitution tokens for attribute names in an expression.</p>
         252  +
    /// /* BuilderGenerator.kt:334 */<p>One or more substitution tokens for attribute names in an expression.</p>
         253  +
    /* BuilderGenerator.kt:336 */
  164    254   
    pub fn get_expression_attribute_names(
  165    255   
        &self,
  166    256   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
         257  +
        /* BuilderGenerator.kt:337 */
  167    258   
        &self.expression_attribute_names
         259  +
        /* BuilderGenerator.kt:336 */
  168    260   
    }
  169         -
    /// Adds a key-value pair to `expression_attribute_values`.
         261  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `expression_attribute_values`.
         262  +
    /* BuilderGenerator.kt:437 */
  170    263   
    ///
  171         -
    /// To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
         264  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_expression_attribute_values`](Self::set_expression_attribute_values).
         265  +
    /* BuilderGenerator.kt:439 */
  172    266   
    ///
  173         -
    /// <p>One or more values that can be substituted in an expression.</p>
         267  +
    /// /* BuilderGenerator.kt:440 */<p>One or more values that can be substituted in an expression.</p>
         268  +
    /* BuilderGenerator.kt:445 */
  174    269   
    pub fn expression_attribute_values(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
         270  +
        /* BuilderGenerator.kt:448 */
  175    271   
        let mut hash_map = self.expression_attribute_values.unwrap_or_default();
  176    272   
        hash_map.insert(k.into(), v);
  177    273   
        self.expression_attribute_values = ::std::option::Option::Some(hash_map);
  178    274   
        self
         275  +
        /* BuilderGenerator.kt:445 */
  179    276   
    }
  180         -
    /// <p>One or more values that can be substituted in an expression.</p>
         277  +
    /// /* BuilderGenerator.kt:312 */<p>One or more values that can be substituted in an expression.</p>
         278  +
    /* BuilderGenerator.kt:314 */
  181    279   
    pub fn set_expression_attribute_values(
  182    280   
        mut self,
  183    281   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
  184    282   
    ) -> Self {
         283  +
        /* BuilderGenerator.kt:315 */
  185    284   
        self.expression_attribute_values = input;
  186    285   
        self
         286  +
        /* BuilderGenerator.kt:314 */
  187    287   
    }
  188         -
    /// <p>One or more values that can be substituted in an expression.</p>
         288  +
    /// /* BuilderGenerator.kt:334 */<p>One or more values that can be substituted in an expression.</p>
         289  +
    /* BuilderGenerator.kt:336 */
  189    290   
    pub fn get_expression_attribute_values(
  190    291   
        &self,
  191    292   
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
         293  +
        /* BuilderGenerator.kt:337 */
  192    294   
        &self.expression_attribute_values
         295  +
        /* BuilderGenerator.kt:336 */
  193    296   
    }
  194         -
    /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         297  +
    /// /* BuilderGenerator.kt:286 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         298  +
    /* BuilderGenerator.kt:291 */
  195    299   
    pub fn return_values_on_condition_check_failure(mut self, input: crate::types::ReturnValuesOnConditionCheckFailure) -> Self {
         300  +
        /* BuilderGenerator.kt:292 */
  196    301   
        self.return_values_on_condition_check_failure = ::std::option::Option::Some(input);
         302  +
        /* BuilderGenerator.kt:293 */
  197    303   
        self
         304  +
        /* BuilderGenerator.kt:291 */
  198    305   
    }
  199         -
    /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         306  +
    /// /* BuilderGenerator.kt:312 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         307  +
    /* BuilderGenerator.kt:314 */
  200    308   
    pub fn set_return_values_on_condition_check_failure(
  201    309   
        mut self,
  202    310   
        input: ::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure>,
  203    311   
    ) -> Self {
         312  +
        /* BuilderGenerator.kt:315 */
  204    313   
        self.return_values_on_condition_check_failure = input;
  205    314   
        self
         315  +
        /* BuilderGenerator.kt:314 */
  206    316   
    }
  207         -
    /// <p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         317  +
    /// /* BuilderGenerator.kt:334 */<p>Use <code>ReturnValuesOnConditionCheckFailure</code> to get the item attributes if the <code>Update</code> condition fails. For <code>ReturnValuesOnConditionCheckFailure</code>, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.</p>
         318  +
    /* BuilderGenerator.kt:336 */
  208    319   
    pub fn get_return_values_on_condition_check_failure(&self) -> &::std::option::Option<crate::types::ReturnValuesOnConditionCheckFailure> {
         320  +
        /* BuilderGenerator.kt:337 */
  209    321   
        &self.return_values_on_condition_check_failure
         322  +
        /* BuilderGenerator.kt:336 */
  210    323   
    }
  211         -
    /// Consumes the builder and constructs a [`Update`](crate::types::Update).
  212         -
    /// This method will fail if any of the following fields are not set:
  213         -
    /// - [`key`](crate::types::builders::UpdateBuilder::key)
  214         -
    /// - [`update_expression`](crate::types::builders::UpdateBuilder::update_expression)
  215         -
    /// - [`table_name`](crate::types::builders::UpdateBuilder::table_name)
         324  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Update`](crate::types::Update).
         325  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         326  +
    /// /* BuilderGenerator.kt:246 */- [`key`](crate::types::builders::UpdateBuilder::key)
         327  +
    /// /* BuilderGenerator.kt:246 */- [`update_expression`](crate::types::builders::UpdateBuilder::update_expression)
         328  +
    /// /* BuilderGenerator.kt:246 */- [`table_name`](crate::types::builders::UpdateBuilder::table_name)
         329  +
    /* BuilderGenerator.kt:253 */
  216    330   
    pub fn build(self) -> ::std::result::Result<crate::types::Update, ::aws_smithy_types::error::operation::BuildError> {
  217         -
        ::std::result::Result::Ok(crate::types::Update {
  218         -
            key: self.key.ok_or_else(|| {
  219         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  220         -
                    "key",
  221         -
                    "key was not specified but it is required when building Update",
  222         -
                )
  223         -
            })?,
  224         -
            update_expression: self.update_expression.ok_or_else(|| {
  225         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  226         -
                    "update_expression",
  227         -
                    "update_expression was not specified but it is required when building Update",
  228         -
                )
  229         -
            })?,
  230         -
            table_name: self.table_name.ok_or_else(|| {
  231         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  232         -
                    "table_name",
  233         -
                    "table_name was not specified but it is required when building Update",
  234         -
                )
  235         -
            })?,
  236         -
            condition_expression: self.condition_expression,
  237         -
            expression_attribute_names: self.expression_attribute_names,
  238         -
            expression_attribute_values: self.expression_attribute_values,
  239         -
            return_values_on_condition_check_failure: self.return_values_on_condition_check_failure,
  240         -
        })
         331  +
        /* BuilderGenerator.kt:254 */
         332  +
        ::std::result::Result::Ok(
         333  +
            /* BuilderGenerator.kt:477 */crate::types::Update {
         334  +
                /* BuilderGenerator.kt:481 */key: self.key
         335  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         336  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("key", "key was not specified but it is required when building Update")
         337  +
                    /* BuilderGenerator.kt:494 */)?
         338  +
                ,
         339  +
                /* BuilderGenerator.kt:481 */update_expression: self.update_expression
         340  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         341  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("update_expression", "update_expression was not specified but it is required when building Update")
         342  +
                    /* BuilderGenerator.kt:494 */)?
         343  +
                ,
         344  +
                /* BuilderGenerator.kt:481 */table_name: self.table_name
         345  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         346  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("table_name", "table_name was not specified but it is required when building Update")
         347  +
                    /* BuilderGenerator.kt:494 */)?
         348  +
                ,
         349  +
                /* BuilderGenerator.kt:481 */condition_expression: self.condition_expression
         350  +
                ,
         351  +
                /* BuilderGenerator.kt:481 */expression_attribute_names: self.expression_attribute_names
         352  +
                ,
         353  +
                /* BuilderGenerator.kt:481 */expression_attribute_values: self.expression_attribute_values
         354  +
                ,
         355  +
                /* BuilderGenerator.kt:481 */return_values_on_condition_check_failure: self.return_values_on_condition_check_failure
         356  +
                ,
         357  +
            /* BuilderGenerator.kt:477 */}
         358  +
        /* BuilderGenerator.kt:254 */)
         359  +
        /* BuilderGenerator.kt:253 */
  241    360   
    }
         361  +
    /* BuilderGenerator.kt:355 */
  242    362   
}

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

@@ -1,1 +93,139 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the new provisioned throughput settings to be applied to a global secondary index.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the new provisioned throughput settings to be applied to a global 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 UpdateGlobalSecondaryIndexAction {
    7         -
    /// <p>The name of the global secondary index to be updated.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct UpdateGlobalSecondaryIndexAction {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index to be updated.</p>
    8     10   
    pub index_name: ::std::string::String,
    9         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   10     12   
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   11     13   
    pub provisioned_throughput: crate::types::ProvisionedThroughput,
          14  +
    /* StructureGenerator.kt:201 */
   12     15   
}
          16  +
/* StructureGenerator.kt:135 */
   13     17   
impl UpdateGlobalSecondaryIndexAction {
   14         -
    /// <p>The name of the global secondary index to be updated.</p>
          18  +
    /// /* StructureGenerator.kt:231 */<p>The name of the global secondary index to be updated.</p>
          19  +
    /* StructureGenerator.kt:166 */
   15     20   
    pub fn index_name(&self) -> &str {
          21  +
        /* StructureGenerator.kt:171 */
   16     22   
        use std::ops::Deref;
   17     23   
        self.index_name.deref()
          24  +
        /* StructureGenerator.kt:166 */
   18     25   
    }
   19         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   20     27   
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          28  +
    /* StructureGenerator.kt:166 */
   21     29   
    pub fn provisioned_throughput(&self) -> &crate::types::ProvisionedThroughput {
          30  +
        /* StructureGenerator.kt:172 */
   22     31   
        &self.provisioned_throughput
          32  +
        /* StructureGenerator.kt:166 */
   23     33   
    }
          34  +
    /* StructureGenerator.kt:135 */
   24     35   
}
          36  +
/* ClientCodegenVisitor.kt:237 */
   25     37   
impl UpdateGlobalSecondaryIndexAction {
   26         -
    /// Creates a new builder-style object to manufacture [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
          38  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
          39  +
    /* BuilderGenerator.kt:175 */
   27     40   
    pub fn builder() -> crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder {
          41  +
        /* BuilderGenerator.kt:176 */
   28     42   
        crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder::default()
          43  +
        /* BuilderGenerator.kt:175 */
   29     44   
    }
          45  +
    /* ClientCodegenVisitor.kt:237 */
   30     46   
}
   31     47   
   32         -
/// A builder for [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
          48  +
/// /* BuilderGenerator.kt:342 */A builder for [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
          49  +
/* RustType.kt:516 */
   33     50   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          51  +
/* RustType.kt:516 */
   34     52   
#[non_exhaustive]
          53  +
/* BuilderGenerator.kt:345 */
   35     54   
pub struct UpdateGlobalSecondaryIndexActionBuilder {
   36         -
    pub(crate) index_name: ::std::option::Option<::std::string::String>,
          55  +
    /* BuilderGenerator.kt:275 */ pub(crate) index_name: ::std::option::Option<::std::string::String>,
          56  +
    /* BuilderGenerator.kt:275 */
   37     57   
    pub(crate) provisioned_throughput: ::std::option::Option<crate::types::ProvisionedThroughput>,
          58  +
    /* BuilderGenerator.kt:345 */
   38     59   
}
          60  +
/* BuilderGenerator.kt:355 */
   39     61   
impl UpdateGlobalSecondaryIndexActionBuilder {
   40         -
    /// <p>The name of the global secondary index to be updated.</p>
   41         -
    /// This field is required.
          62  +
    /// /* BuilderGenerator.kt:286 */<p>The name of the global secondary index to be updated.</p>
          63  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          64  +
    /* BuilderGenerator.kt:291 */
   42     65   
    pub fn index_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          66  +
        /* BuilderGenerator.kt:292 */
   43     67   
        self.index_name = ::std::option::Option::Some(input.into());
          68  +
        /* BuilderGenerator.kt:293 */
   44     69   
        self
          70  +
        /* BuilderGenerator.kt:291 */
   45     71   
    }
   46         -
    /// <p>The name of the global secondary index to be updated.</p>
          72  +
    /// /* BuilderGenerator.kt:312 */<p>The name of the global secondary index to be updated.</p>
          73  +
    /* BuilderGenerator.kt:314 */
   47     74   
    pub fn set_index_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          75  +
        /* BuilderGenerator.kt:315 */
   48     76   
        self.index_name = input;
   49     77   
        self
          78  +
        /* BuilderGenerator.kt:314 */
   50     79   
    }
   51         -
    /// <p>The name of the global secondary index to be updated.</p>
          80  +
    /// /* BuilderGenerator.kt:334 */<p>The name of the global secondary index to be updated.</p>
          81  +
    /* BuilderGenerator.kt:336 */
   52     82   
    pub fn get_index_name(&self) -> &::std::option::Option<::std::string::String> {
          83  +
        /* BuilderGenerator.kt:337 */
   53     84   
        &self.index_name
          85  +
        /* BuilderGenerator.kt:336 */
   54     86   
    }
   55         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          87  +
    /// /* BuilderGenerator.kt:286 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   56     88   
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   57         -
    /// This field is required.
          89  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          90  +
    /* BuilderGenerator.kt:291 */
   58     91   
    pub fn provisioned_throughput(mut self, input: crate::types::ProvisionedThroughput) -> Self {
          92  +
        /* BuilderGenerator.kt:292 */
   59     93   
        self.provisioned_throughput = ::std::option::Option::Some(input);
          94  +
        /* BuilderGenerator.kt:293 */
   60     95   
        self
          96  +
        /* BuilderGenerator.kt:291 */
   61     97   
    }
   62         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
          98  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   63     99   
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         100  +
    /* BuilderGenerator.kt:314 */
   64    101   
    pub fn set_provisioned_throughput(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughput>) -> Self {
         102  +
        /* BuilderGenerator.kt:315 */
   65    103   
        self.provisioned_throughput = input;
   66    104   
        self
         105  +
        /* BuilderGenerator.kt:314 */
   67    106   
    }
   68         -
    /// <p>Represents the provisioned throughput settings for the specified global secondary index.</p>
         107  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the provisioned throughput settings for the specified global secondary index.</p>
   69    108   
    /// <p>For current minimum and maximum provisioned throughput values, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Service, Account, and Table Quotas</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         109  +
    /* BuilderGenerator.kt:336 */
   70    110   
    pub fn get_provisioned_throughput(&self) -> &::std::option::Option<crate::types::ProvisionedThroughput> {
         111  +
        /* BuilderGenerator.kt:337 */
   71    112   
        &self.provisioned_throughput
         113  +
        /* BuilderGenerator.kt:336 */
   72    114   
    }
   73         -
    /// Consumes the builder and constructs a [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
   74         -
    /// This method will fail if any of the following fields are not set:
   75         -
    /// - [`index_name`](crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder::index_name)
   76         -
    /// - [`provisioned_throughput`](crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder::provisioned_throughput)
         115  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`UpdateGlobalSecondaryIndexAction`](crate::types::UpdateGlobalSecondaryIndexAction).
         116  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         117  +
    /// /* BuilderGenerator.kt:246 */- [`index_name`](crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder::index_name)
         118  +
    /// /* BuilderGenerator.kt:246 */- [`provisioned_throughput`](crate::types::builders::UpdateGlobalSecondaryIndexActionBuilder::provisioned_throughput)
         119  +
    /* BuilderGenerator.kt:253 */
   77    120   
    pub fn build(self) -> ::std::result::Result<crate::types::UpdateGlobalSecondaryIndexAction, ::aws_smithy_types::error::operation::BuildError> {
   78         -
        ::std::result::Result::Ok(crate::types::UpdateGlobalSecondaryIndexAction {
   79         -
            index_name: self.index_name.ok_or_else(|| {
   80         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   81         -
                    "index_name",
   82         -
                    "index_name was not specified but it is required when building UpdateGlobalSecondaryIndexAction",
   83         -
                )
   84         -
            })?,
   85         -
            provisioned_throughput: self.provisioned_throughput.ok_or_else(|| {
   86         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   87         -
                    "provisioned_throughput",
   88         -
                    "provisioned_throughput was not specified but it is required when building UpdateGlobalSecondaryIndexAction",
   89         -
                )
   90         -
            })?,
   91         -
        })
         121  +
        /* BuilderGenerator.kt:254 */
         122  +
        ::std::result::Result::Ok(
         123  +
            /* BuilderGenerator.kt:477 */crate::types::UpdateGlobalSecondaryIndexAction {
         124  +
                /* BuilderGenerator.kt:481 */index_name: self.index_name
         125  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         126  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("index_name", "index_name was not specified but it is required when building UpdateGlobalSecondaryIndexAction")
         127  +
                    /* BuilderGenerator.kt:494 */)?
         128  +
                ,
         129  +
                /* BuilderGenerator.kt:481 */provisioned_throughput: self.provisioned_throughput
         130  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         131  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("provisioned_throughput", "provisioned_throughput was not specified but it is required when building UpdateGlobalSecondaryIndexAction")
         132  +
                    /* BuilderGenerator.kt:494 */)?
         133  +
                ,
         134  +
            /* BuilderGenerator.kt:477 */}
         135  +
        /* BuilderGenerator.kt:254 */)
         136  +
        /* BuilderGenerator.kt:253 */
   92    137   
    }
         138  +
    /* BuilderGenerator.kt:355 */
   93    139   
}