Client Test

Client Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/_validation_exception_reason.rs

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

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/builders.rs

@@ -1,1 +6,9 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::_tag::TagBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::_block::BlockBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::_changed_block::ChangedBlockBuilder;

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error.rs

@@ -1,1 +35,51 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::error::_validation_exception::ValidationError;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededError;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundError;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::error::_request_throttled_exception::RequestThrottledError;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::error::_internal_server_exception::InternalServerError;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::error::_conflict_exception::ConflictError;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::error::_concurrent_limit_exceeded_exception::ConcurrentLimitExceededError;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::error::_access_denied_exception::AccessDeniedError;
   17     25   
          26  +
/* RustModule.kt:172 */
   18     27   
mod _access_denied_exception;
   19     28   
          29  +
/* RustModule.kt:172 */
   20     30   
mod _concurrent_limit_exceeded_exception;
   21     31   
          32  +
/* RustModule.kt:172 */
   22     33   
mod _conflict_exception;
   23     34   
          35  +
/* RustModule.kt:172 */
   24     36   
mod _internal_server_exception;
   25     37   
          38  +
/* RustModule.kt:172 */
   26     39   
mod _request_throttled_exception;
   27     40   
          41  +
/* RustModule.kt:172 */
   28     42   
mod _resource_not_found_exception;
   29     43   
          44  +
/* RustModule.kt:172 */
   30     45   
mod _service_quota_exceeded_exception;
   31     46   
          47  +
/* RustModule.kt:172 */
   32     48   
mod _validation_exception;
   33     49   
   34         -
/// Builders
          50  +
/// /* CodegenDelegator.kt:51 */Builders
   35     51   
pub mod builders;

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_access_denied_exception.rs

