Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/naming_test_ops/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_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_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/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         -
}

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

@@ -1,1 +337,441 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4         -
    /// [`RpcEchoInput`](crate::input::RpcEchoInput) using modelled bindings.
    5         -
    pub struct RpcEchoInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
           4  +
    /// [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) using modelled bindings.
           5  +
    pub struct ReservedWordsAsMembersInputFuture {
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10         -
impl std::future::Future for RpcEchoInputFuture {
          10  +
impl std::future::Future for ReservedWordsAsMembersInputFuture {
   11     11   
    type Output = Result<
   12         -
        crate::input::RpcEchoInput,
          12  +
        crate::input::ReservedWordsAsMembersInput,
   13     13   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26     26   
    ::aws_smithy_http_server::request::FromRequest<
   27     27   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   28     28   
        B,
   29         -
    > for crate::input::RpcEchoInput
          29  +
    > for crate::input::ReservedWordsAsMembersInput
   30     30   
where
   31     31   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35     35   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
   36     36   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38     38   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
   39         -
    type Future = RpcEchoInputFuture;
          39  +
    type Future = ReservedWordsAsMembersInputFuture;
   40     40   
   41     41   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
   42     42   
        let fut = async move {
   43     43   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   44     44   
                request.headers(),
   45     45   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
   46     46   
            ) {
   47     47   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
   48     48   
            }
   49         -
            crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_request(request).await
          49  +
            crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members_http_request(request)
          50  +
                            .await
   50     51   
        };
   51     52   
        use ::futures_util::future::TryFutureExt;
   52     53   
        let fut = fut.map_err(
   53     54   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
   54     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   55     56   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
   56     57   
            },
   57     58   
        );
   58         -
        RpcEchoInputFuture {
          59  +
        ReservedWordsAsMembersInputFuture {
   59     60   
            inner: Box::pin(fut),
   60     61   
        }
   61     62   
    }
   62     63   
}
   63     64   
impl
   64     65   
    ::aws_smithy_http_server::response::IntoResponse<
   65     66   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   66         -
    > for crate::output::RpcEchoOutput
          67  +
    > for crate::output::ReservedWordsAsMembersOutput
   67     68   
{
   68     69   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   69         -
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_response(self) {
          70  +
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_response(self) {
   70     71   
                        Ok(response) => response,
   71     72   
                        Err(e) => {
   72     73   
                            ::tracing::error!(error = %e, "failed to serialize response");
   73         -
                ::aws_smithy_http_server::response::IntoResponse::<
   74         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   75         -
                >::into_response(
   76         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
   77         -
                        e,
   78         -
                    ),
   79         -
                )
          74  +
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
   80     75   
                        }
   81     76   
                    }
   82     77   
    }
   83     78   
}
   84     79   
impl
   85     80   
    ::aws_smithy_http_server::response::IntoResponse<
   86     81   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
   87         -
    > for crate::error::RPCEchoError
          82  +
    > for crate::error::ReservedWordsAsMembersError
   88     83   
{
   89     84   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   90         -
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_error(&self) {
          85  +
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_error(&self) {
   91     86   
            Ok(mut response) => {
   92         -
                response.extensions_mut().insert(
   93         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
   94         -
                );
          87  +
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
   95     88   
                response
   96         -
            }
          89  +
            },
   97     90   
            Err(e) => {
   98     91   
                ::tracing::error!(error = %e, "failed to serialize response");
   99         -
                ::aws_smithy_http_server::response::IntoResponse::<
  100         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  101         -
                >::into_response(
  102         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  103         -
                        e,
          92  +
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
          93  +
            }
          94  +
        }
          95  +
    }
          96  +
}
          97  +
          98  +
#[allow(unreachable_code, unused_variables)]
          99  +
#[cfg(test)]
         100  +
