Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

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

@@ -1,1 +860,1305 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
    4         -
pub struct QueryPrecedenceInput {
           6  +
pub /* StructureGenerator.kt:201 */ struct QueryPrecedenceInput {
           7  +
    /* StructureGenerator.kt:231 */
    5      8   
    #[allow(missing_docs)] // documentation missing in model
    6      9   
    pub foo: ::std::option::Option<::std::string::String>,
          10  +
    /* StructureGenerator.kt:231 */
    7     11   
    #[allow(missing_docs)] // documentation missing in model
    8     12   
    pub baz: ::std::option::Option<
    9     13   
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
   10     14   
    >,
          15  +
    /* StructureGenerator.kt:201 */
   11     16   
}
          17  +
/* StructureGenerator.kt:135 */
   12     18   
impl QueryPrecedenceInput {
          19  +
    /* StructureGenerator.kt:231 */
   13     20   
    #[allow(missing_docs)] // documentation missing in model
          21  +
                           /* StructureGenerator.kt:166 */
   14     22   
    pub fn foo(&self) -> ::std::option::Option<&str> {
          23  +
        /* StructureGenerator.kt:169 */
   15     24   
        self.foo.as_deref()
          25  +
        /* StructureGenerator.kt:166 */
   16     26   
    }
          27  +
    /* StructureGenerator.kt:231 */
   17     28   
    #[allow(missing_docs)] // documentation missing in model
          29  +
                           /* StructureGenerator.kt:166 */
   18     30   
    pub fn baz(
   19     31   
        &self,
   20     32   
    ) -> ::std::option::Option<
   21     33   
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
   22     34   
    > {
          35  +
        /* StructureGenerator.kt:170 */
   23     36   
        self.baz.as_ref()
          37  +
        /* StructureGenerator.kt:166 */
   24     38   
    }
          39  +
    /* StructureGenerator.kt:135 */
   25     40   
}
          41  +
/* ServerCodegenVisitor.kt:345 */
   26     42   
impl QueryPrecedenceInput {
   27         -
    /// Creates a new builder-style object to manufacture [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
          43  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
          44  +
    /* ServerBuilderGenerator.kt:295 */
   28     45   
    pub fn builder() -> crate::input::query_precedence_input::Builder {
          46  +
        /* ServerBuilderGenerator.kt:296 */
   29     47   
        crate::input::query_precedence_input::Builder::default()
          48  +
        /* ServerBuilderGenerator.kt:295 */
   30     49   
    }
          50  +
    /* ServerCodegenVisitor.kt:345 */
   31     51   
}
          52  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   32     53   
impl crate::constrained::Constrained for crate::input::QueryPrecedenceInput {
   33     54   
    type Unconstrained = crate::input::query_precedence_input::Builder;
   34     55   
}
   35     56   
          57  +
/* StructureGenerator.kt:197 */
   36     58   
#[allow(missing_docs)] // documentation missing in model
          59  +
/* RustType.kt:516 */
   37     60   
#[derive(
   38     61   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   39     62   
)]
   40         -
pub struct EmptyStructWithContentOnWireOpInput {}
          63  +
pub /* StructureGenerator.kt:201 */ struct EmptyStructWithContentOnWireOpInput {/* StructureGenerator.kt:201 */}
          64  +
/* ServerCodegenVisitor.kt:345 */
   41     65   
impl EmptyStructWithContentOnWireOpInput {
   42         -
    /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
          66  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
          67  +
    /* ServerBuilderGenerator.kt:295 */
   43     68   
    pub fn builder() -> crate::input::empty_struct_with_content_on_wire_op_input::Builder {
          69  +
        /* ServerBuilderGenerator.kt:296 */
   44     70   
        crate::input::empty_struct_with_content_on_wire_op_input::Builder::default()
          71  +
        /* ServerBuilderGenerator.kt:295 */
   45     72   
    }
          73  +
    /* ServerCodegenVisitor.kt:345 */
   46     74   
}
          75  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   47     76   
impl crate::constrained::Constrained for crate::input::EmptyStructWithContentOnWireOpInput {
   48     77   
    type Unconstrained = crate::input::empty_struct_with_content_on_wire_op_input::Builder;
   49     78   
}
   50     79   
          80  +
/* StructureGenerator.kt:197 */
   51     81   
#[allow(missing_docs)] // documentation missing in model
          82  +
/* RustType.kt:516 */
   52     83   
#[derive(
   53     84   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   54     85   
)]
   55         -
pub struct CaseInsensitiveErrorOperationInput {}
          86  +
pub /* StructureGenerator.kt:201 */ struct CaseInsensitiveErrorOperationInput {/* StructureGenerator.kt:201 */}
          87  +
/* ServerCodegenVisitor.kt:345 */
   56     88   
impl CaseInsensitiveErrorOperationInput {
   57         -
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
          89  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
          90  +
    /* ServerBuilderGenerator.kt:295 */
   58     91   
    pub fn builder() -> crate::input::case_insensitive_error_operation_input::Builder {
          92  +
        /* ServerBuilderGenerator.kt:296 */
   59     93   
        crate::input::case_insensitive_error_operation_input::Builder::default()
          94  +
        /* ServerBuilderGenerator.kt:295 */
   60     95   
    }
          96  +
    /* ServerCodegenVisitor.kt:345 */
   61     97   
}
          98  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   62     99   
impl crate::constrained::Constrained for crate::input::CaseInsensitiveErrorOperationInput {
   63    100   
    type Unconstrained = crate::input::case_insensitive_error_operation_input::Builder;
   64    101   
}
   65    102   
         103  +
/* StructureGenerator.kt:197 */
   66    104   
#[allow(missing_docs)] // documentation missing in model
         105  +
/* RustType.kt:516 */
   67    106   
#[derive(
   68    107   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   69    108   
)]
   70         -
pub struct NullInNonSparseInput {}
         109  +
pub /* StructureGenerator.kt:201 */ struct NullInNonSparseInput {/* StructureGenerator.kt:201 */}
         110  +
/* ServerCodegenVisitor.kt:345 */
   71    111   
impl NullInNonSparseInput {
   72         -
    /// Creates a new builder-style object to manufacture [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         112  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         113  +
    /* ServerBuilderGenerator.kt:295 */
   73    114   
    pub fn builder() -> crate::input::null_in_non_sparse_input::Builder {
         115  +
        /* ServerBuilderGenerator.kt:296 */
   74    116   
        crate::input::null_in_non_sparse_input::Builder::default()
         117  +
        /* ServerBuilderGenerator.kt:295 */
   75    118   
    }
         119  +
    /* ServerCodegenVisitor.kt:345 */
   76    120   
}
         121  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   77    122   
impl crate::constrained::Constrained for crate::input::NullInNonSparseInput {
   78    123   
    type Unconstrained = crate::input::null_in_non_sparse_input::Builder;
   79    124   
}
   80    125   
         126  +
/* StructureGenerator.kt:197 */
   81    127   
#[allow(missing_docs)] // documentation missing in model
         128  +
/* RustType.kt:516 */
   82    129   
#[derive(
   83    130   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   84    131   
)]
   85         -
pub struct EscapedStringValuesInput {
         132  +
pub /* StructureGenerator.kt:201 */ struct EscapedStringValuesInput {
         133  +
    /* StructureGenerator.kt:231 */
   86    134   
    #[allow(missing_docs)] // documentation missing in model
   87    135   
    pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
         136  +
    /* StructureGenerator.kt:231 */
   88    137   
    #[allow(missing_docs)] // documentation missing in model
   89    138   
    pub some_string: ::std::option::Option<::std::string::String>,
         139  +
    /* StructureGenerator.kt:201 */
   90    140   
}
         141  +
/* StructureGenerator.kt:135 */
   91    142   
impl EscapedStringValuesInput {
         143  +
    /* StructureGenerator.kt:231 */
   92    144   
    #[allow(missing_docs)] // documentation missing in model
         145  +
                           /* StructureGenerator.kt:166 */
   93    146   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
         147  +
        /* StructureGenerator.kt:170 */
   94    148   
        self.r#enum.as_ref()
         149  +
        /* StructureGenerator.kt:166 */
   95    150   
    }
         151  +
    /* StructureGenerator.kt:231 */
   96    152   
    #[allow(missing_docs)] // documentation missing in model
         153  +
                           /* StructureGenerator.kt:166 */
   97    154   
    pub fn some_string(&self) -> ::std::option::Option<&str> {
         155  +
        /* StructureGenerator.kt:169 */
   98    156   
        self.some_string.as_deref()
         157  +
        /* StructureGenerator.kt:166 */
   99    158   
    }
         159  +
    /* StructureGenerator.kt:135 */
  100    160   
}
         161  +
/* ServerCodegenVisitor.kt:345 */
  101    162   
impl EscapedStringValuesInput {
  102         -
    /// Creates a new builder-style object to manufacture [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         163  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         164  +
    /* ServerBuilderGenerator.kt:295 */
  103    165   
    pub fn builder() -> crate::input::escaped_string_values_input::Builder {
         166  +
        /* ServerBuilderGenerator.kt:296 */
  104    167   
        crate::input::escaped_string_values_input::Builder::default()
         168  +
        /* ServerBuilderGenerator.kt:295 */
  105    169   
    }
         170  +
    /* ServerCodegenVisitor.kt:345 */
  106    171   
}
         172  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  107    173   
impl crate::constrained::Constrained for crate::input::EscapedStringValuesInput {
  108    174   
    type Unconstrained = crate::input::escaped_string_values_input::Builder;
  109    175   
}
  110    176   
         177  +
/* StructureGenerator.kt:197 */
  111    178   
#[allow(missing_docs)] // documentation missing in model
         179  +
/* RustType.kt:516 */
  112    180   
#[derive(
  113    181   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  114    182   
)]
  115         -
pub struct PrimitiveIntOpInput {
         183  +
pub /* StructureGenerator.kt:201 */ struct PrimitiveIntOpInput {
         184  +
    /* StructureGenerator.kt:231 */
  116    185   
    #[allow(missing_docs)] // documentation missing in model
  117    186   
    pub value: i32,
         187  +
    /* StructureGenerator.kt:201 */
  118    188   
}
         189  +
/* StructureGenerator.kt:135 */
  119    190   
impl PrimitiveIntOpInput {
         191  +
    /* StructureGenerator.kt:231 */
  120    192   
    #[allow(missing_docs)] // documentation missing in model
         193  +
                           /* StructureGenerator.kt:166 */
  121    194   
    pub fn value(&self) -> i32 {
         195  +
        /* StructureGenerator.kt:168 */
  122    196   
        self.value
         197  +
        /* StructureGenerator.kt:166 */
  123    198   
    }
         199  +
    /* StructureGenerator.kt:135 */
  124    200   
}
         201  +
/* ServerCodegenVisitor.kt:345 */
  125    202   
impl PrimitiveIntOpInput {
  126         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         203  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         204  +
    /* ServerBuilderGenerator.kt:295 */
  127    205   
    pub fn builder() -> crate::input::primitive_int_op_input::Builder {
         206  +
        /* ServerBuilderGenerator.kt:296 */
  128    207   
        crate::input::primitive_int_op_input::Builder::default()
         208  +
        /* ServerBuilderGenerator.kt:295 */
  129    209   
    }
         210  +
    /* ServerCodegenVisitor.kt:345 */
  130    211   
}
         212  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  131    213   
impl crate::constrained::Constrained for crate::input::PrimitiveIntOpInput {
  132    214   
    type Unconstrained = crate::input::primitive_int_op_input::Builder;
  133    215   
}
  134    216   
         217  +
/* StructureGenerator.kt:197 */
  135    218   
#[allow(missing_docs)] // documentation missing in model
         219  +
/* RustType.kt:516 */
  136    220   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  137         -
pub struct MapWithEnumKeyOpInput {
         221  +
pub /* StructureGenerator.kt:201 */ struct MapWithEnumKeyOpInput {
         222  +
    /* StructureGenerator.kt:231 */
  138    223   
    #[allow(missing_docs)] // documentation missing in model
  139    224   
    pub map: ::std::option::Option<
  140    225   
        ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  141    226   
    >,
         227  +
    /* StructureGenerator.kt:201 */
  142    228   
}
         229  +
/* StructureGenerator.kt:135 */
  143    230   
impl MapWithEnumKeyOpInput {
         231  +
    /* StructureGenerator.kt:231 */
  144    232   
    #[allow(missing_docs)] // documentation missing in model
         233  +
                           /* StructureGenerator.kt:166 */
  145    234   
    pub fn map(
  146    235   
        &self,
  147    236   
    ) -> ::std::option::Option<
  148    237   
        &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  149    238   
    > {
         239  +
        /* StructureGenerator.kt:170 */
  150    240   
        self.map.as_ref()
         241  +
        /* StructureGenerator.kt:166 */
  151    242   
    }
         243  +
    /* StructureGenerator.kt:135 */
  152    244   
}
         245  +
/* ServerCodegenVisitor.kt:345 */
  153    246   
impl MapWithEnumKeyOpInput {
  154         -
    /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         247  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         248  +
    /* ServerBuilderGenerator.kt:295 */
  155    249   
    pub fn builder() -> crate::input::map_with_enum_key_op_input::Builder {
         250  +
        /* ServerBuilderGenerator.kt:296 */
  156    251   
        crate::input::map_with_enum_key_op_input::Builder::default()
         252  +
        /* ServerBuilderGenerator.kt:295 */
  157    253   
    }
         254  +
    /* ServerCodegenVisitor.kt:345 */
  158    255   
}
         256  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  159    257   
impl crate::constrained::Constrained for crate::input::MapWithEnumKeyOpInput {
  160    258   
    type Unconstrained = crate::input::map_with_enum_key_op_input::Builder;
  161    259   
}
  162    260   
         261  +
/* StructureGenerator.kt:197 */
  163    262   
#[allow(missing_docs)] // documentation missing in model
         263  +
/* RustType.kt:516 */
  164    264   
#[derive(
  165    265   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  166    266   
)]
  167         -
pub struct StatusResponseInput {}
         267  +
pub /* StructureGenerator.kt:201 */ struct StatusResponseInput {/* StructureGenerator.kt:201 */}
         268  +
/* ServerCodegenVisitor.kt:345 */
  168    269   
impl StatusResponseInput {
  169         -
    /// Creates a new builder-style object to manufacture [`StatusResponseInput`](crate::input::StatusResponseInput).
         270  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StatusResponseInput`](crate::input::StatusResponseInput).
         271  +
    /* ServerBuilderGenerator.kt:295 */
  170    272   
    pub fn builder() -> crate::input::status_response_input::Builder {
         273  +
        /* ServerBuilderGenerator.kt:296 */
  171    274   
        crate::input::status_response_input::Builder::default()
         275  +
        /* ServerBuilderGenerator.kt:295 */
  172    276   
    }
         277  +
    /* ServerCodegenVisitor.kt:345 */
  173    278   
}
         279  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  174    280   
impl crate::constrained::Constrained for crate::input::StatusResponseInput {
  175    281   
    type Unconstrained = crate::input::status_response_input::Builder;
  176    282   
}
  177    283   
         284  +
/* StructureGenerator.kt:197 */
  178    285   
#[allow(missing_docs)] // documentation missing in model
         286  +
/* RustType.kt:516 */
  179    287   
#[derive(
  180    288   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  181    289   
)]
  182         -
pub struct EnumQueryInput {
         290  +
pub /* StructureGenerator.kt:201 */ struct EnumQueryInput {
         291  +
    /* StructureGenerator.kt:231 */
  183    292   
    #[allow(missing_docs)] // documentation missing in model
  184    293   
    pub r#enum: crate::model::StringEnum,
         294  +
    /* StructureGenerator.kt:201 */
  185    295   
}
         296  +
/* StructureGenerator.kt:135 */
  186    297   
impl EnumQueryInput {
         298  +
    /* StructureGenerator.kt:231 */
  187    299   
    #[allow(missing_docs)] // documentation missing in model
         300  +
                           /* StructureGenerator.kt:166 */
  188    301   
    pub fn r#enum(&self) -> &crate::model::StringEnum {
         302  +
        /* StructureGenerator.kt:172 */
  189    303   
        &self.r#enum
         304  +
        /* StructureGenerator.kt:166 */
  190    305   
    }
         306  +
    /* StructureGenerator.kt:135 */
  191    307   
}
         308  +
/* ServerCodegenVisitor.kt:345 */
  192    309   
impl EnumQueryInput {
  193         -
    /// Creates a new builder-style object to manufacture [`EnumQueryInput`](crate::input::EnumQueryInput).
         310  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EnumQueryInput`](crate::input::EnumQueryInput).
         311  +
    /* ServerBuilderGenerator.kt:295 */
  194    312   
    pub fn builder() -> crate::input::enum_query_input::Builder {
         313  +
        /* ServerBuilderGenerator.kt:296 */
  195    314   
        crate::input::enum_query_input::Builder::default()
         315  +
        /* ServerBuilderGenerator.kt:295 */
  196    316   
    }
         317  +
    /* ServerCodegenVisitor.kt:345 */
  197    318   
}
         319  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  198    320   
impl crate::constrained::Constrained for crate::input::EnumQueryInput {
  199    321   
    type Unconstrained = crate::input::enum_query_input::Builder;
  200    322   
}
  201    323   
         324  +
/* StructureGenerator.kt:197 */
  202    325   
#[allow(missing_docs)] // documentation missing in model
         326  +
/* RustType.kt:516 */
  203    327   
#[derive(
  204    328   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  205    329   
)]
  206         -
pub struct PrimitiveIntHeaderInput {}
         330  +
pub /* StructureGenerator.kt:201 */ struct PrimitiveIntHeaderInput {/* StructureGenerator.kt:201 */}
         331  +
/* ServerCodegenVisitor.kt:345 */
  207    332   
impl PrimitiveIntHeaderInput {
  208         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
         333  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
         334  +
    /* ServerBuilderGenerator.kt:295 */
  209    335   
    pub fn builder() -> crate::input::primitive_int_header_input::Builder {
         336  +
        /* ServerBuilderGenerator.kt:296 */
  210    337   
        crate::input::primitive_int_header_input::Builder::default()
         338  +
        /* ServerBuilderGenerator.kt:295 */
  211    339   
    }
         340  +
    /* ServerCodegenVisitor.kt:345 */
  212    341   
}
         342  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  213    343   
impl crate::constrained::Constrained for crate::input::PrimitiveIntHeaderInput {
  214    344   
    type Unconstrained = crate::input::primitive_int_header_input::Builder;
  215    345   
}
  216    346   
         347  +
/* StructureGenerator.kt:197 */
  217    348   
#[allow(missing_docs)] // documentation missing in model
         349  +
/* RustType.kt:516 */
  218    350   
#[derive(
  219    351   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  220    352   
)]
  221         -