@@ -1,1 +113,180 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>You do not have sufficient access to perform this action.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>You do not have sufficient access to perform this action.</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 AccessDeniedError {
           8  +
pub /* StructureGenerator.kt:201 */ struct AccessDeniedError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The reason for the exception.</p>
          12  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
   10     13   
    pub reason: crate::types::AccessDeniedExceptionReason,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl AccessDeniedError {
   14         -
    /// <p>The reason for the exception.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn reason(&self) -> &crate::types::AccessDeniedExceptionReason {
          22  +
        /* StructureGenerator.kt:172 */
   16     23   
        &self.reason
          24  +
        /* StructureGenerator.kt:166 */
   17     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   18     27   
}
          28  +
/* ErrorImplGenerator.kt:99 */
   19     29   
impl AccessDeniedError {
          30  +
    /* ErrorImplGenerator.kt:128 */
   20     31   
    /// Returns the error message.
   21     32   
    pub fn message(&self) -> ::std::option::Option<&str> {
   22     33   
        self.message.as_deref()
   23     34   
    }
          35  +
    /* ErrorImplGenerator.kt:99 */
   24     36   
}
          37  +
/* ErrorImplGenerator.kt:153 */
   25     38   
impl ::std::fmt::Display for AccessDeniedError {
          39  +
    /* ErrorImplGenerator.kt:154 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ErrorImplGenerator.kt:161 */
   27     42   
        ::std::write!(f, "AccessDeniedError [AccessDeniedException]")?;
          43  +
        /* ErrorImplGenerator.kt:166 */
   28     44   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          45  +
            /* ErrorImplGenerator.kt:166 */
   29     46   
            {
          47  +
                /* ErrorImplGenerator.kt:167 */
   30     48   
                ::std::write!(f, ": {}", inner_1)?;
          49  +
                /* ErrorImplGenerator.kt:166 */
   31     50   
            }
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for AccessDeniedError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for AccessDeniedError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl AccessDeniedError {
   43         -
    /// Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::types::error::AccessDeniedError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`AccessDeniedError`](crate::types::error::AccessDeniedError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::AccessDeniedErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::AccessDeniedErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`AccessDeniedError`](crate::types::error::AccessDeniedError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`AccessDeniedError`](crate::types::error::AccessDeniedError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct AccessDeniedErrorBuilder {
   53         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) reason: ::std::option::Option<crate::types::AccessDeniedExceptionReason>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::AccessDeniedExceptionReason>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl AccessDeniedErrorBuilder {
          95  +
    /* BuilderGenerator.kt:286 */
   58     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:291 */
   59     98   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:292 */
   60    100   
        self.message = ::std::option::Option::Some(input.into());
         101  +
        /* BuilderGenerator.kt:293 */
   61    102   
        self
         103  +
        /* BuilderGenerator.kt:291 */
   62    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   63    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   64    108   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   65    110   
        self.message = input;
   66    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   67    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   68    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   69    117   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         118  +
        /* BuilderGenerator.kt:337 */
   70    119   
        &self.message
         120  +
        /* BuilderGenerator.kt:336 */
   71    121   
    }
   72         -
    /// <p>The reason for the exception.</p>
   73         -
    /// This field is required.
         122  +
    /// /* BuilderGenerator.kt:286 */<p>The reason for the exception.</p>
         123  +
    /// /* BuilderGenerator.kt:288 */This field is required.
         124  +
    /* BuilderGenerator.kt:291 */
   74    125   
    pub fn reason(mut self, input: crate::types::AccessDeniedExceptionReason) -> Self {
         126  +
        /* BuilderGenerator.kt:292 */
   75    127   
        self.reason = ::std::option::Option::Some(input);
         128  +
        /* BuilderGenerator.kt:293 */
   76    129   
        self
         130  +
        /* BuilderGenerator.kt:291 */
   77    131   
    }
   78         -
    /// <p>The reason for the exception.</p>
         132  +
    /// /* BuilderGenerator.kt:312 */<p>The reason for the exception.</p>
         133  +
    /* BuilderGenerator.kt:314 */
   79    134   
    pub fn set_reason(mut self, input: ::std::option::Option<crate::types::AccessDeniedExceptionReason>) -> Self {
         135  +
        /* BuilderGenerator.kt:315 */
   80    136   
        self.reason = input;
   81    137   
        self
         138  +
        /* BuilderGenerator.kt:314 */
   82    139   
    }
   83         -
    /// <p>The reason for the exception.</p>
         140  +
    /// /* BuilderGenerator.kt:334 */<p>The reason for the exception.</p>
         141  +
    /* BuilderGenerator.kt:336 */
   84    142   
    pub fn get_reason(&self) -> &::std::option::Option<crate::types::AccessDeniedExceptionReason> {
         143  +
        /* BuilderGenerator.kt:337 */
   85    144   
        &self.reason
         145  +
        /* BuilderGenerator.kt:336 */
   86    146   
    }
         147  +
    /* ErrorGenerator.kt:101 */
   87    148   
    /// Sets error metadata
   88    149   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   89    150   
        self.meta = Some(meta);
   90    151   
        self
   91    152   
    }
   92    153   
   93    154   
    /// Sets error metadata
   94    155   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   95    156   
        self.meta = meta;
   96    157   
        self
   97    158   
    }
   98         -
    /// Consumes the builder and constructs a [`AccessDeniedError`](crate::types::error::AccessDeniedError).
   99         -
    /// This method will fail if any of the following fields are not set:
  100         -
    /// - [`reason`](crate::types::error::builders::AccessDeniedErrorBuilder::reason)
         159  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`AccessDeniedError`](crate::types::error::AccessDeniedError).
         160  +
    /// /* BuilderGenerator.kt:243 */This method will fail if any of the following fields are not set:
         161  +
    /// /* BuilderGenerator.kt:246 */- [`reason`](crate::types::error::builders::AccessDeniedErrorBuilder::reason)
         162  +
    /* BuilderGenerator.kt:253 */
  101    163   
    pub fn build(self) -> ::std::result::Result<crate::types::error::AccessDeniedError, ::aws_smithy_types::error::operation::BuildError> {
  102         -
        ::std::result::Result::Ok(crate::types::error::AccessDeniedError {
  103         -
            message: self.message,
  104         -
            reason: self.reason.ok_or_else(|| {
  105         -
                ::aws_smithy_types::error::operation::BuildError::missing_field(
  106         -
                    "reason",
  107         -
                    "reason was not specified but it is required when building AccessDeniedError",
  108         -
                )
  109         -
            })?,
  110         -
            meta: self.meta.unwrap_or_default(),
  111         -
        })
         164  +
        /* BuilderGenerator.kt:254 */
         165  +
        ::std::result::Result::Ok(
         166  +
            /* BuilderGenerator.kt:477 */crate::types::error::AccessDeniedError {
         167  +
                /* BuilderGenerator.kt:481 */message: self.message
         168  +
                ,
         169  +
                /* BuilderGenerator.kt:481 */reason: self.reason
         170  +
                    /* BuilderGenerator.kt:494 */.ok_or_else(||
         171  +
                        /* BuilderGenerator.kt:117 */::aws_smithy_types::error::operation::BuildError::missing_field("reason", "reason was not specified but it is required when building AccessDeniedError")
         172  +
                    /* BuilderGenerator.kt:494 */)?
         173  +
                ,
         174  +
                /* ErrorGenerator.kt:120 */meta: self.meta.unwrap_or_default(),
         175  +
            /* BuilderGenerator.kt:477 */}
         176  +
        /* BuilderGenerator.kt:254 */)
         177  +
        /* BuilderGenerator.kt:253 */
  112    178   
    }
         179  +
    /* BuilderGenerator.kt:355 */
  113    180   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_concurrent_limit_exceeded_exception.rs

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>You have reached the limit for concurrent API requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance">Optimizing performance of the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>You have reached the limit for concurrent API requests. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html#ebsapi-performance">Optimizing performance of the EBS direct APIs</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</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 ConcurrentLimitExceededError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ConcurrentLimitExceededError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl ConcurrentLimitExceededError {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for ConcurrentLimitExceededError {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "ConcurrentLimitExceededError [ConcurrentLimitExceededException]")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for ConcurrentLimitExceededError {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConcurrentLimitExceededError {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl ConcurrentLimitExceededError {
   35         -
    /// Creates a new builder-style object to manufacture [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::ConcurrentLimitExceededErrorBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::ConcurrentLimitExceededErrorBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct ConcurrentLimitExceededErrorBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl ConcurrentLimitExceededErrorBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConcurrentLimitExceededError`](crate::types::error::ConcurrentLimitExceededError).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::ConcurrentLimitExceededError {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::ConcurrentLimitExceededError {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_conflict_exception.rs

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The request uses the same client token as a previous, but non-identical request.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The request uses the same client token as a previous, but non-identical request.</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 ConflictError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ConflictError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl ConflictError {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for ConflictError {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "ConflictError [ConflictException]")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for ConflictError {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ConflictError {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl ConflictError {
   35         -
    /// Creates a new builder-style object to manufacture [`ConflictError`](crate::types::error::ConflictError).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ConflictError`](crate::types::error::ConflictError).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::ConflictErrorBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::ConflictErrorBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`ConflictError`](crate::types::error::ConflictError).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`ConflictError`](crate::types::error::ConflictError).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct ConflictErrorBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl ConflictErrorBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`ConflictError`](crate::types::error::ConflictError).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ConflictError`](crate::types::error::ConflictError).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::ConflictError {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::ConflictError {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_internal_server_exception.rs

@@ -1,1 +81,133 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>An internal error has occurred.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>An internal error has occurred.</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 InternalServerError {
           8  +
pub /* StructureGenerator.kt:201 */ struct InternalServerError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          12  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          13  +
    /* StructureGenerator.kt:201 */
   10     14   
}
          15  +
/* ErrorImplGenerator.kt:99 */
   11     16   
impl InternalServerError {
          17  +
    /* ErrorImplGenerator.kt:128 */
   12     18   
    /// Returns the error message.
   13     19   
    pub fn message(&self) -> ::std::option::Option<&str> {
   14     20   
        self.message.as_deref()
   15     21   
    }
          22  +
    /* ErrorImplGenerator.kt:99 */
   16     23   
}
          24  +
/* ErrorImplGenerator.kt:153 */
   17     25   
impl ::std::fmt::Display for InternalServerError {
          26  +
    /* ErrorImplGenerator.kt:154 */
   18     27   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          28  +
        /* ErrorImplGenerator.kt:161 */
   19     29   
        ::std::write!(f, "InternalServerError [InternalServerException]")?;
          30  +
        /* ErrorImplGenerator.kt:166 */
   20     31   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          32  +
            /* ErrorImplGenerator.kt:166 */
   21     33   
            {
          34  +
                /* ErrorImplGenerator.kt:167 */
   22     35   
                ::std::write!(f, ": {}", inner_1)?;
          36  +
                /* ErrorImplGenerator.kt:166 */
   23     37   
            }
          38  +
            /* ErrorImplGenerator.kt:166 */
   24     39   
        }
          40  +
        /* ErrorImplGenerator.kt:171 */
   25     41   
        Ok(())
          42  +
        /* ErrorImplGenerator.kt:154 */
   26     43   
    }
          44  +
    /* ErrorImplGenerator.kt:153 */
   27     45   
}
          46  +
/* ErrorImplGenerator.kt:175 */
   28     47   
impl ::std::error::Error for InternalServerError {}
          48  +
/* ErrorGenerator.kt:77 */
   29     49   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InternalServerError {
          50  +
    /* ErrorGenerator.kt:78 */
   30     51   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   31     52   
        &self.meta
   32     53   
    }
          54  +
    /* ErrorGenerator.kt:77 */
   33     55   
}
          56  +
/* ErrorGenerator.kt:81 */
   34     57   
impl InternalServerError {
   35         -
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::types::error::InternalServerError).
          58  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`InternalServerError`](crate::types::error::InternalServerError).
          59  +
    /* BuilderGenerator.kt:175 */
   36     60   
    pub fn builder() -> crate::types::error::builders::InternalServerErrorBuilder {
          61  +
        /* BuilderGenerator.kt:176 */
   37     62   
        crate::types::error::builders::InternalServerErrorBuilder::default()
          63  +
        /* BuilderGenerator.kt:175 */
   38     64   
    }
          65  +
    /* ErrorGenerator.kt:81 */
   39     66   
}
   40     67   
   41         -
/// A builder for [`InternalServerError`](crate::types::error::InternalServerError).
          68  +
/// /* BuilderGenerator.kt:342 */A builder for [`InternalServerError`](crate::types::error::InternalServerError).
          69  +
/* RustType.kt:516 */
   42     70   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          71  +
/* RustType.kt:516 */
   43     72   
#[non_exhaustive]
          73  +
/* BuilderGenerator.kt:345 */
   44     74   
pub struct InternalServerErrorBuilder {
   45         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   46         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          75  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          76  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          77  +
    /* BuilderGenerator.kt:345 */
   47     78   
}
          79  +
/* BuilderGenerator.kt:355 */
   48     80   
impl InternalServerErrorBuilder {
          81  +
    /* BuilderGenerator.kt:286 */
   49     82   
    #[allow(missing_docs)] // documentation missing in model
          83  +
                           /* BuilderGenerator.kt:291 */
   50     84   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          85  +
        /* BuilderGenerator.kt:292 */
   51     86   
        self.message = ::std::option::Option::Some(input.into());
          87  +
        /* BuilderGenerator.kt:293 */
   52     88   
        self
          89  +
        /* BuilderGenerator.kt:291 */
   53     90   
    }
          91  +
    /* BuilderGenerator.kt:312 */
   54     92   
    #[allow(missing_docs)] // documentation missing in model
          93  +
                           /* BuilderGenerator.kt:314 */
   55     94   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
          95  +
        /* BuilderGenerator.kt:315 */
   56     96   
        self.message = input;
   57     97   
        self
          98  +
        /* BuilderGenerator.kt:314 */
   58     99   
    }
         100  +
    /* BuilderGenerator.kt:334 */
   59    101   
    #[allow(missing_docs)] // documentation missing in model
         102  +
                           /* BuilderGenerator.kt:336 */
   60    103   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         104  +
        /* BuilderGenerator.kt:337 */
   61    105   
        &self.message
         106  +
        /* BuilderGenerator.kt:336 */
   62    107   
    }
         108  +
    /* ErrorGenerator.kt:101 */
   63    109   
    /// Sets error metadata
   64    110   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   65    111   
        self.meta = Some(meta);
   66    112   
        self
   67    113   
    }
   68    114   
   69    115   
    /// Sets error metadata
   70    116   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   71    117   
        self.meta = meta;
   72    118   
        self
   73    119   
    }
   74         -
    /// Consumes the builder and constructs a [`InternalServerError`](crate::types::error::InternalServerError).
         120  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`InternalServerError`](crate::types::error::InternalServerError).
         121  +
    /* BuilderGenerator.kt:253 */
   75    122   
    pub fn build(self) -> crate::types::error::InternalServerError {
         123  +
        /* BuilderGenerator.kt:477 */
   76    124   
        crate::types::error::InternalServerError {
   77         -
            message: self.message,
         125  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         126  +
            /* ErrorGenerator.kt:120 */
   78    127   
            meta: self.meta.unwrap_or_default(),
         128  +
            /* BuilderGenerator.kt:477 */
   79    129   
        }
         130  +
        /* BuilderGenerator.kt:253 */
   80    131   
    }
         132  +
    /* BuilderGenerator.kt:355 */
   81    133   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_request_throttled_exception.rs