mod reserved_words_as_members_test {
         101  +
         102  +
    /// Test ID: reserved_words
         103  +
    #[::tokio::test]
         104  +
    #[::tracing_test::traced_test]
         105  +
    async fn reserved_words_request() {
         106  +
        #[allow(unused_mut)]
         107  +
        let mut http_request = ::http_1x::Request::builder()
         108  +
            .uri("/")
         109  +
            .method("POST")
         110  +
            .header("Content-Type", "application/x-amz-json-1.1")
         111  +
            .header("X-Amz-Target", "Config.ReservedWordsAsMembers")
         112  +
            .body(::aws_smithy_http_server::body::boxed(
         113  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
         114  +
                    &::aws_smithy_protocol_test::decode_body_data(
         115  +
                        "{\"as\": 5, \"async\": true}".as_bytes(),
         116  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
  104    117   
                    ),
         118  +
                )),
         119  +
            ))
         120  +
            .unwrap();
         121  +
        #[allow(unused_mut)]
         122  +
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
         123  +
        let config = crate::service::ConfigConfig::builder().build();
         124  +
        let service =
         125  +
            crate::service::Config::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
         126  +
                config,
  105    127   
            )
         128  +
            .reserved_words_as_members(move |input: crate::input::ReservedWordsAsMembersInput| {
         129  +
                let sender = sender.clone();
         130  +
                async move {
         131  +
                    let result = {
         132  +
                        let expected = crate::input::ReservedWordsAsMembersInput {
         133  +
                            r#as: ::std::option::Option::Some(5),
         134  +
                            r#async: ::std::option::Option::Some(true),
         135  +
                            r#enum: ::std::option::Option::None,
         136  +
                            self_: ::std::option::Option::None,
         137  +
                            crate_: ::std::option::Option::None,
         138  +
                            super_: ::std::option::Option::None,
         139  +
                            build_value: ::std::option::Option::None,
         140  +
                            default_value: ::std::option::Option::None,
         141  +
                            send: ::std::option::Option::None,
         142  +
                        };
         143  +
                        ::pretty_assertions::assert_eq!(input, expected);
         144  +
                        let output = crate::output::ReservedWordsAsMembersOutput {};
         145  +
                        Ok(output)
         146  +
                    };
         147  +
                    sender.send(()).await.expect("receiver dropped early");
         148  +
                    result
  106    149   
                }
  107         -
        }
         150  +
            })
         151  +
            .build_unchecked();
         152  +
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
         153  +
            .await
         154  +
            .expect("unable to make an HTTP request");
         155  +
        assert!(
         156  +
            receiver.recv().await.is_some(),
         157  +
            "we expected operation handler to be invoked but it was not entered"
         158  +
        );
  108    159   
    }
  109    160   
}
  110    161   
  111    162   
::pin_project_lite::pin_project! {
  112    163   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  113         -
    /// [`MatchInput`](crate::input::MatchInput) using modelled bindings.
  114         -
    pub struct MatchInputFuture {
  115         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         164  +
    /// [`StructureNamePunningInput`](crate::input::StructureNamePunningInput) using modelled bindings.
         165  +
    pub struct StructureNamePunningInputFuture {
         166  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  116    167   
    }
  117    168   
}
  118    169   
  119         -
impl std::future::Future for MatchInputFuture {
         170  +
impl std::future::Future for StructureNamePunningInputFuture {
  120    171   
    type Output = Result<
  121         -
        crate::input::MatchInput,
         172  +
        crate::input::StructureNamePunningInput,
  122    173   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  123    174   
    >;
  124    175   
  125    176   
    fn poll(
  126    177   
        self: std::pin::Pin<&mut Self>,
  127    178   
        cx: &mut std::task::Context<'_>,
  128    179   
    ) -> std::task::Poll<Self::Output> {
  129    180   
        let this = self.project();
  130    181   
        this.inner.as_mut().poll(cx)
  131    182   
    }
  132    183   
}
  133    184   
  134    185   
impl<B>
  135    186   
    ::aws_smithy_http_server::request::FromRequest<
  136    187   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  137    188   
        B,
  138         -
    > for crate::input::MatchInput
         189  +
    > for crate::input::StructureNamePunningInput
  139    190   
where
  140    191   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  141    192   
    B: 'static,
  142    193   
  143    194   
    B::Data: Send,
  144    195   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  145    196   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  146    197   
{
  147    198   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  148         -
    type Future = MatchInputFuture;
         199  +
    type Future = StructureNamePunningInputFuture;
  149    200   
  150    201   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  151    202   
        let fut = async move {
  152    203   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  153    204   
                request.headers(),
  154    205   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  155    206   
            ) {
  156    207   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  157    208   
            }
  158         -
            crate::protocol_serde::shape_match::de_match_http_request(request).await
         209  +
            crate::protocol_serde::shape_structure_name_punning::de_structure_name_punning_http_request(request)
         210  +
                            .await
  159    211   
        };
  160    212   
        use ::futures_util::future::TryFutureExt;
  161    213   
        let fut = fut.map_err(
  162    214   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  163    215   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  164    216   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  165    217   
            },
  166    218   
        );
  167         -
        MatchInputFuture {
         219  +
        StructureNamePunningInputFuture {
  168    220   
            inner: Box::pin(fut),
  169    221   
        }
  170    222   
    }
  171    223   
}
  172    224   