pub struct StringPayloadInput {
         353  +
pub /* StructureGenerator.kt:201 */ struct StringPayloadInput {
         354  +
    /* StructureGenerator.kt:231 */
  222    355   
    #[allow(missing_docs)] // documentation missing in model
  223    356   
    pub payload: ::std::option::Option<::std::string::String>,
         357  +
    /* StructureGenerator.kt:201 */
  224    358   
}
         359  +
/* StructureGenerator.kt:135 */
  225    360   
impl StringPayloadInput {
         361  +
    /* StructureGenerator.kt:231 */
  226    362   
    #[allow(missing_docs)] // documentation missing in model
         363  +
                           /* StructureGenerator.kt:166 */
  227    364   
    pub fn payload(&self) -> ::std::option::Option<&str> {
         365  +
        /* StructureGenerator.kt:169 */
  228    366   
        self.payload.as_deref()
         367  +
        /* StructureGenerator.kt:166 */
  229    368   
    }
         369  +
    /* StructureGenerator.kt:135 */
  230    370   
}
         371  +
/* ServerCodegenVisitor.kt:345 */
  231    372   
impl StringPayloadInput {
  232         -
    /// Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
         373  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
         374  +
    /* ServerBuilderGenerator.kt:295 */
  233    375   
    pub fn builder() -> crate::input::string_payload_input::Builder {
         376  +
        /* ServerBuilderGenerator.kt:296 */
  234    377   
        crate::input::string_payload_input::Builder::default()
         378  +
        /* ServerBuilderGenerator.kt:295 */
  235    379   
    }
         380  +
    /* ServerCodegenVisitor.kt:345 */
  236    381   
}
         382  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  237    383   
impl crate::constrained::Constrained for crate::input::StringPayloadInput {
  238    384   
    type Unconstrained = crate::input::string_payload_input::Builder;
  239    385   
}
  240         -
/// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
         386  +
/// /* ServerBuilderGenerator.kt:171 */See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
  241    387   
pub mod query_precedence_input {
  242    388   
         389  +
    /* ServerBuilderGenerator.kt:461 */
  243    390   
    impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
  244    391   
        fn from(builder: Builder) -> Self {
  245    392   
            builder.build()
  246    393   
        }
  247    394   
    }
  248         -
    /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
         395  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
         396  +
    /* RustType.kt:516 */
  249    397   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         398  +
    /* ServerBuilderGenerator.kt:211 */
  250    399   
    pub struct Builder {
         400  +
        /* ServerBuilderGenerator.kt:308 */
  251    401   
        pub(crate) foo: ::std::option::Option<::std::string::String>,
         402  +
        /* ServerBuilderGenerator.kt:308 */
  252    403   
        pub(crate) baz: ::std::option::Option<
  253    404   
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  254    405   
        >,
         406  +
        /* ServerBuilderGenerator.kt:211 */
  255    407   
    }
         408  +
    /* ServerBuilderGenerator.kt:215 */
  256    409   
    impl Builder {
         410  +
        /* ServerBuilderGenerator.kt:331 */
  257    411   
        #[allow(missing_docs)] // documentation missing in model
         412  +
                               /* ServerBuilderGenerator.kt:343 */
  258    413   
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  259         -
            self.foo = input;
         414  +
            /* ServerBuilderGenerator.kt:344 */
         415  +
            self.foo =
         416  +
                /* ServerBuilderGenerator.kt:376 */input
         417  +
            /* ServerBuilderGenerator.kt:344 */;
  260    418   
            self
         419  +
            /* ServerBuilderGenerator.kt:343 */
  261    420   
        }
         421  +
        /* ServerBuilderGenerator.kt:426 */
  262    422   
        #[allow(missing_docs)] // documentation missing in model
         423  +
                               /* ServerBuilderGenerator.kt:428 */
  263    424   
        pub(crate) fn set_foo(
  264    425   
            mut self,
  265    426   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  266    427   
        ) -> Self {
         428  +
            /* ServerBuilderGenerator.kt:429 */
  267    429   
            self.foo = input.map(|v| v.into());
  268    430   
            self
         431  +
            /* ServerBuilderGenerator.kt:428 */
  269    432   
        }
         433  +
        /* ServerBuilderGenerator.kt:331 */
  270    434   
        #[allow(missing_docs)] // documentation missing in model
         435  +
                               /* ServerBuilderGenerator.kt:343 */
  271    436   
        pub fn baz(
  272    437   
            mut self,
  273    438   
            input: ::std::option::Option<
  274    439   
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  275    440   
            >,
  276    441   
        ) -> Self {
  277         -
            self.baz = input;
         442  +
            /* ServerBuilderGenerator.kt:344 */
         443  +
            self.baz =
         444  +
                /* ServerBuilderGenerator.kt:376 */input
         445  +
            /* ServerBuilderGenerator.kt:344 */;
  278    446   
            self
         447  +
            /* ServerBuilderGenerator.kt:343 */
  279    448   
        }
         449  +
        /* ServerBuilderGenerator.kt:426 */
  280    450   
        #[allow(missing_docs)] // documentation missing in model
         451  +
                               /* ServerBuilderGenerator.kt:428 */
  281    452   
        pub(crate) fn set_baz(
  282    453   
            mut self,
  283    454   
            input: Option<
  284    455   
                impl ::std::convert::Into<
  285    456   
                    ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  286    457   
                >,
  287    458   
            >,
  288    459   
        ) -> Self {
         460  +
            /* ServerBuilderGenerator.kt:429 */
  289    461   
            self.baz = input.map(|v| v.into());
  290    462   
            self
         463  +
            /* ServerBuilderGenerator.kt:428 */
  291    464   
        }
  292         -
        /// Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
         465  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
         466  +
        /* ServerBuilderGenerator.kt:271 */
  293    467   
        pub fn build(self) -> crate::input::QueryPrecedenceInput {
  294    468   
            self.build_enforcing_all_constraints()
  295    469   
        }
         470  +
        /* ServerBuilderGenerator.kt:283 */
  296    471   
        fn build_enforcing_all_constraints(self) -> crate::input::QueryPrecedenceInput {
         472  +
            /* ServerBuilderGenerator.kt:542 */
  297    473   
            crate::input::QueryPrecedenceInput {
         474  +
                /* ServerBuilderGenerator.kt:546 */
  298    475   
                foo: self.foo,
         476  +
                /* ServerBuilderGenerator.kt:546 */
  299    477   
                baz: self.baz,
         478  +
                /* ServerBuilderGenerator.kt:542 */
  300    479   
            }
         480  +
            /* ServerBuilderGenerator.kt:283 */
  301    481   
        }
         482  +
        /* ServerBuilderGenerator.kt:215 */
  302    483   
    }
         484  +
         485  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  303    486   
}
  304         -
/// See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
         487  +
/// /* ServerBuilderGenerator.kt:171 */See [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
  305    488   
pub mod empty_struct_with_content_on_wire_op_input {
  306    489   
         490  +
    /* ServerBuilderGenerator.kt:461 */
  307    491   
    impl ::std::convert::From<Builder> for crate::input::EmptyStructWithContentOnWireOpInput {
  308    492   
        fn from(builder: Builder) -> Self {
  309    493   
            builder.build()
  310    494   
        }
  311    495   
    }
  312         -
    /// A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
         496  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
         497  +
    /* RustType.kt:516 */
  313    498   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  314         -
    pub struct Builder {}
         499  +
    /* ServerBuilderGenerator.kt:211 */
         500  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         501  +
    /* ServerBuilderGenerator.kt:215 */
  315    502   
    impl Builder {
  316         -
        /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
         503  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput).
         504  +
        /* ServerBuilderGenerator.kt:271 */
  317    505   
        pub fn build(self) -> crate::input::EmptyStructWithContentOnWireOpInput {
  318    506   
            self.build_enforcing_all_constraints()
  319    507   
        }
         508  +
        /* ServerBuilderGenerator.kt:283 */
  320    509   
        fn build_enforcing_all_constraints(
  321    510   
            self,
  322    511   
        ) -> crate::input::EmptyStructWithContentOnWireOpInput {
  323         -
            crate::input::EmptyStructWithContentOnWireOpInput {}
         512  +
            /* ServerBuilderGenerator.kt:542 */
         513  +
            crate::input::EmptyStructWithContentOnWireOpInput {
         514  +
            /* ServerBuilderGenerator.kt:542 */}
         515  +
            /* ServerBuilderGenerator.kt:283 */
  324    516   
        }
         517  +
        /* ServerBuilderGenerator.kt:215 */
  325    518   
    }
         519  +
         520  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  326    521   
}
  327         -
/// See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
         522  +
/// /* ServerBuilderGenerator.kt:171 */See [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
  328    523   
pub mod case_insensitive_error_operation_input {
  329    524   
         525  +
    /* ServerBuilderGenerator.kt:461 */
  330    526   
    impl ::std::convert::From<Builder> for crate::input::CaseInsensitiveErrorOperationInput {
  331    527   
        fn from(builder: Builder) -> Self {
  332    528   
            builder.build()
  333    529   
        }
  334    530   
    }
  335         -
    /// A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
         531  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
         532  +
    /* RustType.kt:516 */
  336    533   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  337         -
    pub struct Builder {}
         534  +
    /* ServerBuilderGenerator.kt:211 */
         535  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         536  +
    /* ServerBuilderGenerator.kt:215 */
  338    537   
    impl Builder {
  339         -
        /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
         538  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput).
         539  +
        /* ServerBuilderGenerator.kt:271 */
  340    540   
        pub fn build(self) -> crate::input::CaseInsensitiveErrorOperationInput {
  341    541   
            self.build_enforcing_all_constraints()
  342    542   
        }
         543  +
        /* ServerBuilderGenerator.kt:283 */
  343    544   
        fn build_enforcing_all_constraints(
  344    545   
            self,
  345    546   
        ) -> crate::input::CaseInsensitiveErrorOperationInput {
  346         -
            crate::input::CaseInsensitiveErrorOperationInput {}
         547  +
            /* ServerBuilderGenerator.kt:542 */
         548  +
            crate::input::CaseInsensitiveErrorOperationInput {
         549  +
            /* ServerBuilderGenerator.kt:542 */}
         550  +
            /* ServerBuilderGenerator.kt:283 */
  347    551   
        }
         552  +
        /* ServerBuilderGenerator.kt:215 */
  348    553   
    }
         554  +
         555  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  349    556   
}
  350         -
/// See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         557  +
/// /* ServerBuilderGenerator.kt:171 */See [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
  351    558   
pub mod null_in_non_sparse_input {
  352    559   
         560  +
    /* ServerBuilderGenerator.kt:461 */
  353    561   
    impl ::std::convert::From<Builder> for crate::input::NullInNonSparseInput {
  354    562   
        fn from(builder: Builder) -> Self {
  355    563   
            builder.build()
  356    564   
        }
  357    565   
    }
  358         -
    /// A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         566  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         567  +
    /* RustType.kt:516 */
  359    568   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  360         -
    pub struct Builder {}
         569  +
    /* ServerBuilderGenerator.kt:211 */
         570  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         571  +
    /* ServerBuilderGenerator.kt:215 */
  361    572   
    impl Builder {
  362         -
        /// Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         573  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NullInNonSparseInput`](crate::input::NullInNonSparseInput).
         574  +
        /* ServerBuilderGenerator.kt:271 */
  363    575   
        pub fn build(self) -> crate::input::NullInNonSparseInput {
  364    576   
            self.build_enforcing_all_constraints()
  365    577   
        }
         578  +
        /* ServerBuilderGenerator.kt:283 */
  366    579   
        fn build_enforcing_all_constraints(self) -> crate::input::NullInNonSparseInput {
  367         -
            crate::input::NullInNonSparseInput {}
         580  +
            /* ServerBuilderGenerator.kt:542 */
         581  +
            crate::input::NullInNonSparseInput {
         582  +
            /* ServerBuilderGenerator.kt:542 */}
         583  +
            /* ServerBuilderGenerator.kt:283 */
  368    584   
        }
         585  +
        /* ServerBuilderGenerator.kt:215 */
  369    586   
    }
         587  +
         588  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  370    589   
}
  371         -
/// See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         590  +
/// /* ServerBuilderGenerator.kt:171 */See [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
  372    591   