@@ -1,1 +105,173 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The number of API requests has exceed the maximum allowed API request throttling limit.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The number of API requests has exceed the maximum allowed API request throttling limit.</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 RequestThrottledError {
           8  +
pub /* StructureGenerator.kt:201 */ struct RequestThrottledError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The reason for the exception.</p>
          12  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
   10     13   
    pub reason: ::std::option::Option<crate::types::RequestThrottledExceptionReason>,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl RequestThrottledError {
   14         -
    /// <p>The reason for the exception.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn reason(&self) -> ::std::option::Option<&crate::types::RequestThrottledExceptionReason> {
          22  +
        /* StructureGenerator.kt:170 */
   16     23   
        self.reason.as_ref()
          24  +
        /* StructureGenerator.kt:166 */
   17     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   18     27   
}
          28  +
/* ErrorImplGenerator.kt:99 */
   19     29   
impl RequestThrottledError {
          30  +
    /* ErrorImplGenerator.kt:128 */
   20     31   
    /// Returns the error message.
   21     32   
    pub fn message(&self) -> ::std::option::Option<&str> {
   22     33   
        self.message.as_deref()
   23     34   
    }
          35  +
    /* ErrorImplGenerator.kt:99 */
   24     36   
}
          37  +
/* ErrorImplGenerator.kt:153 */
   25     38   
impl ::std::fmt::Display for RequestThrottledError {
          39  +
    /* ErrorImplGenerator.kt:154 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ErrorImplGenerator.kt:161 */
   27     42   
        ::std::write!(f, "RequestThrottledError [RequestThrottledException]")?;
          43  +
        /* ErrorImplGenerator.kt:166 */
   28     44   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          45  +
            /* ErrorImplGenerator.kt:166 */
   29     46   
            {
          47  +
                /* ErrorImplGenerator.kt:167 */
   30     48   
                ::std::write!(f, ": {}", inner_1)?;
          49  +
                /* ErrorImplGenerator.kt:166 */
   31     50   
            }
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for RequestThrottledError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RequestThrottledError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl RequestThrottledError {
   43         -
    /// Creates a new builder-style object to manufacture [`RequestThrottledError`](crate::types::error::RequestThrottledError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`RequestThrottledError`](crate::types::error::RequestThrottledError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::RequestThrottledErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::RequestThrottledErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`RequestThrottledError`](crate::types::error::RequestThrottledError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`RequestThrottledError`](crate::types::error::RequestThrottledError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct RequestThrottledErrorBuilder {
   53         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) reason: ::std::option::Option<crate::types::RequestThrottledExceptionReason>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::RequestThrottledExceptionReason>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl RequestThrottledErrorBuilder {
          95  +
    /* BuilderGenerator.kt:286 */
   58     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:291 */
   59     98   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:292 */
   60    100   
        self.message = ::std::option::Option::Some(input.into());
         101  +
        /* BuilderGenerator.kt:293 */
   61    102   
        self
         103  +
        /* BuilderGenerator.kt:291 */
   62    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   63    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   64    108   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   65    110   
        self.message = input;
   66    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   67    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   68    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   69    117   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         118  +
        /* BuilderGenerator.kt:337 */
   70    119   
        &self.message
         120  +
        /* BuilderGenerator.kt:336 */
   71    121   
    }
   72         -
    /// <p>The reason for the exception.</p>
         122  +
    /// /* BuilderGenerator.kt:286 */<p>The reason for the exception.</p>
         123  +
    /* BuilderGenerator.kt:291 */
   73    124   
    pub fn reason(mut self, input: crate::types::RequestThrottledExceptionReason) -> Self {
         125  +
        /* BuilderGenerator.kt:292 */
   74    126   
        self.reason = ::std::option::Option::Some(input);
         127  +
        /* BuilderGenerator.kt:293 */
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:291 */
   76    130   
    }
   77         -
    /// <p>The reason for the exception.</p>
         131  +
    /// /* BuilderGenerator.kt:312 */<p>The reason for the exception.</p>
         132  +
    /* BuilderGenerator.kt:314 */
   78    133   
    pub fn set_reason(mut self, input: ::std::option::Option<crate::types::RequestThrottledExceptionReason>) -> Self {
         134  +
        /* BuilderGenerator.kt:315 */
   79    135   
        self.reason = input;
   80    136   
        self
         137  +
        /* BuilderGenerator.kt:314 */
   81    138   
    }
   82         -
    /// <p>The reason for the exception.</p>
         139  +
    /// /* BuilderGenerator.kt:334 */<p>The reason for the exception.</p>
         140  +
    /* BuilderGenerator.kt:336 */
   83    141   
    pub fn get_reason(&self) -> &::std::option::Option<crate::types::RequestThrottledExceptionReason> {
         142  +
        /* BuilderGenerator.kt:337 */
   84    143   
        &self.reason
         144  +
        /* BuilderGenerator.kt:336 */
   85    145   
    }
         146  +
    /* ErrorGenerator.kt:101 */
   86    147   
    /// Sets error metadata
   87    148   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   88    149   
        self.meta = Some(meta);
   89    150   
        self
   90    151   
    }
   91    152   
   92    153   
    /// Sets error metadata
   93    154   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   94    155   
        self.meta = meta;
   95    156   
        self
   96    157   
    }
   97         -
    /// Consumes the builder and constructs a [`RequestThrottledError`](crate::types::error::RequestThrottledError).
         158  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`RequestThrottledError`](crate::types::error::RequestThrottledError).
         159  +
    /* BuilderGenerator.kt:253 */
   98    160   
    pub fn build(self) -> crate::types::error::RequestThrottledError {
         161  +
        /* BuilderGenerator.kt:477 */
   99    162   
        crate::types::error::RequestThrottledError {
  100         -
            message: self.message,
         163  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         164  +
            /* BuilderGenerator.kt:481 */
  101    165   
            reason: self.reason,
         166  +
            /* ErrorGenerator.kt:120 */
  102    167   
            meta: self.meta.unwrap_or_default(),
         168  +
            /* BuilderGenerator.kt:477 */
  103    169   
        }
         170  +
        /* BuilderGenerator.kt:253 */
  104    171   
    }
         172  +
    /* BuilderGenerator.kt:355 */
  105    173   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_resource_not_found_exception.rs