impl
  173    225   
    ::aws_smithy_http_server::response::IntoResponse<
  174    226   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  175         -
    > for crate::output::MatchOutput
         227  +
    > for crate::output::StructureNamePunningOutput
  176    228   
{
  177    229   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  178         -
        match crate::protocol_serde::shape_match::ser_match_http_response(self) {
         230  +
        match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_response(self) {
  179    231   
                        Ok(response) => response,
  180    232   
                        Err(e) => {
  181    233   
                            ::tracing::error!(error = %e, "failed to serialize response");
  182         -
                ::aws_smithy_http_server::response::IntoResponse::<
  183         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  184         -
                >::into_response(
  185         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  186         -
                        e,
  187         -
                    ),
  188         -
                )
         234  +
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  189    235   
                        }
  190    236   
                    }
  191    237   
    }
  192    238   
}
  193         -
impl
  194         -
    ::aws_smithy_http_server::response::IntoResponse<
  195         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  196         -
    > for crate::error::MatchError
  197         -
{
  198         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  199         -
        match crate::protocol_serde::shape_match::ser_match_http_error(&self) {
  200         -
            Ok(mut response) => {
  201         -
                response.extensions_mut().insert(
  202         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  203         -
                );
  204         -
                response
  205         -
            }
  206         -
            Err(e) => {
  207         -
                ::tracing::error!(error = %e, "failed to serialize response");
  208         -
                ::aws_smithy_http_server::response::IntoResponse::<
  209         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  210         -
                >::into_response(
  211         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  212         -
                        e,
         239  +
         240  +
#[allow(unreachable_code, unused_variables)]
         241  +
#[cfg(test)]
         242  +
mod structure_name_punning_test {
         243  +
         244  +
    /// Test ID: structure_punning
         245  +
    #[::tokio::test]
         246  +
    #[::tracing_test::traced_test]
         247  +
    async fn structure_punning_request() {
         248  +
        #[allow(unused_mut)]
         249  +
        let mut http_request = ::http_1x::Request::builder()
         250  +
            .uri("/")
         251  +
            .method("POST")
         252  +
            .header("Content-Type", "application/x-amz-json-1.1")
         253  +
            .header("X-Amz-Target", "Config.StructureNamePunning")
         254  +
            .body(::aws_smithy_http_server::body::boxed(
         255  +
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
         256  +
                    &::aws_smithy_protocol_test::decode_body_data(
         257  +
                        "{\"regular_string\": \"hello!\"}".as_bytes(),
         258  +
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
  213    259   
                    ),
         260  +
                )),
         261  +
            ))
         262  +
            .unwrap();
         263  +
        #[allow(unused_mut)]
         264  +
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
         265  +
        let config = crate::service::ConfigConfig::builder().build();
         266  +
        let service =
         267  +
            crate::service::Config::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
         268  +
                config,
  214    269   
            )
         270  +
            .structure_name_punning(move |input: crate::input::StructureNamePunningInput| {
         271  +
                let sender = sender.clone();
         272  +
                async move {
         273  +
                    let result = {
         274  +
                        let expected = crate::input::StructureNamePunningInput {
         275  +
                            regular_string: ::std::option::Option::Some("hello!".to_owned()),
         276  +
                            punned_vec: ::std::option::Option::None,
         277  +
                        };
         278  +
                        ::pretty_assertions::assert_eq!(input, expected);
         279  +
                        let output = crate::output::StructureNamePunningOutput {};
         280  +
                        output
         281  +
                    };
         282  +
                    sender.send(()).await.expect("receiver dropped early");
         283  +
                    result
  215    284   
                }
  216         -
        }
         285  +
            })
         286  +
            .build_unchecked();
         287  +
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
         288  +
            .await
         289  +
            .expect("unable to make an HTTP request");
         290  +
        assert!(
         291  +
            receiver.recv().await.is_some(),
         292  +
            "we expected operation handler to be invoked but it was not entered"
         293  +
        );
  217    294   
    }
  218    295   
}
  219    296   
  220    297   