pub mod escaped_string_values_input {
  373    592   
         593  +
    /* RustType.kt:516 */
  374    594   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  375         -
    /// Holds one variant for each of the ways the builder can fail.
         595  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         596  +
    /* RustType.kt:516 */
  376    597   
    #[non_exhaustive]
         598  +
    /* ServerBuilderConstraintViolations.kt:75 */
  377    599   
    #[allow(clippy::enum_variant_names)]
  378    600   
    pub enum ConstraintViolation {
  379         -
        /// Constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`.
         601  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`.
         602  +
        /* RustType.kt:516 */
  380    603   
        #[doc(hidden)]
         604  +
        /* ServerBuilderConstraintViolations.kt:164 */
  381    605   
        Enum(crate::model::enum_with_escaped_chars::ConstraintViolation),
         606  +
        /* ServerBuilderConstraintViolations.kt:75 */
  382    607   
    }
         608  +
    /* ServerBuilderConstraintViolations.kt:117 */
  383    609   
    impl ::std::fmt::Display for ConstraintViolation {
         610  +
        /* ServerBuilderConstraintViolations.kt:118 */
  384    611   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         612  +
            /* ServerBuilderConstraintViolations.kt:119 */
  385    613   
            match self {
  386         -
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`"),
  387         -
            }
         614  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EscapedStringValuesInput`"),
         615  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         616  +
            /* ServerBuilderConstraintViolations.kt:118 */
  388    617   
        }
         618  +
        /* ServerBuilderConstraintViolations.kt:117 */
  389    619   
    }
         620  +
    /* ServerBuilderConstraintViolations.kt:84 */
  390    621   
    impl ::std::error::Error for ConstraintViolation {}
         622  +
    /* ServerBuilderConstraintViolations.kt:171 */
  391    623   
    impl ConstraintViolation {
  392    624   
        pub(crate) fn as_validation_exception_field(
  393    625   
            self,
  394    626   
            path: ::std::string::String,
  395    627   
        ) -> crate::model::ValidationExceptionField {
  396    628   
            match self {
  397    629   
                ConstraintViolation::Enum(inner) => {
  398    630   
                    inner.as_validation_exception_field(path + "/enum")
  399    631   
                }
  400    632   
            }
  401    633   
        }
  402    634   
    }
         635  +
    /* ServerBuilderGenerator.kt:234 */
  403    636   
    impl ::std::convert::From<ConstraintViolation>
  404    637   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  405    638   
    {
  406    639   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  407    640   
            let first_validation_exception_field =
  408    641   
                constraint_violation.as_validation_exception_field("".to_owned());
  409    642   
            let validation_exception = crate::error::ValidationException {
  410    643   
                message: format!(
  411    644   
                    "1 validation error detected. {}",
  412    645   
                    &first_validation_exception_field.message
  413    646   
                ),
  414    647   
                field_list: Some(vec![first_validation_exception_field]),
  415    648   
            };
  416    649   
            Self::ConstraintViolation(
  417    650   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  418    651   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  419    652   
                            )
  420    653   
        }
  421    654   
    }
         655  +
    /* ServerBuilderGenerator.kt:244 */
  422    656   
    impl ::std::convert::From<Builder>
  423    657   
        for crate::constrained::MaybeConstrained<crate::input::EscapedStringValuesInput>
  424    658   
    {
  425    659   
        fn from(builder: Builder) -> Self {
  426    660   
            Self::Unconstrained(builder)
  427    661   
        }
  428    662   
    }
         663  +
    /* ServerBuilderGenerator.kt:446 */
  429    664   
    impl ::std::convert::TryFrom<Builder> for crate::input::EscapedStringValuesInput {
  430    665   
        type Error = ConstraintViolation;
  431    666   
  432    667   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  433    668   
            builder.build()
  434    669   
        }
  435    670   
    }
  436         -
    /// A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         671  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         672  +
    /* RustType.kt:516 */
  437    673   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         674  +
    /* ServerBuilderGenerator.kt:211 */
  438    675   
    pub struct Builder {
         676  +
        /* ServerBuilderGenerator.kt:308 */
  439    677   
        pub(crate) r#enum: ::std::option::Option<
  440    678   
            crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
  441    679   
        >,
         680  +
        /* ServerBuilderGenerator.kt:308 */
  442    681   
        pub(crate) some_string: ::std::option::Option<::std::string::String>,
         682  +
        /* ServerBuilderGenerator.kt:211 */
  443    683   
    }
         684  +
    /* ServerBuilderGenerator.kt:215 */
  444    685   
    impl Builder {
         686  +
        /* ServerBuilderGenerator.kt:331 */
  445    687   
        #[allow(missing_docs)] // documentation missing in model
         688  +
                               /* ServerBuilderGenerator.kt:343 */
  446    689   
        pub fn r#enum(
  447    690   
            mut self,
  448    691   
            input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  449    692   
        ) -> Self {
  450         -
            self.r#enum = input.map(
  451         -
                #[allow(clippy::redundant_closure)]
  452         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  453         -
            );
         693  +
            /* ServerBuilderGenerator.kt:344 */
         694  +
            self.r#enum =
         695  +
                /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
         696  +
            /* ServerBuilderGenerator.kt:344 */;
  454    697   
            self
         698  +
            /* ServerBuilderGenerator.kt:343 */
  455    699   
        }
         700  +
        /* ServerBuilderGenerator.kt:426 */
  456    701   
        #[allow(missing_docs)] // documentation missing in model
         702  +
                               /* ServerBuilderGenerator.kt:428 */
  457    703   
        pub(crate) fn set_enum(
  458    704   
            mut self,
  459    705   
            input: Option<
  460    706   
                impl ::std::convert::Into<
  461    707   
                    crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>,
  462    708   
                >,
  463    709   
            >,
  464    710   
        ) -> Self {
         711  +
            /* ServerBuilderGenerator.kt:429 */
  465    712   
            self.r#enum = input.map(|v| v.into());
  466    713   
            self
         714  +
            /* ServerBuilderGenerator.kt:428 */
  467    715   
        }
         716  +
        /* ServerBuilderGenerator.kt:331 */
  468    717   
        #[allow(missing_docs)] // documentation missing in model
         718  +
                               /* ServerBuilderGenerator.kt:343 */
  469    719   
        pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  470         -
            self.some_string = input;
         720  +
            /* ServerBuilderGenerator.kt:344 */
         721  +
            self.some_string =
         722  +
                /* ServerBuilderGenerator.kt:376 */input
         723  +
            /* ServerBuilderGenerator.kt:344 */;
  471    724   
            self
         725  +
            /* ServerBuilderGenerator.kt:343 */
  472    726   
        }
         727  +
        /* ServerBuilderGenerator.kt:426 */
  473    728   
        #[allow(missing_docs)] // documentation missing in model
         729  +
                               /* ServerBuilderGenerator.kt:428 */
  474    730   
        pub(crate) fn set_some_string(
  475    731   
            mut self,
  476    732   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  477    733   
        ) -> Self {
         734  +
            /* ServerBuilderGenerator.kt:429 */
  478    735   
            self.some_string = input.map(|v| v.into());
  479    736   
            self
         737  +
            /* ServerBuilderGenerator.kt:428 */
  480    738   
        }
  481         -
        /// Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
  482         -
        ///
         739  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput).
         740  +
        /// /* ServerBuilderGenerator.kt:260 */
  483    741   
        /// The builder fails to construct a [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) if a [`ConstraintViolation`] occurs.
  484    742   
        ///
         743  +
        /* ServerBuilderGenerator.kt:271 */
  485    744   
        pub fn build(self) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
  486    745   
            self.build_enforcing_all_constraints()
  487    746   
        }
         747  +
        /* ServerBuilderGenerator.kt:283 */
  488    748   
        fn build_enforcing_all_constraints(
  489    749   
            self,
  490    750   
        ) -> Result<crate::input::EscapedStringValuesInput, ConstraintViolation> {
  491         -
            Ok(crate::input::EscapedStringValuesInput {
         751  +
            /* ServerBuilderGenerator.kt:287 */
         752  +
            Ok(
         753  +
                /* ServerBuilderGenerator.kt:542 */
         754  +
                crate::input::EscapedStringValuesInput {
         755  +
                    /* ServerBuilderGenerator.kt:546 */
  492    756   
                    r#enum: self
  493    757   
                        .r#enum
         758  +
                        /* ServerBuilderGenerator.kt:602 */
  494    759   
                        .map(|v| match v {
  495    760   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  496    761   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  497    762   
                        })
         763  +
                        /* ServerBuilderGenerator.kt:614 */
  498    764   
                        .map(|res| res.map_err(ConstraintViolation::Enum))
  499    765   
                        .transpose()?,
         766  +
                    /* ServerBuilderGenerator.kt:546 */
  500    767   
                    some_string: self.some_string,
  501         -
            })
         768  +
                    /* ServerBuilderGenerator.kt:542 */
         769  +
                }, /* ServerBuilderGenerator.kt:287 */
         770  +
            )
         771  +
            /* ServerBuilderGenerator.kt:283 */
  502    772   
        }
         773  +
        /* ServerBuilderGenerator.kt:215 */
  503    774   
    }
         775  +
         776  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  504    777   
}
  505         -
/// See [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         778  +
/// /* ServerBuilderGenerator.kt:171 */See [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
  506    779   
pub mod primitive_int_op_input {
  507    780   
         781  +
    /* ServerBuilderGenerator.kt:461 */
  508    782   
    impl ::std::convert::From<Builder> for crate::input::PrimitiveIntOpInput {
  509    783   
        fn from(builder: Builder) -> Self {
  510    784   
            builder.build()
  511    785   
        }
  512    786   
    }
  513         -
    /// A builder for [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         787  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         788  +
    /* RustType.kt:516 */
  514    789   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         790  +
    /* ServerBuilderGenerator.kt:211 */
  515    791   
    pub struct Builder {
         792  +
        /* ServerBuilderGenerator.kt:308 */
  516    793   
        pub(crate) value: ::std::option::Option<i32>,
         794  +
        /* ServerBuilderGenerator.kt:211 */
  517    795   
    }
         796  +
    /* ServerBuilderGenerator.kt:215 */
  518    797   
    impl Builder {
         798  +
        /* ServerBuilderGenerator.kt:331 */
  519    799   
        #[allow(missing_docs)] // documentation missing in model
         800  +
                               /* ServerBuilderGenerator.kt:343 */
  520    801   
        pub fn value(mut self, input: i32) -> Self {
  521         -
            self.value = Some(input);
         802  +
            /* ServerBuilderGenerator.kt:344 */
         803  +
            self.value =
         804  +
                /* ServerBuilderGenerator.kt:345 */Some(
         805  +
                    /* ServerBuilderGenerator.kt:376 */input
         806  +
                /* ServerBuilderGenerator.kt:345 */)
         807  +
            /* ServerBuilderGenerator.kt:344 */;
  522    808   
            self
         809  +
            /* ServerBuilderGenerator.kt:343 */
  523    810   
        }
         811  +
        /* ServerBuilderGenerator.kt:426 */
  524    812   
        #[allow(missing_docs)] // documentation missing in model
         813  +
                               /* ServerBuilderGenerator.kt:428 */
  525    814   
        pub(crate) fn set_value(mut self, input: impl ::std::convert::Into<i32>) -> Self {
         815  +
            /* ServerBuilderGenerator.kt:429 */
  526    816   
            self.value = Some(input.into());
  527    817   
            self
         818  +
            /* ServerBuilderGenerator.kt:428 */
  528    819   
        }
  529         -
        /// Consumes the builder and constructs a [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         820  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput).
         821  +
        /* ServerBuilderGenerator.kt:271 */
  530    822   
        pub fn build(self) -> crate::input::PrimitiveIntOpInput {
  531    823   
            self.build_enforcing_all_constraints()
  532    824   
        }
         825  +
        /* ServerBuilderGenerator.kt:283 */
  533    826   
        fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntOpInput {
         827  +
            /* ServerBuilderGenerator.kt:542 */
  534    828   
            crate::input::PrimitiveIntOpInput {
  535         -
                value: self.value.unwrap_or(0i32),
         829  +
                /* ServerBuilderGenerator.kt:546 */
         830  +
                value: self
         831  +
                    .value
         832  +
                    /* ServerBuilderGeneratorCommon.kt:135 */
         833  +
                    .unwrap_or(0i32),
         834  +
                /* ServerBuilderGenerator.kt:542 */
  536    835   
            }
         836  +
            /* ServerBuilderGenerator.kt:283 */
  537    837   
        }
         838  +
        /* ServerBuilderGenerator.kt:215 */
  538    839   
    }
         840  +
         841  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  539    842   
}
  540         -
/// See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         843  +
/// /* ServerBuilderGenerator.kt:171 */See [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
  541    844   
pub mod map_with_enum_key_op_input {
  542    845   
         846  +
    /* RustType.kt:516 */
  543    847   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  544         -
    /// Holds one variant for each of the ways the builder can fail.
         848  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         849  +
    /* RustType.kt:516 */
  545    850   
    #[non_exhaustive]
         851  +
    /* ServerBuilderConstraintViolations.kt:75 */
  546    852   
    #[allow(clippy::enum_variant_names)]
  547    853   
    pub enum ConstraintViolation {
  548         -
        /// Constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`.
         854  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`.
         855  +
        /* RustType.kt:516 */
  549    856   
        #[doc(hidden)]
         857  +
        /* ServerBuilderConstraintViolations.kt:164 */
  550    858   
        Map(crate::model::map_with_enum_key::ConstraintViolation),
         859  +
        /* ServerBuilderConstraintViolations.kt:75 */
  551    860   
    }
         861  +
    /* ServerBuilderConstraintViolations.kt:117 */
  552    862   
    impl ::std::fmt::Display for ConstraintViolation {
         863  +
        /* ServerBuilderConstraintViolations.kt:118 */
  553    864   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         865  +
            /* ServerBuilderConstraintViolations.kt:119 */
  554    866   
            match self {
  555         -
                ConstraintViolation::Map(_) => write!(f, "constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`"),
  556         -
            }
         867  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Map(_) => write!(f, "constraint violation occurred building member `map` when building `MapWithEnumKeyOpInput`"),
         868  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         869  +
            /* ServerBuilderConstraintViolations.kt:118 */
  557    870   
        }
         871  +
        /* ServerBuilderConstraintViolations.kt:117 */
  558    872   
    }
         873  +
    /* ServerBuilderConstraintViolations.kt:84 */
  559    874   
    impl ::std::error::Error for ConstraintViolation {}
         875  +
    /* ServerBuilderConstraintViolations.kt:171 */
  560    876   
    impl ConstraintViolation {
  561    877   
        pub(crate) fn as_validation_exception_field(
  562    878   
            self,
  563    879   
            path: ::std::string::String,
  564    880   
        ) -> crate::model::ValidationExceptionField {
  565    881   
            match self {
  566    882   
                ConstraintViolation::Map(inner) => {
  567    883   
                    inner.as_validation_exception_field(path + "/map")
  568    884   
                }
  569    885   
            }
  570    886   
        }
  571    887   
    }
         888  +
    /* ServerBuilderGenerator.kt:234 */
  572    889   
    impl ::std::convert::From<ConstraintViolation>
  573    890   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  574    891   
    {
  575    892   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  576    893   
            let first_validation_exception_field =
  577    894   
                constraint_violation.as_validation_exception_field("".to_owned());
  578    895   
            let validation_exception = crate::error::ValidationException {
  579    896   
                message: format!(
  580    897   
                    "1 validation error detected. {}",
  581    898   
                    &first_validation_exception_field.message
  582    899   
                ),
  583    900   
                field_list: Some(vec![first_validation_exception_field]),
  584    901   
            };
  585    902   
            Self::ConstraintViolation(
  586    903   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  587    904   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  588    905   
                            )
  589    906   
        }
  590    907   
    }
         908  +
    /* ServerBuilderGenerator.kt:244 */
  591    909   
    impl ::std::convert::From<Builder>
  592    910   
        for crate::constrained::MaybeConstrained<crate::input::MapWithEnumKeyOpInput>
  593    911   
    {
  594    912   
        fn from(builder: Builder) -> Self {
  595    913   
            Self::Unconstrained(builder)
  596    914   
        }
  597    915   
    }
         916  +
    /* ServerBuilderGenerator.kt:446 */
  598    917   
    impl ::std::convert::TryFrom<Builder> for crate::input::MapWithEnumKeyOpInput {
  599    918   
        type Error = ConstraintViolation;
  600    919   
  601    920   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  602    921   
            builder.build()
  603    922   
        }
  604    923   
    }
  605         -
    /// A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         924  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         925  +
    /* RustType.kt:516 */
  606    926   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         927  +
    /* ServerBuilderGenerator.kt:211 */
  607    928   
    pub struct Builder {
         929  +
        /* ServerBuilderGenerator.kt:308 */
  608    930   
        pub(crate) map: ::std::option::Option<
  609    931   
            crate::constrained::MaybeConstrained<
  610    932   
                crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained,
  611    933   
            >,
  612    934   
        >,
         935  +
        /* ServerBuilderGenerator.kt:211 */
  613    936   
    }
         937  +
    /* ServerBuilderGenerator.kt:215 */
  614    938   
    impl Builder {
         939  +
        /* ServerBuilderGenerator.kt:331 */
  615    940   
        #[allow(missing_docs)] // documentation missing in model
         941  +
                               /* ServerBuilderGenerator.kt:343 */
  616    942   
        pub fn map(
  617    943   
            mut self,
  618    944   
            input: ::std::option::Option<
  619    945   
                ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  620    946   
            >,
  621    947   
        ) -> Self {
  622         -
            self.map = input.map(
  623         -
                #[allow(clippy::redundant_closure)]
  624         -
                |v| crate::constrained::MaybeConstrained::Constrained((v).into()),
  625         -
            );
         948  +
            /* ServerBuilderGenerator.kt:344 */
         949  +
            self.map =
         950  +
                /* ServerBuilderGenerator.kt:369 */input.map(#[allow(clippy::redundant_closure)] |v|
         951  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained((v).into())
         952  +
                /* ServerBuilderGenerator.kt:369 */)
         953  +
            /* ServerBuilderGenerator.kt:344 */;
  626    954   
            self
         955  +
            /* ServerBuilderGenerator.kt:343 */
  627    956   
        }
         957  +
        /* ServerBuilderGenerator.kt:426 */
  628    958   
        #[allow(missing_docs)] // documentation missing in model
         959  +
                               /* ServerBuilderGenerator.kt:428 */
  629    960   
        pub(crate) fn set_map(
  630    961   
            mut self,
  631    962   
            input: Option<impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::constrained::map_with_enum_key_constrained::MapWithEnumKeyConstrained>>>,
  632    963   
        ) -> Self {
         964  +
            /* ServerBuilderGenerator.kt:429 */
  633    965   
            self.map = input.map(|v| v.into());
  634    966   
            self
         967  +
            /* ServerBuilderGenerator.kt:428 */
  635    968   
        }
  636         -
        /// Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
  637         -
        ///
         969  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput).
         970  +
        /// /* ServerBuilderGenerator.kt:260 */
  638    971   
        /// The builder fails to construct a [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) if a [`ConstraintViolation`] occurs.
  639    972   
        ///
         973  +
        /* ServerBuilderGenerator.kt:271 */
  640    974   
        pub fn build(self) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
  641    975   
            self.build_enforcing_all_constraints()
  642    976   
        }
         977  +
        /* ServerBuilderGenerator.kt:283 */
  643    978   
        fn build_enforcing_all_constraints(
  644    979   
            self,
  645    980   
        ) -> Result<crate::input::MapWithEnumKeyOpInput, ConstraintViolation> {
  646         -
            Ok(crate::input::MapWithEnumKeyOpInput {
         981  +
            /* ServerBuilderGenerator.kt:287 */
         982  +
            Ok(
         983  +
                /* ServerBuilderGenerator.kt:542 */
         984  +
                crate::input::MapWithEnumKeyOpInput {
         985  +
                    /* ServerBuilderGenerator.kt:546 */
  647    986   
                    map: self
  648    987   
                        .map
         988  +
                        /* ServerBuilderGenerator.kt:602 */
  649    989   
                        .map(|v| match v {
  650    990   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  651    991   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  652    992   
                        })
         993  +
                        /* ServerBuilderGenerator.kt:614 */
  653    994   
                        .map(|res| res.map(|v| v.into()).map_err(ConstraintViolation::Map))
  654    995   
                        .transpose()?,
  655         -
            })
         996  +
                    /* ServerBuilderGenerator.kt:542 */
         997  +
                }, /* ServerBuilderGenerator.kt:287 */
         998  +
            )
         999  +
            /* ServerBuilderGenerator.kt:283 */
  656   1000   
        }
        1001  +
        /* ServerBuilderGenerator.kt:215 */
  657   1002   
    }
        1003  +
        1004  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  658   1005   
}
  659         -
/// See [`StatusResponseInput`](crate::input::StatusResponseInput).
        1006  +
/// /* ServerBuilderGenerator.kt:171 */See [`StatusResponseInput`](crate::input::StatusResponseInput).
  660   1007   
pub mod status_response_input {
  661   1008   
        1009  +
    /* ServerBuilderGenerator.kt:461 */
  662   1010   
    impl ::std::convert::From<Builder> for crate::input::StatusResponseInput {
  663   1011   
        fn from(builder: Builder) -> Self {
  664   1012   
            builder.build()
  665   1013   
        }
  666   1014   
    }
  667         -
    /// A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
        1015  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StatusResponseInput`](crate::input::StatusResponseInput).
        1016  +
    /* RustType.kt:516 */
  668   1017   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  669         -
    pub struct Builder {}
        1018  +
    /* ServerBuilderGenerator.kt:211 */
        1019  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
        1020  +
    /* ServerBuilderGenerator.kt:215 */
  670   1021   
    impl Builder {
  671         -
        /// Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
        1022  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StatusResponseInput`](crate::input::StatusResponseInput).
        1023  +
        /* ServerBuilderGenerator.kt:271 */
  672   1024   
        pub fn build(self) -> crate::input::StatusResponseInput {
  673   1025   
            self.build_enforcing_all_constraints()
  674   1026   
        }
        1027  +
        /* ServerBuilderGenerator.kt:283 */
  675   1028   
        fn build_enforcing_all_constraints(self) -> crate::input::StatusResponseInput {
  676         -
            crate::input::StatusResponseInput {}
        1029  +
            /* ServerBuilderGenerator.kt:542 */
        1030  +
            crate::input::StatusResponseInput {
        1031  +
            /* ServerBuilderGenerator.kt:542 */}
        1032  +
            /* ServerBuilderGenerator.kt:283 */
  677   1033   
        }
        1034  +
        /* ServerBuilderGenerator.kt:215 */
  678   1035   
    }
        1036  +
        1037  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  679   1038   
}
  680         -
/// See [`EnumQueryInput`](crate::input::EnumQueryInput).
        1039  +
/// /* ServerBuilderGenerator.kt:171 */See [`EnumQueryInput`](crate::input::EnumQueryInput).
  681   1040   