@@ -1,1 +105,173 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The specified resource does not exist.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The specified resource does not exist.</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 ResourceNotFoundError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ResourceNotFoundError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The reason for the exception.</p>
          12  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
   10     13   
    pub reason: ::std::option::Option<crate::types::ResourceNotFoundExceptionReason>,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl ResourceNotFoundError {
   14         -
    /// <p>The reason for the exception.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn reason(&self) -> ::std::option::Option<&crate::types::ResourceNotFoundExceptionReason> {
          22  +
        /* StructureGenerator.kt:170 */
   16     23   
        self.reason.as_ref()
          24  +
        /* StructureGenerator.kt:166 */
   17     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   18     27   
}
          28  +
/* ErrorImplGenerator.kt:99 */
   19     29   
impl ResourceNotFoundError {
          30  +
    /* ErrorImplGenerator.kt:128 */
   20     31   
    /// Returns the error message.
   21     32   
    pub fn message(&self) -> ::std::option::Option<&str> {
   22     33   
        self.message.as_deref()
   23     34   
    }
          35  +
    /* ErrorImplGenerator.kt:99 */
   24     36   
}
          37  +
/* ErrorImplGenerator.kt:153 */
   25     38   
impl ::std::fmt::Display for ResourceNotFoundError {
          39  +
    /* ErrorImplGenerator.kt:154 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ErrorImplGenerator.kt:161 */
   27     42   
        ::std::write!(f, "ResourceNotFoundError [ResourceNotFoundException]")?;
          43  +
        /* ErrorImplGenerator.kt:166 */
   28     44   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          45  +
            /* ErrorImplGenerator.kt:166 */
   29     46   
            {
          47  +
                /* ErrorImplGenerator.kt:167 */
   30     48   
                ::std::write!(f, ": {}", inner_1)?;
          49  +
                /* ErrorImplGenerator.kt:166 */
   31     50   
            }
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for ResourceNotFoundError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResourceNotFoundError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl ResourceNotFoundError {
   43         -
    /// Creates a new builder-style object to manufacture [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::ResourceNotFoundErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::ResourceNotFoundErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct ResourceNotFoundErrorBuilder {
   53         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) reason: ::std::option::Option<crate::types::ResourceNotFoundExceptionReason>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::ResourceNotFoundExceptionReason>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl ResourceNotFoundErrorBuilder {
          95  +
    /* BuilderGenerator.kt:286 */
   58     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:291 */
   59     98   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:292 */
   60    100   
        self.message = ::std::option::Option::Some(input.into());
         101  +
        /* BuilderGenerator.kt:293 */
   61    102   
        self
         103  +
        /* BuilderGenerator.kt:291 */
   62    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   63    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   64    108   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   65    110   
        self.message = input;
   66    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   67    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   68    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   69    117   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         118  +
        /* BuilderGenerator.kt:337 */
   70    119   
        &self.message
         120  +
        /* BuilderGenerator.kt:336 */
   71    121   
    }
   72         -
    /// <p>The reason for the exception.</p>
         122  +
    /// /* BuilderGenerator.kt:286 */<p>The reason for the exception.</p>
         123  +
    /* BuilderGenerator.kt:291 */
   73    124   
    pub fn reason(mut self, input: crate::types::ResourceNotFoundExceptionReason) -> Self {
         125  +
        /* BuilderGenerator.kt:292 */
   74    126   
        self.reason = ::std::option::Option::Some(input);
         127  +
        /* BuilderGenerator.kt:293 */
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:291 */
   76    130   
    }
   77         -
    /// <p>The reason for the exception.</p>
         131  +
    /// /* BuilderGenerator.kt:312 */<p>The reason for the exception.</p>
         132  +
    /* BuilderGenerator.kt:314 */
   78    133   
    pub fn set_reason(mut self, input: ::std::option::Option<crate::types::ResourceNotFoundExceptionReason>) -> Self {
         134  +
        /* BuilderGenerator.kt:315 */
   79    135   
        self.reason = input;
   80    136   
        self
         137  +
        /* BuilderGenerator.kt:314 */
   81    138   
    }
   82         -
    /// <p>The reason for the exception.</p>
         139  +
    /// /* BuilderGenerator.kt:334 */<p>The reason for the exception.</p>
         140  +
    /* BuilderGenerator.kt:336 */
   83    141   
    pub fn get_reason(&self) -> &::std::option::Option<crate::types::ResourceNotFoundExceptionReason> {
         142  +
        /* BuilderGenerator.kt:337 */
   84    143   
        &self.reason
         144  +
        /* BuilderGenerator.kt:336 */
   85    145   
    }
         146  +
    /* ErrorGenerator.kt:101 */
   86    147   
    /// Sets error metadata
   87    148   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   88    149   
        self.meta = Some(meta);
   89    150   
        self
   90    151   
    }
   91    152   
   92    153   
    /// Sets error metadata
   93    154   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   94    155   
        self.meta = meta;
   95    156   
        self
   96    157   
    }
   97         -
    /// Consumes the builder and constructs a [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
         158  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ResourceNotFoundError`](crate::types::error::ResourceNotFoundError).
         159  +
    /* BuilderGenerator.kt:253 */
   98    160   
    pub fn build(self) -> crate::types::error::ResourceNotFoundError {
         161  +
        /* BuilderGenerator.kt:477 */
   99    162   
        crate::types::error::ResourceNotFoundError {
  100         -
            message: self.message,
         163  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         164  +
            /* BuilderGenerator.kt:481 */
  101    165   
            reason: self.reason,
         166  +
            /* ErrorGenerator.kt:120 */
  102    167   
            meta: self.meta.unwrap_or_default(),
         168  +
            /* BuilderGenerator.kt:477 */
  103    169   
        }
         170  +
        /* BuilderGenerator.kt:253 */
  104    171   
    }
         172  +
    /* BuilderGenerator.kt:355 */
  105    173   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_service_quota_exceeded_exception.rs

@@ -1,1 +105,173 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>Your current service quotas do not allow you to perform this action.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>Your current service quotas do not allow you to perform this action.</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 ServiceQuotaExceededError {
    7         -
    /// <p>The reason for the exception.</p>
           8  +
pub /* StructureGenerator.kt:201 */ struct ServiceQuotaExceededError {
           9  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
    8     10   
    pub reason: ::std::option::Option<crate::types::ServiceQuotaExceededExceptionReason>,
          11  +
    /* StructureGenerator.kt:231 */
    9     12   
    #[allow(missing_docs)] // documentation missing in model
   10     13   
    pub message: ::std::option::Option<::std::string::String>,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl ServiceQuotaExceededError {
   14         -
    /// <p>The reason for the exception.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the exception.</p>
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn reason(&self) -> ::std::option::Option<&crate::types::ServiceQuotaExceededExceptionReason> {
          22  +
        /* StructureGenerator.kt:170 */
   16     23   
        self.reason.as_ref()
          24  +
        /* StructureGenerator.kt:166 */
   17     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   18     27   
}
          28  +
/* ErrorImplGenerator.kt:99 */
   19     29   
impl ServiceQuotaExceededError {
          30  +
    /* ErrorImplGenerator.kt:128 */
   20     31   
    /// Returns the error message.
   21     32   
    pub fn message(&self) -> ::std::option::Option<&str> {
   22     33   
        self.message.as_deref()
   23     34   
    }
          35  +
    /* ErrorImplGenerator.kt:99 */
   24     36   
}
          37  +
/* ErrorImplGenerator.kt:153 */
   25     38   
impl ::std::fmt::Display for ServiceQuotaExceededError {
          39  +
    /* ErrorImplGenerator.kt:154 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ErrorImplGenerator.kt:161 */
   27     42   
        ::std::write!(f, "ServiceQuotaExceededError [ServiceQuotaExceededException]")?;
          43  +
        /* ErrorImplGenerator.kt:166 */
   28     44   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          45  +
            /* ErrorImplGenerator.kt:166 */
   29     46   
            {
          47  +
                /* ErrorImplGenerator.kt:167 */
   30     48   
                ::std::write!(f, ": {}", inner_1)?;
          49  +
                /* ErrorImplGenerator.kt:166 */
   31     50   
            }
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for ServiceQuotaExceededError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ServiceQuotaExceededError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl ServiceQuotaExceededError {
   43         -
    /// Creates a new builder-style object to manufacture [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::ServiceQuotaExceededErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::ServiceQuotaExceededErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct ServiceQuotaExceededErrorBuilder {
   53         -
    pub(crate) reason: ::std::option::Option<crate::types::ServiceQuotaExceededExceptionReason>,
   54         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::ServiceQuotaExceededExceptionReason>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl ServiceQuotaExceededErrorBuilder {
   58         -
    /// <p>The reason for the exception.</p>
          95  +
    /// /* BuilderGenerator.kt:286 */<p>The reason for the exception.</p>
          96  +
    /* BuilderGenerator.kt:291 */
   59     97   
    pub fn reason(mut self, input: crate::types::ServiceQuotaExceededExceptionReason) -> Self {
          98  +
        /* BuilderGenerator.kt:292 */
   60     99   
        self.reason = ::std::option::Option::Some(input);
         100  +
        /* BuilderGenerator.kt:293 */
   61    101   
        self
         102  +
        /* BuilderGenerator.kt:291 */
   62    103   
    }
   63         -
    /// <p>The reason for the exception.</p>
         104  +
    /// /* BuilderGenerator.kt:312 */<p>The reason for the exception.</p>
         105  +
    /* BuilderGenerator.kt:314 */
   64    106   
    pub fn set_reason(mut self, input: ::std::option::Option<crate::types::ServiceQuotaExceededExceptionReason>) -> Self {
         107  +
        /* BuilderGenerator.kt:315 */
   65    108   
        self.reason = input;
   66    109   
        self
         110  +
        /* BuilderGenerator.kt:314 */
   67    111   
    }
   68         -
    /// <p>The reason for the exception.</p>
         112  +
    /// /* BuilderGenerator.kt:334 */<p>The reason for the exception.</p>
         113  +
    /* BuilderGenerator.kt:336 */
   69    114   
    pub fn get_reason(&self) -> &::std::option::Option<crate::types::ServiceQuotaExceededExceptionReason> {
         115  +
        /* BuilderGenerator.kt:337 */
   70    116   
        &self.reason
         117  +
        /* BuilderGenerator.kt:336 */
   71    118   
    }
         119  +
    /* BuilderGenerator.kt:286 */
   72    120   
    #[allow(missing_docs)] // documentation missing in model
         121  +
                           /* BuilderGenerator.kt:291 */
   73    122   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         123  +
        /* BuilderGenerator.kt:292 */
   74    124   
        self.message = ::std::option::Option::Some(input.into());
         125  +
        /* BuilderGenerator.kt:293 */
   75    126   
        self
         127  +
        /* BuilderGenerator.kt:291 */
   76    128   
    }
         129  +
    /* BuilderGenerator.kt:312 */
   77    130   
    #[allow(missing_docs)] // documentation missing in model
         131  +
                           /* BuilderGenerator.kt:314 */
   78    132   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         133  +
        /* BuilderGenerator.kt:315 */
   79    134   
        self.message = input;
   80    135   
        self
         136  +
        /* BuilderGenerator.kt:314 */
   81    137   
    }
         138  +
    /* BuilderGenerator.kt:334 */
   82    139   
    #[allow(missing_docs)] // documentation missing in model
         140  +
                           /* BuilderGenerator.kt:336 */
   83    141   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         142  +
        /* BuilderGenerator.kt:337 */
   84    143   
        &self.message
         144  +
        /* BuilderGenerator.kt:336 */
   85    145   
    }
         146  +
    /* ErrorGenerator.kt:101 */
   86    147   
    /// Sets error metadata
   87    148   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   88    149   
        self.meta = Some(meta);
   89    150   
        self
   90    151   
    }
   91    152   
   92    153   
    /// Sets error metadata
   93    154   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   94    155   
        self.meta = meta;
   95    156   
        self
   96    157   
    }
   97         -
    /// Consumes the builder and constructs a [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
         158  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ServiceQuotaExceededError`](crate::types::error::ServiceQuotaExceededError).
         159  +
    /* BuilderGenerator.kt:253 */
   98    160   
    pub fn build(self) -> crate::types::error::ServiceQuotaExceededError {
         161  +
        /* BuilderGenerator.kt:477 */
   99    162   
        crate::types::error::ServiceQuotaExceededError {
  100         -
            reason: self.reason,
         163  +
            /* BuilderGenerator.kt:481 */ reason: self.reason,
         164  +
            /* BuilderGenerator.kt:481 */
  101    165   
            message: self.message,
         166  +
            /* ErrorGenerator.kt:120 */
  102    167   
            meta: self.meta.unwrap_or_default(),
         168  +
            /* BuilderGenerator.kt:477 */
  103    169   
        }
         170  +
        /* BuilderGenerator.kt:253 */
  104    171   
    }
         172  +
    /* BuilderGenerator.kt:355 */
  105    173   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/_validation_exception.rs