::pin_project_lite::pin_project! {
  221    298   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  222         -
    /// [`OptionInput`](crate::input::OptionInput) using modelled bindings.
  223         -
    pub struct OptionInputFuture {
  224         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         299  +
    /// [`ErrCollisionsInput`](crate::input::ErrCollisionsInput) using modelled bindings.
         300  +
    pub struct ErrCollisionsInputFuture {
         301  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  225    302   
    }
  226    303   
}
  227    304   
  228         -
impl std::future::Future for OptionInputFuture {
         305  +
impl std::future::Future for ErrCollisionsInputFuture {
  229    306   
    type Output = Result<
  230         -
        crate::input::OptionInput,
         307  +
        crate::input::ErrCollisionsInput,
  231    308   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  232    309   
    >;
  233    310   
  234    311   
    fn poll(
  235    312   
        self: std::pin::Pin<&mut Self>,
  236    313   
        cx: &mut std::task::Context<'_>,
  237    314   
    ) -> std::task::Poll<Self::Output> {
  238    315   
        let this = self.project();
  239    316   
        this.inner.as_mut().poll(cx)
  240    317   
    }
  241    318   
}
  242    319   
  243    320   
impl<B>
  244    321   
    ::aws_smithy_http_server::request::FromRequest<
  245    322   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  246    323   
        B,
  247         -
    > for crate::input::OptionInput
         324  +
    > for crate::input::ErrCollisionsInput
  248    325   
where
  249    326   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  250    327   
    B: 'static,
  251    328   
  252    329   
    B::Data: Send,
  253    330   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  254    331   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  255    332   
{
  256    333   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  257         -
    type Future = OptionInputFuture;
         334  +
    type Future = ErrCollisionsInputFuture;
  258    335   
  259    336   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  260    337   
        let fut = async move {
  261    338   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  262    339   
                request.headers(),
  263    340   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  264    341   
            ) {
  265    342   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  266    343   
            }
  267         -
            crate::protocol_serde::shape_option::de_option_http_request(request).await
         344  +
            crate::protocol_serde::shape_err_collisions::de_err_collisions_http_request(request)
         345  +
                .await
  268    346   
        };
  269    347   
        use ::futures_util::future::TryFutureExt;
  270    348   
        let fut = fut.map_err(
  271    349   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  272    350   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  273    351   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  274    352   
            },
  275    353   
        );
  276         -
        OptionInputFuture {
         354  +
        ErrCollisionsInputFuture {
  277    355   
            inner: Box::pin(fut),
  278    356   
        }
  279    357   
    }
  280    358   
}
  281    359   
impl
  282    360   
    ::aws_smithy_http_server::response::IntoResponse<
  283    361   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  284         -
    > for crate::output::OptionOutput
         362  +
    > for crate::output::ErrCollisionsOutput
  285    363   
{
  286    364   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  287         -
        match crate::protocol_serde::shape_option::ser_option_http_response(self) {
         365  +
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_response(self) {
  288    366   
            Ok(response) => response,
  289    367   
            Err(e) => {
  290    368   
                ::tracing::error!(error = %e, "failed to serialize response");
  291    369   
                ::aws_smithy_http_server::response::IntoResponse::<
  292    370   
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  293    371   
                >::into_response(
  294    372   
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  295    373   
                        e,
  296    374   
                    ),
  297    375   
                )
  298    376   
            }
  299    377   
        }
  300    378   
    }
  301    379   
}
  302         -
  303         -
::pin_project_lite::pin_project! {
  304         -
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  305         -
    /// [`ResultInput`](crate::input::ResultInput) using modelled bindings.
  306         -
    pub struct ResultInputFuture {
  307         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         380  +
impl
         381  +
    ::aws_smithy_http_server::response::IntoResponse<
         382  +
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         383  +
    > for crate::error::ErrCollisionsError
         384  +
{
         385  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         386  +
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_error(&self) {
         387  +
            Ok(mut response) => {
         388  +
                response.extensions_mut().insert(
         389  +
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         390  +
                );
         391  +
                response
         392  +
            }
         393  +
            Err(e) => {
         394  +
                ::tracing::error!(error = %e, "failed to serialize response");
         395  +
                ::aws_smithy_http_server::response::IntoResponse::<
         396  +
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         397  +
                >::into_response(
         398  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         399  +
                        e,
         400  +
                    ),
         401  +
                )
         402  +
            }
         403  +
        }
         404  +
    }
         405  +
}
         406  +
         407  +
::pin_project_lite::pin_project! {
         408  +
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
         409  +
    /// [`ResultInput`](crate::input::ResultInput) using modelled bindings.
         410  +
    pub struct ResultInputFuture {
         411  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResultInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  308    412   
    }
  309    413   
}
  310    414   
  311    415   
impl std::future::Future for ResultInputFuture {
  312    416   
    type Output = Result<
  313    417   
        crate::input::ResultInput,
  314    418   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  315    419   
    >;
  316    420   
  317    421   
    fn poll(
@@ -358,462 +789,789 @@
  378    482   
                        e,
  379    483   
                    ),
  380    484   
                )
  381    485   
            }
  382    486   
        }
  383    487   
    }
  384    488   
}
  385    489   
  386    490   