pub mod enum_query_input {
  682   1041   
        1042  +
    /* RustType.kt:516 */
  683   1043   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  684         -
    /// Holds one variant for each of the ways the builder can fail.
        1044  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        1045  +
    /* RustType.kt:516 */
  685   1046   
    #[non_exhaustive]
        1047  +
    /* ServerBuilderConstraintViolations.kt:75 */
  686   1048   
    #[allow(clippy::enum_variant_names)]
  687   1049   
    pub enum ConstraintViolation {
  688         -
        /// `r#enum` was not provided but it is required when building `EnumQueryInput`.
        1050  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`r#enum` was not provided but it is required when building `EnumQueryInput`.
        1051  +
        /* ServerBuilderConstraintViolations.kt:143 */
  689   1052   
        MissingEnum,
  690         -
        /// Constraint violation occurred building member `r#enum` when building `EnumQueryInput`.
        1053  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `r#enum` when building `EnumQueryInput`.
        1054  +
        /* RustType.kt:516 */
  691   1055   
        #[doc(hidden)]
        1056  +
        /* ServerBuilderConstraintViolations.kt:164 */
  692   1057   
        Enum(crate::model::string_enum::ConstraintViolation),
        1058  +
        /* ServerBuilderConstraintViolations.kt:75 */
  693   1059   
    }
        1060  +
    /* ServerBuilderConstraintViolations.kt:117 */
  694   1061   
    impl ::std::fmt::Display for ConstraintViolation {
        1062  +
        /* ServerBuilderConstraintViolations.kt:118 */
  695   1063   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1064  +
            /* ServerBuilderConstraintViolations.kt:119 */
  696   1065   
            match self {
  697         -
                ConstraintViolation::MissingEnum => write!(f, "`r#enum` was not provided but it is required when building `EnumQueryInput`"),
  698         -
                ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EnumQueryInput`"),
  699         -
            }
        1066  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingEnum => write!(f, "`r#enum` was not provided but it is required when building `EnumQueryInput`"),
        1067  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Enum(_) => write!(f, "constraint violation occurred building member `r#enum` when building `EnumQueryInput`"),
        1068  +
            /* ServerBuilderConstraintViolations.kt:119 */}
        1069  +
            /* ServerBuilderConstraintViolations.kt:118 */
  700   1070   
        }
        1071  +
        /* ServerBuilderConstraintViolations.kt:117 */
  701   1072   
    }
        1073  +
    /* ServerBuilderConstraintViolations.kt:84 */
  702   1074   
    impl ::std::error::Error for ConstraintViolation {}
        1075  +
    /* ServerBuilderConstraintViolations.kt:171 */
  703   1076   
    impl ConstraintViolation {
  704   1077   
        pub(crate) fn as_validation_exception_field(
  705   1078   
            self,
  706   1079   
            path: ::std::string::String,
  707   1080   
        ) -> crate::model::ValidationExceptionField {
  708   1081   
            match self {
  709   1082   
                ConstraintViolation::MissingEnum => crate::model::ValidationExceptionField {
  710   1083   
                    message: format!(
  711   1084   
                        "Value at '{}/enum' failed to satisfy constraint: Member must not be null",
  712   1085   
                        path
  713   1086   
                    ),
  714   1087   
                    path: path + "/enum",
  715   1088   
                },
  716   1089   
                ConstraintViolation::Enum(inner) => {
  717   1090   
                    inner.as_validation_exception_field(path + "/enum")
  718   1091   
                }
  719   1092   
            }
  720   1093   
        }
  721   1094   
    }
        1095  +
    /* ServerBuilderGenerator.kt:234 */
  722   1096   
    impl ::std::convert::From<ConstraintViolation>
  723   1097   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  724   1098   
    {
  725   1099   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  726   1100   
            let first_validation_exception_field =
  727   1101   
                constraint_violation.as_validation_exception_field("".to_owned());
  728   1102   
            let validation_exception = crate::error::ValidationException {
  729   1103   
                message: format!(
  730   1104   
                    "1 validation error detected. {}",
  731   1105   
                    &first_validation_exception_field.message
  732   1106   
                ),
  733   1107   
                field_list: Some(vec![first_validation_exception_field]),
  734   1108   
            };
  735   1109   
            Self::ConstraintViolation(
  736   1110   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  737   1111   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  738   1112   
                            )
  739   1113   
        }
  740   1114   
    }
        1115  +
    /* ServerBuilderGenerator.kt:244 */
  741   1116   
    impl ::std::convert::From<Builder>
  742   1117   
        for crate::constrained::MaybeConstrained<crate::input::EnumQueryInput>
  743   1118   
    {
  744   1119   
        fn from(builder: Builder) -> Self {
  745   1120   
            Self::Unconstrained(builder)
  746   1121   
        }
  747   1122   
    }
        1123  +
    /* ServerBuilderGenerator.kt:446 */
  748   1124   
    impl ::std::convert::TryFrom<Builder> for crate::input::EnumQueryInput {
  749   1125   
        type Error = ConstraintViolation;
  750   1126   
  751   1127   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  752   1128   
            builder.build()
  753   1129   
        }
  754   1130   
    }
  755         -
    /// A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
        1131  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EnumQueryInput`](crate::input::EnumQueryInput).
        1132  +
    /* RustType.kt:516 */
  756   1133   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1134  +
    /* ServerBuilderGenerator.kt:211 */
  757   1135   
    pub struct Builder {
        1136  +
        /* ServerBuilderGenerator.kt:308 */
  758   1137   
        pub(crate) r#enum:
  759   1138   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
        1139  +
        /* ServerBuilderGenerator.kt:211 */
  760   1140   
    }
        1141  +
    /* ServerBuilderGenerator.kt:215 */
  761   1142   
    impl Builder {
        1143  +
        /* ServerBuilderGenerator.kt:331 */
  762   1144   
        #[allow(missing_docs)] // documentation missing in model
        1145  +
                               /* ServerBuilderGenerator.kt:343 */
  763   1146   
        pub fn r#enum(mut self, input: crate::model::StringEnum) -> Self {
  764         -
            self.r#enum = Some(crate::constrained::MaybeConstrained::Constrained(input));
        1147  +
            /* ServerBuilderGenerator.kt:344 */
        1148  +
            self.r#enum =
        1149  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1150  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
        1151  +
                /* ServerBuilderGenerator.kt:345 */)
        1152  +
            /* ServerBuilderGenerator.kt:344 */;
  765   1153   
            self
        1154  +
            /* ServerBuilderGenerator.kt:343 */
  766   1155   
        }
        1156  +
        /* ServerBuilderGenerator.kt:426 */
  767   1157   
        #[allow(missing_docs)] // documentation missing in model
        1158  +
                               /* ServerBuilderGenerator.kt:428 */
  768   1159   
        pub(crate) fn set_enum(
  769   1160   
            mut self,
  770   1161   
            input: impl ::std::convert::Into<
  771   1162   
                crate::constrained::MaybeConstrained<crate::model::StringEnum>,
  772   1163   
            >,
  773   1164   
        ) -> Self {
        1165  +
            /* ServerBuilderGenerator.kt:429 */
  774   1166   
            self.r#enum = Some(input.into());
  775   1167   
            self
        1168  +
            /* ServerBuilderGenerator.kt:428 */
  776   1169   
        }
  777         -
        /// Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
  778         -
        ///
        1170  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EnumQueryInput`](crate::input::EnumQueryInput).
        1171  +
        /// /* ServerBuilderGenerator.kt:260 */
  779   1172   
        /// The builder fails to construct a [`EnumQueryInput`](crate::input::EnumQueryInput) if a [`ConstraintViolation`] occurs.
  780   1173   
        ///
  781         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1174  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1175  +
        /* ServerBuilderGenerator.kt:271 */
  782   1176   
        pub fn build(self) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
  783   1177   
            self.build_enforcing_all_constraints()
  784   1178   
        }
        1179  +
        /* ServerBuilderGenerator.kt:283 */
  785   1180   
        fn build_enforcing_all_constraints(
  786   1181   
            self,
  787   1182   
        ) -> Result<crate::input::EnumQueryInput, ConstraintViolation> {
  788         -
            Ok(crate::input::EnumQueryInput {
        1183  +
            /* ServerBuilderGenerator.kt:287 */
        1184  +
            Ok(
        1185  +
                /* ServerBuilderGenerator.kt:542 */
        1186  +
                crate::input::EnumQueryInput {
        1187  +
                    /* ServerBuilderGenerator.kt:546 */
  789   1188   
                    r#enum: self
  790   1189   
                        .r#enum
        1190  +
                        /* ServerBuilderGenerator.kt:602 */
  791   1191   
                        .map(|v| match v {
  792   1192   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  793   1193   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  794   1194   
                        })
        1195  +
                        /* ServerBuilderGenerator.kt:614 */
  795   1196   
                        .map(|res| res.map_err(ConstraintViolation::Enum))
  796   1197   
                        .transpose()?
        1198  +
                        /* ServerBuilderGenerator.kt:569 */
  797   1199   
                        .ok_or(ConstraintViolation::MissingEnum)?,
  798         -
            })
        1200  +
                    /* ServerBuilderGenerator.kt:542 */
        1201  +
                }, /* ServerBuilderGenerator.kt:287 */
        1202  +
            )
        1203  +
            /* ServerBuilderGenerator.kt:283 */
  799   1204   
        }
        1205  +
        /* ServerBuilderGenerator.kt:215 */
  800   1206   
    }
        1207  +
        1208  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  801   1209   
}
  802         -
/// See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
        1210  +
/// /* ServerBuilderGenerator.kt:171 */See [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
  803   1211   
pub mod primitive_int_header_input {
  804   1212   
        1213  +
    /* ServerBuilderGenerator.kt:461 */
  805   1214   
    impl ::std::convert::From<Builder> for crate::input::PrimitiveIntHeaderInput {
  806   1215   
        fn from(builder: Builder) -> Self {
  807   1216   
            builder.build()
  808   1217   
        }
  809   1218   
    }
  810         -
    /// A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
        1219  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
        1220  +
    /* RustType.kt:516 */
  811   1221   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  812         -
    pub struct Builder {}
        1222  +
    /* ServerBuilderGenerator.kt:211 */
        1223  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
        1224  +
    /* ServerBuilderGenerator.kt:215 */
  813   1225   
    impl Builder {
  814         -
        /// Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
        1226  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput).
        1227  +
        /* ServerBuilderGenerator.kt:271 */
  815   1228   
        pub fn build(self) -> crate::input::PrimitiveIntHeaderInput {
  816   1229   
            self.build_enforcing_all_constraints()
  817   1230   
        }
        1231  +
        /* ServerBuilderGenerator.kt:283 */
  818   1232   
        fn build_enforcing_all_constraints(self) -> crate::input::PrimitiveIntHeaderInput {
  819         -
            crate::input::PrimitiveIntHeaderInput {}
        1233  +
            /* ServerBuilderGenerator.kt:542 */
        1234  +
            crate::input::PrimitiveIntHeaderInput {
        1235  +
            /* ServerBuilderGenerator.kt:542 */}
        1236  +
            /* ServerBuilderGenerator.kt:283 */
  820   1237   
        }
        1238  +
        /* ServerBuilderGenerator.kt:215 */
  821   1239   
    }
        1240  +
        1241  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  822   1242   
}
  823         -
/// See [`StringPayloadInput`](crate::input::StringPayloadInput).
        1243  +
/// /* ServerBuilderGenerator.kt:171 */See [`StringPayloadInput`](crate::input::StringPayloadInput).
  824   1244   
pub mod string_payload_input {
  825   1245   
        1246  +
    /* ServerBuilderGenerator.kt:461 */
  826   1247   
    impl ::std::convert::From<Builder> for crate::input::StringPayloadInput {
  827   1248   
        fn from(builder: Builder) -> Self {
  828   1249   
            builder.build()
  829   1250   
        }
  830   1251   
    }
  831         -
    /// A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
        1252  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StringPayloadInput`](crate::input::StringPayloadInput).
        1253  +
    /* RustType.kt:516 */
  832   1254   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1255  +
    /* ServerBuilderGenerator.kt:211 */
  833   1256   
    pub struct Builder {
        1257  +
        /* ServerBuilderGenerator.kt:308 */
  834   1258   
        pub(crate) payload: ::std::option::Option<::std::string::String>,
        1259  +
        /* ServerBuilderGenerator.kt:211 */
  835   1260   
    }
        1261  +
    /* ServerBuilderGenerator.kt:215 */
  836   1262   
    impl Builder {
        1263  +
        /* ServerBuilderGenerator.kt:331 */
  837   1264   
        #[allow(missing_docs)] // documentation missing in model
        1265  +
                               /* ServerBuilderGenerator.kt:343 */
  838   1266   
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  839         -
            self.payload = input;
        1267  +
            /* ServerBuilderGenerator.kt:344 */
        1268  +
            self.payload =
        1269  +
                /* ServerBuilderGenerator.kt:376 */input
        1270  +
            /* ServerBuilderGenerator.kt:344 */;
  840   1271   
            self
        1272  +
            /* ServerBuilderGenerator.kt:343 */
  841   1273   
        }
        1274  +
        /* ServerBuilderGenerator.kt:426 */
  842   1275   
        #[allow(missing_docs)] // documentation missing in model
        1276  +
                               /* ServerBuilderGenerator.kt:428 */
  843   1277   
        pub(crate) fn set_payload(
  844   1278   
            mut self,
  845   1279   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  846   1280   
        ) -> Self {
        1281  +
            /* ServerBuilderGenerator.kt:429 */
  847   1282   
            self.payload = input.map(|v| v.into());
  848   1283   
            self
        1284  +
            /* ServerBuilderGenerator.kt:428 */
  849   1285   
        }
  850         -
        /// Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
        1286  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StringPayloadInput`](crate::input::StringPayloadInput).
        1287  +
        /* ServerBuilderGenerator.kt:271 */
  851   1288   
        pub fn build(self) -> crate::input::StringPayloadInput {
  852   1289   
            self.build_enforcing_all_constraints()
  853   1290   
        }
        1291  +
        /* ServerBuilderGenerator.kt:283 */
  854   1292   
        fn build_enforcing_all_constraints(self) -> crate::input::StringPayloadInput {
        1293  +
            /* ServerBuilderGenerator.kt:542 */
  855   1294   
            crate::input::StringPayloadInput {
        1295  +
                /* ServerBuilderGenerator.kt:546 */
  856   1296   
                payload: self.payload,
        1297  +
                /* ServerBuilderGenerator.kt:542 */
  857   1298   
            }
        1299  +
            /* ServerBuilderGenerator.kt:283 */
  858   1300   
        }
        1301  +
        /* ServerBuilderGenerator.kt:215 */
  859   1302   
    }
        1303  +
        1304  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  860   1305   
}

tmp-codegen-diff/codegen-server-test/rest_json_extras/rust-server-codegen/src/lib.rs

@@ -1,1 +52,53 @@
   13     13   
#![allow(clippy::result_large_err)]
   14     14   
#![allow(clippy::unnecessary_map_on_constructor)]
   15     15   
#![allow(rustdoc::bare_urls)]
   16     16   
#![allow(rustdoc::redundant_explicit_links)]
   17     17   
#![allow(rustdoc::invalid_html_tags)]
   18     18   
#![forbid(unsafe_code)]
   19     19   
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
   20     20   
//! A REST JSON service that sends JSON requests and responses.
   21     21   
   22     22   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          23  +
/* ServerRootGenerator.kt:65 */
   23     24   
//! A fast and customizable Rust implementation of the RestJsonExtras Smithy service.
   24     25   
//!
   25     26   
//! # Using RestJsonExtras
   26     27   
//!
   27     28   
//! The primary entrypoint is [`RestJsonExtras`]: it satisfies the [`Service<http::Request, Response = http::Response>`](::tower::Service)
   28     29   
//! trait and therefore can be handed to a [`hyper` server](https://github.com/hyperium/hyper) via [`RestJsonExtras::into_make_service`]
   29     30   
//! or used in AWS Lambda
   30     31   
#![cfg_attr(
   31     32   
    feature = "aws-lambda",
   32     33   
    doc = " via [`LambdaHandler`](crate::server::routing::LambdaHandler)."
@@ -217,218 +296,305 @@
  237    238   
//! }
  238    239   
//!
  239    240   
//! ```
  240    241   
//!
  241    242   
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
  242    243   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  243    244   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  244    245   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  245    246   
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  246    247   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
         248  +
/* ServerRootGenerator.kt:261 */
  247    249   
pub use crate::service::{
  248    250   
    MissingOperationsError, RestJsonExtras, RestJsonExtrasBuilder, RestJsonExtrasConfig,
  249    251   
    RestJsonExtrasConfigBuilder,
  250    252   
};
  251    253   
  252         -
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
         254  +
/// /* ServerRustModule.kt:55 */Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  253    255   
pub mod server {
  254    256   
    // Re-export all types from the `aws-smithy-http-server` crate.
  255    257   
    pub use ::aws_smithy_http_server::*;
         258  +
         259  +
    /* CodegenDelegator.kt:200 */
  256    260   
}
  257    261   
         262  +
/* CrateVersionCustomization.kt:23 */
  258    263   
/// Crate version number.
  259    264   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  260    265   
  261         -
/// Constrained types for constrained shapes.
         266  +
/// /* ServerRustModule.kt:55 */Constrained types for constrained shapes.
         267  +
/* RustModule.kt:172 */
  262    268   
mod constrained;
  263    269   
  264         -
/// All error types that operations can return. Documentation on these types is copied from the model.
         270  +
/// /* ServerRustModule.kt:55 */All error types that operations can return. Documentation on these types is copied from the model.
  265    271   
pub mod error;
  266    272   
  267         -
/// Input structures for operations. Documentation on these types is copied from the model.
         273  +
/// /* ServerRustModule.kt:55 */Input structures for operations. Documentation on these types is copied from the model.
  268    274   
pub mod input;
  269    275   
  270         -
/// Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
         276  +
/// /* ServerRustModule.kt:55 */Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
  271    277   
pub mod model;
  272    278   
  273         -
/// All operations that this crate can perform.
         279  +
/// /* ServerRustModule.kt:55 */All operations that this crate can perform.
  274    280   
pub mod operation;
  275    281   
         282  +
/* ServerRustModule.kt:79 */
  276    283   
/// A collection of types representing each operation defined in the service closure.
  277    284   
///
  278    285   
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
  279    286   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  280    287   
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  281    288   
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
  282    289   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  283    290   
pub mod operation_shape;
  284    291   
  285         -
/// Output structures for operations. Documentation on these types is copied from the model.
         292  +
/// /* ServerRustModule.kt:55 */Output structures for operations. Documentation on these types is copied from the model.
  286    293   
pub mod output;
  287    294   
         295  +
/* RustModule.kt:172 */
  288    296   
mod service;
  289    297   
  290         -
/// Data primitives referenced by other data types.
         298  +
/// /* ServerRustModule.kt:55 */Data primitives referenced by other data types.
  291    299   
pub mod types;
  292    300   
  293         -
/// Unconstrained types for constrained shapes.
         301  +
/// /* ServerRustModule.kt:55 */Unconstrained types for constrained shapes.
         302  +
/* RustModule.kt:172 */
  294    303   
mod unconstrained;
  295    304   
  296    305   
pub(crate) mod protocol_serde;

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

@@ -1,1 +386,518 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(
    4      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      7   
)]
    6         -
pub struct EmptyStruct {}
           8  +
pub /* StructureGenerator.kt:201 */ struct EmptyStruct {/* StructureGenerator.kt:201 */}
           9  +
/* ServerCodegenVisitor.kt:345 */
    7     10   
impl EmptyStruct {
    8         -
    /// Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
          11  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
          12  +
    /* ServerBuilderGenerator.kt:295 */
    9     13   
    pub fn builder() -> crate::model::empty_struct::Builder {
          14  +
        /* ServerBuilderGenerator.kt:296 */
   10     15   
        crate::model::empty_struct::Builder::default()
          16  +
        /* ServerBuilderGenerator.kt:295 */
   11     17   
    }
          18  +
    /* ServerCodegenVisitor.kt:345 */
   12     19   
}
   13     20   
          21  +
/* UnionGenerator.kt:67 */
   14     22   
#[allow(missing_docs)] // documentation missing in model
          23  +
/* RustType.kt:516 */
   15     24   
#[derive(
   16     25   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   17     26   
)]
   18         -
pub enum SingleElementUnion {
          27  +
pub /* UnionGenerator.kt:85 */ enum SingleElementUnion {
          28  +
    /* UnionGenerator.kt:90 */
   19     29   
    #[allow(missing_docs)] // documentation missing in model
          30  +
    /* UnionGenerator.kt:190 */
   20     31   
    A(::std::string::String),
          32  +
    /* UnionGenerator.kt:85 */
   21     33   
}
          34  +
/* UnionGenerator.kt:111 */
   22     35   
impl SingleElementUnion {
          36  +
    /* RustType.kt:516 */
   23     37   
    #[allow(irrefutable_let_patterns)]
          38  +
    /* UnionGenerator.kt:217 */
   24     39   
    /// Tries to convert the enum instance into [`A`](crate::model::SingleElementUnion::A), extracting the inner [`String`](::std::string::String).
          40  +
    /* UnionGenerator.kt:222 */
   25     41   
    /// Returns `Err(&Self)` if it can't be converted.
          42  +
    /* UnionGenerator.kt:223 */
   26     43   
    pub fn as_a(&self) -> ::std::result::Result<&::std::string::String, &Self> {
          44  +
        /* UnionGenerator.kt:227 */
   27     45   
        if let SingleElementUnion::A(val) = &self {
   28     46   
            ::std::result::Result::Ok(val)
   29     47   
        } else {
   30     48   
            ::std::result::Result::Err(self)
   31     49   
        }
          50  +
        /* UnionGenerator.kt:223 */
   32     51   
    }
          52  +
    /* UnionGenerator.kt:121 */
   33     53   
    /// Returns true if this is a [`A`](crate::model::SingleElementUnion::A).
          54  +
    /* UnionGenerator.kt:122 */
   34     55   
    pub fn is_a(&self) -> bool {
          56  +
        /* UnionGenerator.kt:123 */
   35     57   
        self.as_a().is_ok()
          58  +
        /* UnionGenerator.kt:122 */
   36     59   
    }
          60  +
    /* UnionGenerator.kt:111 */
   37     61   
}
   38     62   
   39         -
/// Describes one specific validation failure for an input member.
          63  +
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
          64  +
/* RustType.kt:516 */
   40     65   
#[derive(
   41     66   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   42     67   
)]
   43         -
pub struct ValidationExceptionField {
   44         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          68  +
pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
          69  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   45     70   
    pub path: ::std::string::String,
   46         -
    /// A detailed description of the validation failure.
          71  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   47     72   
    pub message: ::std::string::String,
          73  +
    /* StructureGenerator.kt:201 */
   48     74   
}
          75  +
/* StructureGenerator.kt:135 */
   49     76   
impl ValidationExceptionField {
   50         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          77  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          78  +
    /* StructureGenerator.kt:166 */
   51     79   
    pub fn path(&self) -> &str {
          80  +
        /* StructureGenerator.kt:171 */
   52     81   
        use std::ops::Deref;
   53     82   
        self.path.deref()
          83  +
        /* StructureGenerator.kt:166 */
   54     84   
    }
   55         -
    /// A detailed description of the validation failure.
          85  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
          86  +
    /* StructureGenerator.kt:166 */
   56     87   
    pub fn message(&self) -> &str {
          88  +
        /* StructureGenerator.kt:171 */
   57     89   
        use std::ops::Deref;
   58     90   
        self.message.deref()
          91  +
        /* StructureGenerator.kt:166 */
   59     92   
    }
          93  +
    /* StructureGenerator.kt:135 */
   60     94   
}
          95  +
/* ServerCodegenVisitor.kt:345 */
   61     96   
impl ValidationExceptionField {
   62         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          97  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          98  +
    /* ServerBuilderGenerator.kt:295 */
   63     99   
    pub fn builder() -> crate::model::validation_exception_field::Builder {
         100  +
        /* ServerBuilderGenerator.kt:296 */
   64    101   
        crate::model::validation_exception_field::Builder::default()
         102  +
        /* ServerBuilderGenerator.kt:295 */
   65    103   
    }
         104  +
    /* ServerCodegenVisitor.kt:345 */
   66    105   
}
   67    106   
         107  +