@@ -1,1 +105,173 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// <p>The input fails to satisfy the constraints of the EBS direct APIs.</p>
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */<p>The input fails to satisfy the constraints of the EBS direct APIs.</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 ValidationError {
           8  +
pub /* StructureGenerator.kt:201 */ struct ValidationError {
           9  +
    /* StructureGenerator.kt:231 */
    7     10   
    #[allow(missing_docs)] // documentation missing in model
    8     11   
    pub message: ::std::option::Option<::std::string::String>,
    9         -
    /// <p>The reason for the validation exception.</p>
          12  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the validation exception.</p>
   10     13   
    pub reason: ::std::option::Option<crate::types::ValidationExceptionReason>,
   11         -
    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          14  +
    /* ErrorGenerator.kt:53 */ pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
          15  +
    /* StructureGenerator.kt:201 */
   12     16   
}
          17  +
/* StructureGenerator.kt:135 */
   13     18   
impl ValidationError {
   14         -
    /// <p>The reason for the validation exception.</p>
          19  +
    /// /* StructureGenerator.kt:231 */<p>The reason for the validation exception.</p>
          20  +
    /* StructureGenerator.kt:166 */
   15     21   
    pub fn reason(&self) -> ::std::option::Option<&crate::types::ValidationExceptionReason> {
          22  +
        /* StructureGenerator.kt:170 */
   16     23   
        self.reason.as_ref()
          24  +
        /* StructureGenerator.kt:166 */
   17     25   
    }
          26  +
    /* StructureGenerator.kt:135 */
   18     27   
}
          28  +
/* ErrorImplGenerator.kt:99 */
   19     29   
impl ValidationError {
          30  +
    /* ErrorImplGenerator.kt:128 */
   20     31   
    /// Returns the error message.
   21     32   
    pub fn message(&self) -> ::std::option::Option<&str> {
   22     33   
        self.message.as_deref()
   23     34   
    }
          35  +
    /* ErrorImplGenerator.kt:99 */
   24     36   
}
          37  +
/* ErrorImplGenerator.kt:153 */
   25     38   
impl ::std::fmt::Display for ValidationError {
          39  +
    /* ErrorImplGenerator.kt:154 */
   26     40   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          41  +
        /* ErrorImplGenerator.kt:161 */
   27     42   
        ::std::write!(f, "ValidationError [ValidationException]")?;
          43  +
        /* ErrorImplGenerator.kt:166 */
   28     44   
        if let ::std::option::Option::Some(inner_1) = &self.message {
          45  +
            /* ErrorImplGenerator.kt:166 */
   29     46   
            {
          47  +
                /* ErrorImplGenerator.kt:167 */
   30     48   
                ::std::write!(f, ": {}", inner_1)?;
          49  +
                /* ErrorImplGenerator.kt:166 */
   31     50   
            }
          51  +
            /* ErrorImplGenerator.kt:166 */
   32     52   
        }
          53  +
        /* ErrorImplGenerator.kt:171 */
   33     54   
        Ok(())
          55  +
        /* ErrorImplGenerator.kt:154 */
   34     56   
    }
          57  +
    /* ErrorImplGenerator.kt:153 */
   35     58   
}
          59  +
