Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e

Files changed:

tmp-codegen-diff/codegen-server-test/naming_test_ops-http0x/rust-server-codegen/src/error.rs

@@ -1,1 +298,298 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Error type for the `RPCEcho` operation.
    3         -
/// Each variant represents an error that can occur for the `RPCEcho` operation.
           2  +
/// Error type for the `ReservedWordsAsMembers` operation.
           3  +
/// Each variant represents an error that can occur for the `ReservedWordsAsMembers` operation.
    4      4   
#[derive(::std::fmt::Debug)]
    5         -
pub enum RPCEchoError {
           5  +
pub enum ReservedWordsAsMembersError {
    6      6   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
    7      7   
    ValidationException(crate::error::ValidationException),
    8      8   
}
    9         -
impl ::std::fmt::Display for RPCEchoError {
           9  +
impl ::std::fmt::Display for ReservedWordsAsMembersError {
   10     10   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   11     11   
        match &self {
   12         -
            RPCEchoError::ValidationException(_inner) => _inner.fmt(f),
          12  +
            ReservedWordsAsMembersError::ValidationException(_inner) => _inner.fmt(f),
   13     13   
        }
   14     14   
    }
   15     15   
}
   16         -
impl RPCEchoError {
   17         -
    /// Returns `true` if the error kind is `RPCEchoError::ValidationException`.
          16  +
impl ReservedWordsAsMembersError {
          17  +
    /// Returns `true` if the error kind is `ReservedWordsAsMembersError::ValidationException`.
   18     18   
    pub fn is_validation_exception(&self) -> bool {
   19         -
        matches!(&self, RPCEchoError::ValidationException(_))
          19  +
        matches!(&self, ReservedWordsAsMembersError::ValidationException(_))
   20     20   
    }
   21     21   
    /// Returns the error name string by matching the correct variant.
   22     22   
    pub fn name(&self) -> &'static str {
   23     23   
        match &self {
   24         -
            RPCEchoError::ValidationException(_inner) => _inner.name(),
          24  +
            ReservedWordsAsMembersError::ValidationException(_inner) => _inner.name(),
   25     25   
        }
   26     26   
    }
   27     27   
}
   28         -
impl ::std::error::Error for RPCEchoError {
          28  +
impl ::std::error::Error for ReservedWordsAsMembersError {
   29     29   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   30     30   
        match &self {
   31         -
            RPCEchoError::ValidationException(_inner) => Some(_inner),
          31  +
            ReservedWordsAsMembersError::ValidationException(_inner) => Some(_inner),
   32     32   
        }
   33     33   
    }
   34     34   
}
   35         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::RPCEchoError {
   36         -
    fn from(variant: crate::error::ValidationException) -> crate::error::RPCEchoError {
          35  +
impl ::std::convert::From<crate::error::ValidationException>
          36  +
    for crate::error::ReservedWordsAsMembersError
          37  +
{
          38  +
    fn from(
          39  +
        variant: crate::error::ValidationException,
          40  +
    ) -> crate::error::ReservedWordsAsMembersError {
   37     41   
        Self::ValidationException(variant)
   38     42   
    }
   39     43   
}
   40     44   
   41         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
   42         -
#[derive(
   43         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   44         -
)]
   45         -
pub struct ValidationException {
   46         -
    /// A summary of the validation failure.
   47         -
    pub message: ::std::string::String,
   48         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   49         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          45  +
/// Error type for the `ErrCollisions` operation.
          46  +
/// Each variant represents an error that can occur for the `ErrCollisions` operation.
          47  +
#[derive(::std::fmt::Debug)]
          48  +
pub enum ErrCollisionsError {
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    CollidingError(crate::error::CollidingError),
          51  +
    /// This will be renamed to CollidingError
          52  +
    CollidingException(crate::error::CollidingException),
   50     53   
}
   51         -
impl ValidationException {
   52         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   53         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
   54         -
        self.field_list.as_deref()
          54  +
impl ::std::fmt::Display for ErrCollisionsError {
          55  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          56  +
        match &self {
          57  +
            ErrCollisionsError::CollidingError(_inner) => _inner.fmt(f),
          58  +
            ErrCollisionsError::CollidingException(_inner) => _inner.fmt(f),
          59  +
        }
   55     60   
    }
   56     61   
}
   57         -
impl ValidationException {
   58         -
    /// Returns the error message.
   59         -
    pub fn message(&self) -> &str {
   60         -
        &self.message
          62  +
impl ErrCollisionsError {
          63  +
    /// Returns `true` if the error kind is `ErrCollisionsError::CollidingError`.
          64  +
    pub fn is_colliding_error(&self) -> bool {
          65  +
        matches!(&self, ErrCollisionsError::CollidingError(_))
   61     66   
    }
   62         -
    #[doc(hidden)]
   63         -
    /// Returns the error name.
          67  +
    /// Returns `true` if the error kind is `ErrCollisionsError::CollidingException`.
          68  +
    pub fn is_colliding_exception(&self) -> bool {
          69  +
        matches!(&self, ErrCollisionsError::CollidingException(_))
          70  +
    }
          71  +
    /// Returns the error name string by matching the correct variant.
   64     72   
    pub fn name(&self) -> &'static str {
   65         -
        "ValidationException"
          73  +
        match &self {
          74  +
            ErrCollisionsError::CollidingError(_inner) => _inner.name(),
          75  +
            ErrCollisionsError::CollidingException(_inner) => _inner.name(),
          76  +
        }
   66     77   
    }
   67     78   
}
   68         -
impl ::std::fmt::Display for ValidationException {
   69         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   70         -
        ::std::write!(f, "ValidationException")?;
   71         -
        {
   72         -
            ::std::write!(f, ": {}", &self.message)?;
          79  +
impl ::std::error::Error for ErrCollisionsError {
          80  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          81  +
        match &self {
          82  +
            ErrCollisionsError::CollidingError(_inner) => Some(_inner),
          83  +
            ErrCollisionsError::CollidingException(_inner) => Some(_inner),
   73     84   
        }
   74         -
        Ok(())
   75     85   
    }
   76     86   
}
   77         -
impl ::std::error::Error for ValidationException {}
   78         -
impl ValidationException {
   79         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
   80         -
    pub fn builder() -> crate::error::validation_exception::Builder {
   81         -
        crate::error::validation_exception::Builder::default()
          87  +
impl ::std::convert::From<crate::error::CollidingError> for crate::error::ErrCollisionsError {
          88  +
    fn from(variant: crate::error::CollidingError) -> crate::error::ErrCollisionsError {
          89  +
        Self::CollidingError(variant)
          90  +
    }
          91  +
}
          92  +
impl ::std::convert::From<crate::error::CollidingException> for crate::error::ErrCollisionsError {
          93  +
    fn from(variant: crate::error::CollidingException) -> crate::error::ErrCollisionsError {
          94  +
        Self::CollidingException(variant)
   82     95   
    }
   83     96   
}
   84     97   
   85     98   
/// Error type for the `Match` operation.
   86     99   
/// Each variant represents an error that can occur for the `Match` operation.
   87    100   
#[derive(::std::fmt::Debug)]
   88    101   
pub enum MatchError {
   89    102   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
   90    103   
    ValidationException(crate::error::ValidationException),
   91    104   
}
   92    105   
impl ::std::fmt::Display for MatchError {
   93    106   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   94    107   
        match &self {
   95    108   
            MatchError::ValidationException(_inner) => _inner.fmt(f),
   96    109   
        }
   97    110   
    }
   98    111   
}
   99    112   
impl MatchError {
  100    113   
    /// Returns `true` if the error kind is `MatchError::ValidationException`.
  101    114   
    pub fn is_validation_exception(&self) -> bool {
  102    115   
        matches!(&self, MatchError::ValidationException(_))
  103    116   
    }
  104    117   
    /// Returns the error name string by matching the correct variant.
  105    118   
    pub fn name(&self) -> &'static str {
  106    119   
        match &self {
  107    120   
            MatchError::ValidationException(_inner) => _inner.name(),
  108    121   
        }
  109    122   
    }
  110    123   
}
  111    124   
impl ::std::error::Error for MatchError {
  112    125   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  113    126   
        match &self {
  114    127   
            MatchError::ValidationException(_inner) => Some(_inner),
  115    128   
        }
  116    129   
    }
  117    130   
}
  118    131   
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MatchError {
  119    132   
    fn from(variant: crate::error::ValidationException) -> crate::error::MatchError {
  120    133   
        Self::ValidationException(variant)
  121    134   
    }
  122    135   
}
  123    136   
  124         -
/// Error type for the `ErrCollisions` operation.
  125         -
/// Each variant represents an error that can occur for the `ErrCollisions` operation.
         137  +
/// Error type for the `RPCEcho` operation.
         138  +
/// Each variant represents an error that can occur for the `RPCEcho` operation.
  126    139   
#[derive(::std::fmt::Debug)]
  127         -
pub enum ErrCollisionsError {
  128         -
    #[allow(missing_docs)] // documentation missing in model
  129         -
    CollidingError(crate::error::CollidingError),
  130         -
    /// This will be renamed to CollidingError
  131         -
    CollidingException(crate::error::CollidingException),
         140  +
pub enum RPCEchoError {
         141  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         142  +
    ValidationException(crate::error::ValidationException),
  132    143   
}
  133         -
impl ::std::fmt::Display for ErrCollisionsError {
         144  +
impl ::std::fmt::Display for RPCEchoError {
  134    145   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  135    146   
        match &self {
  136         -
            ErrCollisionsError::CollidingError(_inner) => _inner.fmt(f),
  137         -
            ErrCollisionsError::CollidingException(_inner) => _inner.fmt(f),
         147  +
            RPCEchoError::ValidationException(_inner) => _inner.fmt(f),
  138    148   
        }
  139    149   
    }
  140    150   
}
  141         -
impl ErrCollisionsError {
  142         -
    /// Returns `true` if the error kind is `ErrCollisionsError::CollidingError`.
  143         -
    pub fn is_colliding_error(&self) -> bool {
  144         -
        matches!(&self, ErrCollisionsError::CollidingError(_))
  145         -
    }
  146         -
    /// Returns `true` if the error kind is `ErrCollisionsError::CollidingException`.
  147         -
    pub fn is_colliding_exception(&self) -> bool {
  148         -
        matches!(&self, ErrCollisionsError::CollidingException(_))
         151  +
impl RPCEchoError {
         152  +
    /// Returns `true` if the error kind is `RPCEchoError::ValidationException`.
         153  +
    pub fn is_validation_exception(&self) -> bool {
         154  +
        matches!(&self, RPCEchoError::ValidationException(_))
  149    155   
    }
  150    156   
    /// Returns the error name string by matching the correct variant.
  151    157   
    pub fn name(&self) -> &'static str {
  152    158   
        match &self {
  153         -
            ErrCollisionsError::CollidingError(_inner) => _inner.name(),
  154         -
            ErrCollisionsError::CollidingException(_inner) => _inner.name(),
         159  +
            RPCEchoError::ValidationException(_inner) => _inner.name(),
  155    160   
        }
  156    161   
    }
  157    162   
}
  158         -
impl ::std::error::Error for ErrCollisionsError {
         163  +
impl ::std::error::Error for RPCEchoError {
  159    164   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  160    165   
        match &self {
  161         -
            ErrCollisionsError::CollidingError(_inner) => Some(_inner),
  162         -
            ErrCollisionsError::CollidingException(_inner) => Some(_inner),
         166  +
            RPCEchoError::ValidationException(_inner) => Some(_inner),
  163    167   
        }
  164    168   
    }
  165    169   
}
  166         -
impl ::std::convert::From<crate::error::CollidingError> for crate::error::ErrCollisionsError {
  167         -
    fn from(variant: crate::error::CollidingError) -> crate::error::ErrCollisionsError {
  168         -
        Self::CollidingError(variant)
  169         -
    }
  170         -
}
  171         -
impl ::std::convert::From<crate::error::CollidingException> for crate::error::ErrCollisionsError {
  172         -
    fn from(variant: crate::error::CollidingException) -> crate::error::ErrCollisionsError {
  173         -
        Self::CollidingException(variant)
         170  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::RPCEchoError {
         171  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RPCEchoError {
         172  +
        Self::ValidationException(variant)
  174    173   
    }
  175    174   
}
  176    175   
  177         -
/// This will be renamed to CollidingError
         176  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  178    177   
#[derive(
  179    178   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  180    179   
)]
  181         -
pub struct CollidingException {}
  182         -
impl CollidingException {
         180  +
pub struct ValidationException {
         181  +
    /// A summary of the validation failure.
         182  +
    pub message: ::std::string::String,
         183  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         184  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         185  +
}
         186  +
impl ValidationException {
         187  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         188  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         189  +
        self.field_list.as_deref()
         190  +
    }
         191  +
}
         192  +
impl ValidationException {
         193  +
    /// Returns the error message.
         194  +
    pub fn message(&self) -> &str {
         195  +
        &self.message
         196  +
    }
  183    197   
    #[doc(hidden)]
  184    198   
    /// Returns the error name.
  185    199   
    pub fn name(&self) -> &'static str {
  186         -
        "CollidingException"
         200  +
        "ValidationException"
  187    201   
    }
  188    202   
}
  189         -
impl ::std::fmt::Display for CollidingException {
         203  +
impl ::std::fmt::Display for ValidationException {
  190    204   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  191         -
        ::std::write!(f, "CollidingException")?;
         205  +
        ::std::write!(f, "ValidationException")?;
         206  +
        {
         207  +
            ::std::write!(f, ": {}", &self.message)?;
         208  +
        }
  192    209   
        Ok(())
  193    210   
    }
  194    211   
}
  195         -
impl ::std::error::Error for CollidingException {}
  196         -
impl CollidingException {
  197         -
    /// Creates a new builder-style object to manufacture [`CollidingException`](crate::error::CollidingException).
  198         -
    pub fn builder() -> crate::error::colliding_exception::Builder {
  199         -
        crate::error::colliding_exception::Builder::default()
         212  +
impl ::std::error::Error for ValidationException {}
         213  +
impl ValidationException {
         214  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         215  +
    pub fn builder() -> crate::error::validation_exception::Builder {
         216  +
        crate::error::validation_exception::Builder::default()
  200    217   
    }
  201    218   
}
  202    219   
  203    220   
#[allow(missing_docs)] // documentation missing in model
  204    221   
#[derive(
  205    222   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  206    223   
)]
  207    224   
pub struct CollidingError {}
  208    225   
impl CollidingError {
  209    226   
    #[doc(hidden)]
  210    227   
    /// Returns the error name.
  211    228   
    pub fn name(&self) -> &'static str {
  212    229   
        "CollidingError"
  213    230   
    }
  214    231   
}
  215    232   
impl ::std::fmt::Display for CollidingError {
  216    233   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  217    234   
        ::std::write!(f, "CollidingError")?;
  218    235   
        Ok(())
  219    236   
    }
  220    237   
}
  221    238   
impl ::std::error::Error for CollidingError {}
  222    239   
impl CollidingError {
  223    240   
    /// Creates a new builder-style object to manufacture [`CollidingError`](crate::error::CollidingError).
  224    241   
    pub fn builder() -> crate::error::colliding_error::Builder {
  225    242   
        crate::error::colliding_error::Builder::default()
  226    243   
    }
  227    244   
}
  228    245   
  229         -
/// Error type for the `ReservedWordsAsMembers` operation.
  230         -
/// Each variant represents an error that can occur for the `ReservedWordsAsMembers` operation.
  231         -
#[derive(::std::fmt::Debug)]
  232         -
pub enum ReservedWordsAsMembersError {
  233         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  234         -
    ValidationException(crate::error::ValidationException),
  235         -
}
  236         -
impl ::std::fmt::Display for ReservedWordsAsMembersError {
  237         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  238         -
        match &self {
  239         -
            ReservedWordsAsMembersError::ValidationException(_inner) => _inner.fmt(f),
  240         -
        }
  241         -
    }
  242         -
}
  243         -
impl ReservedWordsAsMembersError {
  244         -
    /// Returns `true` if the error kind is `ReservedWordsAsMembersError::ValidationException`.
  245         -
    pub fn is_validation_exception(&self) -> bool {
  246         -
        matches!(&self, ReservedWordsAsMembersError::ValidationException(_))
  247         -
    }
  248         -
    /// Returns the error name string by matching the correct variant.
         246  +
/// This will be renamed to CollidingError
         247  +
#[derive(
         248  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         249  +
)]
         250  +
