Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +58,91 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the settings used to enable point in time recovery.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the settings used to enable point in time recovery.</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 PointInTimeRecoverySpecification {
    7         -
    /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct PointInTimeRecoverySpecification {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
    8     10   
    pub point_in_time_recovery_enabled: bool,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl PointInTimeRecoverySpecification {
   11         -
    /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn point_in_time_recovery_enabled(&self) -> bool {
          18  +
        /* StructureGenerator.kt:168 */
   13     19   
        self.point_in_time_recovery_enabled
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl PointInTimeRecoverySpecification {
   17         -
    /// Creates a new builder-style object to manufacture [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::PointInTimeRecoverySpecificationBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::PointInTimeRecoverySpecificationBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
          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 PointInTimeRecoverySpecificationBuilder {
   27         -
    pub(crate) point_in_time_recovery_enabled: ::std::option::Option<bool>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) point_in_time_recovery_enabled: ::std::option::Option<bool>,
          44  +
    /* BuilderGenerator.kt:345 */
   28     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   29     47   
impl PointInTimeRecoverySpecificationBuilder {
   30         -
    /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
   31         -
    /// This field is required.
          48  +
    /// /* BuilderGenerator.kt:286 */<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          49  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          50  +
    /* BuilderGenerator.kt:291 */
   32     51   
    pub fn point_in_time_recovery_enabled(mut self, input: bool) -> Self {
          52  +
        /* BuilderGenerator.kt:292 */
   33     53   
        self.point_in_time_recovery_enabled = ::std::option::Option::Some(input);
          54  +
        /* BuilderGenerator.kt:293 */
   34     55   
        self
          56  +
        /* BuilderGenerator.kt:291 */
   35     57   
    }
   36         -
    /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          58  +
    /// /* BuilderGenerator.kt:312 */<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          59  +
    /* BuilderGenerator.kt:314 */
   37     60   
    pub fn set_point_in_time_recovery_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
          61  +
        /* BuilderGenerator.kt:315 */
   38     62   
        self.point_in_time_recovery_enabled = input;
   39     63   
        self
          64  +
        /* BuilderGenerator.kt:314 */
   40     65   
    }
   41         -
    /// <p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          66  +
    /// /* BuilderGenerator.kt:334 */<p>Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.</p>
          67  +
    /* BuilderGenerator.kt:336 */
   42     68   
    pub fn get_point_in_time_recovery_enabled(&self) -> &::std::option::Option<bool> {
          69  +
        /* BuilderGenerator.kt:337 */
   43     70   
        &self.point_in_time_recovery_enabled
          71  +
        /* BuilderGenerator.kt:336 */
   44     72   
    }
   45         -
    /// Consumes the builder and constructs a [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
   46         -
    /// This method will fail if any of the following fields are not set:
   47         -
    /// - [`point_in_time_recovery_enabled`](crate::types::builders::PointInTimeRecoverySpecificationBuilder::point_in_time_recovery_enabled)
          73  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PointInTimeRecoverySpecification`](crate::types::PointInTimeRecoverySpecification).
          74  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          75  +
    /// /* BuilderGenerator.kt:246 */- [`point_in_time_recovery_enabled`](crate::types::builders::PointInTimeRecoverySpecificationBuilder::point_in_time_recovery_enabled)
          76  +
    /* BuilderGenerator.kt:253 */
   48     77   
    pub fn build(self) -> ::std::result::Result<crate::types::PointInTimeRecoverySpecification, ::aws_smithy_types::error::operation::BuildError> {
   49         -
        ::std::result::Result::Ok(crate::types::PointInTimeRecoverySpecification {
   50         -
            point_in_time_recovery_enabled: self.point_in_time_recovery_enabled.ok_or_else(|| {
   51         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   52         -
                    "point_in_time_recovery_enabled",
   53         -
                    "point_in_time_recovery_enabled was not specified but it is required when building PointInTimeRecoverySpecification",
   54         -
                )
   55         -
            })?,
   56         -
        })
          78  +
        /* BuilderGenerator.kt:254 */
          79  +
        ::std::result::Result::Ok(
          80  +
            /* BuilderGenerator.kt:477 */crate::types::PointInTimeRecoverySpecification {
          81  +
                /* BuilderGenerator.kt:481 */point_in_time_recovery_enabled: self.point_in_time_recovery_enabled
          82  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          83  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("point_in_time_recovery_enabled", "point_in_time_recovery_enabled was not specified but it is required when building PointInTimeRecoverySpecification")
          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/_point_in_time_recovery_status.rs

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

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

@@ -1,1 +125,177 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.</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 Projection {
    7         -
    /// <p>The set of attributes that are projected into the index:</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct Projection {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The set of attributes that are projected into the index:</p>
    8     10   
    /// <ul>
    9     11   
    /// <li>
   10     12   
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
   11     13   
    /// <li>
   12     14   
    /// <p><code>INCLUDE</code> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</p></li>
   13     15   
    /// <li>
   14     16   
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
   15     17   
    /// </ul>
   16     18   
    pub projection_type: ::std::option::Option<crate::types::ProjectionType>,
   17         -
    /// <p>Represents the non-key attribute names which will be projected into the index.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>Represents the non-key attribute names which will be projected into the index.</p>
   18     20   
    /// <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
   19     21   
    pub non_key_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          22  +
    /* StructureGenerator.kt:201 */
   20     23   
}
          24  +
/* StructureGenerator.kt:135 */
   21     25   
impl Projection {
   22         -
    /// <p>The set of attributes that are projected into the index:</p>
          26  +
    /// /* StructureGenerator.kt:231 */<p>The set of attributes that are projected into the index:</p>
   23     27   
    /// <ul>
   24     28   
    /// <li>
   25     29   
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
   26     30   
    /// <li>
   27     31   
    /// <p><code>INCLUDE</code> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</p></li>
   28     32   
    /// <li>
   29     33   
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
   30     34   
    /// </ul>
          35  +
    /* StructureGenerator.kt:166 */
   31     36   
    pub fn projection_type(&self) -> ::std::option::Option<&crate::types::ProjectionType> {
          37  +
        /* StructureGenerator.kt:170 */
   32     38   
        self.projection_type.as_ref()
          39  +
        /* StructureGenerator.kt:166 */
   33     40   
    }
   34         -
    /// <p>Represents the non-key attribute names which will be projected into the index.</p>
          41  +
    /// /* StructureGenerator.kt:231 */<p>Represents the non-key attribute names which will be projected into the index.</p>
   35     42   
    /// <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
   36         -
    ///
   37         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.non_key_attributes.is_none()`.
          43  +
    /// /* StructureGenerator.kt:162 */
          44  +
    /// /* StructureGenerator.kt:163 */If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.non_key_attributes.is_none()`.
          45  +
    /* StructureGenerator.kt:166 */
   38     46   
    pub fn non_key_attributes(&self) -> &[::std::string::String] {
   39         -
        self.non_key_attributes.as_deref().unwrap_or_default()
          47  +
        /* StructureGenerator.kt:169 */
          48  +
        self.non_key_attributes
          49  +
            .as_deref()
          50  +
            /* StructureGenerator.kt:175 */
          51  +
            .unwrap_or_default()
          52  +
        /* StructureGenerator.kt:166 */
   40     53   
    }
          54  +
    /* StructureGenerator.kt:135 */
   41     55   
}
          56  +
/* ClientCodegenVisitor.kt:237 */
   42     57   
impl Projection {
   43         -
    /// Creates a new builder-style object to manufacture [`Projection`](crate::types::Projection).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Projection`](crate::types::Projection).
          59  +
    /* BuilderGenerator.kt:175 */
   44     60   
    pub fn builder() -> crate::types::builders::ProjectionBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   45     62   
        crate::types::builders::ProjectionBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   46     64   
    }
          65  +
    /* ClientCodegenVisitor.kt:237 */
   47     66   
}
   48     67   
   49         -
/// A builder for [`Projection`](crate::types::Projection).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`Projection`](crate::types::Projection).
          69  +
/* RustType.kt:516 */
   50     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   51     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   52     74   
pub struct ProjectionBuilder {
   53         -
    pub(crate) projection_type: ::std::option::Option<crate::types::ProjectionType>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) projection_type: ::std::option::Option<crate::types::ProjectionType>,
          76  +
    /* BuilderGenerator.kt:275 */
   54     77   
    pub(crate) non_key_attributes: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          78  +
    /* BuilderGenerator.kt:345 */
   55     79   
}
          80  +
/* BuilderGenerator.kt:355 */
   56     81   
impl ProjectionBuilder {
   57         -
    /// <p>The set of attributes that are projected into the index:</p>
          82  +
    /// /* BuilderGenerator.kt:286 */<p>The set of attributes that are projected into the index:</p>
   58     83   
    /// <ul>
   59     84   
    /// <li>
   60     85   
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
   61     86   
    /// <li>
   62     87   
    /// <p><code>INCLUDE</code> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</p></li>
   63     88   
    /// <li>
   64     89   
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
   65     90   
    /// </ul>
          91  +
    /* BuilderGenerator.kt:291 */
   66     92   
    pub fn projection_type(mut self, input: crate::types::ProjectionType) -> Self {
          93  +
        /* BuilderGenerator.kt:292 */
   67     94   
        self.projection_type = ::std::option::Option::Some(input);
          95  +
        /* BuilderGenerator.kt:293 */
   68     96   
        self
          97  +
        /* BuilderGenerator.kt:291 */
   69     98   
    }
   70         -
    /// <p>The set of attributes that are projected into the index:</p>
          99  +
    /// /* BuilderGenerator.kt:312 */<p>The set of attributes that are projected into the index:</p>
   71    100   
    /// <ul>
   72    101   
    /// <li>
   73    102   
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
   74    103   
    /// <li>
   75    104   
    /// <p><code>INCLUDE</code> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</p></li>
   76    105   
    /// <li>
   77    106   
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
   78    107   
    /// </ul>
         108  +
    /* BuilderGenerator.kt:314 */
   79    109   
    pub fn set_projection_type(mut self, input: ::std::option::Option<crate::types::ProjectionType>) -> Self {
         110  +
        /* BuilderGenerator.kt:315 */
   80    111   
        self.projection_type = input;
   81    112   
        self
         113  +
        /* BuilderGenerator.kt:314 */
   82    114   
    }
   83         -
    /// <p>The set of attributes that are projected into the index:</p>
         115  +
    /// /* BuilderGenerator.kt:334 */<p>The set of attributes that are projected into the index:</p>
   84    116   
    /// <ul>
   85    117   
    /// <li>
   86    118   
    /// <p><code>KEYS_ONLY</code> - Only the index and primary keys are projected into the index.</p></li>
   87    119   
    /// <li>
   88    120   
    /// <p><code>INCLUDE</code> - In addition to the attributes described in <code>KEYS_ONLY</code>, the secondary index will include other non-key attributes that you specify.</p></li>
   89    121   
    /// <li>
   90    122   
    /// <p><code>ALL</code> - All of the table attributes are projected into the index.</p></li>
   91    123   
    /// </ul>
         124  +
    /* BuilderGenerator.kt:336 */
   92    125   
    pub fn get_projection_type(&self) -> &::std::option::Option<crate::types::ProjectionType> {
         126  +
        /* BuilderGenerator.kt:337 */
   93    127   
        &self.projection_type
         128  +
        /* BuilderGenerator.kt:336 */
   94    129   
    }
   95         -
    /// Appends an item to `non_key_attributes`.
         130  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `non_key_attributes`.
         131  +
    /* BuilderGenerator.kt:411 */
   96    132   
    ///
   97         -
    /// To override the contents of this collection use [`set_non_key_attributes`](Self::set_non_key_attributes).
         133  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_non_key_attributes`](Self::set_non_key_attributes).
         134  +
    /* BuilderGenerator.kt:413 */
   98    135   
    ///
   99         -
    /// <p>Represents the non-key attribute names which will be projected into the index.</p>
         136  +
    /// /* BuilderGenerator.kt:414 */<p>Represents the non-key attribute names which will be projected into the index.</p>
  100    137   
    /// <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
         138  +
    /* BuilderGenerator.kt:418 */
  101    139   
    pub fn non_key_attributes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         140  +
        /* BuilderGenerator.kt:419 */
  102    141   
        let mut v = self.non_key_attributes.unwrap_or_default();
  103    142   
        v.push(input.into());
  104    143   
        self.non_key_attributes = ::std::option::Option::Some(v);
  105    144   
        self
         145  +
        /* BuilderGenerator.kt:418 */
  106    146   
    }
  107         -
    /// <p>Represents the non-key attribute names which will be projected into the index.</p>
         147  +
    /// /* BuilderGenerator.kt:312 */<p>Represents the non-key attribute names which will be projected into the index.</p>
  108    148   
    /// <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
         149  +
    /* BuilderGenerator.kt:314 */
  109    150   
    pub fn set_non_key_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         151  +
        /* BuilderGenerator.kt:315 */
  110    152   
        self.non_key_attributes = input;
  111    153   
        self
         154  +
        /* BuilderGenerator.kt:314 */
  112    155   
    }
  113         -
    /// <p>Represents the non-key attribute names which will be projected into the index.</p>
         156  +
    /// /* BuilderGenerator.kt:334 */<p>Represents the non-key attribute names which will be projected into the index.</p>
  114    157   
    /// <p>For local secondary indexes, the total count of <code>NonKeyAttributes</code> summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.</p>
         158  +
    /* BuilderGenerator.kt:336 */
  115    159   
    pub fn get_non_key_attributes(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         160  +
        /* BuilderGenerator.kt:337 */
  116    161   
        &self.non_key_attributes
         162  +
        /* BuilderGenerator.kt:336 */
  117    163   
    }
  118         -
    /// Consumes the builder and constructs a [`Projection`](crate::types::Projection).
         164  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Projection`](crate::types::Projection).
         165  +
    /* BuilderGenerator.kt:253 */
  119    166   
    pub fn build(self) -> crate::types::Projection {
         167  +
        /* BuilderGenerator.kt:477 */
  120    168   
        crate::types::Projection {
  121         -
            projection_type: self.projection_type,
         169  +
            /* BuilderGenerator.kt:481 */ projection_type: self.projection_type,
         170  +
            /* BuilderGenerator.kt:481 */
  122    171   
            non_key_attributes: self.non_key_attributes,
         172  +
            /* BuilderGenerator.kt:477 */
  123    173   
        }
         174  +
        /* BuilderGenerator.kt:253 */
  124    175   
    }
         176  +
    /* BuilderGenerator.kt:355 */
  125    177   
}

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

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

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

@@ -1,1 +98,143 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the <code>UpdateTable</code> operation.</p>
    4      4   
/// <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>
           5  +
/* RustType.kt:516 */
    5      6   
#[non_exhaustive]
           7  +
/* RustType.kt:516 */
    6      8   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    7         -
pub struct ProvisionedThroughput {
    8         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
           9  +
pub /* StructureGenerator.kt:201 */ struct ProvisionedThroughput {
          10  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
    9     11   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
   10     12   
    pub read_capacity_units: i64,
   11         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   12     14   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
   13     15   
    pub write_capacity_units: i64,
          16  +
    /* StructureGenerator.kt:201 */
   14     17   
}
          18  +
/* StructureGenerator.kt:135 */
   15     19   
impl ProvisionedThroughput {
   16         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          20  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   17     21   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
          22  +
    /* StructureGenerator.kt:166 */
   18     23   
    pub fn read_capacity_units(&self) -> i64 {
          24  +
        /* StructureGenerator.kt:168 */
   19     25   
        self.read_capacity_units
          26  +
        /* StructureGenerator.kt:166 */
   20     27   
    }
   21         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          28  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   22     29   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
          30  +
    /* StructureGenerator.kt:166 */
   23     31   
    pub fn write_capacity_units(&self) -> i64 {
          32  +
        /* StructureGenerator.kt:168 */
   24     33   
        self.write_capacity_units
          34  +
        /* StructureGenerator.kt:166 */
   25     35   
    }
          36  +
    /* StructureGenerator.kt:135 */
   26     37   
}
          38  +
/* ClientCodegenVisitor.kt:237 */
   27     39   
impl ProvisionedThroughput {
   28         -
    /// Creates a new builder-style object to manufacture [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
          40  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
          41  +
    /* BuilderGenerator.kt:175 */
   29     42   
    pub fn builder() -> crate::types::builders::ProvisionedThroughputBuilder {
          43  +
        /* BuilderGenerator.kt:176 */
   30     44   
        crate::types::builders::ProvisionedThroughputBuilder::default()
          45  +
        /* BuilderGenerator.kt:175 */
   31     46   
    }
          47  +
    /* ClientCodegenVisitor.kt:237 */
   32     48   
}
   33     49   
   34         -
/// A builder for [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
          50  +
/// /* BuilderGenerator.kt:342 */A builder for [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
          51  +
/* RustType.kt:516 */
   35     52   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          53  +
/* RustType.kt:516 */
   36     54   
#[non_exhaustive]
          55  +
/* BuilderGenerator.kt:345 */
   37     56   
pub struct ProvisionedThroughputBuilder {
   38         -
    pub(crate) read_capacity_units: ::std::option::Option<i64>,
   39         -
    pub(crate) write_capacity_units: ::std::option::Option<i64>,
          57  +
    /* BuilderGenerator.kt:275 */ pub(crate) read_capacity_units: ::std::option::Option<i64>,
          58  +
    /* BuilderGenerator.kt:275 */ pub(crate) write_capacity_units: ::std::option::Option<i64>,
          59  +
    /* BuilderGenerator.kt:345 */
   40     60   
}
          61  +
/* BuilderGenerator.kt:355 */
   41     62   
impl ProvisionedThroughputBuilder {
   42         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          63  +
    /// /* BuilderGenerator.kt:286 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   43     64   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
   44         -
    /// This field is required.
          65  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          66  +
    /* BuilderGenerator.kt:291 */
   45     67   
    pub fn read_capacity_units(mut self, input: i64) -> Self {
          68  +
        /* BuilderGenerator.kt:292 */
   46     69   
        self.read_capacity_units = ::std::option::Option::Some(input);
          70  +
        /* BuilderGenerator.kt:293 */
   47     71   
        self
          72  +
        /* BuilderGenerator.kt:291 */
   48     73   
    }
   49         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          74  +
    /// /* BuilderGenerator.kt:312 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   50     75   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
          76  +
    /* BuilderGenerator.kt:314 */
   51     77   
    pub fn set_read_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
          78  +
        /* BuilderGenerator.kt:315 */
   52     79   
        self.read_capacity_units = input;
   53     80   
        self
          81  +
        /* BuilderGenerator.kt:314 */
   54     82   
    }
   55         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          83  +
    /// /* BuilderGenerator.kt:334 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   56     84   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
          85  +
    /* BuilderGenerator.kt:336 */
   57     86   
    pub fn get_read_capacity_units(&self) -> &::std::option::Option<i64> {
          87  +
        /* BuilderGenerator.kt:337 */
   58     88   
        &self.read_capacity_units
          89  +
        /* BuilderGenerator.kt:336 */
   59     90   
    }
   60         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
          91  +
    /// /* BuilderGenerator.kt:286 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   61     92   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
   62         -
    /// This field is required.
          93  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          94  +
    /* BuilderGenerator.kt:291 */
   63     95   
    pub fn write_capacity_units(mut self, input: i64) -> Self {
          96  +
        /* BuilderGenerator.kt:292 */
   64     97   
        self.write_capacity_units = ::std::option::Option::Some(input);
          98  +
        /* BuilderGenerator.kt:293 */
   65     99   
        self
         100  +
        /* BuilderGenerator.kt:291 */
   66    101   
    }
   67         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         102  +
    /// /* BuilderGenerator.kt:312 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   68    103   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
         104  +
    /* BuilderGenerator.kt:314 */
   69    105   
    pub fn set_write_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
         106  +
        /* BuilderGenerator.kt:315 */
   70    107   
        self.write_capacity_units = input;
   71    108   
        self
         109  +
        /* BuilderGenerator.kt:314 */
   72    110   
    }
   73         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
         111  +
    /// /* BuilderGenerator.kt:334 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>. For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput">Specifying Read and Write Requirements</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p>
   74    112   
    /// <p>If read/write capacity mode is <code>PAY_PER_REQUEST</code> the value is set to 0.</p>
         113  +
    /* BuilderGenerator.kt:336 */
   75    114   
    pub fn get_write_capacity_units(&self) -> &::std::option::Option<i64> {
         115  +
        /* BuilderGenerator.kt:337 */
   76    116   
        &self.write_capacity_units
         117  +
        /* BuilderGenerator.kt:336 */
   77    118   
    }
   78         -
    /// Consumes the builder and constructs a [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
   79         -
    /// This method will fail if any of the following fields are not set:
   80         -
    /// - [`read_capacity_units`](crate::types::builders::ProvisionedThroughputBuilder::read_capacity_units)
   81         -
    /// - [`write_capacity_units`](crate::types::builders::ProvisionedThroughputBuilder::write_capacity_units)
         119  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ProvisionedThroughput`](crate::types::ProvisionedThroughput).
         120  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         121  +
    /// /* BuilderGenerator.kt:246 */- [`read_capacity_units`](crate::types::builders::ProvisionedThroughputBuilder::read_capacity_units)
         122  +
    /// /* BuilderGenerator.kt:246 */- [`write_capacity_units`](crate::types::builders::ProvisionedThroughputBuilder::write_capacity_units)
         123  +
    /* BuilderGenerator.kt:253 */
   82    124   
    pub fn build(self) -> ::std::result::Result<crate::types::ProvisionedThroughput, ::aws_smithy_types::error::operation::BuildError> {
   83         -
        ::std::result::Result::Ok(crate::types::ProvisionedThroughput {
   84         -
            read_capacity_units: self.read_capacity_units.ok_or_else(|| {
   85         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   86         -
                    "read_capacity_units",
   87         -
                    "read_capacity_units was not specified but it is required when building ProvisionedThroughput",
   88         -
                )
   89         -
            })?,
   90         -
            write_capacity_units: self.write_capacity_units.ok_or_else(|| {
   91         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   92         -
                    "write_capacity_units",
   93         -
                    "write_capacity_units was not specified but it is required when building ProvisionedThroughput",
   94         -
                )
   95         -
            })?,
   96         -
        })
         125  +
        /* BuilderGenerator.kt:254 */
         126  +
        ::std::result::Result::Ok(
         127  +
            /* BuilderGenerator.kt:477 */crate::types::ProvisionedThroughput {
         128  +
                /* BuilderGenerator.kt:481 */read_capacity_units: self.read_capacity_units
         129  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         130  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("read_capacity_units", "read_capacity_units was not specified but it is required when building ProvisionedThroughput")
         131  +
                    /* BuilderGenerator.kt:494 */)?
         132  +
                ,
         133  +
                /* BuilderGenerator.kt:481 */write_capacity_units: self.write_capacity_units
         134  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         135  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("write_capacity_units", "write_capacity_units was not specified but it is required when building ProvisionedThroughput")
         136  +
                    /* BuilderGenerator.kt:494 */)?
         137  +
                ,
         138  +
            /* BuilderGenerator.kt:477 */}
         139  +
        /* BuilderGenerator.kt:254 */)
         140  +
        /* BuilderGenerator.kt:253 */
   97    141   
    }
         142  +
    /* BuilderGenerator.kt:355 */
   98    143   
}

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

@@ -1,1 +138,227 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.</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 ProvisionedThroughputDescription {
    7         -
    /// <p>The date and time of the last provisioned throughput increase for this table.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ProvisionedThroughputDescription {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The date and time of the last provisioned throughput increase for this table.</p>
    8     10   
    pub last_increase_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    9         -
    /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The date and time of the last provisioned throughput decrease for this table.</p>
   10     12   
    pub last_decrease_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   11         -
    /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
          13  +
    /// /* StructureGenerator.kt:231 */<p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
   12     14   
    pub number_of_decreases_today: ::std::option::Option<i64>,
   13         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
   14     16   
    pub read_capacity_units: ::std::option::Option<i64>,
   15         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
          17  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
   16     18   
    pub write_capacity_units: ::std::option::Option<i64>,
          19  +
    /* StructureGenerator.kt:201 */
   17     20   
}
          21  +
/* StructureGenerator.kt:135 */
   18     22   
impl ProvisionedThroughputDescription {
   19         -
    /// <p>The date and time of the last provisioned throughput increase for this table.</p>
          23  +
    /// /* StructureGenerator.kt:231 */<p>The date and time of the last provisioned throughput increase for this table.</p>
          24  +
    /* StructureGenerator.kt:166 */
   20     25   
    pub fn last_increase_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          26  +
        /* StructureGenerator.kt:170 */
   21     27   
        self.last_increase_date_time.as_ref()
          28  +
        /* StructureGenerator.kt:166 */
   22     29   
    }
   23         -
    /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
          30  +
    /// /* StructureGenerator.kt:231 */<p>The date and time of the last provisioned throughput decrease for this table.</p>
          31  +
    /* StructureGenerator.kt:166 */
   24     32   
    pub fn last_decrease_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
          33  +
        /* StructureGenerator.kt:170 */
   25     34   
        self.last_decrease_date_time.as_ref()
          35  +
        /* StructureGenerator.kt:166 */
   26     36   
    }
   27         -
    /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
          37  +
    /// /* StructureGenerator.kt:231 */<p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
          38  +
    /* StructureGenerator.kt:166 */
   28     39   
    pub fn number_of_decreases_today(&self) -> ::std::option::Option<i64> {
          40  +
        /* StructureGenerator.kt:168 */
   29     41   
        self.number_of_decreases_today
          42  +
        /* StructureGenerator.kt:166 */
   30     43   
    }
   31         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
          44  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
          45  +
    /* StructureGenerator.kt:166 */
   32     46   
    pub fn read_capacity_units(&self) -> ::std::option::Option<i64> {
          47  +
        /* StructureGenerator.kt:168 */
   33     48   
        self.read_capacity_units
          49  +
        /* StructureGenerator.kt:166 */
   34     50   
    }
   35         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
          51  +
    /// /* StructureGenerator.kt:231 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
          52  +
    /* StructureGenerator.kt:166 */
   36     53   
    pub fn write_capacity_units(&self) -> ::std::option::Option<i64> {
          54  +
        /* StructureGenerator.kt:168 */
   37     55   
        self.write_capacity_units
          56  +
        /* StructureGenerator.kt:166 */
   38     57   
    }
          58  +
    /* StructureGenerator.kt:135 */
   39     59   
}
          60  +
/* ClientCodegenVisitor.kt:237 */
   40     61   
impl ProvisionedThroughputDescription {
   41         -
    /// Creates a new builder-style object to manufacture [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
          62  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
          63  +
    /* BuilderGenerator.kt:175 */
   42     64   
    pub fn builder() -> crate::types::builders::ProvisionedThroughputDescriptionBuilder {
          65  +
        /* BuilderGenerator.kt:176 */
   43     66   
        crate::types::builders::ProvisionedThroughputDescriptionBuilder::default()
          67  +
        /* BuilderGenerator.kt:175 */
   44     68   
    }
          69  +
    /* ClientCodegenVisitor.kt:237 */
   45     70   
}
   46     71   
   47         -
/// A builder for [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
          72  +
/// /* BuilderGenerator.kt:342 */A builder for [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
          73  +
/* RustType.kt:516 */
   48     74   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          75  +
/* RustType.kt:516 */
   49     76   
#[non_exhaustive]
          77  +
/* BuilderGenerator.kt:345 */
   50     78   
pub struct ProvisionedThroughputDescriptionBuilder {
   51         -
    pub(crate) last_increase_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   52         -
    pub(crate) last_decrease_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
   53         -
    pub(crate) number_of_decreases_today: ::std::option::Option<i64>,
   54         -
    pub(crate) read_capacity_units: ::std::option::Option<i64>,
   55         -
    pub(crate) write_capacity_units: ::std::option::Option<i64>,
          79  +
    /* BuilderGenerator.kt:275 */ pub(crate) last_increase_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          80  +
    /* BuilderGenerator.kt:275 */ pub(crate) last_decrease_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
          81  +
    /* BuilderGenerator.kt:275 */ pub(crate) number_of_decreases_today: ::std::option::Option<i64>,
          82  +
    /* BuilderGenerator.kt:275 */ pub(crate) read_capacity_units: ::std::option::Option<i64>,
          83  +
    /* BuilderGenerator.kt:275 */ pub(crate) write_capacity_units: ::std::option::Option<i64>,
          84  +
    /* BuilderGenerator.kt:345 */
   56     85   
}
          86  +
/* BuilderGenerator.kt:355 */
   57     87   
impl ProvisionedThroughputDescriptionBuilder {
   58         -
    /// <p>The date and time of the last provisioned throughput increase for this table.</p>
          88  +
    /// /* BuilderGenerator.kt:286 */<p>The date and time of the last provisioned throughput increase for this table.</p>
          89  +
    /* BuilderGenerator.kt:291 */
   59     90   
    pub fn last_increase_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
          91  +
        /* BuilderGenerator.kt:292 */
   60     92   
        self.last_increase_date_time = ::std::option::Option::Some(input);
          93  +
        /* BuilderGenerator.kt:293 */
   61     94   
        self
          95  +
        /* BuilderGenerator.kt:291 */
   62     96   
    }
   63         -
    /// <p>The date and time of the last provisioned throughput increase for this table.</p>
          97  +
    /// /* BuilderGenerator.kt:312 */<p>The date and time of the last provisioned throughput increase for this table.</p>
          98  +
    /* BuilderGenerator.kt:314 */
   64     99   
    pub fn set_last_increase_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         100  +
        /* BuilderGenerator.kt:315 */
   65    101   
        self.last_increase_date_time = input;
   66    102   
        self
         103  +
        /* BuilderGenerator.kt:314 */
   67    104   
    }
   68         -
    /// <p>The date and time of the last provisioned throughput increase for this table.</p>
         105  +
    /// /* BuilderGenerator.kt:334 */<p>The date and time of the last provisioned throughput increase for this table.</p>
         106  +
    /* BuilderGenerator.kt:336 */
   69    107   
    pub fn get_last_increase_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         108  +
        /* BuilderGenerator.kt:337 */
   70    109   
        &self.last_increase_date_time
         110  +
        /* BuilderGenerator.kt:336 */
   71    111   
    }
   72         -
    /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
         112  +
    /// /* BuilderGenerator.kt:286 */<p>The date and time of the last provisioned throughput decrease for this table.</p>
         113  +
    /* BuilderGenerator.kt:291 */
   73    114   
    pub fn last_decrease_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
         115  +
        /* BuilderGenerator.kt:292 */
   74    116   
        self.last_decrease_date_time = ::std::option::Option::Some(input);
         117  +
        /* BuilderGenerator.kt:293 */
   75    118   
        self
         119  +
        /* BuilderGenerator.kt:291 */
   76    120   
    }
   77         -
    /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
         121  +
    /// /* BuilderGenerator.kt:312 */<p>The date and time of the last provisioned throughput decrease for this table.</p>
         122  +
    /* BuilderGenerator.kt:314 */
   78    123   
    pub fn set_last_decrease_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
         124  +
        /* BuilderGenerator.kt:315 */
   79    125   
        self.last_decrease_date_time = input;
   80    126   
        self
         127  +
        /* BuilderGenerator.kt:314 */
   81    128   
    }
   82         -
    /// <p>The date and time of the last provisioned throughput decrease for this table.</p>
         129  +
    /// /* BuilderGenerator.kt:334 */<p>The date and time of the last provisioned throughput decrease for this table.</p>
         130  +
    /* BuilderGenerator.kt:336 */
   83    131   
    pub fn get_last_decrease_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
         132  +
        /* BuilderGenerator.kt:337 */
   84    133   
        &self.last_decrease_date_time
         134  +
        /* BuilderGenerator.kt:336 */
   85    135   
    }
   86         -
    /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         136  +
    /// /* BuilderGenerator.kt:286 */<p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         137  +
    /* BuilderGenerator.kt:291 */
   87    138   
    pub fn number_of_decreases_today(mut self, input: i64) -> Self {
         139  +
        /* BuilderGenerator.kt:292 */
   88    140   
        self.number_of_decreases_today = ::std::option::Option::Some(input);
         141  +
        /* BuilderGenerator.kt:293 */
   89    142   
        self
         143  +
        /* BuilderGenerator.kt:291 */
   90    144   
    }
   91         -
    /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         145  +
    /// /* BuilderGenerator.kt:312 */<p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         146  +
    /* BuilderGenerator.kt:314 */
   92    147   
    pub fn set_number_of_decreases_today(mut self, input: ::std::option::Option<i64>) -> Self {
         148  +
        /* BuilderGenerator.kt:315 */
   93    149   
        self.number_of_decreases_today = input;
   94    150   
        self
         151  +
        /* BuilderGenerator.kt:314 */
   95    152   
    }
   96         -
    /// <p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         153  +
    /// /* BuilderGenerator.kt:334 */<p>The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, 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>
         154  +
    /* BuilderGenerator.kt:336 */
   97    155   
    pub fn get_number_of_decreases_today(&self) -> &::std::option::Option<i64> {
         156  +
        /* BuilderGenerator.kt:337 */
   98    157   
        &self.number_of_decreases_today
         158  +
        /* BuilderGenerator.kt:336 */
   99    159   
    }
  100         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         160  +
    /// /* BuilderGenerator.kt:286 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         161  +
    /* BuilderGenerator.kt:291 */
  101    162   
    pub fn read_capacity_units(mut self, input: i64) -> Self {
         163  +
        /* BuilderGenerator.kt:292 */
  102    164   
        self.read_capacity_units = ::std::option::Option::Some(input);
         165  +
        /* BuilderGenerator.kt:293 */
  103    166   
        self
         167  +
        /* BuilderGenerator.kt:291 */
  104    168   
    }
  105         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         169  +
    /// /* BuilderGenerator.kt:312 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         170  +
    /* BuilderGenerator.kt:314 */
  106    171   
    pub fn set_read_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
         172  +
        /* BuilderGenerator.kt:315 */
  107    173   
        self.read_capacity_units = input;
  108    174   
        self
         175  +
        /* BuilderGenerator.kt:314 */
  109    176   
    }
  110         -
    /// <p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         177  +
    /// /* BuilderGenerator.kt:334 */<p>The maximum number of strongly consistent reads consumed per second before DynamoDB returns a <code>ThrottlingException</code>. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 <code>ReadCapacityUnits</code> per second provides 100 eventually consistent <code>ReadCapacityUnits</code> per second.</p>
         178  +
    /* BuilderGenerator.kt:336 */
  111    179   
    pub fn get_read_capacity_units(&self) -> &::std::option::Option<i64> {
         180  +
        /* BuilderGenerator.kt:337 */
  112    181   
        &self.read_capacity_units
         182  +
        /* BuilderGenerator.kt:336 */
  113    183   
    }
  114         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         184  +
    /// /* BuilderGenerator.kt:286 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         185  +
    /* BuilderGenerator.kt:291 */
  115    186   
    pub fn write_capacity_units(mut self, input: i64) -> Self {
         187  +
        /* BuilderGenerator.kt:292 */
  116    188   
        self.write_capacity_units = ::std::option::Option::Some(input);
         189  +
        /* BuilderGenerator.kt:293 */
  117    190   
        self
         191  +
        /* BuilderGenerator.kt:291 */
  118    192   
    }
  119         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         193  +
    /// /* BuilderGenerator.kt:312 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         194  +
    /* BuilderGenerator.kt:314 */
  120    195   
    pub fn set_write_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
         196  +
        /* BuilderGenerator.kt:315 */
  121    197   
        self.write_capacity_units = input;
  122    198   
        self
         199  +
        /* BuilderGenerator.kt:314 */
  123    200   
    }
  124         -
    /// <p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         201  +
    /// /* BuilderGenerator.kt:334 */<p>The maximum number of writes consumed per second before DynamoDB returns a <code>ThrottlingException</code>.</p>
         202  +
    /* BuilderGenerator.kt:336 */
  125    203   
    pub fn get_write_capacity_units(&self) -> &::std::option::Option<i64> {
         204  +
        /* BuilderGenerator.kt:337 */
  126    205   
        &self.write_capacity_units
         206  +
        /* BuilderGenerator.kt:336 */
  127    207   
    }
  128         -
    /// Consumes the builder and constructs a [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
         208  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ProvisionedThroughputDescription`](crate::types::ProvisionedThroughputDescription).
         209  +
    /* BuilderGenerator.kt:253 */
  129    210   
    pub fn build(self) -> crate::types::ProvisionedThroughputDescription {
         211  +
        /* BuilderGenerator.kt:477 */
  130    212   
        crate::types::ProvisionedThroughputDescription {
  131         -
            last_increase_date_time: self.last_increase_date_time,
         213  +
            /* BuilderGenerator.kt:481 */ last_increase_date_time: self.last_increase_date_time,
         214  +
            /* BuilderGenerator.kt:481 */
  132    215   
            last_decrease_date_time: self.last_decrease_date_time,
         216  +
            /* BuilderGenerator.kt:481 */
  133    217   
            number_of_decreases_today: self.number_of_decreases_today,
         218  +
            /* BuilderGenerator.kt:481 */
  134    219   
            read_capacity_units: self.read_capacity_units,
         220  +
            /* BuilderGenerator.kt:481 */
  135    221   
            write_capacity_units: self.write_capacity_units,
         222  +
            /* BuilderGenerator.kt:477 */
  136    223   
        }
         224  +
        /* BuilderGenerator.kt:253 */
  137    225   
    }
         226  +
    /* BuilderGenerator.kt:355 */
  138    227   
}

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