/* ErrorImplGenerator.kt:175 */
   36     60   
impl ::std::error::Error for ValidationError {}
          61  +
/* ErrorGenerator.kt:77 */
   37     62   
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ValidationError {
          63  +
    /* ErrorGenerator.kt:78 */
   38     64   
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
   39     65   
        &self.meta
   40     66   
    }
          67  +
    /* ErrorGenerator.kt:77 */
   41     68   
}
          69  +
/* ErrorGenerator.kt:81 */
   42     70   
impl ValidationError {
   43         -
    /// Creates a new builder-style object to manufacture [`ValidationError`](crate::types::error::ValidationError).
          71  +
    /// /* BuilderGenerator.kt:173 */Creates a new builder-style object to manufacture [`ValidationError`](crate::types::error::ValidationError).
          72  +
    /* BuilderGenerator.kt:175 */
   44     73   
    pub fn builder() -> crate::types::error::builders::ValidationErrorBuilder {
          74  +
        /* BuilderGenerator.kt:176 */
   45     75   
        crate::types::error::builders::ValidationErrorBuilder::default()
          76  +
        /* BuilderGenerator.kt:175 */
   46     77   
    }
          78  +
    /* ErrorGenerator.kt:81 */
   47     79   
}
   48     80   
   49         -
/// A builder for [`ValidationError`](crate::types::error::ValidationError).
          81  +
/// /* BuilderGenerator.kt:342 */A builder for [`ValidationError`](crate::types::error::ValidationError).
          82  +
/* RustType.kt:516 */
   50     83   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
          84  +
/* RustType.kt:516 */
   51     85   
#[non_exhaustive]
          86  +
/* BuilderGenerator.kt:345 */
   52     87   
pub struct ValidationErrorBuilder {
   53         -
    pub(crate) message: ::std::option::Option<::std::string::String>,
   54         -
    pub(crate) reason: ::std::option::Option<crate::types::ValidationExceptionReason>,
   55         -
    meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          88  +
    /* BuilderGenerator.kt:275 */ pub(crate) message: ::std::option::Option<::std::string::String>,
          89  +
    /* BuilderGenerator.kt:275 */ pub(crate) reason: ::std::option::Option<crate::types::ValidationExceptionReason>,
          90  +
    /* ErrorGenerator.kt:97 */ meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
          91  +
    /* BuilderGenerator.kt:345 */
   56     92   
}
          93  +
/* BuilderGenerator.kt:355 */
   57     94   
