Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/types/_continuous_backups_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 `ContinuousBackupsStatus`, it is important to ensure
           2  +
/* ClientEnumGenerator.kt:234 */
           3  +
/// /* ClientEnumGenerator.kt:234 */When writing a match expression against `ContinuousBackupsStatus`, 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 continuousbackupsstatus = unimplemented!();
          15  +
/* ClientEnumGenerator.kt:249 */
   14     16   
/// match continuousbackupsstatus {
          17  +
/* ClientEnumGenerator.kt:251 */
   15     18   
///     ContinuousBackupsStatus::Disabled => { /* ... */ },
          19  +
/* ClientEnumGenerator.kt:251 */
   16     20   
///     ContinuousBackupsStatus::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 `continuousbackupsstatus` represents
          27  +
/// /* ClientEnumGenerator.kt:256 */```
          28  +
/// /* ClientEnumGenerator.kt:257 */The above code demonstrates that when `continuousbackupsstatus` 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 `ContinuousBackupsStatus::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   
/// `ContinuousBackupsStatus::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 `ContinuousBackupsStatus::NewFeature` is defined.
   30     37   
/// Specifically, when `continuousbackupsstatus` 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 `ContinuousBackupsStatus::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 ContinuousBackupsStatus {
   45         -
    #[allow(missing_docs)] // documentation missing in model
          54  +