::pin_project_lite::pin_project! {
  387    491   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  388         -
    /// [`ErrCollisionsInput`](crate::input::ErrCollisionsInput) using modelled bindings.
  389         -
    pub struct ErrCollisionsInputFuture {
  390         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ErrCollisionsInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         492  +
    /// [`OptionInput`](crate::input::OptionInput) using modelled bindings.
         493  +
    pub struct OptionInputFuture {
         494  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::OptionInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  391    495   
    }
  392    496   
}
  393    497   
  394         -
impl std::future::Future for ErrCollisionsInputFuture {
         498  +
impl std::future::Future for OptionInputFuture {
  395    499   
    type Output = Result<
  396         -
        crate::input::ErrCollisionsInput,
         500  +
        crate::input::OptionInput,
  397    501   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  398    502   
    >;
  399    503   
  400    504   
    fn poll(
  401    505   
        self: std::pin::Pin<&mut Self>,
  402    506   
        cx: &mut std::task::Context<'_>,
  403    507   
    ) -> std::task::Poll<Self::Output> {
  404    508   
        let this = self.project();
  405    509   
        this.inner.as_mut().poll(cx)
  406    510   
    }
  407    511   
}
  408    512   
  409    513   
impl<B>
  410    514   
    ::aws_smithy_http_server::request::FromRequest<
  411    515   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  412    516   
        B,
  413         -
    > for crate::input::ErrCollisionsInput
         517  +
    > for crate::input::OptionInput
  414    518   
where
  415    519   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  416    520   
    B: 'static,
  417    521   
  418    522   
    B::Data: Send,
  419    523   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  420    524   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  421    525   
{
  422    526   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  423         -
    type Future = ErrCollisionsInputFuture;
         527  +
    type Future = OptionInputFuture;
  424    528   
  425    529   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  426    530   
        let fut = async move {
  427    531   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  428    532   
                request.headers(),
  429    533   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  430    534   
            ) {
  431    535   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  432    536   
            }
  433         -
            crate::protocol_serde::shape_err_collisions::de_err_collisions_http_request(request)
  434         -
                .await
         537  +
            crate::protocol_serde::shape_option::de_option_http_request(request).await
  435    538   
        };
  436    539   
        use ::futures_util::future::TryFutureExt;
  437    540   
        let fut = fut.map_err(
  438    541   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  439    542   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  440    543   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  441    544   
            },
  442    545   
        );
  443         -
        ErrCollisionsInputFuture {
         546  +
        OptionInputFuture {
  444    547   
            inner: Box::pin(fut),
  445    548   
        }
  446    549   
    }
  447    550   
}
  448    551   
impl
  449    552   
    ::aws_smithy_http_server::response::IntoResponse<
  450    553   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  451         -
    > for crate::output::ErrCollisionsOutput
         554  +
    > for crate::output::OptionOutput
  452    555   
{
  453    556   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  454         -
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_response(self) {
         557  +
        match crate::protocol_serde::shape_option::ser_option_http_response(self) {
  455    558   
            Ok(response) => response,
  456    559   
            Err(e) => {
  457    560   
                ::tracing::error!(error = %e, "failed to serialize response");
  458    561   
                ::aws_smithy_http_server::response::IntoResponse::<
  459    562   
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  460    563   
                >::into_response(
  461    564   
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  462    565   
                        e,
  463    566   
                    ),
  464    567   
                )
  465    568   
            }
  466    569   
        }
  467    570   
    }
  468    571   
}
  469         -
impl
  470         -
    ::aws_smithy_http_server::response::IntoResponse<
  471         -
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  472         -
    > for crate::error::ErrCollisionsError
  473         -
{
  474         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  475         -
        match crate::protocol_serde::shape_err_collisions::ser_err_collisions_http_error(&self) {
  476         -
            Ok(mut response) => {
  477         -
                response.extensions_mut().insert(
  478         -
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  479         -
                );
  480         -
                response
  481         -
            }
  482         -
            Err(e) => {
  483         -
                ::tracing::error!(error = %e, "failed to serialize response");
  484         -
                ::aws_smithy_http_server::response::IntoResponse::<
  485         -
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  486         -
                >::into_response(
  487         -
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
  488         -
                        e,
  489         -
                    ),
  490         -
                )
  491         -
            }
  492         -
        }
  493         -
    }
  494         -
}
  495    572   
  496    573   