impl ValidationErrorBuilder {
          95  +
    /* BuilderGenerator.kt:286 */
   58     96   
    #[allow(missing_docs)] // documentation missing in model
          97  +
                           /* BuilderGenerator.kt:291 */
   59     98   
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
          99  +
        /* BuilderGenerator.kt:292 */
   60    100   
        self.message = ::std::option::Option::Some(input.into());
         101  +
        /* BuilderGenerator.kt:293 */
   61    102   
        self
         103  +
        /* BuilderGenerator.kt:291 */
   62    104   
    }
         105  +
    /* BuilderGenerator.kt:312 */
   63    106   
    #[allow(missing_docs)] // documentation missing in model
         107  +
                           /* BuilderGenerator.kt:314 */
   64    108   
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         109  +
        /* BuilderGenerator.kt:315 */
   65    110   
        self.message = input;
   66    111   
        self
         112  +
        /* BuilderGenerator.kt:314 */
   67    113   
    }
         114  +
    /* BuilderGenerator.kt:334 */
   68    115   
    #[allow(missing_docs)] // documentation missing in model
         116  +
                           /* BuilderGenerator.kt:336 */
   69    117   
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
         118  +
        /* BuilderGenerator.kt:337 */
   70    119   
        &self.message
         120  +
        /* BuilderGenerator.kt:336 */
   71    121   
    }
   72         -
    /// <p>The reason for the validation exception.</p>
         122  +
    /// /* BuilderGenerator.kt:286 */<p>The reason for the validation exception.</p>
         123  +
    /* BuilderGenerator.kt:291 */
   73    124   
    pub fn reason(mut self, input: crate::types::ValidationExceptionReason) -> Self {
         125  +
        /* BuilderGenerator.kt:292 */
   74    126   
        self.reason = ::std::option::Option::Some(input);
         127  +
        /* BuilderGenerator.kt:293 */
   75    128   
        self
         129  +
        /* BuilderGenerator.kt:291 */
   76    130   
    }
   77         -
    /// <p>The reason for the validation exception.</p>
         131  +
    /// /* BuilderGenerator.kt:312 */<p>The reason for the validation exception.</p>
         132  +
    /* BuilderGenerator.kt:314 */
   78    133   
    pub fn set_reason(mut self, input: ::std::option::Option<crate::types::ValidationExceptionReason>) -> Self {
         134  +
        /* BuilderGenerator.kt:315 */
   79    135   
        self.reason = input;
   80    136   
        self
         137  +
        /* BuilderGenerator.kt:314 */
   81    138   
    }
   82         -
    /// <p>The reason for the validation exception.</p>
         139  +
    /// /* BuilderGenerator.kt:334 */<p>The reason for the validation exception.</p>
         140  +
    /* BuilderGenerator.kt:336 */
   83    141   
    pub fn get_reason(&self) -> &::std::option::Option<crate::types::ValidationExceptionReason> {
         142  +
        /* BuilderGenerator.kt:337 */
   84    143   
        &self.reason
         144  +
        /* BuilderGenerator.kt:336 */
   85    145   
    }
         146  +
    /* ErrorGenerator.kt:101 */
   86    147   
    /// Sets error metadata
   87    148   
    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
   88    149   
        self.meta = Some(meta);
   89    150   
        self
   90    151   
    }
   91    152   
   92    153   
    /// Sets error metadata
   93    154   
    pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
   94    155   
        self.meta = meta;
   95    156   
        self
   96    157   
    }
   97         -
    /// Consumes the builder and constructs a [`ValidationError`](crate::types::error::ValidationError).
         158  +
    /// /* BuilderGenerator.kt:240 */Consumes the builder and constructs a [`ValidationError`](crate::types::error::ValidationError).
         159  +
    /* BuilderGenerator.kt:253 */
   98    160   
    pub fn build(self) -> crate::types::error::ValidationError {
         161  +
        /* BuilderGenerator.kt:477 */
   99    162   
        crate::types::error::ValidationError {
  100         -
            message: self.message,
         163  +
            /* BuilderGenerator.kt:481 */ message: self.message,
         164  +
            /* BuilderGenerator.kt:481 */
  101    165   
            reason: self.reason,
         166  +
            /* ErrorGenerator.kt:120 */
  102    167   
            meta: self.meta.unwrap_or_default(),
         168  +
            /* BuilderGenerator.kt:477 */
  103    169   
        }
         170  +
        /* BuilderGenerator.kt:253 */
  104    171   
    }
         172  +
    /* BuilderGenerator.kt:355 */
  105    173   
}

tmp-codegen-diff/codegen-client-test/ebs/rust-client-codegen/src/types/error/builders.rs

@@ -1,1 +16,24 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CodegenDelegator.kt:255 */
    2      3   
pub use crate::types::error::_validation_exception::ValidationErrorBuilder;
    3      4   
           5  +
/* CodegenDelegator.kt:255 */
    4      6   
pub use crate::types::error::_service_quota_exceeded_exception::ServiceQuotaExceededErrorBuilder;
    5      7   
           8  +
/* CodegenDelegator.kt:255 */
    6      9   
pub use crate::types::error::_resource_not_found_exception::ResourceNotFoundErrorBuilder;
    7     10   
          11  +
/* CodegenDelegator.kt:255 */
    8     12   
pub use crate::types::error::_request_throttled_exception::RequestThrottledErrorBuilder;
    9     13   
          14  +
/* CodegenDelegator.kt:255 */
   10     15   
pub use crate::types::error::_internal_server_exception::InternalServerErrorBuilder;
   11     16   
          17  +
/* CodegenDelegator.kt:255 */
   12     18   
pub use crate::types::error::_conflict_exception::ConflictErrorBuilder;
   13     19   
          20  +
/* CodegenDelegator.kt:255 */
   14     21   
pub use crate::types::error::_concurrent_limit_exceeded_exception::ConcurrentLimitExceededErrorBuilder;
   15     22   
          23  +
/* CodegenDelegator.kt:255 */
   16     24   
pub use crate::types::error::_access_denied_exception::AccessDeniedErrorBuilder;

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/client.rs

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:105 */
    2      3   
#[derive(Debug)]
    3      4   
pub(crate) struct Handle {
    4      5   
    pub(crate) conf: crate::Config,
    5      6   
    #[allow(dead_code)] // unused when a service does not provide any operations
    6      7   
    pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
    7      8   
}
    8      9   
    9     10   
///
   10     11   
/// An ergonomic client for Sample Ec2 Protocol Service.
   11     12   
///
@@ -77,78 +182,208 @@
   97     98   
    fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
   98     99   
        let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
   99    100   
        handle
  100    101   
            .runtime_plugins
  101    102   
            .apply_client_configuration(&mut cfg)?
  102    103   
            .validate_base_client_config(&cfg)?;
  103    104   
        Ok(())
  104    105   
    }
  105    106   
}
  106    107   
  107         -
/// Operation customization and supporting types.
         108  +
/// /* ClientRustModule.kt:161 */Operation customization and supporting types.
  108    109   
///
  109         -
/// The underlying HTTP requests made during an operation can be customized
         110  +
/// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
  110    111   
/// by calling the `customize()` method on the builder returned from a client
  111    112   