/* EnumGenerator.kt:154 */
   68    108   
#[allow(missing_docs)] // documentation missing in model
         109  +
/* RustType.kt:516 */
   69    110   
#[derive(
   70    111   
    ::std::clone::Clone,
   71    112   
    ::std::cmp::Eq,
   72    113   
    ::std::cmp::Ord,
   73    114   
    ::std::cmp::PartialEq,
   74    115   
    ::std::cmp::PartialOrd,
   75    116   
    ::std::fmt::Debug,
   76    117   
    ::std::hash::Hash,
   77    118   
)]
   78         -
pub enum EnumWithEscapedChars {
   79         -
    /// this needs#tobe escaped
         119  +
pub /* EnumGenerator.kt:267 */ enum EnumWithEscapedChars {
         120  +
    /// /* EnumGenerator.kt:156 */this needs#tobe escaped
         121  +
    /* EnumGenerator.kt:143 */
   80    122   
    HasQuotes,
         123  +
    /* EnumGenerator.kt:154 */
   81    124   
    #[allow(missing_docs)] // documentation missing in model
         125  +
    /* EnumGenerator.kt:143 */
   82    126   
    Normal,
         127  +
    /* EnumGenerator.kt:267 */
   83    128   
}
   84         -
/// See [`EnumWithEscapedChars`](crate::model::EnumWithEscapedChars).
         129  +
/// /* CodegenDelegator.kt:51 */See [`EnumWithEscapedChars`](crate::model::EnumWithEscapedChars).
   85    130   
pub mod enum_with_escaped_chars {
   86    131   
    #[derive(Debug, PartialEq)]
   87    132   
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
   88    133   
   89    134   
    impl ::std::fmt::Display for ConstraintViolation {
   90    135   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   91    136   
            write!(
   92    137   
                f,
   93    138   
                r#"Value provided for 'aws.protocoltests.restjson#EnumWithEscapedChars' failed to satisfy constraint: Member must satisfy enum value set: [has"quotes, normal]"#
   94    139   
            )
   95    140   
        }
   96    141   
    }
   97    142   
   98    143   
    impl ::std::error::Error for ConstraintViolation {}
   99    144   
    impl ConstraintViolation {
  100    145   
        pub(crate) fn as_validation_exception_field(
  101    146   
            self,
  102    147   
            path: ::std::string::String,
  103    148   
        ) -> crate::model::ValidationExceptionField {
  104    149   
            crate::model::ValidationExceptionField {
  105    150   
                message: format!(
  106    151   
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [has"quotes, normal]"#,
  107    152   
                    &path
  108    153   
                ),
  109    154   
                path,
  110    155   
            }
  111    156   
        }
  112    157   
    }
         158  +
         159  +
    /* ServerEnumGenerator.kt:46 */
  113    160   
}
         161  +
/* ServerEnumGenerator.kt:85 */
  114    162   
impl ::std::convert::TryFrom<&str> for EnumWithEscapedChars {
  115    163   
    type Error = crate::model::enum_with_escaped_chars::ConstraintViolation;
  116    164   
    fn try_from(
  117    165   
        s: &str,
  118    166   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
  119    167   
        match s {
  120    168   
            "has\"quotes" => Ok(EnumWithEscapedChars::HasQuotes),
  121    169   
            "normal" => Ok(EnumWithEscapedChars::Normal),
  122    170   
            _ => Err(crate::model::enum_with_escaped_chars::ConstraintViolation(
  123    171   
                s.to_owned(),
  124    172   
            )),
  125    173   
        }
  126    174   
    }
  127    175   
}
  128    176   
impl ::std::convert::TryFrom<::std::string::String> for EnumWithEscapedChars {
  129    177   
    type Error = crate::model::enum_with_escaped_chars::ConstraintViolation;
  130    178   
    fn try_from(
  131    179   
        s: ::std::string::String,
  132    180   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
  133    181   
    {
  134    182   
        s.as_str().try_into()
  135    183   
    }
  136    184   
}
         185  +
/* ServerEnumGenerator.kt:145 */
  137    186   
impl std::str::FromStr for EnumWithEscapedChars {
  138    187   
    type Err = crate::model::enum_with_escaped_chars::ConstraintViolation;
  139    188   
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
  140    189   
        Self::try_from(s)
  141    190   
    }
  142    191   
}
         192  +
/* EnumGenerator.kt:274 */
  143    193   
impl EnumWithEscapedChars {
  144    194   
    /// Returns the `&str` value of the enum member.
  145    195   
    pub fn as_str(&self) -> &str {
  146    196   
        match self {
  147    197   
            EnumWithEscapedChars::HasQuotes => "has\"quotes",
  148    198   
            EnumWithEscapedChars::Normal => "normal",
  149    199   
        }
  150    200   
    }
  151    201   
    /// Returns all the `&str` representations of the enum members.
  152    202   
    pub const fn values() -> &'static [&'static str] {
  153    203   
        &["has\"quotes", "normal"]
  154    204   
    }
  155    205   
}
         206  +
/* EnumGenerator.kt:223 */
  156    207   
impl ::std::convert::AsRef<str> for EnumWithEscapedChars {
  157    208   
    fn as_ref(&self) -> &str {
  158    209   
        self.as_str()
  159    210   
    }
  160    211   
}
         212  +
/* ConstrainedTraitForEnumGenerator.kt:36 */
  161    213   
impl crate::constrained::Constrained for EnumWithEscapedChars {
  162    214   
    type Unconstrained = ::std::string::String;
  163    215   
}
  164    216   
  165    217   
impl ::std::convert::From<::std::string::String>
  166    218   
    for crate::constrained::MaybeConstrained<crate::model::EnumWithEscapedChars>
  167    219   
{
  168    220   
    fn from(value: ::std::string::String) -> Self {
  169    221   
        Self::Unconstrained(value)
  170    222   
    }
  171    223   
}
  172    224   
         225  +
/* EnumGenerator.kt:154 */
  173    226   
#[allow(missing_docs)] // documentation missing in model
         227  +
/* RustType.kt:516 */
  174    228   
#[derive(
  175    229   
    ::std::clone::Clone,
  176    230   
    ::std::cmp::Eq,
  177    231   
    ::std::cmp::Ord,
  178    232   
    ::std::cmp::PartialEq,
  179    233   
    ::std::cmp::PartialOrd,
  180    234   
    ::std::fmt::Debug,
  181    235   
    ::std::hash::Hash,
  182    236   
)]
  183         -
pub enum StringEnum {
         237  +
pub /* EnumGenerator.kt:267 */ enum StringEnum {
         238  +
    /* EnumGenerator.kt:154 */
  184    239   
    #[allow(missing_docs)] // documentation missing in model
         240  +
    /* EnumGenerator.kt:143 */
  185    241   
    V,
         242  +
    /* EnumGenerator.kt:267 */
  186    243   
}
  187         -
/// See [`StringEnum`](crate::model::StringEnum).
         244  +
/// /* CodegenDelegator.kt:51 */See [`StringEnum`](crate::model::StringEnum).
  188    245   
pub mod string_enum {
  189    246   
    #[derive(Debug, PartialEq)]
  190    247   
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
  191    248   
  192    249   
    impl ::std::fmt::Display for ConstraintViolation {
  193    250   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  194    251   
            write!(
  195    252   
                f,
  196    253   
                r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
  197    254   
            )
  198    255   
        }
  199    256   
    }
  200    257   
  201    258   
    impl ::std::error::Error for ConstraintViolation {}
  202    259   
    impl ConstraintViolation {
  203    260   
        pub(crate) fn as_validation_exception_field(
  204    261   
            self,
  205    262   
            path: ::std::string::String,
  206    263   
        ) -> crate::model::ValidationExceptionField {
  207    264   
            crate::model::ValidationExceptionField {
  208    265   
                message: format!(
  209    266   
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
  210    267   
                    &path
  211    268   
                ),
  212    269   
                path,
  213    270   
            }
  214    271   
        }
  215    272   
    }
         273  +
         274  +
    /* ServerEnumGenerator.kt:46 */
  216    275   
}
         276  +
/* ServerEnumGenerator.kt:85 */
  217    277   
impl ::std::convert::TryFrom<&str> for StringEnum {
  218    278   
    type Error = crate::model::string_enum::ConstraintViolation;
  219    279   
    fn try_from(
  220    280   
        s: &str,
  221    281   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
  222    282   
        match s {
  223    283   
            "enumvalue" => Ok(StringEnum::V),
  224    284   
            _ => Err(crate::model::string_enum::ConstraintViolation(s.to_owned())),
  225    285   
        }
  226    286   
    }
  227    287   
}
  228    288   
impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
  229    289   
    type Error = crate::model::string_enum::ConstraintViolation;
  230    290   
    fn try_from(
  231    291   
        s: ::std::string::String,
  232    292   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
  233    293   
    {
  234    294   
        s.as_str().try_into()
  235    295   
    }
  236    296   
}
         297  +
/* ServerEnumGenerator.kt:145 */
  237    298   
impl std::str::FromStr for StringEnum {
  238    299   
    type Err = crate::model::string_enum::ConstraintViolation;
  239    300   
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
  240    301   
        Self::try_from(s)
  241    302   
    }
  242    303   
}
         304  +
/* EnumGenerator.kt:274 */
  243    305   
impl StringEnum {
  244    306   
    /// Returns the `&str` value of the enum member.
  245    307   
    pub fn as_str(&self) -> &str {
  246    308   
        match self {
  247    309   
            StringEnum::V => "enumvalue",
  248    310   
        }
  249    311   
    }
  250    312   
    /// Returns all the `&str` representations of the enum members.
  251    313   
    pub const fn values() -> &'static [&'static str] {
  252    314   
        &["enumvalue"]
  253    315   
    }
  254    316   
}
         317  +
/* EnumGenerator.kt:223 */
  255    318   
impl ::std::convert::AsRef<str> for StringEnum {
  256    319   
    fn as_ref(&self) -> &str {
  257    320   
        self.as_str()
  258    321   
    }
  259    322   
}
         323  +
/* ConstrainedTraitForEnumGenerator.kt:36 */
  260    324   
impl crate::constrained::Constrained for StringEnum {
  261    325   
    type Unconstrained = ::std::string::String;
  262    326   
}
  263    327   
  264    328   
impl ::std::convert::From<::std::string::String>
  265    329   
    for crate::constrained::MaybeConstrained<crate::model::StringEnum>
  266    330   
{
  267    331   
    fn from(value: ::std::string::String) -> Self {
  268    332   
        Self::Unconstrained(value)
  269    333   
    }
  270    334   
}
  271         -
/// See [`EmptyStruct`](crate::model::EmptyStruct).
         335  +
/// /* ServerBuilderGenerator.kt:171 */See [`EmptyStruct`](crate::model::EmptyStruct).
  272    336   