::pin_project_lite::pin_project! {
  497    574   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  498         -
    /// [`StructureNamePunningInput`](crate::input::StructureNamePunningInput) using modelled bindings.
  499         -
    pub struct StructureNamePunningInputFuture {
  500         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StructureNamePunningInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         575  +
    /// [`MatchInput`](crate::input::MatchInput) using modelled bindings.
         576  +
    pub struct MatchInputFuture {
         577  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MatchInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  501    578   
    }
  502    579   
}
  503    580   
  504         -
impl std::future::Future for StructureNamePunningInputFuture {
         581  +
impl std::future::Future for MatchInputFuture {
  505    582   
    type Output = Result<
  506         -
        crate::input::StructureNamePunningInput,
         583  +
        crate::input::MatchInput,
  507    584   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  508    585   
    >;
  509    586   
  510    587   
    fn poll(
  511    588   
        self: std::pin::Pin<&mut Self>,
  512    589   
        cx: &mut std::task::Context<'_>,
  513    590   
    ) -> std::task::Poll<Self::Output> {
  514    591   
        let this = self.project();
  515    592   
        this.inner.as_mut().poll(cx)
  516    593   
    }
  517    594   
}
  518    595   
  519    596   
impl<B>
  520    597   
    ::aws_smithy_http_server::request::FromRequest<
  521    598   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  522    599   
        B,
  523         -
    > for crate::input::StructureNamePunningInput
         600  +
    > for crate::input::MatchInput
  524    601   
where
  525    602   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  526    603   
    B: 'static,
  527    604   
  528    605   
    B::Data: Send,
  529    606   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  530    607   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  531    608   
{
  532    609   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  533         -
    type Future = StructureNamePunningInputFuture;
         610  +
    type Future = MatchInputFuture;
  534    611   
  535    612   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  536    613   
        let fut = async move {
  537    614   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  538    615   
                request.headers(),
  539    616   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  540    617   
            ) {
  541    618   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  542    619   
            }
  543         -
            crate::protocol_serde::shape_structure_name_punning::de_structure_name_punning_http_request(request)
  544         -
                            .await
         620  +
            crate::protocol_serde::shape_match::de_match_http_request(request).await
  545    621   
        };
  546    622   
        use ::futures_util::future::TryFutureExt;
  547    623   
        let fut = fut.map_err(
  548    624   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  549    625   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  550    626   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  551    627   
            },
  552    628   
        );
  553         -
        StructureNamePunningInputFuture {
         629  +
        MatchInputFuture {
  554    630   
            inner: Box::pin(fut),
  555    631   
        }
  556    632   
    }
  557    633   
}
  558    634   
impl
  559    635   
    ::aws_smithy_http_server::response::IntoResponse<
  560    636   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  561         -
    > for crate::output::StructureNamePunningOutput
         637  +
    > for crate::output::MatchOutput
  562    638   
{
  563    639   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  564         -
        match crate::protocol_serde::shape_structure_name_punning::ser_structure_name_punning_http_response(self) {
         640  +
        match crate::protocol_serde::shape_match::ser_match_http_response(self) {
  565    641   
            Ok(response) => response,
  566    642   
            Err(e) => {
  567    643   
                ::tracing::error!(error = %e, "failed to serialize response");
  568         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         644  +
                ::aws_smithy_http_server::response::IntoResponse::<
         645  +
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         646  +
                >::into_response(
         647  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         648  +
                        e,
         649  +
                    ),
         650  +
                )
  569    651   
            }
  570    652   
        }
  571    653   
    }
  572    654   
}
  573         -
  574         -
#[allow(unreachable_code, unused_variables)]
  575         -
#[cfg(test)]
  576         -
mod structure_name_punning_test {
  577         -
  578         -
    /// Test ID: structure_punning
  579         -
    #[::tokio::test]
  580         -
    #[::tracing_test::traced_test]
  581         -
    async fn structure_punning_request() {
  582         -
        #[allow(unused_mut)]
  583         -
        let mut http_request = ::http_1x::Request::builder()
  584         -
            .uri("/")
  585         -
            .method("POST")
  586         -
            .header("Content-Type", "application/x-amz-json-1.1")
  587         -
            .header("X-Amz-Target", "Config.StructureNamePunning")
  588         -
            .body(::aws_smithy_http_server::body::boxed(
  589         -
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
  590         -
                    &::aws_smithy_protocol_test::decode_body_data(
  591         -
                        "{\"regular_string\": \"hello!\"}".as_bytes(),
  592         -
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
         655  +
impl
         656  +
    ::aws_smithy_http_server::response::IntoResponse<
         657  +
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         658  +
    > for crate::error::MatchError
         659  +
{
         660  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         661  +
        match crate::protocol_serde::shape_match::ser_match_http_error(&self) {
         662  +
            Ok(mut response) => {
         663  +
                response.extensions_mut().insert(
         664  +
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         665  +
                );
         666  +
                response
         667  +
            }
         668  +
            Err(e) => {
         669  +
                ::tracing::error!(error = %e, "failed to serialize response");
         670  +
                ::aws_smithy_http_server::response::IntoResponse::<
         671  +
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         672  +
                >::into_response(
         673  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         674  +
                        e,
  593    675   
                    ),
  594         -
                )),
  595         -
            ))
  596         -
            .unwrap();
  597         -
        #[allow(unused_mut)]
  598         -
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  599         -
        let config = crate::service::ConfigConfig::builder().build();
  600         -
        let service =
  601         -
            crate::service::Config::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
  602         -
                config,
  603    676   
                )
  604         -
            .structure_name_punning(move |input: crate::input::StructureNamePunningInput| {
  605         -
                let sender = sender.clone();
  606         -
                async move {
  607         -
                    let result = {
  608         -
                        let expected = crate::input::StructureNamePunningInput {
  609         -
                            regular_string: ::std::option::Option::Some("hello!".to_owned()),
  610         -
                            punned_vec: ::std::option::Option::None,
  611         -
                        };
  612         -
                        ::pretty_assertions::assert_eq!(input, expected);
  613         -
                        let output = crate::output::StructureNamePunningOutput {};
  614         -
                        output
  615         -
                    };
  616         -
                    sender.send(()).await.expect("receiver dropped early");
  617         -
                    result
  618    677   
            }
  619         -
            })
  620         -
            .build_unchecked();
  621         -
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
  622         -
            .await
  623         -
            .expect("unable to make an HTTP request");
  624         -
        assert!(
  625         -
            receiver.recv().await.is_some(),
  626         -
            "we expected operation handler to be invoked but it was not entered"
  627         -
        );
         678  +
        }
  628    679   
    }
  629    680   
}
  630    681   
  631    682   