pub struct CollidingException {}
         251  +
impl CollidingException {
         252  +
    #[doc(hidden)]
         253  +
    /// Returns the error name.
  249    254   
    pub fn name(&self) -> &'static str {
  250         -
        match &self {
  251         -
            ReservedWordsAsMembersError::ValidationException(_inner) => _inner.name(),
  252         -
        }
         255  +
        "CollidingException"
  253    256   
    }
  254    257   
}
  255         -
impl ::std::error::Error for ReservedWordsAsMembersError {
  256         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  257         -
        match &self {
  258         -
            ReservedWordsAsMembersError::ValidationException(_inner) => Some(_inner),
  259         -
        }
         258  +
impl ::std::fmt::Display for CollidingException {
         259  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         260  +
        ::std::write!(f, "CollidingException")?;
         261  +
        Ok(())
  260    262   
    }
  261    263   
}
  262         -
impl ::std::convert::From<crate::error::ValidationException>
  263         -
    for crate::error::ReservedWordsAsMembersError
  264         -
{
  265         -
    fn from(
  266         -
        variant: crate::error::ValidationException,
  267         -
    ) -> crate::error::ReservedWordsAsMembersError {
  268         -
        Self::ValidationException(variant)
         264  +
impl ::std::error::Error for CollidingException {}
         265  +
impl CollidingException {
         266  +
    /// Creates a new builder-style object to manufacture [`CollidingException`](crate::error::CollidingException).
         267  +
    pub fn builder() -> crate::error::colliding_exception::Builder {
         268  +
        crate::error::colliding_exception::Builder::default()
  269    269   
    }
  270    270   
}
  271    271   
/// See [`ValidationException`](crate::error::ValidationException).
  272    272   
pub mod validation_exception {
  273    273   
  274    274   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  275    275   
    /// Holds one variant for each of the ways the builder can fail.
  276    276   
    #[non_exhaustive]
  277    277   
    #[allow(clippy::enum_variant_names)]
  278    278   
    pub enum ConstraintViolation {
@@ -305,305 +376,376 @@
  325    325   
        fn build_enforcing_all_constraints(
  326    326   
            self,
  327    327   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  328    328   
            Ok(crate::error::ValidationException {
  329    329   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  330    330   
                field_list: self.field_list,
  331    331   
            })
  332    332   
        }
  333    333   
    }
  334    334   
}
  335         -
/// See [`CollidingException`](crate::error::CollidingException).
  336         -
pub mod colliding_exception {
         335  +
/// See [`CollidingError`](crate::error::CollidingError).
         336  +
pub mod colliding_error {
  337    337   
  338         -
    impl ::std::convert::From<Builder> for crate::error::CollidingException {
         338  +
    impl ::std::convert::From<Builder> for crate::error::CollidingError {
  339    339   
        fn from(builder: Builder) -> Self {
  340    340   
            builder.build()
  341    341   
        }
  342    342   
    }
  343         -
    /// A builder for [`CollidingException`](crate::error::CollidingException).
         343  +
    /// A builder for [`CollidingError`](crate::error::CollidingError).
  344    344   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  345    345   
    pub struct Builder {}
  346    346   
    impl Builder {
  347         -
        /// Consumes the builder and constructs a [`CollidingException`](crate::error::CollidingException).
  348         -
        pub fn build(self) -> crate::error::CollidingException {
         347  +
        /// Consumes the builder and constructs a [`CollidingError`](crate::error::CollidingError).
         348  +
        pub fn build(self) -> crate::error::CollidingError {
  349    349   
            self.build_enforcing_all_constraints()
  350    350   
        }
  351         -
        fn build_enforcing_all_constraints(self) -> crate::error::CollidingException {
  352         -
            crate::error::CollidingException {}
         351  +
        fn build_enforcing_all_constraints(self) -> crate::error::CollidingError {
         352  +
            crate::error::CollidingError {}
  353    353   
        }
  354    354   
    }
  355    355   
}
  356         -
/// See [`CollidingError`](crate::error::CollidingError).
  357         -
pub mod colliding_error {
         356  +
/// See [`CollidingException`](crate::error::CollidingException).
         357  +
pub mod colliding_exception {
  358    358   
  359         -
    impl ::std::convert::From<Builder> for crate::error::CollidingError {
         359  +
    impl ::std::convert::From<Builder> for crate::error::CollidingException {
  360    360   
        fn from(builder: Builder) -> Self {
  361    361   
            builder.build()
  362    362   
        }
  363    363   
    }
  364         -
    /// A builder for [`CollidingError`](crate::error::CollidingError).
         364  +
    /// A builder for [`CollidingException`](crate::error::CollidingException).
  365    365   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  366    366   
    pub struct Builder {}
  367    367   
    impl Builder {
  368         -
        /// Consumes the builder and constructs a [`CollidingError`](crate::error::CollidingError).
  369         -
        pub fn build(self) -> crate::error::CollidingError {
         368  +
        /// Consumes the builder and constructs a [`CollidingException`](crate::error::CollidingException).
         369  +
        pub fn build(self) -> crate::error::CollidingException {
  370    370   
            self.build_enforcing_all_constraints()
  371    371   
        }
  372         -
        fn build_enforcing_all_constraints(self) -> crate::error::CollidingError {
  373         -
            crate::error::CollidingError {}
         372  +
        fn build_enforcing_all_constraints(self) -> crate::error::CollidingException {
         373  +
            crate::error::CollidingException {}
  374    374   
        }
  375    375   
    }
  376    376   
}

tmp-codegen-diff/codegen-server-test/naming_test_ops-http0x/rust-server-codegen/src/input.rs

@@ -1,1 +405,405 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[derive(
    4      4   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      5   
)]
    6         -
pub struct RpcEchoInput {
           6  +
pub struct ReservedWordsAsMembersInput {
    7      7   
    #[allow(missing_docs)] // documentation missing in model
    8      8   
    pub r#as: ::std::option::Option<i32>,
    9      9   
    #[allow(missing_docs)] // documentation missing in model
   10     10   
    pub r#async: ::std::option::Option<bool>,
   11     11   
    #[allow(missing_docs)] // documentation missing in model
   12     12   
    pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
   13     13   
    #[allow(missing_docs)] // documentation missing in model
   14     14   
    pub self_: ::std::option::Option<bool>,
   15     15   
    #[allow(missing_docs)] // documentation missing in model
   16     16   
    pub crate_: ::std::option::Option<bool>,
   17     17   
    #[allow(missing_docs)] // documentation missing in model
   18     18   
    pub super_: ::std::option::Option<bool>,
   19     19   
    #[allow(missing_docs)] // documentation missing in model
   20     20   
    pub build_value: ::std::option::Option<::std::string::String>,
   21     21   
    #[allow(missing_docs)] // documentation missing in model
   22     22   
    pub default_value: ::std::option::Option<::std::string::String>,
   23     23   
    #[allow(missing_docs)] // documentation missing in model
   24     24   
    pub send: ::std::option::Option<::std::string::String>,
   25     25   
}
   26         -
impl RpcEchoInput {
          26  +
impl ReservedWordsAsMembersInput {
   27     27   
    #[allow(missing_docs)] // documentation missing in model
   28     28   
    pub fn r#as(&self) -> ::std::option::Option<i32> {
   29     29   
        self.r#as
   30     30   
    }
   31     31   
    #[allow(missing_docs)] // documentation missing in model
   32     32   
    pub fn r#async(&self) -> ::std::option::Option<bool> {
   33     33   
        self.r#async
   34     34   
    }
   35     35   
    #[allow(missing_docs)] // documentation missing in model
   36     36   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
   37     37   
        self.r#enum.as_ref()
   38     38   
    }
   39     39   
    #[allow(missing_docs)] // documentation missing in model
   40     40   
    pub fn self_(&self) -> ::std::option::Option<bool> {
   41     41   
        self.self_
   42     42   
    }
   43     43   
    #[allow(missing_docs)] // documentation missing in model
   44     44   
    pub fn crate_(&self) -> ::std::option::Option<bool> {
   45     45   
        self.crate_
   46     46   
    }
   47     47   
    #[allow(missing_docs)] // documentation missing in model
   48     48   
    pub fn super_(&self) -> ::std::option::Option<bool> {
   49     49   
        self.super_
   50     50   
    }
   51     51   
    #[allow(missing_docs)] // documentation missing in model
   52     52   
    pub fn build_value(&self) -> ::std::option::Option<&str> {
   53     53   
        self.build_value.as_deref()
   54     54   
    }
   55     55   
    #[allow(missing_docs)] // documentation missing in model
   56     56   
    pub fn default_value(&self) -> ::std::option::Option<&str> {
   57     57   
        self.default_value.as_deref()
   58     58   
    }
   59     59   
    #[allow(missing_docs)] // documentation missing in model
   60     60   
    pub fn send(&self) -> ::std::option::Option<&str> {
   61     61   
        self.send.as_deref()
   62     62   
    }
   63     63   
}
   64         -
impl RpcEchoInput {
   65         -
    /// Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::input::RpcEchoInput).
   66         -
    pub fn builder() -> crate::input::rpc_echo_input::Builder {
   67         -
        crate::input::rpc_echo_input::Builder::default()
          64  +
impl ReservedWordsAsMembersInput {
          65  +
    /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
          66  +
    pub fn builder() -> crate::input::reserved_words_as_members_input::Builder {
          67  +
        crate::input::reserved_words_as_members_input::Builder::default()
   68     68   
    }
   69     69   
}
   70         -
impl crate::constrained::Constrained for crate::input::RpcEchoInput {
   71         -
    type Unconstrained = crate::input::rpc_echo_input::Builder;
          70  +
impl crate::constrained::Constrained for crate::input::ReservedWordsAsMembersInput {
          71  +
    type Unconstrained = crate::input::reserved_words_as_members_input::Builder;
   72     72   
}
   73     73   
   74     74   
#[allow(missing_docs)] // documentation missing in model
   75     75   
#[derive(
   76     76   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   77     77   
)]
   78         -
pub struct MatchInput {
   79         -
    #[allow(missing_docs)] // documentation missing in model
   80         -
    pub r#as: ::std::option::Option<i32>,
   81         -
    #[allow(missing_docs)] // documentation missing in model
   82         -
    pub r#async: ::std::option::Option<bool>,
   83         -
    #[allow(missing_docs)] // documentation missing in model
   84         -
    pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
   85         -
    #[allow(missing_docs)] // documentation missing in model
   86         -
    pub self_: ::std::option::Option<bool>,
   87         -
    #[allow(missing_docs)] // documentation missing in model
   88         -
    pub crate_: ::std::option::Option<bool>,
   89         -
    #[allow(missing_docs)] // documentation missing in model
   90         -
    pub super_: ::std::option::Option<bool>,
   91         -
    #[allow(missing_docs)] // documentation missing in model
   92         -
    pub build_value: ::std::option::Option<::std::string::String>,
          78  +
pub struct StructureNamePunningInput {
   93     79   
    #[allow(missing_docs)] // documentation missing in model
   94         -
    pub default_value: ::std::option::Option<::std::string::String>,
          80  +
    pub regular_string: ::std::option::Option<::std::string::String>,
   95     81   
    #[allow(missing_docs)] // documentation missing in model
   96         -
    pub send: ::std::option::Option<::std::string::String>,
          82  +
    pub punned_vec: ::std::option::Option<crate::model::Vec>,
   97     83   
}
   98         -
impl MatchInput {
   99         -
    #[allow(missing_docs)] // documentation missing in model
  100         -
    pub fn r#as(&self) -> ::std::option::Option<i32> {
  101         -
        self.r#as
  102         -
    }
  103         -
    #[allow(missing_docs)] // documentation missing in model
  104         -
    pub fn r#async(&self) -> ::std::option::Option<bool> {
  105         -
        self.r#async
  106         -
    }
  107         -
    #[allow(missing_docs)] // documentation missing in model
  108         -
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
  109         -
        self.r#enum.as_ref()
  110         -
    }
  111         -
    #[allow(missing_docs)] // documentation missing in model
  112         -
    pub fn self_(&self) -> ::std::option::Option<bool> {
  113         -
        self.self_
  114         -
    }
  115         -
    #[allow(missing_docs)] // documentation missing in model
  116         -
    pub fn crate_(&self) -> ::std::option::Option<bool> {
  117         -
        self.crate_
  118         -
    }
  119         -
    #[allow(missing_docs)] // documentation missing in model
  120         -
    pub fn super_(&self) -> ::std::option::Option<bool> {
  121         -
        self.super_
  122         -
    }
  123         -
    #[allow(missing_docs)] // documentation missing in model
  124         -
    pub fn build_value(&self) -> ::std::option::Option<&str> {
  125         -
        self.build_value.as_deref()
  126         -
    }
          84  +
impl StructureNamePunningInput {
  127     85   
    #[allow(missing_docs)] // documentation missing in model
  128         -
    pub fn default_value(&self) -> ::std::option::Option<&str> {
  129         -
        self.default_value.as_deref()
          86  +
    pub fn regular_string(&self) -> ::std::option::Option<&str> {
          87  +
        self.regular_string.as_deref()
  130     88   
    }
  131     89   
    #[allow(missing_docs)] // documentation missing in model
  132         -
    pub fn send(&self) -> ::std::option::Option<&str> {
  133         -
        self.send.as_deref()
          90  +
    pub fn punned_vec(&self) -> ::std::option::Option<&crate::model::Vec> {
          91  +
        self.punned_vec.as_ref()
  134     92   
    }
  135     93   
}
  136         -
impl MatchInput {
  137         -
    /// Creates a new builder-style object to manufacture [`MatchInput`](crate::input::MatchInput).
  138         -
    pub fn builder() -> crate::input::match_input::Builder {
  139         -
        crate::input::match_input::Builder::default()
          94  +
impl StructureNamePunningInput {
          95  +
    /// Creates a new builder-style object to manufacture [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
          96  +
    pub fn builder() -> crate::input::structure_name_punning_input::Builder {
          97  +
        crate::input::structure_name_punning_input::Builder::default()
  140     98   
    }
  141     99   
}
  142         -
impl crate::constrained::Constrained for crate::input::MatchInput {
  143         -
    type Unconstrained = crate::input::match_input::Builder;
         100  +
impl crate::constrained::Constrained for crate::input::StructureNamePunningInput {
         101  +
    type Unconstrained = crate::input::structure_name_punning_input::Builder;
  144    102   
}
  145    103   
  146    104   
#[allow(missing_docs)] // documentation missing in model
  147    105   
#[derive(
  148    106   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  149    107   
)]
  150         -
pub struct OptionInput {
  151         -
    #[allow(missing_docs)] // documentation missing in model
  152         -
    pub pv_member: ::std::option::Option<bool>,
  153         -
}
  154         -
impl OptionInput {
  155         -
    #[allow(missing_docs)] // documentation missing in model
  156         -
    pub fn pv_member(&self) -> ::std::option::Option<bool> {
  157         -
        self.pv_member
  158         -
    }
  159         -
}
  160         -
impl OptionInput {
  161         -
    /// Creates a new builder-style object to manufacture [`OptionInput`](crate::input::OptionInput).
  162         -
    pub fn builder() -> crate::input::option_input::Builder {
  163         -
        crate::input::option_input::Builder::default()
         108  +
pub struct ErrCollisionsInput {}
         109  +
impl ErrCollisionsInput {
         110  +
    /// Creates a new builder-style object to manufacture [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
         111  +
    pub fn builder() -> crate::input::err_collisions_input::Builder {
         112  +
        crate::input::err_collisions_input::Builder::default()
  164    113   
    }
  165    114   
}
  166         -
impl crate::constrained::Constrained for crate::input::OptionInput {
  167         -
    type Unconstrained = crate::input::option_input::Builder;
         115  +
impl crate::constrained::Constrained for crate::input::ErrCollisionsInput {
         116  +
    type Unconstrained = crate::input::err_collisions_input::Builder;
  168    117   
}
  169    118   
  170    119   
#[allow(missing_docs)] // documentation missing in model
  171    120   
#[derive(
  172    121   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  173    122   
)]
  174    123   
pub struct ResultInput {
  175    124   
    #[allow(missing_docs)] // documentation missing in model
  176    125   
    pub pv_member: ::std::option::Option<bool>,
  177    126   
}
  178    127   
impl ResultInput {
  179    128   
    #[allow(missing_docs)] // documentation missing in model
  180    129   
    pub fn pv_member(&self) -> ::std::option::Option<bool> {
  181    130   
        self.pv_member
  182    131   
    }
  183    132   
}
  184    133   
impl ResultInput {
  185    134   
    /// Creates a new builder-style object to manufacture [`ResultInput`](crate::input::ResultInput).
  186    135   
    pub fn builder() -> crate::input::result_input::Builder {
  187    136   
        crate::input::result_input::Builder::default()
  188    137   
    }
  189    138   
}
  190    139   
impl crate::constrained::Constrained for crate::input::ResultInput {
  191    140   
    type Unconstrained = crate::input::result_input::Builder;
  192    141   
}
  193    142   
  194    143   
#[allow(missing_docs)] // documentation missing in model
  195    144   
#[derive(
  196    145   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  197    146   
)]
  198         -
pub struct ErrCollisionsInput {}
  199         -
impl ErrCollisionsInput {
  200         -
    /// Creates a new builder-style object to manufacture [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
  201         -
    pub fn builder() -> crate::input::err_collisions_input::Builder {
  202         -
        crate::input::err_collisions_input::Builder::default()
         147  +
pub struct OptionInput {
         148  +
    #[allow(missing_docs)] // documentation missing in model
         149  +
    pub pv_member: ::std::option::Option<bool>,
         150  +
}
         151  +
impl OptionInput {
         152  +
    #[allow(missing_docs)] // documentation missing in model
         153  +
    pub fn pv_member(&self) -> ::std::option::Option<bool> {
         154  +
        self.pv_member
  203    155   
    }
  204    156   
}
  205         -
impl crate::constrained::Constrained for crate::input::ErrCollisionsInput {
  206         -
    type Unconstrained = crate::input::err_collisions_input::Builder;
         157  +
impl OptionInput {
         158  +
    /// Creates a new builder-style object to manufacture [`OptionInput`](crate::input::OptionInput).
         159  +
    pub fn builder() -> crate::input::option_input::Builder {
         160  +
        crate::input::option_input::Builder::default()
         161  +
    }
         162  +
}
         163  +
impl crate::constrained::Constrained for crate::input::OptionInput {
         164  +
    type Unconstrained = crate::input::option_input::Builder;
  207    165   
}
  208    166   
  209    167   
#[allow(missing_docs)] // documentation missing in model
  210    168   
#[derive(
  211    169   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  212    170   
)]
  213         -
pub struct StructureNamePunningInput {
         171  +
pub struct MatchInput {
  214    172   
    #[allow(missing_docs)] // documentation missing in model
  215         -
    pub regular_string: ::std::option::Option<::std::string::String>,
         173  +
    pub r#as: ::std::option::Option<i32>,
  216    174   
    #[allow(missing_docs)] // documentation missing in model
  217         -
    pub punned_vec: ::std::option::Option<crate::model::Vec>,
         175  +
    pub r#async: ::std::option::Option<bool>,
         176  +
    #[allow(missing_docs)] // documentation missing in model
         177  +
    pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
         178  +
    #[allow(missing_docs)] // documentation missing in model
         179  +
    pub self_: ::std::option::Option<bool>,
         180  +
    #[allow(missing_docs)] // documentation missing in model
         181  +
    pub crate_: ::std::option::Option<bool>,
         182  +
    #[allow(missing_docs)] // documentation missing in model
         183  +
    pub super_: ::std::option::Option<bool>,
         184  +
    #[allow(missing_docs)] // documentation missing in model
         185  +
    pub build_value: ::std::option::Option<::std::string::String>,
         186  +
    #[allow(missing_docs)] // documentation missing in model
         187  +
    pub default_value: ::std::option::Option<::std::string::String>,
         188  +
    #[allow(missing_docs)] // documentation missing in model
         189  +
    pub send: ::std::option::Option<::std::string::String>,
  218    190   
}
  219         -
impl StructureNamePunningInput {
         191  +
impl MatchInput {
  220    192   
    #[allow(missing_docs)] // documentation missing in model
  221         -
    pub fn regular_string(&self) -> ::std::option::Option<&str> {
  222         -
        self.regular_string.as_deref()
         193  +
    pub fn r#as(&self) -> ::std::option::Option<i32> {
         194  +
        self.r#as
  223    195   
    }
  224    196   
    #[allow(missing_docs)] // documentation missing in model
  225         -
    pub fn punned_vec(&self) -> ::std::option::Option<&crate::model::Vec> {
  226         -
        self.punned_vec.as_ref()
         197  +
    pub fn r#async(&self) -> ::std::option::Option<bool> {
         198  +
        self.r#async
         199  +
    }
         200  +
    #[allow(missing_docs)] // documentation missing in model
         201  +
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
         202  +
        self.r#enum.as_ref()
         203  +
    }
         204  +
    #[allow(missing_docs)] // documentation missing in model
         205  +
    pub fn self_(&self) -> ::std::option::Option<bool> {
         206  +
        self.self_
         207  +
    }
         208  +
    #[allow(missing_docs)] // documentation missing in model
         209  +
    pub fn crate_(&self) -> ::std::option::Option<bool> {
         210  +
        self.crate_
         211  +
    }
         212  +
    #[allow(missing_docs)] // documentation missing in model
         213  +
    pub fn super_(&self) -> ::std::option::Option<bool> {
         214  +
        self.super_
         215  +
    }
         216  +
    #[allow(missing_docs)] // documentation missing in model
         217  +
    pub fn build_value(&self) -> ::std::option::Option<&str> {
         218  +
        self.build_value.as_deref()
         219  +
    }
         220  +
    #[allow(missing_docs)] // documentation missing in model
         221  +
    pub fn default_value(&self) -> ::std::option::Option<&str> {
         222  +
        self.default_value.as_deref()
         223  +
    }
         224  +
    #[allow(missing_docs)] // documentation missing in model
         225  +
    pub fn send(&self) -> ::std::option::Option<&str> {
         226  +
        self.send.as_deref()
  227    227   
    }
  228    228   
}
  229         -
impl StructureNamePunningInput {
  230         -
    /// Creates a new builder-style object to manufacture [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
  231         -
    pub fn builder() -> crate::input::structure_name_punning_input::Builder {
  232         -
        crate::input::structure_name_punning_input::Builder::default()
         229  +
impl MatchInput {
         230  +
    /// Creates a new builder-style object to manufacture [`MatchInput`](crate::input::MatchInput).
         231  +
    pub fn builder() -> crate::input::match_input::Builder {
         232  +
        crate::input::match_input::Builder::default()
  233    233   
    }
  234    234   
}
  235         -
impl crate::constrained::Constrained for crate::input::StructureNamePunningInput {
  236         -
    type Unconstrained = crate::input::structure_name_punning_input::Builder;
         235  +
impl crate::constrained::Constrained for crate::input::MatchInput {
         236  +
    type Unconstrained = crate::input::match_input::Builder;
  237    237   
}
  238    238   
  239    239   
#[allow(missing_docs)] // documentation missing in model
  240    240   
#[derive(
  241    241   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  242    242   
)]
  243         -
pub struct ReservedWordsAsMembersInput {
         243  +
pub struct RpcEchoInput {
  244    244   
    #[allow(missing_docs)] // documentation missing in model
  245    245   
    pub r#as: ::std::option::Option<i32>,
  246    246   
    #[allow(missing_docs)] // documentation missing in model
  247    247   
    pub r#async: ::std::option::Option<bool>,
  248    248   
    #[allow(missing_docs)] // documentation missing in model
  249    249   
    pub r#enum: ::std::option::Option<crate::model::UnknownVariantCollidingEnum>,
  250    250   
    #[allow(missing_docs)] // documentation missing in model
  251    251   
    pub self_: ::std::option::Option<bool>,
  252    252   
    #[allow(missing_docs)] // documentation missing in model
  253    253   
    pub crate_: ::std::option::Option<bool>,
  254    254   
    #[allow(missing_docs)] // documentation missing in model
  255    255   
    pub super_: ::std::option::Option<bool>,
  256    256   
    #[allow(missing_docs)] // documentation missing in model
  257    257   
    pub build_value: ::std::option::Option<::std::string::String>,
  258    258   
    #[allow(missing_docs)] // documentation missing in model
  259    259   
    pub default_value: ::std::option::Option<::std::string::String>,
  260    260   
    #[allow(missing_docs)] // documentation missing in model
  261    261   
    pub send: ::std::option::Option<::std::string::String>,
  262    262   
}
  263         -
impl ReservedWordsAsMembersInput {
         263  +
impl RpcEchoInput {
  264    264   
    #[allow(missing_docs)] // documentation missing in model
  265    265   
    pub fn r#as(&self) -> ::std::option::Option<i32> {
  266    266   
        self.r#as
  267    267   
    }
  268    268   
    #[allow(missing_docs)] // documentation missing in model
  269    269   
    pub fn r#async(&self) -> ::std::option::Option<bool> {
  270    270   
        self.r#async
  271    271   
    }
  272    272   
    #[allow(missing_docs)] // documentation missing in model
  273    273   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::UnknownVariantCollidingEnum> {
  274    274   
        self.r#enum.as_ref()
  275    275   
    }
  276    276   
    #[allow(missing_docs)] // documentation missing in model
  277    277   
    pub fn self_(&self) -> ::std::option::Option<bool> {
  278    278   
        self.self_
  279    279   
    }
  280    280   
    #[allow(missing_docs)] // documentation missing in model
  281    281   
    pub fn crate_(&self) -> ::std::option::Option<bool> {
  282    282   
        self.crate_
  283    283   
    }
  284    284   
    #[allow(missing_docs)] // documentation missing in model
  285    285   
    pub fn super_(&self) -> ::std::option::Option<bool> {
  286    286   
        self.super_
  287    287   
    }
  288    288   
    #[allow(missing_docs)] // documentation missing in model
  289    289   
    pub fn build_value(&self) -> ::std::option::Option<&str> {
  290    290   
        self.build_value.as_deref()
  291    291   
    }
  292    292   
    #[allow(missing_docs)] // documentation missing in model
  293    293   
    pub fn default_value(&self) -> ::std::option::Option<&str> {
  294    294   
        self.default_value.as_deref()
  295    295   
    }
  296    296   
    #[allow(missing_docs)] // documentation missing in model
  297    297   
    pub fn send(&self) -> ::std::option::Option<&str> {
  298    298   
        self.send.as_deref()
  299    299   
    }
  300    300   
}
  301         -
impl ReservedWordsAsMembersInput {
  302         -
    /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
  303         -
    pub fn builder() -> crate::input::reserved_words_as_members_input::Builder {
  304         -
        crate::input::reserved_words_as_members_input::Builder::default()
         301  +
impl RpcEchoInput {
         302  +
    /// Creates a new builder-style object to manufacture [`RpcEchoInput`](crate::input::RpcEchoInput).
         303  +
    pub fn builder() -> crate::input::rpc_echo_input::Builder {
         304  +
        crate::input::rpc_echo_input::Builder::default()
  305    305   
    }
  306    306   
}
  307         -
impl crate::constrained::Constrained for crate::input::ReservedWordsAsMembersInput {
  308         -
    type Unconstrained = crate::input::reserved_words_as_members_input::Builder;
         307  +
impl crate::constrained::Constrained for crate::input::RpcEchoInput {
         308  +
    type Unconstrained = crate::input::rpc_echo_input::Builder;
  309    309   
}
  310         -
/// See [`RpcEchoInput`](crate::input::RpcEchoInput).
  311         -
pub mod rpc_echo_input {
         310  +
/// See [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
         311  +
pub mod reserved_words_as_members_input {
  312    312   
  313    313   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  314    314   
    /// Holds one variant for each of the ways the builder can fail.
  315    315   
    #[non_exhaustive]
  316    316   
    #[allow(clippy::enum_variant_names)]
  317    317   
    pub enum ConstraintViolation {
  318         -
        /// Constraint violation occurred building member `r#enum` when building `RpcEchoInput`.
         318  +
        /// Constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`.
  319    319   
        #[doc(hidden)]
  320    320   
        Enum(crate::model::unknown_variant_colliding_enum::ConstraintViolation),
  321    321   
    }
  322    322   
    impl ::std::fmt::Display for ConstraintViolation {
  323    323   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  324    324   
            match self {
  325         -
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `RpcEchoInput`"),
         325  +
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`"),
  326    326   
            }
  327    327   
        }
  328    328   
    }
  329    329   
    impl ::std::error::Error for ConstraintViolation {}
  330    330   
    impl ConstraintViolation {
  331    331   
        pub(crate) fn as_validation_exception_field(
  332    332   
            self,
  333    333   
            path: ::std::string::String,
  334    334   
        ) -> crate::model::ValidationExceptionField {
  335    335   
            match self {
  336    336   
                ConstraintViolation::Enum(inner) => {
  337    337   
                    inner.as_validation_exception_field(path + "/enum")
  338    338   
                }
  339    339   
            }
  340    340   
        }
  341    341   
    }
  342    342   
    impl ::std::convert::From<ConstraintViolation>
  343    343   
        for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
  344    344   
    {
  345    345   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  346    346   
            let first_validation_exception_field =
  347    347   
                constraint_violation.as_validation_exception_field("".to_owned());
  348    348   
            let validation_exception = crate::error::ValidationException {
  349    349   
                message: format!(
  350    350   
                    "1 validation error detected. {}",
  351    351   
                    &first_validation_exception_field.message
  352    352   
                ),
  353    353   
                field_list: Some(vec![first_validation_exception_field]),
  354    354   
            };
  355    355   
            Self::ConstraintViolation(
  356    356   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  357    357   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  358    358   
                            )
  359    359   
        }
  360    360   
    }
  361    361   
    impl ::std::convert::From<Builder>
  362         -
        for crate::constrained::MaybeConstrained<crate::input::RpcEchoInput>
         362  +
        for crate::constrained::MaybeConstrained<crate::input::ReservedWordsAsMembersInput>
  363    363   
    {
  364    364   
        fn from(builder: Builder) -> Self {
  365    365   
            Self::Unconstrained(builder)
  366    366   
        }
  367    367   
    }
  368         -
    impl ::std::convert::TryFrom<Builder> for crate::input::RpcEchoInput {
         368  +
    impl ::std::convert::TryFrom<Builder> for crate::input::ReservedWordsAsMembersInput {
  369    369   
        type Error = ConstraintViolation;
  370    370   
  371    371   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  372    372   
            builder.build()
  373    373   
        }
  374    374   
    }
  375         -
    /// A builder for [`RpcEchoInput`](crate::input::RpcEchoInput).
         375  +
    /// A builder for [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
  376    376   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  377    377   
    pub struct Builder {
  378    378   
        pub(crate) r#as: ::std::option::Option<i32>,
  379    379   
        pub(crate) r#async: ::std::option::Option<bool>,
  380    380   
        pub(crate) r#enum: ::std::option::Option<
  381    381   
            crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
  382    382   
        >,
  383    383   
        pub(crate) self_: ::std::option::Option<bool>,
  384    384   
        pub(crate) crate_: ::std::option::Option<bool>,
  385    385   
        pub(crate) super_: ::std::option::Option<bool>,
@@ -453,453 +560,715 @@
  473    473   
        }
  474    474   
        #[allow(missing_docs)] // documentation missing in model
  475    475   
        pub fn default_value(
  476    476   
            mut self,
  477    477   
            input: ::std::option::Option<::std::string::String>,
  478    478   
        ) -> Self {
  479    479   
            self.default_value = input;
  480    480   
            self
  481    481   
        }
  482    482   
        #[allow(missing_docs)] // documentation missing in model
  483         -
        pub(crate) fn set_default(
         483  +
        pub(crate) fn set_default(
         484  +
            mut self,
         485  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         486  +
        ) -> Self {
         487  +
            self.default_value = input.map(|v| v.into());
         488  +
            self
         489  +
        }
         490  +
        #[allow(missing_docs)] // documentation missing in model
         491  +
        pub fn send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         492  +
            self.send = input;
         493  +
            self
         494  +
        }
         495  +
        #[allow(missing_docs)] // documentation missing in model
         496  +
        pub(crate) fn set_send(
         497  +
            mut self,
         498  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         499  +
        ) -> Self {
         500  +
            self.send = input.map(|v| v.into());
         501  +
            self
         502  +
        }
         503  +
        /// Consumes the builder and constructs a [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
         504  +
        ///
         505  +
        /// The builder fails to construct a [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) if a [`ConstraintViolation`] occurs.
         506  +
        ///
         507  +
        pub fn build(
         508  +
            self,
         509  +
        ) -> Result<crate::input::ReservedWordsAsMembersInput, ConstraintViolation> {
         510  +
            self.build_enforcing_all_constraints()
         511  +
        }
         512  +
        fn build_enforcing_all_constraints(
         513  +
            self,
         514  +
        ) -> Result<crate::input::ReservedWordsAsMembersInput, ConstraintViolation> {
         515  +
            Ok(crate::input::ReservedWordsAsMembersInput {
         516  +
                r#as: self.r#as,
         517  +
                r#async: self.r#async,
         518  +
                r#enum: self
         519  +
                    .r#enum
         520  +
                    .map(|v| match v {
         521  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
         522  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
         523  +
                    })
         524  +
                    .map(|res| res.map_err(ConstraintViolation::Enum))
         525  +
                    .transpose()?,
         526  +
                self_: self.self_,
         527  +
                crate_: self.crate_,
         528  +
                super_: self.super_,
         529  +
                build_value: self.build_value,
         530  +
                default_value: self.default_value,
         531  +
                send: self.send,
         532  +
            })
         533  +
        }
         534  +
    }
         535  +
}
         536  +
/// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
         537  +
pub mod structure_name_punning_input {
         538  +
         539  +
    impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
         540  +
        fn from(builder: Builder) -> Self {
         541  +
            builder.build()
         542  +
        }
         543  +
    }
         544  +
    /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
         545  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         546  +
    pub struct Builder {
         547  +
        pub(crate) regular_string: ::std::option::Option<::std::string::String>,
         548  +
        pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
         549  +
    }
         550  +
    impl Builder {
         551  +
        #[allow(missing_docs)] // documentation missing in model
         552  +
        pub fn regular_string(
         553  +
            mut self,
         554  +
            input: ::std::option::Option<::std::string::String>,
         555  +
        ) -> Self {
         556  +
            self.regular_string = input;
         557  +
            self
         558  +
        }
         559  +
        #[allow(missing_docs)] // documentation missing in model
         560  +
        pub(crate) fn set_regular_string(
         561  +
            mut self,
         562  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         563  +
        ) -> Self {
         564  +
            self.regular_string = input.map(|v| v.into());
         565  +
            self
         566  +
        }
         567  +
        #[allow(missing_docs)] // documentation missing in model
         568  +
        pub fn punned_vec(mut self, input: ::std::option::Option<crate::model::Vec>) -> Self {
         569  +
            self.punned_vec = input;
         570  +
            self
         571  +
        }
         572  +
        #[allow(missing_docs)] // documentation missing in model
         573  +
        pub(crate) fn set_punned_vec(
         574  +
            mut self,
         575  +
            input: Option<impl ::std::convert::Into<crate::model::Vec>>,
         576  +
        ) -> Self {
         577  +
            self.punned_vec = input.map(|v| v.into());
         578  +
            self
         579  +
        }
         580  +
        /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
         581  +
        pub fn build(self) -> crate::input::StructureNamePunningInput {
         582  +
            self.build_enforcing_all_constraints()
         583  +
        }
         584  +
        fn build_enforcing_all_constraints(self) -> crate::input::StructureNamePunningInput {
         585  +
            crate::input::StructureNamePunningInput {
         586  +
                regular_string: self.regular_string,
         587  +
                punned_vec: self.punned_vec,
         588  +
            }
         589  +
        }
         590  +
    }
         591  +
}
         592  +
/// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
         593  +
pub mod err_collisions_input {
         594  +
         595  +
    impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
         596  +
        fn from(builder: Builder) -> Self {
         597  +
            builder.build()
         598  +
        }
         599  +
    }
         600  +
    /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
         601  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         602  +
    pub struct Builder {}
         603  +
    impl Builder {
         604  +
        /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
         605  +
        pub fn build(self) -> crate::input::ErrCollisionsInput {
         606  +
            self.build_enforcing_all_constraints()
         607  +
        }
         608  +
        fn build_enforcing_all_constraints(self) -> crate::input::ErrCollisionsInput {
         609  +
            crate::input::ErrCollisionsInput {}
         610  +
        }
         611  +
    }
         612  +
}
         613  +
/// See [`ResultInput`](crate::input::ResultInput).
         614  +
pub mod result_input {
         615  +
         616  +
    impl ::std::convert::From<Builder> for crate::input::ResultInput {
         617  +
        fn from(builder: Builder) -> Self {
         618  +
            builder.build()
         619  +
        }
         620  +
    }
         621  +
    /// A builder for [`ResultInput`](crate::input::ResultInput).
         622  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         623  +
    pub struct Builder {
         624  +
        pub(crate) pv_member: ::std::option::Option<bool>,
         625  +
    }
         626  +
    impl Builder {
         627  +
        #[allow(missing_docs)] // documentation missing in model
         628  +
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
         629  +
            self.pv_member = input;
         630  +
            self
         631  +
        }
         632  +
        #[allow(missing_docs)] // documentation missing in model
         633  +
        pub(crate) fn set_pv_member(
  484    634   
            mut self,
  485         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         635  +
            input: Option<impl ::std::convert::Into<bool>>,
  486    636   
        ) -> Self {
  487         -
            self.default_value = input.map(|v| v.into());
         637  +
            self.pv_member = input.map(|v| v.into());
  488    638   
            self
  489    639   
        }
         640  +
        /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
         641  +
        pub fn build(self) -> crate::input::ResultInput {
         642  +
            self.build_enforcing_all_constraints()
         643  +
        }
         644  +
        fn build_enforcing_all_constraints(self) -> crate::input::ResultInput {
         645  +
            crate::input::ResultInput {
         646  +
                pv_member: self.pv_member,
         647  +
            }
         648  +
        }
         649  +
    }
         650  +
}
         651  +
/// See [`OptionInput`](crate::input::OptionInput).
         652  +
pub mod option_input {
         653  +
         654  +
    impl ::std::convert::From<Builder> for crate::input::OptionInput {
         655  +
        fn from(builder: Builder) -> Self {
         656  +
            builder.build()
         657  +
        }
         658  +
    }
         659  +
    /// A builder for [`OptionInput`](crate::input::OptionInput).
         660  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         661  +
    pub struct Builder {
         662  +
        pub(crate) pv_member: ::std::option::Option<bool>,
         663  +
    }
         664  +
    impl Builder {
  490    665   
        #[allow(missing_docs)] // documentation missing in model
  491         -
        pub fn send(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  492         -
            self.send = input;
         666  +
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
         667  +
            self.pv_member = input;
  493    668   
            self
  494    669   
        }
  495    670   
        #[allow(missing_docs)] // documentation missing in model
  496         -
        pub(crate) fn set_send(
         671  +
        pub(crate) fn set_pv_member(
  497    672   
            mut self,
  498         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
         673  +
            input: Option<impl ::std::convert::Into<bool>>,
  499    674   
        ) -> Self {
  500         -
            self.send = input.map(|v| v.into());
         675  +
            self.pv_member = input.map(|v| v.into());
  501    676   
            self
  502    677   
        }
  503         -
        /// Consumes the builder and constructs a [`RpcEchoInput`](crate::input::RpcEchoInput).
  504         -
        ///
  505         -
        /// The builder fails to construct a [`RpcEchoInput`](crate::input::RpcEchoInput) if a [`ConstraintViolation`] occurs.
  506         -
        ///
  507         -
        pub fn build(self) -> Result<crate::input::RpcEchoInput, ConstraintViolation> {
         678  +
        /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
         679  +
        pub fn build(self) -> crate::input::OptionInput {
  508    680   
            self.build_enforcing_all_constraints()
  509    681   
        }
  510         -
        fn build_enforcing_all_constraints(
  511         -
            self,
  512         -
        ) -> Result<crate::input::RpcEchoInput, ConstraintViolation> {
  513         -
            Ok(crate::input::RpcEchoInput {
  514         -
                r#as: self.r#as,
  515         -
                r#async: self.r#async,
  516         -
                r#enum: self
  517         -
                    .r#enum
  518         -
                    .map(|v| match v {
  519         -
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  520         -
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  521         -
                    })
  522         -
                    .map(|res| res.map_err(ConstraintViolation::Enum))
  523         -
                    .transpose()?,
  524         -
                self_: self.self_,
  525         -
                crate_: self.crate_,
  526         -
                super_: self.super_,
  527         -
                build_value: self.build_value,
  528         -
                default_value: self.default_value,
  529         -
                send: self.send,
  530         -
            })
         682  +
        fn build_enforcing_all_constraints(self) -> crate::input::OptionInput {
         683  +
            crate::input::OptionInput {
         684  +
                pv_member: self.pv_member,
         685  +
            }
  531    686   
        }
  532    687   
    }
  533    688   
}
  534    689   
/// See [`MatchInput`](crate::input::MatchInput).
  535    690   
pub mod match_input {
  536    691   
  537    692   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  538    693   
    /// Holds one variant for each of the ways the builder can fail.
  539    694   
    #[non_exhaustive]
  540    695   
    #[allow(clippy::enum_variant_names)]
@@ -728,883 +1006,1008 @@
  748    903   
                self_: self.self_,
  749    904   
                crate_: self.crate_,
  750    905   
                super_: self.super_,
  751    906   
                build_value: self.build_value,
  752    907   
                default_value: self.default_value,
  753    908   
                send: self.send,
  754    909   
            })
  755    910   
        }
  756    911   
    }
  757    912   
}
  758         -
/// See [`OptionInput`](crate::input::OptionInput).
  759         -
pub mod option_input {
  760         -
  761         -
    impl ::std::convert::From<Builder> for crate::input::OptionInput {
  762         -
        fn from(builder: Builder) -> Self {
  763         -
            builder.build()
  764         -
        }
  765         -
    }
  766         -
    /// A builder for [`OptionInput`](crate::input::OptionInput).
  767         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  768         -
    pub struct Builder {
  769         -
        pub(crate) pv_member: ::std::option::Option<bool>,
  770         -
    }
  771         -
    impl Builder {
  772         -
        #[allow(missing_docs)] // documentation missing in model
  773         -
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
  774         -
            self.pv_member = input;
  775         -
            self
  776         -
        }
  777         -
        #[allow(missing_docs)] // documentation missing in model
  778         -
        pub(crate) fn set_pv_member(
  779         -
            mut self,
  780         -
            input: Option<impl ::std::convert::Into<bool>>,
  781         -
        ) -> Self {
  782         -
            self.pv_member = input.map(|v| v.into());
  783         -
            self
  784         -
        }
  785         -
        /// Consumes the builder and constructs a [`OptionInput`](crate::input::OptionInput).
  786         -
        pub fn build(self) -> crate::input::OptionInput {
  787         -
            self.build_enforcing_all_constraints()
  788         -
        }
  789         -
        fn build_enforcing_all_constraints(self) -> crate::input::OptionInput {
  790         -
            crate::input::OptionInput {
  791         -
                pv_member: self.pv_member,
  792         -
            }
  793         -
        }
  794         -
    }
  795         -
}
  796         -
/// See [`ResultInput`](crate::input::ResultInput).
  797         -
pub mod result_input {
  798         -
  799         -
    impl ::std::convert::From<Builder> for crate::input::ResultInput {
  800         -
        fn from(builder: Builder) -> Self {
  801         -
            builder.build()
  802         -
        }
  803         -
    }
  804         -
    /// A builder for [`ResultInput`](crate::input::ResultInput).
  805         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  806         -
    pub struct Builder {
  807         -
        pub(crate) pv_member: ::std::option::Option<bool>,
  808         -
    }
  809         -
    impl Builder {
  810         -
        #[allow(missing_docs)] // documentation missing in model
  811         -
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
  812         -
            self.pv_member = input;
  813         -
            self
  814         -
        }
  815         -
        #[allow(missing_docs)] // documentation missing in model
  816         -
        pub(crate) fn set_pv_member(
  817         -
            mut self,
  818         -
            input: Option<impl ::std::convert::Into<bool>>,
  819         -
        ) -> Self {
  820         -
            self.pv_member = input.map(|v| v.into());
  821         -
            self
  822         -
        }
  823         -
        /// Consumes the builder and constructs a [`ResultInput`](crate::input::ResultInput).
  824         -
        pub fn build(self) -> crate::input::ResultInput {
  825         -
            self.build_enforcing_all_constraints()
  826         -
        }
  827         -
        fn build_enforcing_all_constraints(self) -> crate::input::ResultInput {
  828         -
            crate::input::ResultInput {
  829         -
                pv_member: self.pv_member,
  830         -
            }
  831         -
        }
  832         -
    }
  833         -
}
  834         -
/// See [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
  835         -
pub mod err_collisions_input {
  836         -
  837         -
    impl ::std::convert::From<Builder> for crate::input::ErrCollisionsInput {
  838         -
        fn from(builder: Builder) -> Self {
  839         -
            builder.build()
  840         -
        }
  841         -
    }
  842         -
    /// A builder for [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
  843         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  844         -
    pub struct Builder {}
  845         -
    impl Builder {
  846         -
        /// Consumes the builder and constructs a [`ErrCollisionsInput`](crate::input::ErrCollisionsInput).
  847         -
        pub fn build(self) -> crate::input::ErrCollisionsInput {
  848         -
            self.build_enforcing_all_constraints()
  849         -
        }
  850         -
        fn build_enforcing_all_constraints(self) -> crate::input::ErrCollisionsInput {
  851         -
            crate::input::ErrCollisionsInput {}
  852         -
        }
  853         -
    }
  854         -
}
  855         -
/// See [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
  856         -
pub mod structure_name_punning_input {
  857         -
  858         -
    impl ::std::convert::From<Builder> for crate::input::StructureNamePunningInput {
  859         -
        fn from(builder: Builder) -> Self {
  860         -
            builder.build()
  861         -
        }
  862         -
    }
  863         -
    /// A builder for [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
  864         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  865         -
    pub struct Builder {
  866         -
        pub(crate) regular_string: ::std::option::Option<::std::string::String>,
  867         -
        pub(crate) punned_vec: ::std::option::Option<crate::model::Vec>,
  868         -
    }
  869         -
    impl Builder {
  870         -
        #[allow(missing_docs)] // documentation missing in model
  871         -
        pub fn regular_string(
  872         -
            mut self,
  873         -
            input: ::std::option::Option<::std::string::String>,
  874         -
        ) -> Self {
  875         -
            self.regular_string = input;
  876         -
            self
  877         -
        }
  878         -
        #[allow(missing_docs)] // documentation missing in model
  879         -
        pub(crate) fn set_regular_string(
  880         -
            mut self,
  881         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  882         -
        ) -> Self {
  883         -
            self.regular_string = input.map(|v| v.into());
  884         -
            self
  885         -
        }
  886         -
        #[allow(missing_docs)] // documentation missing in model
  887         -
        pub fn punned_vec(mut self, input: ::std::option::Option<crate::model::Vec>) -> Self {
  888         -
            self.punned_vec = input;
  889         -
            self
  890         -
        }
  891         -
        #[allow(missing_docs)] // documentation missing in model
  892         -
        pub(crate) fn set_punned_vec(
  893         -
            mut self,
  894         -
            input: Option<impl ::std::convert::Into<crate::model::Vec>>,
  895         -
        ) -> Self {
  896         -
            self.punned_vec = input.map(|v| v.into());
  897         -
            self
  898         -
        }
  899         -
        /// Consumes the builder and constructs a [`StructureNamePunningInput`](crate::input::StructureNamePunningInput).
  900         -
        pub fn build(self) -> crate::input::StructureNamePunningInput {
  901         -
            self.build_enforcing_all_constraints()
  902         -
        }
  903         -
        fn build_enforcing_all_constraints(self) -> crate::input::StructureNamePunningInput {
  904         -
            crate::input::StructureNamePunningInput {
  905         -
                regular_string: self.regular_string,
  906         -
                punned_vec: self.punned_vec,
  907         -
            }
  908         -
        }
  909         -
    }
  910         -
}
  911         -
/// See [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
  912         -
pub mod reserved_words_as_members_input {
         913  +
/// See [`RpcEchoInput`](crate::input::RpcEchoInput).
         914  +
pub mod rpc_echo_input {
  913    915   
  914    916   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  915    917   
    /// Holds one variant for each of the ways the builder can fail.
  916    918   
    #[non_exhaustive]
  917    919   
    #[allow(clippy::enum_variant_names)]
  918    920   
    pub enum ConstraintViolation {
  919         -
        /// Constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`.
         921  +
        /// Constraint violation occurred building member `r#enum` when building `RpcEchoInput`.
  920    922   
        #[doc(hidden)]
  921    923   
        Enum(crate::model::unknown_variant_colliding_enum::ConstraintViolation),
  922    924   
    }
  923    925   
    impl ::std::fmt::Display for ConstraintViolation {
  924    926   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  925    927   
            match self {
  926         -
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `ReservedWordsAsMembersInput`"),
         928  +
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `RpcEchoInput`"),
  927    929   
            }
  928    930   
        }
  929    931   
    }
  930    932   
    impl ::std::error::Error for ConstraintViolation {}
  931    933   
    impl ConstraintViolation {
  932    934   
        pub(crate) fn as_validation_exception_field(
  933    935   
            self,
  934    936   
            path: ::std::string::String,
  935    937   
        ) -> crate::model::ValidationExceptionField {
  936    938   
            match self {
  937    939   
                ConstraintViolation::Enum(inner) => {
  938    940   
                    inner.as_validation_exception_field(path + "/enum")
  939    941   
                }
  940    942   
            }
  941    943   
        }
  942    944   
    }
  943    945   
    impl ::std::convert::From<ConstraintViolation>
  944    946   
        for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
  945    947   
    {
  946    948   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  947    949   
            let first_validation_exception_field =
  948    950   
                constraint_violation.as_validation_exception_field("".to_owned());
  949    951   
            let validation_exception = crate::error::ValidationException {
  950    952   
                message: format!(
  951    953   
                    "1 validation error detected. {}",
  952    954   
                    &first_validation_exception_field.message
  953    955   
                ),
  954    956   
                field_list: Some(vec![first_validation_exception_field]),
  955    957   
            };
  956    958   
            Self::ConstraintViolation(
  957    959   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  958    960   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  959    961   
                            )
  960    962   
        }
  961    963   
    }
  962    964   
    impl ::std::convert::From<Builder>
  963         -
        for crate::constrained::MaybeConstrained<crate::input::ReservedWordsAsMembersInput>
         965  +
        for crate::constrained::MaybeConstrained<crate::input::RpcEchoInput>
  964    966   
    {
  965    967   
        fn from(builder: Builder) -> Self {
  966    968   
            Self::Unconstrained(builder)
  967    969   
        }
  968    970   
    }
  969         -
    impl ::std::convert::TryFrom<Builder> for crate::input::ReservedWordsAsMembersInput {
         971  +
    impl ::std::convert::TryFrom<Builder> for crate::input::RpcEchoInput {
  970    972   
        type Error = ConstraintViolation;
  971    973   
  972    974   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  973    975   
            builder.build()
  974    976   
        }
  975    977   
    }
  976         -
    /// A builder for [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
         978  +
    /// A builder for [`RpcEchoInput`](crate::input::RpcEchoInput).
  977    979   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  978    980   
    pub struct Builder {
  979    981   
        pub(crate) r#as: ::std::option::Option<i32>,
  980    982   
        pub(crate) r#async: ::std::option::Option<bool>,
  981    983   
        pub(crate) r#enum: ::std::option::Option<
  982    984   
            crate::constrained::MaybeConstrained<crate::model::UnknownVariantCollidingEnum>,
  983    985   
        >,
  984    986   
        pub(crate) self_: ::std::option::Option<bool>,
  985    987   
        pub(crate) crate_: ::std::option::Option<bool>,
  986    988   
        pub(crate) super_: ::std::option::Option<bool>,
@@ -1074,1076 +1136,1136 @@
 1094   1096   
            self
 1095   1097   
        }
 1096   1098   
        #[allow(missing_docs)] // documentation missing in model
 1097   1099   
        pub(crate) fn set_send(
 1098   1100   
            mut self,
 1099   1101   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 1100   1102   
        ) -> Self {
 1101   1103   
            self.send = input.map(|v| v.into());
 1102   1104   
            self
 1103   1105   
        }
 1104         -
        /// Consumes the builder and constructs a [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput).
        1106  +
        /// Consumes the builder and constructs a [`RpcEchoInput`](crate::input::RpcEchoInput).
 1105   1107   
        ///
 1106         -
        /// The builder fails to construct a [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) if a [`ConstraintViolation`] occurs.
        1108  +
        /// The builder fails to construct a [`RpcEchoInput`](crate::input::RpcEchoInput) if a [`ConstraintViolation`] occurs.
 1107   1109   
        ///
 1108         -
        pub fn build(
 1109         -
            self,
 1110         -
        ) -> Result<crate::input::ReservedWordsAsMembersInput, ConstraintViolation> {
        1110  +
        pub fn build(self) -> Result<crate::input::RpcEchoInput, ConstraintViolation> {
 1111   1111   
            self.build_enforcing_all_constraints()
 1112   1112   
        }
 1113   1113   
        fn build_enforcing_all_constraints(
 1114   1114   
            self,
 1115         -
        ) -> Result<crate::input::ReservedWordsAsMembersInput, ConstraintViolation> {
 1116         -
            Ok(crate::input::ReservedWordsAsMembersInput {
        1115  +
        ) -> Result<crate::input::RpcEchoInput, ConstraintViolation> {
        1116  +
            Ok(crate::input::RpcEchoInput {
 1117   1117   
                r#as: self.r#as,
 1118   1118   
                r#async: self.r#async,
 1119   1119   
                r#enum: self
 1120   1120   
                    .r#enum
 1121   1121   
                    .map(|v| match v {
 1122   1122   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
 1123   1123   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
 1124   1124   
                    })
 1125   1125   
                    .map(|res| res.map_err(ConstraintViolation::Enum))
 1126   1126   
                    .transpose()?,

tmp-codegen-diff/codegen-server-test/naming_test_ops-http0x/rust-server-codegen/src/model.rs

@@ -1,1 +61,31 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Describes one specific validation failure for an input member.
    4         -
#[derive(
    5         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6         -
)]
    7         -
pub struct ValidationExceptionField {
    8         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    9         -
    pub path: ::std::string::String,
   10         -
    /// A detailed description of the validation failure.
   11         -
    pub message: ::std::string::String,
   12         -
}
   13         -
impl ValidationExceptionField {
   14         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   15         -
    pub fn path(&self) -> &str {
   16         -
        use std::ops::Deref;
   17         -
        self.path.deref()
   18         -
    }
   19         -
    /// A detailed description of the validation failure.
   20         -
    pub fn message(&self) -> &str {
   21         -
        use std::ops::Deref;
   22         -
        self.message.deref()
   23         -
    }
   24         -
}
   25         -
impl ValidationExceptionField {
   26         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
   27         -
    pub fn builder() -> crate::model::validation_exception_field::Builder {
   28         -
        crate::model::validation_exception_field::Builder::default()
   29         -
    }
   30         -
}
   31         -
   32      2   
///
   33      3   
/// _Note: `UnknownVariantCollidingEnum::Self` has been renamed to `::SelfValue`.
   34      4   
/// `UnknownVariantCollidingEnum::SelfValue` has been renamed to `::SelfValue_`._
   35      5   
#[derive(
   36      6   
    ::std::clone::Clone,
   37      7   
    ::std::cmp::Eq,
   38      8   
    ::std::cmp::Ord,
   39      9   
    ::std::cmp::PartialEq,
   40     10   
    ::std::cmp::PartialOrd,
   41     11   
    ::std::fmt::Debug,
@@ -146,116 +205,242 @@
  166    136   
}
  167    137   
impl Vec {
  168    138   
    /// Creates a new builder-style object to manufacture [`Vec`](crate::model::Vec).
  169    139   
    pub fn builder() -> crate::model::vec::Builder {
  170    140   
        crate::model::vec::Builder::default()
  171    141   
    }
  172    142   
}
  173    143   
impl crate::constrained::Constrained for crate::model::Vec {
  174    144   
    type Unconstrained = crate::model::vec::Builder;
  175    145   
}
         146  +
         147  +
/// Describes one specific validation failure for an input member.
         148  +
#[derive(
         149  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         150  +
)]
         151  +
pub struct ValidationExceptionField {
         152  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         153  +
    pub path: ::std::string::String,
         154  +
    /// A detailed description of the validation failure.
         155  +
    pub message: ::std::string::String,
         156  +
}
         157  +
impl ValidationExceptionField {
         158  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         159  +
    pub fn path(&self) -> &str {
         160  +
        use std::ops::Deref;
         161  +
        self.path.deref()
         162  +
    }
         163  +
    /// A detailed description of the validation failure.
         164  +
    pub fn message(&self) -> &str {
         165  +
        use std::ops::Deref;
         166  +
        self.message.deref()
         167  +
    }
         168  +
}
         169  +
impl ValidationExceptionField {
         170  +
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         171  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
         172  +
        crate::model::validation_exception_field::Builder::default()
         173  +
    }
         174  +
}
         175  +
/// See [`Vec`](crate::model::Vec).
         176  +
pub mod vec {
         177  +
         178  +
    impl ::std::convert::From<Builder> for crate::model::Vec {
         179  +
        fn from(builder: Builder) -> Self {
         180  +
            builder.build()
         181  +
        }
         182  +
    }
         183  +
    /// A builder for [`Vec`](crate::model::Vec).
         184  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         185  +
    pub struct Builder {
         186  +
        pub(crate) pv_member: ::std::option::Option<bool>,
         187  +
    }
         188  +
    impl Builder {
         189  +
        #[allow(missing_docs)] // documentation missing in model
         190  +
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
         191  +
            self.pv_member = input;
         192  +
            self
         193  +
        }
         194  +
        #[allow(missing_docs)] // documentation missing in model
         195  +
        pub(crate) fn set_pv_member(
         196  +
            mut self,
         197  +
            input: Option<impl ::std::convert::Into<bool>>,
         198  +
        ) -> Self {
         199  +
            self.pv_member = input.map(|v| v.into());
         200  +
            self
         201  +
        }
         202  +
        /// Consumes the builder and constructs a [`Vec`](crate::model::Vec).
         203  +
        pub fn build(self) -> crate::model::Vec {
         204  +
            self.build_enforcing_all_constraints()
         205  +
        }
         206  +
        fn build_enforcing_all_constraints(self) -> crate::model::Vec {
         207  +
            crate::model::Vec {
         208  +
                pv_member: self.pv_member,
         209  +
            }
         210  +
        }
         211  +
    }
         212  +
}
  176    213   
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  177    214   
pub mod validation_exception_field {
  178    215   
  179    216   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  180    217   
    /// Holds one variant for each of the ways the builder can fail.
  181    218   
    #[non_exhaustive]
  182    219   
    #[allow(clippy::enum_variant_names)]
  183    220   
    pub enum ConstraintViolation {
  184    221   
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
  185    222   
        MissingPath,
@@ -210,247 +277,0 @@
  230    267   
        fn build_enforcing_all_constraints(
  231    268   
            self,
  232    269   
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  233    270   
            Ok(crate::model::ValidationExceptionField {
  234    271   
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  235    272   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  236    273   
            })
  237    274   
        }
  238    275   
    }
  239    276   
}
  240         -
/// See [`Vec`](crate::model::Vec).
  241         -
pub mod vec {
  242         -
  243         -
    impl ::std::convert::From<Builder> for crate::model::Vec {
  244         -
        fn from(builder: Builder) -> Self {
  245         -
            builder.build()
  246         -
        }
  247         -
    }
  248         -
    /// A builder for [`Vec`](crate::model::Vec).
  249         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  250         -
    pub struct Builder {
  251         -
        pub(crate) pv_member: ::std::option::Option<bool>,
  252         -
    }
  253         -
    impl Builder {
  254         -
        #[allow(missing_docs)] // documentation missing in model
  255         -
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
  256         -
            self.pv_member = input;
  257         -
            self
  258         -
        }
  259         -
        #[allow(missing_docs)] // documentation missing in model
  260         -
        pub(crate) fn set_pv_member(
  261         -
            mut self,
  262         -
            input: Option<impl ::std::convert::Into<bool>>,
  263         -
        ) -> Self {
  264         -
            self.pv_member = input.map(|v| v.into());
  265         -
            self
  266         -
        }
  267         -
        /// Consumes the builder and constructs a [`Vec`](crate::model::Vec).
  268         -
        pub fn build(self) -> crate::model::Vec {
  269         -
            self.build_enforcing_all_constraints()
  270         -
        }
  271         -
        fn build_enforcing_all_constraints(self) -> crate::model::Vec {
  272         -
            crate::model::Vec {
  273         -
                pv_member: self.pv_member,
  274         -
            }
  275         -
        }
  276         -
    }
  277         -
}