pub mod empty_struct {
  273    337   
         338  +
    /* ServerBuilderGenerator.kt:461 */
  274    339   
    impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
  275    340   
        fn from(builder: Builder) -> Self {
  276    341   
            builder.build()
  277    342   
        }
  278    343   
    }
  279         -
    /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
         344  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyStruct`](crate::model::EmptyStruct).
         345  +
    /* RustType.kt:516 */
  280    346   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  281         -
    pub struct Builder {}
         347  +
    /* ServerBuilderGenerator.kt:211 */
         348  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         349  +
    /* ServerBuilderGenerator.kt:215 */
  282    350   
    impl Builder {
  283         -
        /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
         351  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
         352  +
        /* ServerBuilderGenerator.kt:271 */
  284    353   
        pub fn build(self) -> crate::model::EmptyStruct {
  285    354   
            self.build_enforcing_all_constraints()
  286    355   
        }
         356  +
        /* ServerBuilderGenerator.kt:283 */
  287    357   
        fn build_enforcing_all_constraints(self) -> crate::model::EmptyStruct {
  288         -
            crate::model::EmptyStruct {}
         358  +
            /* ServerBuilderGenerator.kt:542 */
         359  +
            crate::model::EmptyStruct {
         360  +
            /* ServerBuilderGenerator.kt:542 */}
         361  +
            /* ServerBuilderGenerator.kt:283 */
  289    362   
        }
         363  +
        /* ServerBuilderGenerator.kt:215 */
  290    364   
    }
         365  +
         366  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  291    367   
}
  292         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         368  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  293    369   
pub mod validation_exception_field {
  294    370   
         371  +
    /* RustType.kt:516 */
  295    372   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  296         -
    /// Holds one variant for each of the ways the builder can fail.
         373  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         374  +
    /* RustType.kt:516 */
  297    375   
    #[non_exhaustive]
         376  +
    /* ServerBuilderConstraintViolations.kt:75 */
  298    377   
    #[allow(clippy::enum_variant_names)]
  299    378   
    pub enum ConstraintViolation {
  300         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
         379  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
         380  +
        /* ServerBuilderConstraintViolations.kt:143 */
  301    381   
        MissingPath,
  302         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
         382  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
         383  +
        /* ServerBuilderConstraintViolations.kt:143 */
  303    384   
        MissingMessage,
         385  +
        /* ServerBuilderConstraintViolations.kt:75 */
  304    386   
    }
         387  +
    /* ServerBuilderConstraintViolations.kt:117 */
  305    388   
    impl ::std::fmt::Display for ConstraintViolation {
         389  +
        /* ServerBuilderConstraintViolations.kt:118 */
  306    390   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         391  +
            /* ServerBuilderConstraintViolations.kt:119 */
  307    392   
            match self {
  308         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
  309         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
  310         -
            }
         393  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
         394  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
         395  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         396  +
            /* ServerBuilderConstraintViolations.kt:118 */
  311    397   
        }
         398  +
        /* ServerBuilderConstraintViolations.kt:117 */
  312    399   
    }
         400  +
    /* ServerBuilderConstraintViolations.kt:84 */
  313    401   
    impl ::std::error::Error for ConstraintViolation {}
         402  +
    /* ServerBuilderGenerator.kt:446 */
  314    403   
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
  315    404   
        type Error = ConstraintViolation;
  316    405   
  317    406   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  318    407   
            builder.build()
  319    408   
        }
  320    409   
    }
  321         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         410  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         411  +
    /* RustType.kt:516 */
  322    412   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         413  +
    /* ServerBuilderGenerator.kt:211 */
  323    414   
    pub struct Builder {
         415  +
        /* ServerBuilderGenerator.kt:308 */
  324    416   
        pub(crate) path: ::std::option::Option<::std::string::String>,
         417  +
        /* ServerBuilderGenerator.kt:308 */
  325    418   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         419  +
        /* ServerBuilderGenerator.kt:211 */
  326    420   
    }
         421  +
    /* ServerBuilderGenerator.kt:215 */
  327    422   
    impl Builder {
  328         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         423  +
        /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         424  +
        /* ServerBuilderGenerator.kt:343 */
  329    425   
        pub fn path(mut self, input: ::std::string::String) -> Self {
  330         -
            self.path = Some(input);
         426  +
            /* ServerBuilderGenerator.kt:344 */
         427  +
            self.path =
         428  +
                /* ServerBuilderGenerator.kt:345 */Some(
         429  +
                    /* ServerBuilderGenerator.kt:376 */input
         430  +
                /* ServerBuilderGenerator.kt:345 */)
         431  +
            /* ServerBuilderGenerator.kt:344 */;
  331    432   
            self
         433  +
            /* ServerBuilderGenerator.kt:343 */
  332    434   
        }
  333         -
        /// A detailed description of the validation failure.
         435  +
        /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
         436  +
        /* ServerBuilderGenerator.kt:343 */
  334    437   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  335         -
            self.message = Some(input);
         438  +
            /* ServerBuilderGenerator.kt:344 */
         439  +
            self.message =
         440  +
                /* ServerBuilderGenerator.kt:345 */Some(
         441  +
                    /* ServerBuilderGenerator.kt:376 */input
         442  +
                /* ServerBuilderGenerator.kt:345 */)
         443  +
            /* ServerBuilderGenerator.kt:344 */;
  336    444   
            self
         445  +
            /* ServerBuilderGenerator.kt:343 */
  337    446   
        }
  338         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  339         -
        ///
         447  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         448  +
        /// /* ServerBuilderGenerator.kt:260 */
  340    449   
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
  341    450   
        ///
  342         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         451  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         452  +
        /* ServerBuilderGenerator.kt:271 */
  343    453   
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  344    454   
            self.build_enforcing_all_constraints()
  345    455   
        }
         456  +
        /* ServerBuilderGenerator.kt:283 */
  346    457   
        fn build_enforcing_all_constraints(
  347    458   
            self,
  348    459   
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  349         -
            Ok(crate::model::ValidationExceptionField {
  350         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  351         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  352         -
            })
         460  +
            /* ServerBuilderGenerator.kt:287 */
         461  +
            Ok(
         462  +
                /* ServerBuilderGenerator.kt:542 */
         463  +
                crate::model::ValidationExceptionField {
         464  +
                    /* ServerBuilderGenerator.kt:546 */
         465  +
                    path: self
         466  +
                        .path
         467  +
                        /* ServerBuilderGenerator.kt:569 */
         468  +
                        .ok_or(ConstraintViolation::MissingPath)?,
         469  +
                    /* ServerBuilderGenerator.kt:546 */
         470  +
                    message: self
         471  +
                        .message
         472  +
                        /* ServerBuilderGenerator.kt:569 */
         473  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
         474  +
                    /* ServerBuilderGenerator.kt:542 */
         475  +
                }, /* ServerBuilderGenerator.kt:287 */
         476  +
            )
         477  +
            /* ServerBuilderGenerator.kt:283 */
  353    478   
        }
         479  +
        /* ServerBuilderGenerator.kt:215 */
  354    480   
    }
         481  +
         482  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  355    483   
}
  356    484   
pub mod map_with_enum_key {
  357    485   
         486  +
    /* MapConstraintViolationGenerator.kt:82 */
  358    487   
    #[allow(clippy::enum_variant_names)]
  359    488   
    #[derive(Debug, PartialEq)]
  360    489   
    pub enum ConstraintViolation {
  361    490   
        #[doc(hidden)]
  362    491   
        Key(crate::model::string_enum::ConstraintViolation),
  363    492   
    }
  364    493   
  365    494   
    impl ::std::fmt::Display for ConstraintViolation {
  366    495   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  367    496   
            match self {
  368    497   
                Self::Key(key_constraint_violation) => write!(f, "{}", key_constraint_violation),
  369    498   
            }
  370    499   
        }
  371    500   
    }
  372    501   
  373    502   
    impl ::std::error::Error for ConstraintViolation {}
         503  +
    /* MapConstraintViolationGenerator.kt:111 */
  374    504   
    impl ConstraintViolation {
  375    505   
        pub(crate) fn as_validation_exception_field(
  376    506   
            self,
  377    507   
            path: ::std::string::String,
  378    508   
        ) -> crate::model::ValidationExceptionField {
  379    509   
            match self {
  380    510   
                Self::Key(key_constraint_violation) => {
  381    511   
                    key_constraint_violation.as_validation_exception_field(path)
  382    512   
                }
  383    513   
            }
  384    514   
        }
  385    515   
    }
         516  +
         517  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  386    518   
}

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

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
    2      3   
const CONTENT_TYPE_QUERYPRECEDENCE: ::mime::Mime = ::mime::APPLICATION_JSON;
    3      4   
::pin_project_lite::pin_project! {
    4      5   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    5      6   
    /// [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput) using modelled bindings.
    6      7   
    pub struct QueryPrecedenceInputFuture {
    7      8   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::QueryPrecedenceInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    8      9   
    }
    9     10   
}
   10     11   
   11     12   
impl std::future::Future for QueryPrecedenceInputFuture {
@@ -38,39 +138,144 @@
   58     59   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     60   
                    e,
   60     61   
                )
   61     62   
            },
   62     63   
        );
   63     64   
        QueryPrecedenceInputFuture {
   64     65   
            inner: Box::pin(fut),
   65     66   
        }
   66     67   
    }
   67     68   
}
          69  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
   68     70   
impl
   69     71   
    ::aws_smithy_http_server::response::IntoResponse<
   70     72   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   71     73   
    > for crate::output::QueryPrecedenceOutput
   72     74   
{
   73     75   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   74     76   
        match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_response(
   75     77   
            self,
   76     78   
        ) {
   77     79   
            Ok(response) => response,
   78     80   
            Err(e) => {
   79     81   
                ::tracing::error!(error = %e, "failed to serialize response");
   80     82   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   81     83   
            }
   82     84   
        }
   83     85   
    }
   84     86   
}
          87  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
   85     88   
impl
   86     89   
    ::aws_smithy_http_server::response::IntoResponse<
   87     90   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   88     91   
    > for crate::error::QueryPrecedenceError
   89     92   
{
   90     93   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   91     94   
        match crate::protocol_serde::shape_query_precedence::ser_query_precedence_http_error(&self)
   92     95   
        {
   93     96   
            Ok(mut response) => {
   94     97   
                response.extensions_mut().insert(
   95     98   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
   96     99   
                );
   97    100   
                response
   98    101   
            }
   99    102   
            Err(e) => {
  100    103   
                ::tracing::error!(error = %e, "failed to serialize response");
  101    104   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  102    105   
            }
  103    106   
        }
  104    107   
    }
  105    108   
}
  106    109   
         110  +
/* RustType.kt:516 */
  107    111   
#[allow(unreachable_code, unused_variables)]
         112  +
/* RustType.kt:516 */
  108    113   
#[cfg(test)]
         114  +
/* ProtocolTestGenerator.kt:98 */
  109    115   
mod query_precedence_test {
  110    116   
  111    117   
    /// Servers put all query params in map
  112    118   
    /// Test ID: RestJsonServersPutAllQueryParamsInMap
  113    119   
    #[::tokio::test]
  114    120   
    #[::tracing_test::traced_test]
  115    121   
    async fn rest_json_servers_put_all_query_params_in_map_request() {
  116    122   
        #[allow(unused_mut)]
  117    123   
        let mut http_request = http::Request::builder()
  118    124   
            .uri("/Precedence")
@@ -161,167 +222,231 @@
  181    187   
        ));
  182    188   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  183    189   
            .await
  184    190   
            .expect("unable to extract body to bytes");
  185    191   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  186    192   
            &body,
  187    193   
            "{}",
  188    194   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  189    195   
        ));
  190    196   
    }
         197  +
         198  +
    /* ProtocolTestGenerator.kt:98 */
  191    199   
}
  192    200   
         201  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  193    202   
const CONTENT_TYPE_EMPTYSTRUCTWITHCONTENTONWIREOP: ::mime::Mime = ::mime::APPLICATION_JSON;
  194    203   
::pin_project_lite::pin_project! {
  195    204   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  196    205   
    /// [`EmptyStructWithContentOnWireOpInput`](crate::input::EmptyStructWithContentOnWireOpInput) using modelled bindings.
  197    206   
    pub struct EmptyStructWithContentOnWireOpInputFuture {
  198    207   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EmptyStructWithContentOnWireOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  199    208   
    }
  200    209   
}
  201    210   
  202    211   
impl std::future::Future for EmptyStructWithContentOnWireOpInputFuture {
@@ -229,238 +355,372 @@
  249    258   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  250    259   
                    e,
  251    260   
                )
  252    261   
            },
  253    262   
        );
  254    263   
        EmptyStructWithContentOnWireOpInputFuture {
  255    264   
            inner: Box::pin(fut),
  256    265   
        }
  257    266   
    }
  258    267   
}
         268  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  259    269   
impl
  260    270   
    ::aws_smithy_http_server::response::IntoResponse<
  261    271   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  262    272   
    > for crate::output::EmptyStructWithContentOnWireOpOutput
  263    273   
{
  264    274   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  265    275   
        match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_response(self) {
  266    276   
                        Ok(response) => response,
  267    277   
                        Err(e) => {
  268    278   
                            ::tracing::error!(error = %e, "failed to serialize response");
  269    279   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  270    280   
                        }
  271    281   
                    }
  272    282   
    }
  273    283   
}
         284  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  274    285   
impl
  275    286   
    ::aws_smithy_http_server::response::IntoResponse<
  276    287   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  277    288   
    > for crate::error::EmptyStructWithContentOnWireOpError
  278    289   
{
  279    290   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  280    291   
        match crate::protocol_serde::shape_empty_struct_with_content_on_wire_op::ser_empty_struct_with_content_on_wire_op_http_error(&self) {
  281    292   
            Ok(mut response) => {
  282    293   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  283    294   
                response
  284    295   
            },
  285    296   
            Err(e) => {
  286    297   
                ::tracing::error!(error = %e, "failed to serialize response");
  287    298   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  288    299   
            }
  289    300   
        }
  290    301   
    }
  291    302   
}
  292    303   
         304  +
/* RustType.kt:516 */
  293    305   
#[allow(unreachable_code, unused_variables)]
         306  +
/* RustType.kt:516 */
  294    307   
#[cfg(test)]
         308  +
/* ProtocolTestGenerator.kt:98 */
  295    309   
mod empty_struct_with_content_on_wire_op_test {
  296    310   
  297    311   
    /// Upper case error modeled lower case.
  298    312   
    /// Test ID: ServiceLevelErrorServer
  299    313   
    #[::tokio::test]
  300    314   
    #[::tracing_test::traced_test]
  301    315   
    async fn service_level_error_server_response() {
  302    316   
        let output = crate::error::ExtraError {};
  303    317   
        let output = crate::error::EmptyStructWithContentOnWireOpError::ExtraError(output);
  304    318   
        use ::aws_smithy_http_server::response::IntoResponse;
  305    319   
        let http_response = output.into_response();
  306    320   
        ::pretty_assertions::assert_eq!(
  307    321   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
  308    322   
            http_response.status()
  309    323   
        );
  310    324   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
  311    325   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  312    326   
            http_response.headers(),
  313    327   
            expected_headers,
  314    328   
        ));
  315    329   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  316    330   
            .await
  317    331   
            .expect("unable to extract body to bytes");
  318    332   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  319    333   
            &body,
  320    334   
            "{}",
  321    335   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  322    336   
        ));
  323    337   
    }
         338  +
         339  +
    /* ProtocolTestGenerator.kt:98 */
  324    340   
}
  325    341   
         342  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  326    343   
const CONTENT_TYPE_CASEINSENSITIVEERROROPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  327    344   
::pin_project_lite::pin_project! {
  328    345   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  329    346   
    /// [`CaseInsensitiveErrorOperationInput`](crate::input::CaseInsensitiveErrorOperationInput) using modelled bindings.
  330    347   
    pub struct CaseInsensitiveErrorOperationInputFuture {
  331    348   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::CaseInsensitiveErrorOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  332    349   
    }
  333    350   
}
  334    351   
  335    352   
impl std::future::Future for CaseInsensitiveErrorOperationInputFuture {
@@ -362,379 +488,513 @@
  382    399   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  383    400   
                    e,
  384    401   
                )
  385    402   
            },
  386    403   
        );
  387    404   
        CaseInsensitiveErrorOperationInputFuture {
  388    405   
            inner: Box::pin(fut),
  389    406   
        }
  390    407   
    }
  391    408   
}
         409  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  392    410   
impl
  393    411   
    ::aws_smithy_http_server::response::IntoResponse<
  394    412   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  395    413   
    > for crate::output::CaseInsensitiveErrorOperationOutput
  396    414   
{
  397    415   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  398    416   
        match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_response(self) {
  399    417   
                        Ok(response) => response,
  400    418   
                        Err(e) => {
  401    419   
                            ::tracing::error!(error = %e, "failed to serialize response");
  402    420   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  403    421   
                        }
  404    422   
                    }
  405    423   
    }
  406    424   
}
         425  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  407    426   
impl
  408    427   
    ::aws_smithy_http_server::response::IntoResponse<
  409    428   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  410    429   
    > for crate::error::CaseInsensitiveErrorOperationError
  411    430   
{
  412    431   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  413    432   
        match crate::protocol_serde::shape_case_insensitive_error_operation::ser_case_insensitive_error_operation_http_error(&self) {
  414    433   
            Ok(mut response) => {
  415    434   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  416    435   
                response
  417    436   
            },
  418    437   
            Err(e) => {
  419    438   
                ::tracing::error!(error = %e, "failed to serialize response");
  420    439   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  421    440   
            }
  422    441   
        }
  423    442   
    }
  424    443   
}
  425    444   
         445  +
/* RustType.kt:516 */
  426    446   
#[allow(unreachable_code, unused_variables)]
         447  +
/* RustType.kt:516 */
  427    448   
#[cfg(test)]
         449  +
/* ProtocolTestGenerator.kt:98 */
  428    450   
mod case_insensitive_error_operation_test {
  429    451   
  430    452   
    /// Upper case error modeled lower case.
  431    453   
    /// Test ID: ServiceLevelErrorServer
  432    454   
    #[::tokio::test]
  433    455   
    #[::tracing_test::traced_test]
  434    456   
    async fn service_level_error_server_response() {
  435    457   
        let output = crate::error::ExtraError {};
  436    458   
        let output = crate::error::CaseInsensitiveErrorOperationError::ExtraError(output);
  437    459   
        use ::aws_smithy_http_server::response::IntoResponse;
  438    460   
        let http_response = output.into_response();
  439    461   
        ::pretty_assertions::assert_eq!(
  440    462   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
  441    463   
            http_response.status()
  442    464   
        );
  443    465   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
  444    466   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  445    467   
            http_response.headers(),
  446    468   
            expected_headers,
  447    469   
        ));
  448    470   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  449    471   
            .await
  450    472   
            .expect("unable to extract body to bytes");
  451    473   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  452    474   
            &body,
  453    475   
            "{}",
  454    476   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  455    477   
        ));
  456    478   
    }
         479  +
         480  +
    /* ProtocolTestGenerator.kt:98 */
  457    481   
}
  458    482   
         483  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  459    484   
const CONTENT_TYPE_NULLINNONSPARSE: ::mime::Mime = ::mime::APPLICATION_JSON;
  460    485   
::pin_project_lite::pin_project! {
  461    486   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  462    487   
    /// [`NullInNonSparseInput`](crate::input::NullInNonSparseInput) using modelled bindings.
  463    488   
    pub struct NullInNonSparseInputFuture {
  464    489   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::NullInNonSparseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  465    490   
    }
  466    491   
}
  467    492   
  468    493   
impl std::future::Future for NullInNonSparseInputFuture {
@@ -497,522 +629,662 @@
  517    542   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  518    543   
                    e,
  519    544   
                )
  520    545   
            },
  521    546   
        );
  522    547   
        NullInNonSparseInputFuture {
  523    548   
            inner: Box::pin(fut),
  524    549   
        }
  525    550   
    }
  526    551   
}
         552  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  527    553   
impl
  528    554   
    ::aws_smithy_http_server::response::IntoResponse<
  529    555   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  530    556   
    > for crate::output::NullInNonSparseOutput
  531    557   
{
  532    558   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  533    559   
        match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_response(
  534    560   
            self,
  535    561   
        ) {
  536    562   
            Ok(response) => response,
  537    563   
            Err(e) => {
  538    564   
                ::tracing::error!(error = %e, "failed to serialize response");
  539    565   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  540    566   
            }
  541    567   
        }
  542    568   
    }
  543    569   
}
         570  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  544    571   
impl
  545    572   
    ::aws_smithy_http_server::response::IntoResponse<
  546    573   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  547    574   
    > for crate::error::NullInNonSparseError
  548    575   
{
  549    576   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  550    577   
        match crate::protocol_serde::shape_null_in_non_sparse::ser_null_in_non_sparse_http_error(
  551    578   
            &self,
  552    579   
        ) {
  553    580   
            Ok(mut response) => {
  554    581   
                response.extensions_mut().insert(
  555    582   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  556    583   
                );
  557    584   
                response
  558    585   
            }
  559    586   
            Err(e) => {
  560    587   
                ::tracing::error!(error = %e, "failed to serialize response");
  561    588   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  562    589   
            }
  563    590   
        }
  564    591   
    }
  565    592   
}
  566    593   
         594  +
/* RustType.kt:516 */
  567    595   
#[allow(unreachable_code, unused_variables)]
         596  +
/* RustType.kt:516 */
  568    597   
#[cfg(test)]
         598  +
/* ProtocolTestGenerator.kt:98 */
  569    599   
mod null_in_non_sparse_test {
  570    600   
  571    601   
    /// Upper case error modeled lower case.
  572    602   
    /// Test ID: ServiceLevelErrorServer
  573    603   
    #[::tokio::test]
  574    604   
    #[::tracing_test::traced_test]
  575    605   
    async fn service_level_error_server_response() {
  576    606   
        let output = crate::error::ExtraError {};
  577    607   
        let output = crate::error::NullInNonSparseError::ExtraError(output);
  578    608   
        use ::aws_smithy_http_server::response::IntoResponse;
  579    609   
        let http_response = output.into_response();
  580    610   
        ::pretty_assertions::assert_eq!(
  581    611   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
  582    612   
            http_response.status()
  583    613   
        );
  584    614   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
  585    615   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  586    616   
            http_response.headers(),
  587    617   
            expected_headers,
  588    618   
        ));
  589    619   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  590    620   
            .await
  591    621   
            .expect("unable to extract body to bytes");
  592    622   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  593    623   
            &body,
  594    624   
            "{}",
  595    625   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  596    626   
        ));
  597    627   
    }
         628  +
         629  +
    /* ProtocolTestGenerator.kt:98 */
  598    630   
}
  599    631   
         632  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  600    633   
const CONTENT_TYPE_ESCAPEDSTRINGVALUES: ::mime::Mime = ::mime::APPLICATION_JSON;
  601    634   
::pin_project_lite::pin_project! {
  602    635   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  603    636   
    /// [`EscapedStringValuesInput`](crate::input::EscapedStringValuesInput) using modelled bindings.
  604    637   
    pub struct EscapedStringValuesInputFuture {
  605    638   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EscapedStringValuesInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  606    639   
    }
  607    640   
}
  608    641   
  609    642   
impl std::future::Future for EscapedStringValuesInputFuture {
@@ -636,669 +731,769 @@
  656    689   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  657    690   
                    e,
  658    691   
                )
  659    692   
            },
  660    693   
        );
  661    694   
        EscapedStringValuesInputFuture {
  662    695   
            inner: Box::pin(fut),
  663    696   
        }
  664    697   
    }
  665    698   
}
         699  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  666    700   
impl
  667    701   
    ::aws_smithy_http_server::response::IntoResponse<
  668    702   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  669    703   
    > for crate::output::EscapedStringValuesOutput
  670    704   
{
  671    705   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  672    706   
        match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_response(self) {
  673    707   
                        Ok(response) => response,
  674    708   
                        Err(e) => {
  675    709   
                            ::tracing::error!(error = %e, "failed to serialize response");
  676    710   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  677    711   
                        }
  678    712   
                    }
  679    713   
    }
  680    714   
}
         715  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  681    716   
impl
  682    717   
    ::aws_smithy_http_server::response::IntoResponse<
  683    718   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  684    719   
    > for crate::error::EscapedStringValuesError
  685    720   
{
  686    721   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  687    722   
        match crate::protocol_serde::shape_escaped_string_values::ser_escaped_string_values_http_error(&self) {
  688    723   
            Ok(mut response) => {
  689    724   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  690    725   
                response
  691    726   
            },
  692    727   
            Err(e) => {
  693    728   
                ::tracing::error!(error = %e, "failed to serialize response");
  694    729   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  695    730   
            }
  696    731   
        }
  697    732   
    }
  698    733   
}
  699    734   
         735  +
/* RustType.kt:516 */
  700    736   
#[allow(unreachable_code, unused_variables)]
         737  +
/* RustType.kt:516 */
  701    738   
#[cfg(test)]
         739  +
/* ProtocolTestGenerator.kt:98 */
  702    740   
mod escaped_string_values_test {
  703    741   
  704    742   
    /// Test ID: EscapedStringValuesRequest
  705    743   
    #[::tokio::test]
  706    744   
    #[::tracing_test::traced_test]
  707    745   
    async fn escaped_string_values_request_request() {
  708    746   
        #[allow(unused_mut)]
  709    747   
        let mut http_request = http::Request::builder()
  710    748   
            .uri("/escaped-string-values")
  711    749   
            .method("POST")
@@ -782,820 +843,884 @@
  802    840   
        ));
  803    841   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  804    842   
            .await
  805    843   
            .expect("unable to extract body to bytes");
  806    844   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  807    845   
            &body,
  808    846   
            "{}",
  809    847   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  810    848   
        ));
  811    849   
    }
         850  +
         851  +
    /* ProtocolTestGenerator.kt:98 */
  812    852   
}
  813    853   
         854  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  814    855   
const CONTENT_TYPE_PRIMITIVEINTOP: ::mime::Mime = ::mime::APPLICATION_JSON;
  815    856   
::pin_project_lite::pin_project! {
  816    857   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  817    858   
    /// [`PrimitiveIntOpInput`](crate::input::PrimitiveIntOpInput) using modelled bindings.
  818    859   
    pub struct PrimitiveIntOpInputFuture {
  819    860   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  820    861   
    }
  821    862   
}
  822    863   
  823    864   
impl std::future::Future for PrimitiveIntOpInputFuture {
@@ -850,891 +981,1030 @@
  870    911   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  871    912   
                    e,
  872    913   
                )
  873    914   
            },
  874    915   
        );
  875    916   
        PrimitiveIntOpInputFuture {
  876    917   
            inner: Box::pin(fut),
  877    918   
        }
  878    919   
    }
  879    920   
}
         921  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  880    922   
impl
  881    923   
    ::aws_smithy_http_server::response::IntoResponse<
  882    924   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  883    925   
    > for crate::output::PrimitiveIntOpOutput
  884    926   
{
  885    927   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  886    928   
        match crate::protocol_serde::shape_primitive_int_op::ser_primitive_int_op_http_response(
  887    929   
            self,
  888    930   
        ) {
  889    931   
            Ok(response) => response,
  890    932   
            Err(e) => {
  891    933   
                ::tracing::error!(error = %e, "failed to serialize response");
  892    934   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  893    935   
            }
  894    936   
        }
  895    937   
    }
  896    938   
}
         939  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  897    940   
impl
  898    941   
    ::aws_smithy_http_server::response::IntoResponse<
  899    942   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  900    943   
    > for crate::error::PrimitiveIntOpError
  901    944   
{
  902    945   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  903    946   
        match crate::protocol_serde::shape_primitive_int_op::ser_primitive_int_op_http_error(&self)
  904    947   
        {
  905    948   
            Ok(mut response) => {
  906    949   
                response.extensions_mut().insert(
  907    950   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
  908    951   
                );
  909    952   
                response
  910    953   
            }
  911    954   
            Err(e) => {
  912    955   
                ::tracing::error!(error = %e, "failed to serialize response");
  913    956   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  914    957   
            }
  915    958   
        }
  916    959   
    }
  917    960   
}
  918    961   
         962  +
/* RustType.kt:516 */
  919    963   
#[allow(unreachable_code, unused_variables)]
         964  +
/* RustType.kt:516 */
  920    965   
#[cfg(test)]
         966  +
/* ProtocolTestGenerator.kt:98 */
  921    967   
mod primitive_int_op_test {
  922    968   
  923    969   
    /// Upper case error modeled lower case.
  924    970   
    /// Test ID: ServiceLevelErrorServer
  925    971   
    #[::tokio::test]
  926    972   
    #[::tracing_test::traced_test]
  927    973   
    async fn service_level_error_server_response() {
  928    974   
        let output = crate::error::ExtraError {};
  929    975   
        let output = crate::error::PrimitiveIntOpError::ExtraError(output);
  930    976   
        use ::aws_smithy_http_server::response::IntoResponse;
  931    977   
        let http_response = output.into_response();
  932    978   
        ::pretty_assertions::assert_eq!(
  933    979   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
  934    980   
            http_response.status()
  935    981   
        );
  936    982   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
  937    983   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  938    984   
            http_response.headers(),
  939    985   
            expected_headers,
  940    986   
        ));
  941    987   
        let body = ::hyper::body::to_bytes(http_response.into_body())
  942    988   
            .await
  943    989   
            .expect("unable to extract body to bytes");
  944    990   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
  945    991   
            &body,
  946    992   
            "{}",
  947    993   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
  948    994   
        ));
  949    995   
    }
         996  +
         997  +
    /* ProtocolTestGenerator.kt:98 */
  950    998   
}
  951    999   
        1000  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  952   1001   
const CONTENT_TYPE_MAPWITHENUMKEYOP: ::mime::Mime = ::mime::APPLICATION_JSON;
  953   1002   
::pin_project_lite::pin_project! {
  954   1003   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  955   1004   
    /// [`MapWithEnumKeyOpInput`](crate::input::MapWithEnumKeyOpInput) using modelled bindings.
  956   1005   
    pub struct MapWithEnumKeyOpInputFuture {
  957   1006   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::MapWithEnumKeyOpInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  958   1007   
    }
  959   1008   
}
  960   1009   
  961   1010   
impl std::future::Future for MapWithEnumKeyOpInputFuture {
@@ -990,1039 +1089,1143 @@
 1010   1059   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1011   1060   
                    e,
 1012   1061   
                )
 1013   1062   
            },
 1014   1063   
        );
 1015   1064   
        MapWithEnumKeyOpInputFuture {
 1016   1065   
            inner: Box::pin(fut),
 1017   1066   
        }
 1018   1067   
    }
 1019   1068   
}
        1069  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
 1020   1070   
impl
 1021   1071   
    ::aws_smithy_http_server::response::IntoResponse<
 1022   1072   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1023   1073   
    > for crate::output::MapWithEnumKeyOpOutput
 1024   1074   
{
 1025   1075   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1026   1076   
        match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_response(self) {
 1027   1077   
                        Ok(response) => response,
 1028   1078   
                        Err(e) => {
 1029   1079   
                            ::tracing::error!(error = %e, "failed to serialize response");
 1030   1080   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1031   1081   
                        }
 1032   1082   
                    }
 1033   1083   
    }
 1034   1084   
}
        1085  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
 1035   1086   
impl
 1036   1087   
    ::aws_smithy_http_server::response::IntoResponse<
 1037   1088   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1038   1089   
    > for crate::error::MapWithEnumKeyOpError
 1039   1090   
{
 1040   1091   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1041   1092   
        match crate::protocol_serde::shape_map_with_enum_key_op::ser_map_with_enum_key_op_http_error(
 1042   1093   
            &self,
 1043   1094   
        ) {
 1044   1095   
            Ok(mut response) => {
 1045   1096   
                response.extensions_mut().insert(
 1046   1097   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
 1047   1098   
                );
 1048   1099   
                response
 1049   1100   
            }
 1050   1101   
            Err(e) => {
 1051   1102   
                ::tracing::error!(error = %e, "failed to serialize response");
 1052   1103   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1053   1104   
            }
 1054   1105   
        }
 1055   1106   
    }
 1056   1107   
}
 1057   1108   
        1109  +
/* RustType.kt:516 */
 1058   1110   
#[allow(unreachable_code, unused_variables)]
        1111  +
/* RustType.kt:516 */
 1059   1112   
#[cfg(test)]
        1113  +
/* ProtocolTestGenerator.kt:98 */
 1060   1114   
mod map_with_enum_key_op_test {
 1061   1115   
 1062   1116   
    /// Test ID: MapWithEnumKeyRequest
 1063   1117   
    #[::tokio::test]
 1064   1118   
    #[::tracing_test::traced_test]
 1065   1119   
    async fn map_with_enum_key_request_request() {
 1066   1120   
        #[allow(unused_mut)]
 1067   1121   
        let mut http_request = http::Request::builder()
 1068   1122   
            .uri("/map-with-enum-key")
 1069   1123   
            .method("POST")
@@ -1147,1201 +1208,1265 @@
 1167   1221   
        ));
 1168   1222   
        let body = ::hyper::body::to_bytes(http_response.into_body())
 1169   1223   
            .await
 1170   1224   
            .expect("unable to extract body to bytes");
 1171   1225   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1172   1226   
            &body,
 1173   1227   
            "{}",
 1174   1228   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1175   1229   
        ));
 1176   1230   
    }
        1231  +
        1232  +
    /* ProtocolTestGenerator.kt:98 */
 1177   1233   
}
 1178   1234   
        1235  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
 1179   1236   
const CONTENT_TYPE_STATUSRESPONSE: ::mime::Mime = ::mime::APPLICATION_JSON;
 1180   1237   
::pin_project_lite::pin_project! {
 1181   1238   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 1182   1239   
    /// [`StatusResponseInput`](crate::input::StatusResponseInput) using modelled bindings.
 1183   1240   
    pub struct StatusResponseInputFuture {
 1184   1241   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::StatusResponseInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
 1185   1242   
    }
 1186   1243   
}
 1187   1244   
 1188   1245   
impl std::future::Future for StatusResponseInputFuture {
@@ -1215,1272 +1344,1409 @@
 1235   1292   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1236   1293   
                    e,
 1237   1294   
                )
 1238   1295   
            },
 1239   1296   
        );
 1240   1297   
        StatusResponseInputFuture {
 1241   1298   
            inner: Box::pin(fut),
 1242   1299   
        }
 1243   1300   
    }
 1244   1301   
}
        1302  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
 1245   1303   
impl
 1246   1304   
    ::aws_smithy_http_server::response::IntoResponse<
 1247   1305   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1248   1306   
    > for crate::output::StatusResponseOutput
 1249   1307   
{
 1250   1308   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1251   1309   
        match crate::protocol_serde::shape_status_response::ser_status_response_http_response(self)
 1252   1310   
        {
 1253   1311   
            Ok(response) => response,
 1254   1312   
            Err(e) => {
 1255   1313   
                ::tracing::error!(error = %e, "failed to serialize response");
 1256   1314   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1257   1315   
            }
 1258   1316   
        }
 1259   1317   
    }
 1260   1318   
}
        1319  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
 1261   1320   
impl
 1262   1321   
    ::aws_smithy_http_server::response::IntoResponse<
 1263   1322   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1264   1323   
    > for crate::error::StatusResponseError
 1265   1324   
{
 1266   1325   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1267   1326   
        match crate::protocol_serde::shape_status_response::ser_status_response_http_error(&self) {
 1268   1327   
            Ok(mut response) => {
 1269   1328   
                response.extensions_mut().insert(
 1270   1329   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
 1271   1330   
                );
 1272   1331   
                response
 1273   1332   
            }
 1274   1333   
            Err(e) => {
 1275   1334   
                ::tracing::error!(error = %e, "failed to serialize response");
 1276   1335   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1277   1336   
            }
 1278   1337   
        }
 1279   1338   
    }
 1280   1339   
}
 1281   1340   
        1341  +
/* RustType.kt:516 */
 1282   1342   
#[allow(unreachable_code, unused_variables)]
        1343  +
/* RustType.kt:516 */
 1283   1344   
#[cfg(test)]
        1345  +
/* ProtocolTestGenerator.kt:98 */
 1284   1346   
mod status_response_test {
 1285   1347   
 1286   1348   
    /// Upper case error modeled lower case.
 1287   1349   
    /// Test ID: ServiceLevelErrorServer
 1288   1350   
    #[::tokio::test]
 1289   1351   
    #[::tracing_test::traced_test]
 1290   1352   
    async fn service_level_error_server_response() {
 1291   1353   
        let output = crate::error::ExtraError {};
 1292   1354   
        let output = crate::error::StatusResponseError::ExtraError(output);
 1293   1355   
        use ::aws_smithy_http_server::response::IntoResponse;
 1294   1356   
        let http_response = output.into_response();
 1295   1357   
        ::pretty_assertions::assert_eq!(
 1296   1358   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
 1297   1359   
            http_response.status()
 1298   1360   
        );
 1299   1361   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
 1300   1362   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 1301   1363   
            http_response.headers(),
 1302   1364   
            expected_headers,
 1303   1365   
        ));
 1304   1366   
        let body = ::hyper::body::to_bytes(http_response.into_body())
 1305   1367   
            .await
 1306   1368   
            .expect("unable to extract body to bytes");
 1307   1369   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1308   1370   
            &body,
 1309   1371   
            "{}",
 1310   1372   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1311   1373   
        ));
 1312   1374   
    }
        1375  +
        1376  +
    /* ProtocolTestGenerator.kt:98 */
 1313   1377   
}
 1314   1378   
        1379  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
 1315   1380   
const CONTENT_TYPE_ENUMQUERY: ::mime::Mime = ::mime::APPLICATION_JSON;
 1316   1381   
::pin_project_lite::pin_project! {
 1317   1382   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 1318   1383   
    /// [`EnumQueryInput`](crate::input::EnumQueryInput) using modelled bindings.
 1319   1384   
    pub struct EnumQueryInputFuture {
 1320   1385   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::EnumQueryInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
 1321   1386   
    }
 1322   1387   
}
 1323   1388   
 1324   1389   
impl std::future::Future for EnumQueryInputFuture {
@@ -1351,1416 +1448,1518 @@
 1371   1436   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1372   1437   
                    e,
 1373   1438   
                )
 1374   1439   
            },
 1375   1440   
        );
 1376   1441   
        EnumQueryInputFuture {
 1377   1442   
            inner: Box::pin(fut),
 1378   1443   
        }
 1379   1444   
    }
 1380   1445   
}
        1446  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
 1381   1447   
impl
 1382   1448   
    ::aws_smithy_http_server::response::IntoResponse<
 1383   1449   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1384   1450   
    > for crate::output::EnumQueryOutput
 1385   1451   
{
 1386   1452   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1387   1453   
        match crate::protocol_serde::shape_enum_query::ser_enum_query_http_response(self) {
 1388   1454   
            Ok(response) => response,
 1389   1455   
            Err(e) => {
 1390   1456   
                ::tracing::error!(error = %e, "failed to serialize response");
 1391   1457   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1392   1458   
            }
 1393   1459   
        }
 1394   1460   
    }
 1395   1461   
}
        1462  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
 1396   1463   
impl
 1397   1464   
    ::aws_smithy_http_server::response::IntoResponse<
 1398   1465   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1399   1466   
    > for crate::error::EnumQueryError
 1400   1467   
{
 1401   1468   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1402   1469   
        match crate::protocol_serde::shape_enum_query::ser_enum_query_http_error(&self) {
 1403   1470   
            Ok(mut response) => {
 1404   1471   
                response.extensions_mut().insert(
 1405   1472   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
 1406   1473   
                );
 1407   1474   
                response
 1408   1475   
            }
 1409   1476   
            Err(e) => {
 1410   1477   
                ::tracing::error!(error = %e, "failed to serialize response");
 1411   1478   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1412   1479   
            }
 1413   1480   
        }
 1414   1481   
    }
 1415   1482   
}
 1416   1483   
        1484  +
/* RustType.kt:516 */
 1417   1485   
#[allow(unreachable_code, unused_variables)]
        1486  +
/* RustType.kt:516 */
 1418   1487   
#[cfg(test)]
        1488  +
/* ProtocolTestGenerator.kt:98 */
 1419   1489   
mod enum_query_test {
 1420   1490   
 1421   1491   
    /// Test ID: EnumQueryRequest
 1422   1492   
    #[::tokio::test]
 1423   1493   
    #[::tracing_test::traced_test]
 1424   1494   
    async fn enum_query_request_request() {
 1425   1495   
        #[allow(unused_mut)]
 1426   1496   
        let mut http_request = http::Request::builder()
 1427   1497   
            .uri("/foo/enumvalue")
 1428   1498   
            .method("GET")
@@ -1460,1530 +1521,1594 @@
 1480   1550   
        ));
 1481   1551   
        let body = ::hyper::body::to_bytes(http_response.into_body())
 1482   1552   
            .await
 1483   1553   
            .expect("unable to extract body to bytes");
 1484   1554   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1485   1555   
            &body,
 1486   1556   
            "{}",
 1487   1557   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1488   1558   
        ));
 1489   1559   
    }
        1560  +
        1561  +
    /* ProtocolTestGenerator.kt:98 */
 1490   1562   
}
 1491   1563   
        1564  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
 1492   1565   
const CONTENT_TYPE_PRIMITIVEINTHEADER: ::mime::Mime = ::mime::APPLICATION_JSON;
 1493   1566   
::pin_project_lite::pin_project! {
 1494   1567   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 1495   1568   
    /// [`PrimitiveIntHeaderInput`](crate::input::PrimitiveIntHeaderInput) using modelled bindings.
 1496   1569   
    pub struct PrimitiveIntHeaderInputFuture {
 1497   1570   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::PrimitiveIntHeaderInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
 1498   1571   
    }
 1499   1572   
}
 1500   1573   
 1501   1574   
impl std::future::Future for PrimitiveIntHeaderInputFuture {
@@ -1530,1603 +1690,1771 @@
 1550   1623   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1551   1624   
                    e,
 1552   1625   
                )
 1553   1626   
            },
 1554   1627   
        );
 1555   1628   
        PrimitiveIntHeaderInputFuture {
 1556   1629   
            inner: Box::pin(fut),
 1557   1630   
        }
 1558   1631   
    }
 1559   1632   
}
        1633  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
 1560   1634   
impl
 1561   1635   
    ::aws_smithy_http_server::response::IntoResponse<
 1562   1636   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1563   1637   
    > for crate::output::PrimitiveIntHeaderOutput
 1564   1638   
{
 1565   1639   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1566   1640   
        match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_response(self) {
 1567   1641   
                        Ok(response) => response,
 1568   1642   
                        Err(e) => {
 1569   1643   
                            ::tracing::error!(error = %e, "failed to serialize response");
 1570   1644   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1571   1645   
                        }
 1572   1646   
                    }
 1573   1647   
    }
 1574   1648   
}
        1649  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
 1575   1650   
impl
 1576   1651   
    ::aws_smithy_http_server::response::IntoResponse<
 1577   1652   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1578   1653   
    > for crate::error::PrimitiveIntHeaderError
 1579   1654   
{
 1580   1655   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1581   1656   
        match crate::protocol_serde::shape_primitive_int_header::ser_primitive_int_header_http_error(
 1582   1657   
            &self,
 1583   1658   
        ) {
 1584   1659   
            Ok(mut response) => {
 1585   1660   
                response.extensions_mut().insert(
 1586   1661   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
 1587   1662   
                );
 1588   1663   
                response
 1589   1664   
            }
 1590   1665   
            Err(e) => {
 1591   1666   
                ::tracing::error!(error = %e, "failed to serialize response");
 1592   1667   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1593   1668   
            }
 1594   1669   
        }
 1595   1670   
    }
 1596   1671   
}
 1597   1672   
        1673  +
/* RustType.kt:516 */
 1598   1674   
#[allow(unreachable_code, unused_variables)]
        1675  +
/* RustType.kt:516 */
 1599   1676   
#[cfg(test)]
        1677  +
/* ProtocolTestGenerator.kt:98 */
 1600   1678   
mod primitive_int_header_test {
 1601   1679   
 1602   1680   
    /// Test ID: DeserPrimitiveHeader
 1603   1681   
    #[::tokio::test]
 1604   1682   
    #[::tracing_test::traced_test]
 1605   1683   
    async fn deser_primitive_header_response() {
 1606   1684   
        let output = crate::output::PrimitiveIntHeaderOutput { field: 123 };
 1607   1685   
        use ::aws_smithy_http_server::response::IntoResponse;
 1608   1686   
        let http_response = output.into_response();
 1609   1687   
        ::pretty_assertions::assert_eq!(
 1610   1688   
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 1611   1689   
            http_response.status()
 1612   1690   
        );
 1613   1691   
        let expected_headers = [("x-field", "123")];
 1614   1692   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 1615   1693   
            http_response.headers(),
 1616   1694   
            expected_headers,
 1617   1695   
        ));
 1618   1696   
    }
 1619   1697   
    /// Test ID: DeserPrimitiveHeaderMissing
 1620   1698   
    #[::tokio::test]
 1621   1699   
    #[::tracing_test::traced_test]
 1622   1700   
    async fn deser_primitive_header_missing_response() {
 1623   1701   
        let output = crate::output::PrimitiveIntHeaderOutput { field: 0 };
 1624   1702   
        use ::aws_smithy_http_server::response::IntoResponse;
 1625   1703   
        let http_response = output.into_response();
 1626   1704   
        ::pretty_assertions::assert_eq!(
 1627   1705   
            http::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
 1628   1706   
            http_response.status()
 1629   1707   
        );
 1630   1708   
    }
 1631   1709   
 1632   1710   
    /// Upper case error modeled lower case.
 1633   1711   
    /// Test ID: ServiceLevelErrorServer
 1634   1712   
    #[::tokio::test]
 1635   1713   
    #[::tracing_test::traced_test]
 1636   1714   
    async fn service_level_error_server_response() {
 1637   1715   
        let output = crate::error::ExtraError {};
 1638   1716   
        let output = crate::error::PrimitiveIntHeaderError::ExtraError(output);
 1639   1717   
        use ::aws_smithy_http_server::response::IntoResponse;
 1640   1718   
        let http_response = output.into_response();
 1641   1719   
        ::pretty_assertions::assert_eq!(
 1642   1720   
            http::StatusCode::from_u16(500).expect("invalid expected HTTP status code"),
 1643   1721   
            http_response.status()
 1644   1722   
        );
 1645   1723   
        let expected_headers = [("X-Amzn-Errortype", "ExtraError")];
 1646   1724   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
 1647   1725   
            http_response.headers(),
 1648   1726   
            expected_headers,
 1649   1727   
        ));
 1650   1728   
        let body = ::hyper::body::to_bytes(http_response.into_body())
 1651   1729   
            .await
 1652   1730   
            .expect("unable to extract body to bytes");
 1653   1731   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1654   1732   
            &body,
 1655   1733   
            "{}",
 1656   1734   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1657   1735   
        ));
 1658   1736   
    }
        1737  +
        1738  +
    /* ProtocolTestGenerator.kt:98 */
 1659   1739   
}
 1660   1740   
        1741  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
 1661   1742   
static CONTENT_TYPE_STRINGPAYLOAD: std::sync::LazyLock<::mime::Mime> =
 1662   1743   
    std::sync::LazyLock::new(|| {
 1663   1744   
        "text/plain"
 1664   1745   
            .parse::<::mime::Mime>()
 1665   1746   
            .expect("BUG: MIME parsing failed, content_type is not valid")
 1666   1747   
    });
 1667   1748   
::pin_project_lite::pin_project! {
 1668   1749   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
 1669   1750   
    /// [`StringPayloadInput`](crate::input::StringPayloadInput) using modelled bindings.
 1670   1751   
    pub struct StringPayloadInputFuture {
@@ -1702,1783 +1799,1885 @@
 1722   1803   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
 1723   1804   
                    e,
 1724   1805   
                )
 1725   1806   
            },
 1726   1807   
        );
 1727   1808   
        StringPayloadInputFuture {
 1728   1809   
            inner: Box::pin(fut),
 1729   1810   
        }
 1730   1811   
    }
 1731   1812   
}
        1813  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
 1732   1814   
impl
 1733   1815   
    ::aws_smithy_http_server::response::IntoResponse<
 1734   1816   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1735   1817   
    > for crate::output::StringPayloadOutput
 1736   1818   
{
 1737   1819   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1738   1820   
        match crate::protocol_serde::shape_string_payload::ser_string_payload_http_response(self) {
 1739   1821   
            Ok(response) => response,
 1740   1822   
            Err(e) => {
 1741   1823   
                ::tracing::error!(error = %e, "failed to serialize response");
 1742   1824   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1743   1825   
            }
 1744   1826   
        }
 1745   1827   
    }
 1746   1828   
}
        1829  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
 1747   1830   
impl
 1748   1831   
    ::aws_smithy_http_server::response::IntoResponse<
 1749   1832   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 1750   1833   
    > for crate::error::StringPayloadError
 1751   1834   
{
 1752   1835   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
 1753   1836   
        match crate::protocol_serde::shape_string_payload::ser_string_payload_http_error(&self) {
 1754   1837   
            Ok(mut response) => {
 1755   1838   
                response.extensions_mut().insert(
 1756   1839   
                    ::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()),
 1757   1840   
                );
 1758   1841   
                response
 1759   1842   
            }
 1760   1843   
            Err(e) => {
 1761   1844   
                ::tracing::error!(error = %e, "failed to serialize response");
 1762   1845   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
 1763   1846   
            }
 1764   1847   
        }
 1765   1848   
    }
 1766   1849   
}
 1767   1850   
        1851  +
/* RustType.kt:516 */
 1768   1852   
#[allow(unreachable_code, unused_variables)]
        1853  +
/* RustType.kt:516 */
 1769   1854   
#[cfg(test)]
        1855  +
/* ProtocolTestGenerator.kt:98 */
 1770   1856   
mod string_payload_test {
 1771   1857   
 1772   1858   
    /// Test ID: StringPayload
 1773   1859   
    #[::tokio::test]
 1774   1860   
    #[::tracing_test::traced_test]
 1775   1861   
    async fn string_payload_request() {
 1776   1862   
        #[allow(unused_mut)]
 1777   1863   
        let mut http_request = http::Request::builder()
 1778   1864   
            .uri("/StringPayload")
 1779   1865   
            .method("POST")
@@ -1817,1903 +1847,1935 @@
 1837   1923   
        ));
 1838   1924   
        let body = ::hyper::body::to_bytes(http_response.into_body())
 1839   1925   
            .await
 1840   1926   
            .expect("unable to extract body to bytes");
 1841   1927   
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_body(
 1842   1928   
            &body,
 1843   1929   
            "{}",
 1844   1930   
            ::aws_smithy_protocol_test::MediaType::from("unknown"),
 1845   1931   
        ));
 1846   1932   
    }
        1933  +
        1934  +
    /* ProtocolTestGenerator.kt:98 */
 1847   1935   
}

tmp-codegen-diff/codegen-server-test/rest_json_extras/rust-server-codegen/src/operation_shape.rs

@@ -1,1 +0,455 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerOperationGenerator.kt:48 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
                       /* ServerOperationGenerator.kt:55 */
    3      5   
pub struct QueryPrecedence;
    4      6   
    5      7   
impl ::aws_smithy_http_server::operation::OperationShape for QueryPrecedence {
    6      8   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7      9   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    8     10   
            "aws.protocoltests.restjson#QueryPrecedence",
    9     11   
            "aws.protocoltests.restjson",
   10     12   
            "QueryPrecedence",
   11     13   
        );
   12     14   
   13     15   
    type Input = crate::input::QueryPrecedenceInput;
   14     16   
    type Output = crate::output::QueryPrecedenceOutput;
   15     17   
    type Error = crate::error::QueryPrecedenceError;
   16     18   
}
   17     19   
   18     20   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for QueryPrecedence {
   19     21   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   20     22   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   21     23   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   22     24   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   23     25   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     26   
        >,
   25     27   
    >;
   26     28   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   27     29   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   28     30   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   29     31   
    >;
   30     32   
   31     33   
    fn request_fmt() -> Self::RequestFmt {
   32     34   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   33     35   
    }
   34     36   
   35     37   
    fn response_fmt() -> Self::ResponseFmt {
   36     38   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   37     39   
    }
   38     40   
}
          41  +
/* ServerOperationGenerator.kt:88 */
   39     42   
          43  +
/* ServerOperationGenerator.kt:48 */
   40     44   
#[allow(missing_docs)] // documentation missing in model
          45  +
                       /* ServerOperationGenerator.kt:55 */
   41     46   
pub struct EmptyStructWithContentOnWireOp;
   42     47   
   43     48   
impl ::aws_smithy_http_server::operation::OperationShape for EmptyStructWithContentOnWireOp {
   44     49   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   45     50   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   46     51   
            "aws.protocoltests.restjson#EmptyStructWithContentOnWireOp",
   47     52   
            "aws.protocoltests.restjson",
   48     53   
            "EmptyStructWithContentOnWireOp",
   49     54   
        );
   50     55   
   51     56   
    type Input = crate::input::EmptyStructWithContentOnWireOpInput;
   52     57   
    type Output = crate::output::EmptyStructWithContentOnWireOpOutput;
   53     58   
    type Error = crate::error::EmptyStructWithContentOnWireOpError;
   54     59   
}
   55     60   
   56     61   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   57     62   
    for EmptyStructWithContentOnWireOp
   58     63   
{
   59     64   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   60     65   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   61     66   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   62     67   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   63     68   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64     69   
        >,
   65     70   
    >;
   66     71   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   67     72   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   68     73   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   69     74   
    >;
   70     75   
   71     76   
    fn request_fmt() -> Self::RequestFmt {
   72     77   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   73     78   
    }
   74     79   
   75     80   
    fn response_fmt() -> Self::ResponseFmt {
   76     81   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   77     82   
    }
   78     83   
}
          84  +
/* ServerOperationGenerator.kt:88 */
   79     85   
          86  +
/* ServerOperationGenerator.kt:48 */
   80     87   
#[allow(missing_docs)] // documentation missing in model
          88  +
                       /* ServerOperationGenerator.kt:55 */
   81     89   
pub struct CaseInsensitiveErrorOperation;
   82     90   
   83     91   
impl ::aws_smithy_http_server::operation::OperationShape for CaseInsensitiveErrorOperation {
   84     92   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   85     93   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   86     94   
            "aws.protocoltests.restjson#CaseInsensitiveErrorOperation",
   87     95   
            "aws.protocoltests.restjson",
   88     96   
            "CaseInsensitiveErrorOperation",
   89     97   
        );
   90     98   
   91     99   
    type Input = crate::input::CaseInsensitiveErrorOperationInput;
   92    100   
    type Output = crate::output::CaseInsensitiveErrorOperationOutput;
   93    101   
    type Error = crate::error::CaseInsensitiveErrorOperationError;
   94    102   
}
   95    103   
   96    104   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   97    105   
    for CaseInsensitiveErrorOperation
   98    106   
{
   99    107   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  100    108   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  101    109   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  102    110   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  103    111   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104    112   
        >,
  105    113   
    >;
  106    114   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  107    115   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  108    116   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  109    117   
    >;
  110    118   
  111    119   
    fn request_fmt() -> Self::RequestFmt {
  112    120   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  113    121   
    }
  114    122   
  115    123   
    fn response_fmt() -> Self::ResponseFmt {
  116    124   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  117    125   
    }
  118    126   
}
         127  +
/* ServerOperationGenerator.kt:88 */
  119    128   
         129  +
/* ServerOperationGenerator.kt:48 */
  120    130   
#[allow(missing_docs)] // documentation missing in model
         131  +
                       /* ServerOperationGenerator.kt:55 */
  121    132   
pub struct NullInNonSparse;
  122    133   
  123    134   
impl ::aws_smithy_http_server::operation::OperationShape for NullInNonSparse {
  124    135   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  125    136   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  126    137   
            "aws.protocoltests.restjson#NullInNonSparse",
  127    138   
            "aws.protocoltests.restjson",
  128    139   
            "NullInNonSparse",
  129    140   
        );
  130    141   
  131    142   
    type Input = crate::input::NullInNonSparseInput;
  132    143   
    type Output = crate::output::NullInNonSparseOutput;
  133    144   
    type Error = crate::error::NullInNonSparseError;
  134    145   
}
  135    146   
  136    147   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for NullInNonSparse {
  137    148   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  138    149   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  139    150   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  140    151   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  141    152   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  142    153   
        >,
  143    154   
    >;
  144    155   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  145    156   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146    157   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  147    158   
    >;
  148    159   
  149    160   
    fn request_fmt() -> Self::RequestFmt {
  150    161   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  151    162   
    }
  152    163   
  153    164   
    fn response_fmt() -> Self::ResponseFmt {
  154    165   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  155    166   
    }
  156    167   
}
         168  +
/* ServerOperationGenerator.kt:88 */
  157    169   
         170  +
/* ServerOperationGenerator.kt:48 */
  158    171   
#[allow(missing_docs)] // documentation missing in model
         172  +
                       /* ServerOperationGenerator.kt:55 */
  159    173   
pub struct EscapedStringValues;
  160    174   
  161    175   
impl ::aws_smithy_http_server::operation::OperationShape for EscapedStringValues {
  162    176   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  163    177   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  164    178   
            "aws.protocoltests.restjson#EscapedStringValues",
  165    179   
            "aws.protocoltests.restjson",
  166    180   
            "EscapedStringValues",
  167    181   
        );
  168    182   
  169    183   
    type Input = crate::input::EscapedStringValuesInput;
  170    184   
    type Output = crate::output::EscapedStringValuesOutput;
  171    185   
    type Error = crate::error::EscapedStringValuesError;
  172    186   
}
  173    187   
  174    188   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EscapedStringValues {
  175    189   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  176    190   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  177    191   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  178    192   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  179    193   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  180    194   
        >,
  181    195   
    >;
  182    196   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  183    197   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184    198   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  185    199   
    >;
  186    200   
  187    201   
    fn request_fmt() -> Self::RequestFmt {
  188    202   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  189    203   
    }
  190    204   
  191    205   
    fn response_fmt() -> Self::ResponseFmt {
  192    206   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  193    207   
    }
  194    208   
}
         209  +
/* ServerOperationGenerator.kt:88 */
  195    210   
         211  +
/* ServerOperationGenerator.kt:48 */
  196    212   
#[allow(missing_docs)] // documentation missing in model
         213  +
                       /* ServerOperationGenerator.kt:55 */
  197    214   
pub struct PrimitiveIntOp;
  198    215   
  199    216   
impl ::aws_smithy_http_server::operation::OperationShape for PrimitiveIntOp {
  200    217   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  201    218   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  202    219   
            "aws.protocoltests.restjson#PrimitiveIntOp",
  203    220   
            "aws.protocoltests.restjson",
  204    221   
            "PrimitiveIntOp",
  205    222   
        );
  206    223   
  207    224   
    type Input = crate::input::PrimitiveIntOpInput;
  208    225   
    type Output = crate::output::PrimitiveIntOpOutput;
  209    226   
    type Error = crate::error::PrimitiveIntOpError;
  210    227   
}
  211    228   
  212    229   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for PrimitiveIntOp {
  213    230   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  214    231   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  215    232   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  216    233   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  217    234   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  218    235   
        >,
  219    236   
    >;
  220    237   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  221    238   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  222    239   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  223    240   
    >;
  224    241   
  225    242   
    fn request_fmt() -> Self::RequestFmt {
  226    243   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  227    244   
    }
  228    245   
  229    246   
    fn response_fmt() -> Self::ResponseFmt {
  230    247   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  231    248   
    }
  232    249   
}
         250  +
/* ServerOperationGenerator.kt:88 */
  233    251   
         252  +
/* ServerOperationGenerator.kt:48 */
  234    253   
#[allow(missing_docs)] // documentation missing in model
         254  +
                       /* ServerOperationGenerator.kt:55 */
  235    255   
pub struct MapWithEnumKeyOp;
  236    256   
  237    257   
impl ::aws_smithy_http_server::operation::OperationShape for MapWithEnumKeyOp {
  238    258   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  239    259   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  240    260   
            "aws.protocoltests.restjson#MapWithEnumKeyOp",
  241    261   
            "aws.protocoltests.restjson",
  242    262   
            "MapWithEnumKeyOp",
  243    263   
        );
  244    264   
  245    265   
    type Input = crate::input::MapWithEnumKeyOpInput;
  246    266   
    type Output = crate::output::MapWithEnumKeyOpOutput;
  247    267   
    type Error = crate::error::MapWithEnumKeyOpError;
  248    268   
}
  249    269   
  250    270   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for MapWithEnumKeyOp {
  251    271   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  252    272   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  253    273   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  254    274   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  255    275   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  256    276   
        >,
  257    277   
    >;
  258    278   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  259    279   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  260    280   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  261    281   
    >;
  262    282   
  263    283   
    fn request_fmt() -> Self::RequestFmt {
  264    284   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  265    285   
    }
  266    286   
  267    287   
    fn response_fmt() -> Self::ResponseFmt {
  268    288   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  269    289   
    }
  270    290   
}
         291  +
/* ServerOperationGenerator.kt:88 */
  271    292   
         293  +
/* ServerOperationGenerator.kt:48 */
  272    294   
#[allow(missing_docs)] // documentation missing in model
         295  +
                       /* ServerOperationGenerator.kt:55 */
  273    296   
pub struct StatusResponse;
  274    297   
  275    298   
impl ::aws_smithy_http_server::operation::OperationShape for StatusResponse {
  276    299   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  277    300   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  278    301   
            "aws.protocoltests.restjson#StatusResponse",
  279    302   
            "aws.protocoltests.restjson",
  280    303   
            "StatusResponse",
  281    304   
        );
  282    305   
  283    306   
    type Input = crate::input::StatusResponseInput;
  284    307   
    type Output = crate::output::StatusResponseOutput;
  285    308   
    type Error = crate::error::StatusResponseError;
  286    309   
}
  287    310   
  288    311   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StatusResponse {
  289    312   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  290    313   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  291    314   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  292    315   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  293    316   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  294    317   
        >,
  295    318   
    >;
  296    319   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  297    320   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  298    321   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  299    322   
    >;
  300    323   
  301    324   
    fn request_fmt() -> Self::RequestFmt {
  302    325   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  303    326   
    }
  304    327   
  305    328   
    fn response_fmt() -> Self::ResponseFmt {
  306    329   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  307    330   
    }
  308    331   
}
         332  +
/* ServerOperationGenerator.kt:88 */
  309    333   
         334  +
/* ServerOperationGenerator.kt:48 */
  310    335   
#[allow(missing_docs)] // documentation missing in model
         336  +
                       /* ServerOperationGenerator.kt:55 */
  311    337   
pub struct EnumQuery;
  312    338   
  313    339   
impl ::aws_smithy_http_server::operation::OperationShape for EnumQuery {
  314    340   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  315    341   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  316    342   
            "aws.protocoltests.restjson#EnumQuery",
  317    343   
            "aws.protocoltests.restjson",
  318    344   
            "EnumQuery",
  319    345   
        );
  320    346   
  321    347   
    type Input = crate::input::EnumQueryInput;
  322    348   
    type Output = crate::output::EnumQueryOutput;
  323    349   
    type Error = crate::error::EnumQueryError;
  324    350   
}
  325    351   
  326    352   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for EnumQuery {
  327    353   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  328    354   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  329    355   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  330    356   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  331    357   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  332    358   
        >,
  333    359   
    >;
  334    360   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  335    361   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  336    362   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  337    363   
    >;
  338    364   
  339    365   
    fn request_fmt() -> Self::RequestFmt {
  340    366   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  341    367   
    }
  342    368   
  343    369   
    fn response_fmt() -> Self::ResponseFmt {
  344    370   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  345    371   
    }
  346    372   
}
         373  +
/* ServerOperationGenerator.kt:88 */
  347    374   
         375  +
/* ServerOperationGenerator.kt:48 */
  348    376   
#[allow(missing_docs)] // documentation missing in model
         377  +
                       /* ServerOperationGenerator.kt:55 */
  349    378   
pub struct PrimitiveIntHeader;
  350    379   
  351    380   
impl ::aws_smithy_http_server::operation::OperationShape for PrimitiveIntHeader {
  352    381   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  353    382   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  354    383   
            "aws.protocoltests.restjson#PrimitiveIntHeader",
  355    384   
            "aws.protocoltests.restjson",
  356    385   
            "PrimitiveIntHeader",
  357    386   
        );
  358    387   
  359    388   
    type Input = crate::input::PrimitiveIntHeaderInput;
  360    389   
    type Output = crate::output::PrimitiveIntHeaderOutput;
  361    390   
    type Error = crate::error::PrimitiveIntHeaderError;
  362    391   
}
  363    392   
  364    393   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for PrimitiveIntHeader {
  365    394   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  366    395   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  367    396   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  368    397   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  369    398   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  370    399   
        >,
  371    400   
    >;
  372    401   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  373    402   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  374    403   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  375    404   
    >;
  376    405   
  377    406   
    fn request_fmt() -> Self::RequestFmt {
  378    407   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  379    408   
    }
  380    409   
  381    410   
    fn response_fmt() -> Self::ResponseFmt {
  382    411   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  383    412   
    }
  384    413   
}
         414  +
/* ServerOperationGenerator.kt:88 */
  385    415   
         416  +
/* ServerOperationGenerator.kt:48 */
  386    417   
#[allow(missing_docs)] // documentation missing in model
         418  +
                       /* ServerOperationGenerator.kt:55 */
  387    419   
pub struct StringPayload;
  388    420   
  389    421   
impl ::aws_smithy_http_server::operation::OperationShape for StringPayload {
  390    422   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  391    423   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  392    424   
            "aws.protocoltests.restjson#StringPayload",
  393    425   
            "aws.protocoltests.restjson",
  394    426   
            "StringPayload",
  395    427   
        );
  396    428   
  397    429   
    type Input = crate::input::StringPayloadInput;
  398    430   
    type Output = crate::output::StringPayloadOutput;
  399    431   
    type Error = crate::error::StringPayloadError;
  400    432   
}
  401    433   
  402    434   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for StringPayload {
  403    435   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  404    436   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  405    437   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  406    438   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  407    439   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  408    440   
        >,
  409    441   
    >;
  410    442   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  411    443   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  412    444   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  413    445   
    >;
  414    446   
  415    447   
    fn request_fmt() -> Self::RequestFmt {
  416    448   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  417    449   
    }
  418    450   
  419    451   
    fn response_fmt() -> Self::ResponseFmt {
  420    452   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  421    453   
    }
  422    454   
}
         455  +
/* ServerOperationGenerator.kt:88 */