::pin_project_lite::pin_project! {
  632    683   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  633         -
    /// [`ReservedWordsAsMembersInput`](crate::input::ReservedWordsAsMembersInput) using modelled bindings.
  634         -
    pub struct ReservedWordsAsMembersInputFuture {
  635         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ReservedWordsAsMembersInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
         684  +
    /// [`RpcEchoInput`](crate::input::RpcEchoInput) using modelled bindings.
         685  +
    pub struct RpcEchoInputFuture {
         686  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RpcEchoInput, ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError>> + Send>>
  636    687   
    }
  637    688   
}
  638    689   
  639         -
impl std::future::Future for ReservedWordsAsMembersInputFuture {
         690  +
impl std::future::Future for RpcEchoInputFuture {
  640    691   
    type Output = Result<
  641         -
        crate::input::ReservedWordsAsMembersInput,
         692  +
        crate::input::RpcEchoInput,
  642    693   
        ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError,
  643    694   
    >;
  644    695   
  645    696   
    fn poll(
  646    697   
        self: std::pin::Pin<&mut Self>,
  647    698   
        cx: &mut std::task::Context<'_>,
  648    699   
    ) -> std::task::Poll<Self::Output> {
  649    700   
        let this = self.project();
  650    701   
        this.inner.as_mut().poll(cx)
  651    702   
    }
  652    703   
}
  653    704   
  654    705   
impl<B>
  655    706   
    ::aws_smithy_http_server::request::FromRequest<
  656    707   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  657    708   
        B,
  658         -
    > for crate::input::ReservedWordsAsMembersInput
         709  +
    > for crate::input::RpcEchoInput
  659    710   
where
  660    711   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  661    712   
    B: 'static,
  662    713   
  663    714   
    B::Data: Send,
  664    715   
    ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection:
  665    716   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  666    717   
{
  667    718   
    type Rejection = ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError;
  668         -
    type Future = ReservedWordsAsMembersInputFuture;
         719  +
    type Future = RpcEchoInputFuture;
  669    720   
  670    721   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  671    722   
        let fut = async move {
  672    723   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  673    724   
                request.headers(),
  674    725   
                &crate::mimes::CONTENT_TYPE_APPLICATION_X_AMZ_JSON_1_1,
  675    726   
            ) {
  676    727   
                return Err(::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection::NotAcceptable);
  677    728   
            }
  678         -
            crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members_http_request(request)
  679         -
                            .await
         729  +
            crate::protocol_serde::shape_rpc_echo::de_rpc_echo_http_request(request).await
  680    730   
        };
  681    731   
        use ::futures_util::future::TryFutureExt;
  682    732   
        let fut = fut.map_err(
  683    733   
            |e: ::aws_smithy_http_server::protocol::aws_json::rejection::RequestRejection| {
  684    734   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  685    735   
                ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e)
  686    736   
            },
  687    737   
        );
  688         -
        ReservedWordsAsMembersInputFuture {
         738  +
        RpcEchoInputFuture {
  689    739   
            inner: Box::pin(fut),
  690    740   
        }
  691    741   
    }
  692    742   
}
  693    743   
impl
  694    744   
    ::aws_smithy_http_server::response::IntoResponse<
  695    745   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  696         -
    > for crate::output::ReservedWordsAsMembersOutput
         746  +
    > for crate::output::RpcEchoOutput
  697    747   
{
  698    748   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  699         -
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_response(self) {
         749  +
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_response(self) {
  700    750   
            Ok(response) => response,
  701    751   
            Err(e) => {
  702    752   
                ::tracing::error!(error = %e, "failed to serialize response");
  703         -
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
         753  +
                ::aws_smithy_http_server::response::IntoResponse::<
         754  +
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         755  +
                >::into_response(
         756  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         757  +
                        e,
         758  +
                    ),
         759  +
                )
  704    760   
            }
  705    761   
        }
  706    762   
    }
  707    763   
}
  708    764   