/// operation call. For example, this can be used to add an additional HTTP header:
  112    113   
///
  113    114   
/// ```ignore
  114    115   
/// # async fn wrapper() -> ::std::result::Result<(), ec2_query::Error> {
  115    116   
/// # let client: ec2_query::Client = unimplemented!();
  116    117   
/// use ::http::header::{HeaderName, HeaderValue};
  117    118   
///
  118    119   
/// let result = client.datetime_offsets()
  119    120   
///     .customize()
  120    121   
///     .mutate_request(|req| {
  121    122   
///         // Add `x-example-header` with value
  122    123   
///         req.headers_mut()
  123    124   
///             .insert(
  124    125   
///                 HeaderName::from_static("x-example-header"),
  125    126   
///                 HeaderValue::from_static("1"),
  126    127   
///             );
  127    128   
///     })
  128    129   
///     .send()
  129    130   
///     .await;
  130    131   
/// # }
  131    132   
/// ```
  132    133   
pub mod customize;
  133    134   
         135  +
/* RustModule.kt:172 */
  134    136   
mod datetime_offsets;
  135    137   
         138  +
/* RustModule.kt:172 */
  136    139   
mod empty_input_and_empty_output;
  137    140   
         141  +
/* RustModule.kt:172 */
  138    142   
mod endpoint_operation;
  139    143   
         144  +
/* RustModule.kt:172 */
  140    145   
mod endpoint_with_host_label_operation;
  141    146   
         147  +
/* RustModule.kt:172 */
  142    148   
mod fractional_seconds;
  143    149   
         150  +
/* RustModule.kt:172 */
  144    151   
mod greeting_with_errors;
  145    152   
         153  +
/* RustModule.kt:172 */
  146    154   
mod host_with_path_operation;
  147    155   
         156  +
/* RustModule.kt:172 */
  148    157   
mod ignores_wrapping_xml_name;
  149    158   
         159  +
/* RustModule.kt:172 */
  150    160   
mod nested_structures;
  151    161   
         162  +
/* RustModule.kt:172 */
  152    163   
mod no_input_and_output;
  153    164   
         165  +
/* RustModule.kt:172 */
  154    166   
mod put_with_content_encoding;
  155    167   
         168  +
/* RustModule.kt:172 */
  156    169   
mod query_idempotency_token_auto_fill;
  157    170   
         171  +
/* RustModule.kt:172 */
  158    172   
mod query_lists;
  159    173   
         174  +
/* RustModule.kt:172 */
  160    175   
mod query_timestamps;
  161    176   
         177  +
/* RustModule.kt:172 */
  162    178   
mod recursive_xml_shapes;
  163    179   
         180  +
/* RustModule.kt:172 */
  164    181   
mod simple_input_params;
  165    182   
         183  +
/* RustModule.kt:172 */
  166    184   
mod simple_scalar_xml_properties;
  167    185   
         186  +
/* RustModule.kt:172 */
  168    187   
mod xml_blobs;
  169    188   
         189  +
/* RustModule.kt:172 */
  170    190   
mod xml_empty_blobs;
  171    191   
         192  +
/* RustModule.kt:172 */
  172    193   
mod xml_empty_lists;
  173    194   
         195  +
/* RustModule.kt:172 */
  174    196   
mod xml_enums;
  175    197   
         198  +
/* RustModule.kt:172 */
  176    199   
mod xml_int_enums;
  177    200   
         201  +
/* RustModule.kt:172 */
  178    202   
mod xml_lists;
  179    203   
         204  +
/* RustModule.kt:172 */
  180    205   
mod xml_namespaces;
  181    206   
         207  +
/* RustModule.kt:172 */
  182    208   
mod xml_timestamps;

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/client/customize.rs

@@ -1,1 +32,33 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* CustomizableOperationGenerator.kt:72 */
    3      4   
/// `CustomizableOperation` allows for configuring a single operation invocation before it is sent.
    4      5   
pub struct CustomizableOperation<T, E, B> {
    5      6   
    customizable_send: B,
    6      7   
    config_override: ::std::option::Option<crate::config::Builder>,
    7      8   
    interceptors: Vec<::aws_smithy_runtime_api::client::interceptors::SharedInterceptor>,
    8      9   
    runtime_plugins: Vec<::aws_smithy_runtime_api::client::runtime_plugin::SharedRuntimePlugin>,
    9     10   
    _output: ::std::marker::PhantomData<T>,
   10     11   
    _error: ::std::marker::PhantomData<E>,
   11     12   
}
   12     13   

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/client/customize/internal.rs

@@ -1,1 +12,13 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* CustomizableOperationGenerator.kt:204 */
    2      3   
pub type BoxFuture<T> = ::std::pin::Pin<::std::boxed::Box<dyn ::std::future::Future<Output = T> + ::std::marker::Send>>;
    3      4   
    4      5   
pub type SendResult<T, E> =
    5      6   
    ::std::result::Result<T, ::aws_smithy_runtime_api::client::result::SdkError<E, ::aws_smithy_runtime_api::client::orchestrator::HttpResponse>>;
    6      7   
    7      8   
pub trait CustomizableSend<T, E>: ::std::marker::Send + ::std::marker::Sync {
    8      9   
    // Takes an owned `self` as the implementation will internally call methods that take `self`.
    9     10   
    // If it took `&self`, that would make this trait object safe, but some implementing types do not
   10     11   
    // derive `Clone`, unable to yield `self` from `&self`.
   11     12   
    fn send(self, config_override: crate::config::Builder) -> BoxFuture<SendResult<T, E>>;

tmp-codegen-diff/codegen-client-test/ec2_query/rust-client-codegen/src/client/datetime_offsets.rs

@@ -1,1 +12,16 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* FluentClientGenerator.kt:187 */
    2      3   
impl super::Client {
           4  +
    /* FluentClientGenerator.kt:221 */
    3      5   
    /// Constructs a fluent builder for the [`DatetimeOffsets`](crate::operation::datetime_offsets::builders::DatetimeOffsetsFluentBuilder) operation.
    4      6   
    ///
    5      7   
    /// - The fluent builder takes no input, just [`send`](crate::operation::datetime_offsets::builders::DatetimeOffsetsFluentBuilder::send) it.
    6      8   
    /// - On success, responds with [`DatetimeOffsetsOutput`](crate::operation::datetime_offsets::DatetimeOffsetsOutput) with field(s):
    7      9   
    ///   - [`datetime(Option<DateTime>)`](crate::operation::datetime_offsets::DatetimeOffsetsOutput::datetime): (undocumented)
    8     10   
    /// - On failure, responds with [`SdkError<DatetimeOffsetsError>`](crate::operation::datetime_offsets::DatetimeOffsetsError)
          11  +
    /* FluentClientGenerator.kt:234 */
    9     12   
    pub fn datetime_offsets(&self) -> crate::operation::datetime_offsets::builders::DatetimeOffsetsFluentBuilder {
   10     13   
        crate::operation::datetime_offsets::builders::DatetimeOffsetsFluentBuilder::new(self.handle.clone())
   11     14   
    }
          15  +
    /* FluentClientGenerator.kt:187 */
   12     16   
}