pub /* EnumGenerator.kt:267 */ enum ContinuousBackupsStatus {
          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 ContinuousBackupsStatus {
   54     69   
    fn from(s: &str) -> Self {
   55     70   
        match s {
   56     71   
            "DISABLED" => ContinuousBackupsStatus::Disabled,
   57     72   
            "ENABLED" => ContinuousBackupsStatus::Enabled,
   58     73   
            other => ContinuousBackupsStatus::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 ContinuousBackupsStatus {
   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(ContinuousBackupsStatus::from(s))
   67     83   
    }
   68     84   
}
          85  +
/* EnumGenerator.kt:274 */
   69     86   
impl ContinuousBackupsStatus {
   70     87   
    /// Returns the `&str` value of the enum member.
   71     88   
    pub fn as_str(&self) -> &str {
   72     89   
        match self {
   73     90   
            ContinuousBackupsStatus::Disabled => "DISABLED",
   74     91   
            ContinuousBackupsStatus::Enabled => "ENABLED",
   75     92   
            ContinuousBackupsStatus::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 ContinuousBackupsStatus {
   84    102   
    fn as_ref(&self) -> &str {
   85    103   
        self.as_str()
   86    104   
    }
   87    105   
}
         106  +
/* ClientEnumGenerator.kt:117 */
   88    107   
impl ContinuousBackupsStatus {
   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 ContinuousBackupsStatus {
  101    121   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  102    122   
        match self {
  103    123   
            ContinuousBackupsStatus::Disabled => write!(f, "DISABLED"),
  104    124   
            ContinuousBackupsStatus::Enabled => write!(f, "ENABLED"),
  105    125   
            ContinuousBackupsStatus::Unknown(value) => write!(f, "{}", value),
  106    126   
        }
  107    127   
    }
  108    128   
}

tmp-codegen-diff/codegen-client-test/dynamo/rust-client-codegen/src/types/_contributor_insights_action.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 `ContributorInsightsAction`, it is important to ensure
           2  +
/* ClientEnumGenerator.kt:234 */
           3  +
/// /* ClientEnumGenerator.kt:234 */When writing a match expression against `ContributorInsightsAction`, 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 contributorinsightsaction = unimplemented!();
          15  +
/* ClientEnumGenerator.kt:249 */
   14     16   
/// match contributorinsightsaction {
          17  +
/* ClientEnumGenerator.kt:251 */
   15     18   
///     ContributorInsightsAction::Disable => { /* ... */ },
          19  +
/* ClientEnumGenerator.kt:251 */
   16     20   
///     ContributorInsightsAction::Enable => { /* ... */ },
          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 `contributorinsightsaction` represents
          27  +
/// /* ClientEnumGenerator.kt:256 */```
          28  +
/// /* ClientEnumGenerator.kt:257 */The above code demonstrates that when `contributorinsightsaction` 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 `ContributorInsightsAction::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   
/// `ContributorInsightsAction::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 `ContributorInsightsAction::NewFeature` is defined.
   30     37   
/// Specifically, when `contributorinsightsaction` 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 `ContributorInsightsAction::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 ContributorInsightsAction {
   45         -
    #[allow(missing_docs)] // documentation missing in model
          54  +
pub /* EnumGenerator.kt:267 */ enum ContributorInsightsAction {
          55  +
    /* EnumGenerator.kt:154 */ #[allow(missing_docs)] // documentation missing in model
          56  +
    /* EnumGenerator.kt:143 */
   46     57   
    Disable,
   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   
    Enable,
   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 ContributorInsightsAction {
   54     69   
    fn from(s: &str) -> Self {
   55     70   
        match s {
   56     71   
            "DISABLE" => ContributorInsightsAction::Disable,
   57     72   
            "ENABLE" => ContributorInsightsAction::Enable,
   58     73   
            other => ContributorInsightsAction::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 ContributorInsightsAction {
   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(ContributorInsightsAction::from(s))
   67     83   
    }
   68     84   
}
          85  +
/* EnumGenerator.kt:274 */
   69     86   
impl ContributorInsightsAction {
   70     87   
    /// Returns the `&str` value of the enum member.
   71     88   
    pub fn as_str(&self) -> &str {
   72     89   
        match self {
   73     90   
            ContributorInsightsAction::Disable => "DISABLE",
   74     91   
            ContributorInsightsAction::Enable => "ENABLE",
   75     92   
            ContributorInsightsAction::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   
        &["DISABLE", "ENABLE"]
   81     98   
    }
   82     99   
}
         100  +
/* EnumGenerator.kt:223 */
   83    101   
impl ::std::convert::AsRef<str> for ContributorInsightsAction {
   84    102   
    fn as_ref(&self) -> &str {
   85    103   
        self.as_str()
   86    104   
    }
   87    105   
}
         106  +
/* ClientEnumGenerator.kt:117 */
   88    107   
impl ContributorInsightsAction {
   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 ContributorInsightsAction {
  101    121   
    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
  102    122   
        match self {
  103    123   
            ContributorInsightsAction::Disable => write!(f, "DISABLE"),
  104    124   
            ContributorInsightsAction::Enable => write!(f, "ENABLE"),
  105    125   
            ContributorInsightsAction::Unknown(value) => write!(f, "{}", value),
  106    126   
        }
  107    127   
    }
  108    128   
}

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

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

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

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

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

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

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

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

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

@@ -1,1 +133,214 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Represents a replica to be created.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Represents a replica to be created.</p>
           4  +
/* RustType.kt:516 */
    4      5   
#[non_exhaustive]
           6  +
/* RustType.kt:516 */
    5      7   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    6         -
pub struct CreateReplicationGroupMemberAction {
    7         -
    /// <p>The Region where the new replica will be created.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct CreateReplicationGroupMemberAction {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The Region where the new replica will be created.</p>
    8     10   
    pub region_name: ::std::string::String,
    9         -
    /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
          11  +
    /// /* StructureGenerator.kt:231 */<p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
   10     12   
    pub kms_master_key_id: ::std::option::Option<::std::string::String>,
   11         -
    /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
          13  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
   12     14   
    pub provisioned_throughput_override: ::std::option::Option<crate::types::ProvisionedThroughputOverride>,
   13         -
    /// <p>Replica-specific global secondary index settings.</p>
          15  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific global secondary index settings.</p>
   14     16   
    pub global_secondary_indexes: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaGlobalSecondaryIndex>>,
          17  +
    /* StructureGenerator.kt:201 */
   15     18   
}
          19  +
/* StructureGenerator.kt:135 */
   16     20   
impl CreateReplicationGroupMemberAction {
   17         -
    /// <p>The Region where the new replica will be created.</p>
          21  +
    /// /* StructureGenerator.kt:231 */<p>The Region where the new replica will be created.</p>
          22  +
    /* StructureGenerator.kt:166 */
   18     23   
    pub fn region_name(&self) -> &str {
          24  +
        /* StructureGenerator.kt:171 */
   19     25   
        use std::ops::Deref;
   20     26   
        self.region_name.deref()
          27  +
        /* StructureGenerator.kt:166 */
   21     28   
    }
   22         -
    /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
          29  +
    /// /* StructureGenerator.kt:231 */<p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
          30  +
    /* StructureGenerator.kt:166 */
   23     31   
    pub fn kms_master_key_id(&self) -> ::std::option::Option<&str> {
          32  +
        /* StructureGenerator.kt:169 */
   24     33   
        self.kms_master_key_id.as_deref()
          34  +
        /* StructureGenerator.kt:166 */
   25     35   
    }
   26         -
    /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
          36  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
          37  +
    /* StructureGenerator.kt:166 */
   27     38   
    pub fn provisioned_throughput_override(&self) -> ::std::option::Option<&crate::types::ProvisionedThroughputOverride> {
          39  +
        /* StructureGenerator.kt:170 */
   28     40   
        self.provisioned_throughput_override.as_ref()
          41  +
        /* StructureGenerator.kt:166 */
   29     42   
    }
   30         -
    /// <p>Replica-specific global secondary index settings.</p>
   31         -
    ///
   32         -
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.global_secondary_indexes.is_none()`.
          43  +
    /// /* StructureGenerator.kt:231 */<p>Replica-specific global secondary index settings.</p>
          44  +
    /// /* StructureGenerator.kt:162 */
          45  +
    /// /* 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 `.global_secondary_indexes.is_none()`.
          46  +
    /* StructureGenerator.kt:166 */
   33     47   
    pub fn global_secondary_indexes(&self) -> &[crate::types::ReplicaGlobalSecondaryIndex] {
   34         -
        self.global_secondary_indexes.as_deref().unwrap_or_default()
   35         -
    }
          48  +
        /* StructureGenerator.kt:169 */
          49  +
        self.global_secondary_indexes
          50  +
            .as_deref()
          51  +
            /* StructureGenerator.kt:175 */
          52  +
            .unwrap_or_default()
          53  +
        /* StructureGenerator.kt:166 */
          54  +
    }
          55  +
    /* StructureGenerator.kt:135 */
   36     56   
}
          57  +
/* ClientCodegenVisitor.kt:237 */
   37     58   
impl CreateReplicationGroupMemberAction {
   38         -
    /// Creates a new builder-style object to manufacture [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
          59  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
          60  +
    /* BuilderGenerator.kt:175 */
   39     61   
    pub fn builder() -> crate::types::builders::CreateReplicationGroupMemberActionBuilder {
          62  +
        /* BuilderGenerator.kt:176 */
   40     63   
        crate::types::builders::CreateReplicationGroupMemberActionBuilder::default()
          64  +
        /* BuilderGenerator.kt:175 */
   41     65   
    }
          66  +
    /* ClientCodegenVisitor.kt:237 */
   42     67   
}
   43     68   
   44         -
/// A builder for [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
          69  +
/// /* BuilderGenerator.kt:342 */A builder for [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
          70  +
/* RustType.kt:516 */
   45     71   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          72  +
/* RustType.kt:516 */
   46     73   
#[non_exhaustive]
          74  +
/* BuilderGenerator.kt:345 */
   47     75   
pub struct CreateReplicationGroupMemberActionBuilder {
   48         -
    pub(crate) region_name: ::std::option::Option<::std::string::String>,
   49         -
    pub(crate) kms_master_key_id: ::std::option::Option<::std::string::String>,
          76  +
    /* BuilderGenerator.kt:275 */ pub(crate) region_name: ::std::option::Option<::std::string::String>,
          77  +
    /* BuilderGenerator.kt:275 */ pub(crate) kms_master_key_id: ::std::option::Option<::std::string::String>,
          78  +
    /* BuilderGenerator.kt:275 */
   50     79   
    pub(crate) provisioned_throughput_override: ::std::option::Option<crate::types::ProvisionedThroughputOverride>,
          80  +
    /* BuilderGenerator.kt:275 */
   51     81   
    pub(crate) global_secondary_indexes: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaGlobalSecondaryIndex>>,
          82  +
    /* BuilderGenerator.kt:345 */
   52     83   
}
          84  +
/* BuilderGenerator.kt:355 */
   53     85   
impl CreateReplicationGroupMemberActionBuilder {
   54         -
    /// <p>The Region where the new replica will be created.</p>
   55         -
    /// This field is required.
          86  +
    /// /* BuilderGenerator.kt:286 */<p>The Region where the new replica will be created.</p>
          87  +
    /// /* BuilderGenerator.kt:288 */This field is required.
          88  +
    /* BuilderGenerator.kt:291 */
   56     89   
    pub fn region_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          90  +
        /* BuilderGenerator.kt:292 */
   57     91   
        self.region_name = ::std::option::Option::Some(input.into());
          92  +
        /* BuilderGenerator.kt:293 */
   58     93   
        self
          94  +
        /* BuilderGenerator.kt:291 */
   59     95   
    }
   60         -
    /// <p>The Region where the new replica will be created.</p>
          96  +
    /// /* BuilderGenerator.kt:312 */<p>The Region where the new replica will be created.</p>
          97  +
    /* BuilderGenerator.kt:314 */
   61     98   
    pub fn set_region_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:315 */
   62    100   
        self.region_name = input;
   63    101   
        self
         102  +
        /* BuilderGenerator.kt:314 */
   64    103   
    }
   65         -
    /// <p>The Region where the new replica will be created.</p>
         104  +
    /// /* BuilderGenerator.kt:334 */<p>The Region where the new replica will be created.</p>
         105  +
    /* BuilderGenerator.kt:336 */
   66    106   
    pub fn get_region_name(&self) -> &::std::option::Option<::std::string::String> {
         107  +
        /* BuilderGenerator.kt:337 */
   67    108   
        &self.region_name
         109  +
        /* BuilderGenerator.kt:336 */
   68    110   
    }
   69         -
    /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         111  +
    /// /* BuilderGenerator.kt:286 */<p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         112  +
    /* BuilderGenerator.kt:291 */
   70    113   
    pub fn kms_master_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         114  +
        /* BuilderGenerator.kt:292 */
   71    115   
        self.kms_master_key_id = ::std::option::Option::Some(input.into());
         116  +
        /* BuilderGenerator.kt:293 */
   72    117   
        self
         118  +
        /* BuilderGenerator.kt:291 */
   73    119   
    }
   74         -
    /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         120  +
    /// /* BuilderGenerator.kt:312 */<p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         121  +
    /* BuilderGenerator.kt:314 */
   75    122   
    pub fn set_kms_master_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         123  +
        /* BuilderGenerator.kt:315 */
   76    124   
        self.kms_master_key_id = input;
   77    125   
        self
         126  +
        /* BuilderGenerator.kt:314 */
   78    127   
    }
   79         -
    /// <p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         128  +
    /// /* BuilderGenerator.kt:334 */<p>The AWS KMS customer master key (CMK) that should be used for AWS KMS encryption in the new replica. To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB KMS master key alias/aws/dynamodb.</p>
         129  +
    /* BuilderGenerator.kt:336 */
   80    130   
    pub fn get_kms_master_key_id(&self) -> &::std::option::Option<::std::string::String> {
         131  +
        /* BuilderGenerator.kt:337 */
   81    132   
        &self.kms_master_key_id
         133  +
        /* BuilderGenerator.kt:336 */
   82    134   
    }
   83         -
    /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         135  +
    /// /* BuilderGenerator.kt:286 */<p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         136  +
    /* BuilderGenerator.kt:291 */
   84    137   
    pub fn provisioned_throughput_override(mut self, input: crate::types::ProvisionedThroughputOverride) -> Self {
         138  +
        /* BuilderGenerator.kt:292 */
   85    139   
        self.provisioned_throughput_override = ::std::option::Option::Some(input);
         140  +
        /* BuilderGenerator.kt:293 */
   86    141   
        self
         142  +
        /* BuilderGenerator.kt:291 */
   87    143   
    }
   88         -
    /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         144  +
    /// /* BuilderGenerator.kt:312 */<p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         145  +
    /* BuilderGenerator.kt:314 */
   89    146   
    pub fn set_provisioned_throughput_override(mut self, input: ::std::option::Option<crate::types::ProvisionedThroughputOverride>) -> Self {
         147  +
        /* BuilderGenerator.kt:315 */
   90    148   
        self.provisioned_throughput_override = input;
   91    149   
        self
         150  +
        /* BuilderGenerator.kt:314 */
   92    151   
    }
   93         -
    /// <p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         152  +
    /// /* BuilderGenerator.kt:334 */<p>Replica-specific provisioned throughput. If not specified, uses the source table's provisioned throughput settings.</p>
         153  +
    /* BuilderGenerator.kt:336 */
   94    154   
    pub fn get_provisioned_throughput_override(&self) -> &::std::option::Option<crate::types::ProvisionedThroughputOverride> {
         155  +
        /* BuilderGenerator.kt:337 */
   95    156   
        &self.provisioned_throughput_override
         157  +
        /* BuilderGenerator.kt:336 */
   96    158   
    }
   97         -
    /// Appends an item to `global_secondary_indexes`.
         159  +
    /// /* BuilderGenerator.kt:410 */Appends an item to `global_secondary_indexes`.
         160  +
    /* BuilderGenerator.kt:411 */
   98    161   
    ///
   99         -
    /// To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
         162  +
    /// /* BuilderGenerator.kt:412 */To override the contents of this collection use [`set_global_secondary_indexes`](Self::set_global_secondary_indexes).
         163  +
    /* BuilderGenerator.kt:413 */
  100    164   
    ///
  101         -
    /// <p>Replica-specific global secondary index settings.</p>
         165  +
    /// /* BuilderGenerator.kt:414 */<p>Replica-specific global secondary index settings.</p>
         166  +
    /* BuilderGenerator.kt:418 */
  102    167   
    pub fn global_secondary_indexes(mut self, input: crate::types::ReplicaGlobalSecondaryIndex) -> Self {
         168  +
        /* BuilderGenerator.kt:419 */
  103    169   
        let mut v = self.global_secondary_indexes.unwrap_or_default();
  104    170   
        v.push(input);
  105    171   
        self.global_secondary_indexes = ::std::option::Option::Some(v);
  106    172   
        self
         173  +
        /* BuilderGenerator.kt:418 */
  107    174   
    }
  108         -
    /// <p>Replica-specific global secondary index settings.</p>
         175  +
    /// /* BuilderGenerator.kt:312 */<p>Replica-specific global secondary index settings.</p>
         176  +
    /* BuilderGenerator.kt:314 */
  109    177   
    pub fn set_global_secondary_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ReplicaGlobalSecondaryIndex>>) -> Self {
         178  +
        /* BuilderGenerator.kt:315 */
  110    179   
        self.global_secondary_indexes = input;
  111    180   
        self
         181  +
        /* BuilderGenerator.kt:314 */
  112    182   
    }
  113         -
    /// <p>Replica-specific global secondary index settings.</p>
         183  +
    /// /* BuilderGenerator.kt:334 */<p>Replica-specific global secondary index settings.</p>
         184  +
    /* BuilderGenerator.kt:336 */
  114    185   
    pub fn get_global_secondary_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ReplicaGlobalSecondaryIndex>> {
         186  +
        /* BuilderGenerator.kt:337 */
  115    187   
        &self.global_secondary_indexes
         188  +
        /* BuilderGenerator.kt:336 */
  116    189   
    }
  117         -
    /// Consumes the builder and constructs a [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
  118         -
    /// This method will fail if any of the following fields are not set:
  119         -
    /// - [`region_name`](crate::types::builders::CreateReplicationGroupMemberActionBuilder::region_name)
         190  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`CreateReplicationGroupMemberAction`](crate::types::CreateReplicationGroupMemberAction).
         191  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         192  +
    /// /* BuilderGenerator.kt:246 */- [`region_name`](crate::types::builders::CreateReplicationGroupMemberActionBuilder::region_name)
         193  +
    /* BuilderGenerator.kt:253 */
  120    194   
    pub fn build(self) -> ::std::result::Result<crate::types::CreateReplicationGroupMemberAction, ::aws_smithy_types::error::operation::BuildError> {
  121         -
        ::std::result::Result::Ok(crate::types::CreateReplicationGroupMemberAction {
  122         -
            region_name: self.region_name.ok_or_else(|| {
  123         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  124         -
                    "region_name",
  125         -
                    "region_name was not specified but it is required when building CreateReplicationGroupMemberAction",
  126         -
                )
  127         -
            })?,
  128         -
            kms_master_key_id: self.kms_master_key_id,
  129         -
            provisioned_throughput_override: self.provisioned_throughput_override,
  130         -
            global_secondary_indexes: self.global_secondary_indexes,
  131         -
        })
  132         -
    }
         195  +
        /* BuilderGenerator.kt:254 */
         196  +
        ::std::result::Result::Ok(
         197  +
            /* BuilderGenerator.kt:477 */crate::types::CreateReplicationGroupMemberAction {
         198  +
                /* BuilderGenerator.kt:481 */region_name: self.region_name
         199  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         200  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("region_name", "region_name was not specified but it is required when building CreateReplicationGroupMemberAction")
         201  +
                    /* BuilderGenerator.kt:494 */)?
         202  +
                ,
         203  +
                /* BuilderGenerator.kt:481 */kms_master_key_id: self.kms_master_key_id
         204  +
                ,
         205  +
                /* BuilderGenerator.kt:481 */provisioned_throughput_override: self.provisioned_throughput_override
         206  +
                ,
         207  +
                /* BuilderGenerator.kt:481 */global_secondary_indexes: self.global_secondary_indexes
         208  +
                ,
         209  +
            /* BuilderGenerator.kt:477 */}
         210  +
        /* BuilderGenerator.kt:254 */)
         211  +
        /* BuilderGenerator.kt:253 */
         212  +
    }
         213  +
    /* BuilderGenerator.kt:355 */
  133    214   
}

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

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

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

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