@@ -1,1 +50,83 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Replica-specific provisioned throughput settings. If not specified, uses the source table's provisioned throughput settings.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Replica-specific provisioned throughput settings. If not specified, uses the source table's provisioned throughput settings.</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 ProvisionedThroughputOverride {
    7         -
    /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ProvisionedThroughputOverride {
           9  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
    8     10   
    pub read_capacity_units: ::std::option::Option<i64>,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl ProvisionedThroughputOverride {
   11         -
    /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn read_capacity_units(&self) -> ::std::option::Option<i64> {
          18  +
        /* StructureGenerator.kt:168 */
   13     19   
        self.read_capacity_units
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl ProvisionedThroughputOverride {
   17         -
    /// Creates a new builder-style object to manufacture [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::ProvisionedThroughputOverrideBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::ProvisionedThroughputOverrideBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          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 ProvisionedThroughputOverrideBuilder {
   27         -
    pub(crate) read_capacity_units: ::std::option::Option<i64>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) read_capacity_units: ::std::option::Option<i64>,
          44  +
    /* BuilderGenerator.kt:345 */
   28     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   29     47   
impl ProvisionedThroughputOverrideBuilder {
   30         -
    /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          48  +
    /// /* BuilderGenerator.kt:286 */<p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          49  +
    /* BuilderGenerator.kt:291 */
   31     50   
    pub fn read_capacity_units(mut self, input: i64) -> Self {
          51  +
        /* BuilderGenerator.kt:292 */
   32     52   
        self.read_capacity_units = ::std::option::Option::Some(input);
          53  +
        /* BuilderGenerator.kt:293 */
   33     54   
        self
          55  +
        /* BuilderGenerator.kt:291 */
   34     56   
    }
   35         -
    /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          57  +
    /// /* BuilderGenerator.kt:312 */<p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          58  +
    /* BuilderGenerator.kt:314 */
   36     59   
    pub fn set_read_capacity_units(mut self, input: ::std::option::Option<i64>) -> Self {
          60  +
        /* BuilderGenerator.kt:315 */
   37     61   
        self.read_capacity_units = input;
   38     62   
        self
          63  +
        /* BuilderGenerator.kt:314 */
   39     64   
    }
   40         -
    /// <p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          65  +
    /// /* BuilderGenerator.kt:334 */<p>Replica-specific read capacity units. If not specified, uses the source table's read capacity settings.</p>
          66  +
    /* BuilderGenerator.kt:336 */
   41     67   
    pub fn get_read_capacity_units(&self) -> &::std::option::Option<i64> {
          68  +
        /* BuilderGenerator.kt:337 */
   42     69   
        &self.read_capacity_units
          70  +
        /* BuilderGenerator.kt:336 */
   43     71   
    }
   44         -
    /// Consumes the builder and constructs a [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          72  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ProvisionedThroughputOverride`](crate::types::ProvisionedThroughputOverride).
          73  +
    /* BuilderGenerator.kt:253 */
   45     74   
    pub fn build(self) -> crate::types::ProvisionedThroughputOverride {
          75  +
        /* BuilderGenerator.kt:477 */
   46     76   
        crate::types::ProvisionedThroughputOverride {
   47         -
            read_capacity_units: self.read_capacity_units,
          77  +
            /* BuilderGenerator.kt:481 */ read_capacity_units: self.read_capacity_units,
          78  +
            /* BuilderGenerator.kt:477 */
   48     79   
        }
          80  +
        /* BuilderGenerator.kt:253 */
   49     81   
    }
          82  +
    /* BuilderGenerator.kt:355 */
   50     83   
}

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

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

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

@@ -1,1 +66,101 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents a request to perform a <code>PutItem</code> operation on an item.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents a request to perform a <code>PutItem</code> operation on an item.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct PutRequest {
    7         -
    /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct PutRequest {
           9  +
    /// /* StructureGenerator.kt:231 */<p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
    8     10   
    pub item: ::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl PutRequest {
   11         -
    /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn item(&self) -> &::std::collections::HashMap<::std::string::String, crate::types::AttributeValue> {
          18  +
        /* StructureGenerator.kt:172 */
   13     19   
        &self.item
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl PutRequest {
   17         -
    /// Creates a new builder-style object to manufacture [`PutRequest`](crate::types::PutRequest).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`PutRequest`](crate::types::PutRequest).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::PutRequestBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::PutRequestBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`PutRequest`](crate::types::PutRequest).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`PutRequest`](crate::types::PutRequest).
          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 PutRequestBuilder {
          43  +
    /* BuilderGenerator.kt:275 */
   27     44   
    pub(crate) item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
          45  +
    /* BuilderGenerator.kt:345 */
   28     46   
}
          47  +
/* BuilderGenerator.kt:355 */
   29     48   
impl PutRequestBuilder {
   30         -
    /// Adds a key-value pair to `item`.
          49  +
    /// /* BuilderGenerator.kt:436 */Adds a key-value pair to `item`.
          50  +
    /* BuilderGenerator.kt:437 */
   31     51   
    ///
   32         -
    /// To override the contents of this collection use [`set_item`](Self::set_item).
          52  +
    /// /* BuilderGenerator.kt:438 */To override the contents of this collection use [`set_item`](Self::set_item).
          53  +
    /* BuilderGenerator.kt:439 */
   33     54   
    ///
   34         -
    /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          55  +
    /// /* BuilderGenerator.kt:440 */<p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          56  +
    /* BuilderGenerator.kt:445 */
   35     57   
    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
          58  +
        /* BuilderGenerator.kt:448 */
   36     59   
        let mut hash_map = self.item.unwrap_or_default();
   37     60   
        hash_map.insert(k.into(), v);
   38     61   
        self.item = ::std::option::Option::Some(hash_map);
   39     62   
        self
          63  +
        /* BuilderGenerator.kt:445 */
   40     64   
    }
   41         -
    /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          65  +
    /// /* BuilderGenerator.kt:312 */<p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          66  +
    /* BuilderGenerator.kt:314 */
   42     67   
    pub fn set_item(
   43     68   
        mut self,
   44     69   
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
   45     70   
    ) -> Self {
          71  +
        /* BuilderGenerator.kt:315 */
   46     72   
        self.item = input;
   47     73   
        self
          74  +
        /* BuilderGenerator.kt:314 */
   48     75   
    }
   49         -
    /// <p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          76  +
    /// /* BuilderGenerator.kt:334 */<p>A map of attribute name to attribute values, representing the primary key of an item to be processed by <code>PutItem</code>. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item that are part of an index key schema for the table, their types must match the index key schema.</p>
          77  +
    /* BuilderGenerator.kt:336 */
   50     78   
    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
          79  +
        /* BuilderGenerator.kt:337 */
   51     80   
        &self.item
          81  +
        /* BuilderGenerator.kt:336 */
   52     82   
    }
   53         -
    /// Consumes the builder and constructs a [`PutRequest`](crate::types::PutRequest).
   54         -
    /// This method will fail if any of the following fields are not set:
   55         -
    /// - [`item`](crate::types::builders::PutRequestBuilder::item)
          83  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`PutRequest`](crate::types::PutRequest).
          84  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
          85  +
    /// /* BuilderGenerator.kt:246 */- [`item`](crate::types::builders::PutRequestBuilder::item)
          86  +
    /* BuilderGenerator.kt:253 */
   56     87   
    pub fn build(self) -> ::std::result::Result<crate::types::PutRequest, ::aws_smithy_types::error::operation::BuildError> {
   57         -
        ::std::result::Result::Ok(crate::types::PutRequest {
   58         -
            item: self.item.ok_or_else(|| {
   59         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
   60         -
                    "item",
   61         -
                    "item was not specified but it is required when building PutRequest",
   62         -
                )
   63         -
            })?,
   64         -
        })
          88  +
        /* BuilderGenerator.kt:254 */
          89  +
        ::std::result::Result::Ok(
          90  +
            /* BuilderGenerator.kt:477 */crate::types::PutRequest {
          91  +
                /* BuilderGenerator.kt:481 */item: self.item
          92  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
          93  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("item", "item was not specified but it is required when building PutRequest")
          94  +
                    /* BuilderGenerator.kt:494 */)?
          95  +
                ,
          96  +
            /* BuilderGenerator.kt:477 */}
          97  +
        /* BuilderGenerator.kt:254 */)
          98  +
        /* BuilderGenerator.kt:253 */
   65     99   
    }
         100  +
    /* BuilderGenerator.kt:355 */
   66    101   
}

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

@@ -1,1 +50,83 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents the properties of a replica.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents the properties of a replica.</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 Replica {
    7         -
    /// <p>The Region where the replica needs to be created.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct Replica {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The Region where the replica needs to be created.</p>
    8     10   
    pub region_name: ::std::option::Option<::std::string::String>,
          11  +
    /* StructureGenerator.kt:201 */
    9     12   
}
          13  +
/* StructureGenerator.kt:135 */
   10     14   
impl Replica {
   11         -
    /// <p>The Region where the replica needs to be created.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>The Region where the replica needs to be created.</p>
          16  +
    /* StructureGenerator.kt:166 */
   12     17   
    pub fn region_name(&self) -> ::std::option::Option<&str> {
          18  +
        /* StructureGenerator.kt:169 */
   13     19   
        self.region_name.as_deref()
          20  +
        /* StructureGenerator.kt:166 */
   14     21   
    }
          22  +
    /* StructureGenerator.kt:135 */
   15     23   
}
          24  +
/* ClientCodegenVisitor.kt:237 */
   16     25   
impl Replica {
   17         -
    /// Creates a new builder-style object to manufacture [`Replica`](crate::types::Replica).
          26  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`Replica`](crate::types::Replica).
          27  +
    /* BuilderGenerator.kt:175 */
   18     28   
    pub fn builder() -> crate::types::builders::ReplicaBuilder {
          29  +
        /* BuilderGenerator.kt:176 */
   19     30   
        crate::types::builders::ReplicaBuilder::default()
          31  +
        /* BuilderGenerator.kt:175 */
   20     32   
    }
          33  +
    /* ClientCodegenVisitor.kt:237 */
   21     34   
}
   22     35   
   23         -
/// A builder for [`Replica`](crate::types::Replica).
          36  +
/// /* BuilderGenerator.kt:342 */A builder for [`Replica`](crate::types::Replica).
          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 ReplicaBuilder {
   27         -
    pub(crate) region_name: ::std::option::Option<::std::string::String>,
          43  +
    /* BuilderGenerator.kt:275 */ pub(crate) region_name: ::std::option::Option<::std::string::String>,
          44  +
    /* BuilderGenerator.kt:345 */
   28     45   
}
          46  +
/* BuilderGenerator.kt:355 */
   29     47   
impl ReplicaBuilder {
   30         -
    /// <p>The Region where the replica needs to be created.</p>
          48  +
    /// /* BuilderGenerator.kt:286 */<p>The Region where the replica needs to be created.</p>
          49  +
    /* BuilderGenerator.kt:291 */
   31     50   
    pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          51  +
        /* BuilderGenerator.kt:292 */
   32     52   
        self.region_name = ::std::option::Option::Some(input.into());
          53  +
        /* BuilderGenerator.kt:293 */
   33     54   
        self
          55  +
        /* BuilderGenerator.kt:291 */
   34     56   
    }
   35         -
    /// <p>The Region where the replica needs to be created.</p>
          57  +
    /// /* BuilderGenerator.kt:312 */<p>The Region where the replica needs to be created.</p>
          58  +
    /* BuilderGenerator.kt:314 */
   36     59   
    pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          60  +
        /* BuilderGenerator.kt:315 */
   37     61   
        self.region_name = input;
   38     62   
        self
          63  +
        /* BuilderGenerator.kt:314 */
   39     64   
    }
   40         -
    /// <p>The Region where the replica needs to be created.</p>
          65  +
    /// /* BuilderGenerator.kt:334 */<p>The Region where the replica needs to be created.</p>
          66  +
    /* BuilderGenerator.kt:336 */
   41     67   
    pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
          68  +
        /* BuilderGenerator.kt:337 */
   42     69   
        &self.region_name
          70  +
        /* BuilderGenerator.kt:336 */
   43     71   
    }
   44         -
    /// Consumes the builder and constructs a [`Replica`](crate::types::Replica).
          72  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`Replica`](crate::types::Replica).
          73  +
    /* BuilderGenerator.kt:253 */
   45     74   
    pub fn build(self) -> crate::types::Replica {
          75  +
        /* BuilderGenerator.kt:477 */
   46     76   
        crate::types::Replica {
   47         -
            region_name: self.region_name,
          77  +
            /* BuilderGenerator.kt:481 */ region_name: self.region_name,
          78  +
            /* BuilderGenerator.kt:477 */
   48     79   
        }
          80  +
        /* BuilderGenerator.kt:253 */
   49     81   
    }
          82  +
    /* BuilderGenerator.kt:355 */
   50     83   
}