impl
  709    765   
    ::aws_smithy_http_server::response::IntoResponse<
  710    766   
        ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
  711         -
    > for crate::error::ReservedWordsAsMembersError
         767  +
    > for crate::error::RPCEchoError
  712    768   
{
  713    769   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  714         -
        match crate::protocol_serde::shape_reserved_words_as_members::ser_reserved_words_as_members_http_error(&self) {
         770  +
        match crate::protocol_serde::shape_rpc_echo::ser_rpc_echo_http_error(&self) {
  715    771   
            Ok(mut response) => {
  716         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         772  +
                response.extensions_mut().insert(
         773  +
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
         774  +
                );
  717    775   
                response
  718         -
            },
         776  +
            }
  719    777   
            Err(e) => {
  720    778   
                ::tracing::error!(error = %e, "failed to serialize response");
  721         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1>::into_response(::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(e))
  722         -
            }
  723         -
        }
  724         -
    }
  725         -
}
  726         -
  727         -
#[allow(unreachable_code, unused_variables)]
  728         -
#[cfg(test)]
  729         -
mod reserved_words_as_members_test {
  730         -
  731         -
    /// Test ID: reserved_words
  732         -
    #[::tokio::test]
  733         -
    #[::tracing_test::traced_test]
  734         -
    async fn reserved_words_request() {
  735         -
        #[allow(unused_mut)]
  736         -
        let mut http_request = ::http_1x::Request::builder()
  737         -
            .uri("/")
  738         -
            .method("POST")
  739         -
            .header("Content-Type", "application/x-amz-json-1.1")
  740         -
            .header("X-Amz-Target", "Config.ReservedWordsAsMembers")
  741         -
            .body(::aws_smithy_http_server::body::boxed(
  742         -
                ::http_body_util::Full::new(::bytes::Bytes::copy_from_slice(
  743         -
                    &::aws_smithy_protocol_test::decode_body_data(
  744         -
                        "{\"as\": 5, \"async\": true}".as_bytes(),
  745         -
                        ::aws_smithy_protocol_test::MediaType::from("application/json"),
         779  +
                ::aws_smithy_http_server::response::IntoResponse::<
         780  +
                    ::aws_smithy_http_server::protocol::aws_json_11::AwsJson1_1,
         781  +
                >::into_response(
         782  +
                    ::aws_smithy_http_server::protocol::aws_json::runtime_error::RuntimeError::from(
         783  +
                        e,
  746    784   
                    ),
  747         -
                )),
  748         -
            ))
  749         -
            .unwrap();
  750         -
        #[allow(unused_mut)]
  751         -
        let (sender, mut receiver) = ::tokio::sync::mpsc::channel(1);
  752         -
        let config = crate::service::ConfigConfig::builder().build();
  753         -
        let service =
  754         -
            crate::service::Config::builder::<::aws_smithy_http_server::body::BoxBody, _, _, _>(
  755         -
                config,
  756    785   
                )
  757         -
            .reserved_words_as_members(move |input: crate::input::ReservedWordsAsMembersInput| {
  758         -
                let sender = sender.clone();
  759         -
                async move {
  760         -
                    let result = {
  761         -
                        let expected = crate::input::ReservedWordsAsMembersInput {
  762         -
                            r#as: ::std::option::Option::Some(5),
  763         -
                            r#async: ::std::option::Option::Some(true),
  764         -
                            r#enum: ::std::option::Option::None,
  765         -
                            self_: ::std::option::Option::None,
  766         -
                            crate_: ::std::option::Option::None,
  767         -
                            super_: ::std::option::Option::None,
  768         -
                            build_value: ::std::option::Option::None,
  769         -
                            default_value: ::std::option::Option::None,
  770         -
                            send: ::std::option::Option::None,
  771         -
                        };
  772         -
                        ::pretty_assertions::assert_eq!(input, expected);
  773         -
                        let output = crate::output::ReservedWordsAsMembersOutput {};
  774         -
                        Ok(output)
  775         -
                    };
  776         -
                    sender.send(()).await.expect("receiver dropped early");
  777         -
                    result
  778    786   
            }
  779         -
            })
  780         -
            .build_unchecked();
  781         -
        let http_response = ::tower::ServiceExt::oneshot(service, http_request)
  782         -
            .await
  783         -
            .expect("unable to make an HTTP request");
  784         -
        assert!(
  785         -
            receiver.recv().await.is_some(),
  786         -
            "we expected operation handler to be invoked but it was not entered"
  787         -
        );
         787  +
        }
  788    788   
    }
  789    789   
}