Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e (ignoring whitespace)

Files changed:

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

@@ -1,1 +612,577 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3      3   
#[derive(
    4      4   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      5   
)]
    6         -
pub struct HttpQueryParamsOnlyOperationOutput {}
    7         -
impl HttpQueryParamsOnlyOperationOutput {
    8         -
    /// Creates a new builder-style object to manufacture [`HttpQueryParamsOnlyOperationOutput`](crate::output::HttpQueryParamsOnlyOperationOutput).
    9         -
    pub fn builder() -> crate::output::http_query_params_only_operation_output::Builder {
   10         -
        crate::output::http_query_params_only_operation_output::Builder::default()
           6  +
pub struct StringPayloadOutput {
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub payload: ::std::option::Option<::std::string::String>,
           9  +
}
          10  +
impl StringPayloadOutput {
          11  +
    #[allow(missing_docs)] // documentation missing in model
          12  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
          13  +
        self.payload.as_deref()
   11     14   
    }
   12     15   
}
   13         -
   14         -
#[allow(missing_docs)] // documentation missing in model
   15         -
#[derive(
   16         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   17         -
)]
   18         -
pub struct QueryPrecedenceOutput {}
   19         -
impl QueryPrecedenceOutput {
   20         -
    /// Creates a new builder-style object to manufacture [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
   21         -
    pub fn builder() -> crate::output::query_precedence_output::Builder {
   22         -
        crate::output::query_precedence_output::Builder::default()
          16  +
impl StringPayloadOutput {
          17  +
    /// Creates a new builder-style object to manufacture [`StringPayloadOutput`](crate::output::StringPayloadOutput).
          18  +
    pub fn builder() -> crate::output::string_payload_output::Builder {
          19  +
        crate::output::string_payload_output::Builder::default()
   23     20   
    }
   24     21   
}
   25     22   
   26     23   
#[allow(missing_docs)] // documentation missing in model
   27     24   
#[derive(
   28     25   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   29     26   
)]
   30         -
pub struct EmptyStructWithContentOnWireOpOutput {
          27  +
pub struct PrimitiveIntHeaderOutput {
   31     28   
    #[allow(missing_docs)] // documentation missing in model
   32         -
    pub empty: ::std::option::Option<crate::model::EmptyStruct>,
          29  +
    pub field: i32,
   33     30   
}
   34         -
impl EmptyStructWithContentOnWireOpOutput {
          31  +
impl PrimitiveIntHeaderOutput {
   35     32   
    #[allow(missing_docs)] // documentation missing in model
   36         -
    pub fn empty(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
   37         -
        self.empty.as_ref()
          33  +
    pub fn field(&self) -> i32 {
          34  +
        self.field
   38     35   
    }
   39     36   
}
   40         -
impl EmptyStructWithContentOnWireOpOutput {
   41         -
    /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
   42         -
    pub fn builder() -> crate::output::empty_struct_with_content_on_wire_op_output::Builder {
   43         -
        crate::output::empty_struct_with_content_on_wire_op_output::Builder::default()
          37  +
impl PrimitiveIntHeaderOutput {
          38  +
    /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
          39  +
    pub fn builder() -> crate::output::primitive_int_header_output::Builder {
          40  +
        crate::output::primitive_int_header_output::Builder::default()
   44     41   
    }
   45     42   
}
   46     43   
   47     44   
#[allow(missing_docs)] // documentation missing in model
   48     45   
#[derive(
   49     46   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50     47   
)]
   51         -
pub struct CaseInsensitiveErrorOperationOutput {}
   52         -
impl CaseInsensitiveErrorOperationOutput {
   53         -
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
   54         -
    pub fn builder() -> crate::output::case_insensitive_error_operation_output::Builder {
   55         -
        crate::output::case_insensitive_error_operation_output::Builder::default()
          48  +
pub struct EnumQueryOutput {}
          49  +
impl EnumQueryOutput {
          50  +
    /// Creates a new builder-style object to manufacture [`EnumQueryOutput`](crate::output::EnumQueryOutput).
          51  +
    pub fn builder() -> crate::output::enum_query_output::Builder {
          52  +
        crate::output::enum_query_output::Builder::default()
   56     53   
    }
   57     54   
}
   58     55   
   59     56   
#[allow(missing_docs)] // documentation missing in model
   60         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   61         -
pub struct NullInNonSparseOutput {
          57  +
#[derive(
          58  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          59  +
)]
          60  +
pub struct StatusResponseOutput {
   62     61   
    #[allow(missing_docs)] // documentation missing in model
   63         -
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
          62  +
    pub field: i32,
          63  +
}
          64  +
impl StatusResponseOutput {
          65  +
    #[allow(missing_docs)] // documentation missing in model
          66  +
    pub fn field(&self) -> i32 {
          67  +
        self.field
          68  +
    }
          69  +
}
          70  +
impl StatusResponseOutput {
          71  +
    /// Creates a new builder-style object to manufacture [`StatusResponseOutput`](crate::output::StatusResponseOutput).
          72  +
    pub fn builder() -> crate::output::status_response_output::Builder {
          73  +
        crate::output::status_response_output::Builder::default()
          74  +
    }
          75  +
}
          76  +
          77  +
#[allow(missing_docs)] // documentation missing in model
          78  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          79  +
pub struct MapWithEnumKeyOpOutput {
   64     80   
    #[allow(missing_docs)] // documentation missing in model
   65     81   
    pub map: ::std::option::Option<
   66         -
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
          82  +
        ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
   67     83   
    >,
   68         -
    #[allow(missing_docs)] // documentation missing in model
   69         -
    pub union: ::std::option::Option<crate::model::SingleElementUnion>,
   70     84   
}
   71         -
impl NullInNonSparseOutput {
   72         -
    #[allow(missing_docs)] // documentation missing in model
   73         -
    pub fn list(&self) -> ::std::option::Option<&[::std::string::String]> {
   74         -
        self.list.as_deref()
   75         -
    }
          85  +
impl MapWithEnumKeyOpOutput {
   76     86   
    #[allow(missing_docs)] // documentation missing in model
   77     87   
    pub fn map(
   78     88   
        &self,
   79     89   
    ) -> ::std::option::Option<
   80         -
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
          90  +
        &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
   81     91   
    > {
   82     92   
        self.map.as_ref()
   83     93   
    }
          94  +
}
          95  +
impl MapWithEnumKeyOpOutput {
          96  +
    /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
          97  +
    pub fn builder() -> crate::output::map_with_enum_key_op_output::Builder {
          98  +
        crate::output::map_with_enum_key_op_output::Builder::default()
          99  +
    }
         100  +
}
         101  +
         102  +
#[allow(missing_docs)] // documentation missing in model
         103  +
#[derive(
         104  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         105  +
)]
         106  +
pub struct PrimitiveIntOpOutput {
   84    107   
    #[allow(missing_docs)] // documentation missing in model
   85         -
    pub fn union(&self) -> ::std::option::Option<&crate::model::SingleElementUnion> {
   86         -
        self.union.as_ref()
         108  +
    pub value: i32,
         109  +
}
         110  +
impl PrimitiveIntOpOutput {
         111  +
    #[allow(missing_docs)] // documentation missing in model
         112  +
    pub fn value(&self) -> i32 {
         113  +
        self.value
   87    114   
    }
   88    115   
}
   89         -
impl NullInNonSparseOutput {
   90         -
    /// Creates a new builder-style object to manufacture [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
   91         -
    pub fn builder() -> crate::output::null_in_non_sparse_output::Builder {
   92         -
        crate::output::null_in_non_sparse_output::Builder::default()
         116  +
impl PrimitiveIntOpOutput {
         117  +
    /// Creates a new builder-style object to manufacture [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         118  +
    pub fn builder() -> crate::output::primitive_int_op_output::Builder {
         119  +
        crate::output::primitive_int_op_output::Builder::default()
   93    120   
    }
   94    121   
}
   95    122   
   96    123   
#[allow(missing_docs)] // documentation missing in model
   97    124   
#[derive(
   98    125   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   99    126   
)]
  100    127   
pub struct EscapedStringValuesOutput {
  101    128   
    #[allow(missing_docs)] // documentation missing in model
  102    129   
    pub r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  103    130   
    #[allow(missing_docs)] // documentation missing in model
  104    131   
    pub some_string: ::std::option::Option<::std::string::String>,
  105    132   
}
  106    133   
impl EscapedStringValuesOutput {
  107    134   
    #[allow(missing_docs)] // documentation missing in model
  108    135   
    pub fn r#enum(&self) -> ::std::option::Option<&crate::model::EnumWithEscapedChars> {
  109    136   
        self.r#enum.as_ref()
  110    137   
    }
  111    138   
    #[allow(missing_docs)] // documentation missing in model
  112    139   
    pub fn some_string(&self) -> ::std::option::Option<&str> {
  113    140   
        self.some_string.as_deref()
  114    141   
    }
  115    142   
}
  116    143   
impl EscapedStringValuesOutput {
  117    144   
    /// Creates a new builder-style object to manufacture [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
  118    145   
    pub fn builder() -> crate::output::escaped_string_values_output::Builder {
  119    146   
        crate::output::escaped_string_values_output::Builder::default()
  120    147   
    }
  121    148   
}
  122    149   
  123         -
#[allow(missing_docs)] // documentation missing in model
  124         -
#[derive(
  125         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  126         -
)]
  127         -
pub struct PrimitiveIntOpOutput {
  128         -
    #[allow(missing_docs)] // documentation missing in model
  129         -
    pub value: i32,
  130         -
}
  131         -
impl PrimitiveIntOpOutput {
  132         -
    #[allow(missing_docs)] // documentation missing in model
  133         -
    pub fn value(&self) -> i32 {
  134         -
        self.value
  135         -
    }
  136         -
}
  137         -
impl PrimitiveIntOpOutput {
  138         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
  139         -
    pub fn builder() -> crate::output::primitive_int_op_output::Builder {
  140         -
        crate::output::primitive_int_op_output::Builder::default()
  141         -
    }
  142         -
}
  143         -
  144    150   
#[allow(missing_docs)] // documentation missing in model
  145    151   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  146         -
pub struct MapWithEnumKeyOpOutput {
         152  +
pub struct NullInNonSparseOutput {
         153  +
    #[allow(missing_docs)] // documentation missing in model
         154  +
    pub list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  147    155   
    #[allow(missing_docs)] // documentation missing in model
  148    156   
    pub map: ::std::option::Option<
  149         -
        ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
         157  +
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  150    158   
    >,
         159  +
    #[allow(missing_docs)] // documentation missing in model
         160  +
    pub union: ::std::option::Option<crate::model::SingleElementUnion>,
  151    161   
}
  152         -
impl MapWithEnumKeyOpOutput {
         162  +
impl NullInNonSparseOutput {
         163  +
    #[allow(missing_docs)] // documentation missing in model
         164  +
    pub fn list(&self) -> ::std::option::Option<&[::std::string::String]> {
         165  +
        self.list.as_deref()
         166  +
    }
  153    167   
    #[allow(missing_docs)] // documentation missing in model
  154    168   
    pub fn map(
  155    169   
        &self,
  156    170   
    ) -> ::std::option::Option<
  157         -
        &::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
         171  +
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
  158    172   
    > {
  159    173   
        self.map.as_ref()
  160    174   
    }
  161         -
}
  162         -
impl MapWithEnumKeyOpOutput {
  163         -
    /// Creates a new builder-style object to manufacture [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  164         -
    pub fn builder() -> crate::output::map_with_enum_key_op_output::Builder {
  165         -
        crate::output::map_with_enum_key_op_output::Builder::default()
  166         -
    }
  167         -
}
  168         -
  169         -
#[allow(missing_docs)] // documentation missing in model
  170         -
#[derive(
  171         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  172         -
)]
  173         -
pub struct StatusResponseOutput {
  174    175   
    #[allow(missing_docs)] // documentation missing in model
  175         -
    pub field: i32,
  176         -
}
  177         -
impl StatusResponseOutput {
  178         -
    #[allow(missing_docs)] // documentation missing in model
  179         -
    pub fn field(&self) -> i32 {
  180         -
        self.field
         176  +
    pub fn union(&self) -> ::std::option::Option<&crate::model::SingleElementUnion> {
         177  +
        self.union.as_ref()
  181    178   
    }
  182    179   
}
  183         -
impl StatusResponseOutput {
  184         -
    /// Creates a new builder-style object to manufacture [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  185         -
    pub fn builder() -> crate::output::status_response_output::Builder {
  186         -
        crate::output::status_response_output::Builder::default()
         180  +
impl NullInNonSparseOutput {
         181  +
    /// Creates a new builder-style object to manufacture [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         182  +
    pub fn builder() -> crate::output::null_in_non_sparse_output::Builder {
         183  +
        crate::output::null_in_non_sparse_output::Builder::default()
  187    184   
    }
  188    185   
}
  189    186   
  190    187   
#[allow(missing_docs)] // documentation missing in model
  191    188   
#[derive(
  192    189   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  193    190   
)]
  194         -
pub struct EnumQueryOutput {}
  195         -
impl EnumQueryOutput {
  196         -
    /// Creates a new builder-style object to manufacture [`EnumQueryOutput`](crate::output::EnumQueryOutput).
  197         -
    pub fn builder() -> crate::output::enum_query_output::Builder {
  198         -
        crate::output::enum_query_output::Builder::default()
         191  +
pub struct CaseInsensitiveErrorOperationOutput {}
         192  +
impl CaseInsensitiveErrorOperationOutput {
         193  +
    /// Creates a new builder-style object to manufacture [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         194  +
    pub fn builder() -> crate::output::case_insensitive_error_operation_output::Builder {
         195  +
        crate::output::case_insensitive_error_operation_output::Builder::default()
  199    196   
    }
  200    197   
}
  201    198   
  202    199   
#[allow(missing_docs)] // documentation missing in model
  203    200   
#[derive(
  204    201   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  205    202   
)]
  206         -
pub struct PrimitiveIntHeaderOutput {
         203  +
pub struct EmptyStructWithContentOnWireOpOutput {
  207    204   
    #[allow(missing_docs)] // documentation missing in model
  208         -
    pub field: i32,
         205  +
    pub empty: ::std::option::Option<crate::model::EmptyStruct>,
  209    206   
}
  210         -
impl PrimitiveIntHeaderOutput {
         207  +
impl EmptyStructWithContentOnWireOpOutput {
  211    208   
    #[allow(missing_docs)] // documentation missing in model
  212         -
    pub fn field(&self) -> i32 {
  213         -
        self.field
         209  +
    pub fn empty(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
         210  +
        self.empty.as_ref()
  214    211   
    }
  215    212   
}
  216         -
impl PrimitiveIntHeaderOutput {
  217         -
    /// Creates a new builder-style object to manufacture [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
  218         -
    pub fn builder() -> crate::output::primitive_int_header_output::Builder {
  219         -
        crate::output::primitive_int_header_output::Builder::default()
         213  +
impl EmptyStructWithContentOnWireOpOutput {
         214  +
    /// Creates a new builder-style object to manufacture [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         215  +
    pub fn builder() -> crate::output::empty_struct_with_content_on_wire_op_output::Builder {
         216  +
        crate::output::empty_struct_with_content_on_wire_op_output::Builder::default()
  220    217   
    }
  221    218   
}
  222    219   
  223    220   
#[allow(missing_docs)] // documentation missing in model
  224    221   
#[derive(
  225    222   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  226    223   
)]
  227         -
pub struct StringPayloadOutput {
  228         -
    #[allow(missing_docs)] // documentation missing in model
  229         -
    pub payload: ::std::option::Option<::std::string::String>,
  230         -
}
  231         -
impl StringPayloadOutput {
  232         -
    #[allow(missing_docs)] // documentation missing in model
  233         -
    pub fn payload(&self) -> ::std::option::Option<&str> {
  234         -
        self.payload.as_deref()
  235         -
    }
  236         -
}
  237         -
impl StringPayloadOutput {
  238         -
    /// Creates a new builder-style object to manufacture [`StringPayloadOutput`](crate::output::StringPayloadOutput).
  239         -
    pub fn builder() -> crate::output::string_payload_output::Builder {
  240         -
        crate::output::string_payload_output::Builder::default()
         224  +
pub struct QueryPrecedenceOutput {}
         225  +
impl QueryPrecedenceOutput {
         226  +
    /// Creates a new builder-style object to manufacture [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         227  +
    pub fn builder() -> crate::output::query_precedence_output::Builder {
         228  +
        crate::output::query_precedence_output::Builder::default()
  241    229   
    }
  242    230   
}
  243         -
/// See [`HttpQueryParamsOnlyOperationOutput`](crate::output::HttpQueryParamsOnlyOperationOutput).
  244         -
pub mod http_query_params_only_operation_output {
         231  +
/// See [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         232  +
pub mod string_payload_output {
  245    233   
  246         -
    impl ::std::convert::From<Builder> for crate::output::HttpQueryParamsOnlyOperationOutput {
         234  +
    impl ::std::convert::From<Builder> for crate::output::StringPayloadOutput {
  247    235   
        fn from(builder: Builder) -> Self {
  248    236   
            builder.build()
  249    237   
        }
  250    238   
    }
  251         -
    /// A builder for [`HttpQueryParamsOnlyOperationOutput`](crate::output::HttpQueryParamsOnlyOperationOutput).
         239  +
    /// A builder for [`StringPayloadOutput`](crate::output::StringPayloadOutput).
  252    240   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  253         -
    pub struct Builder {}
         241  +
    pub struct Builder {
         242  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
         243  +
    }
  254    244   
    impl Builder {
  255         -
        /// Consumes the builder and constructs a [`HttpQueryParamsOnlyOperationOutput`](crate::output::HttpQueryParamsOnlyOperationOutput).
  256         -
        pub fn build(self) -> crate::output::HttpQueryParamsOnlyOperationOutput {
         245  +
        #[allow(missing_docs)] // documentation missing in model
         246  +
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         247  +
            self.payload = input;
         248  +
            self
         249  +
        }
         250  +
        /// Consumes the builder and constructs a [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         251  +
        pub fn build(self) -> crate::output::StringPayloadOutput {
  257    252   
            self.build_enforcing_all_constraints()
  258    253   
        }
  259         -
        fn build_enforcing_all_constraints(
  260         -
            self,
  261         -
        ) -> crate::output::HttpQueryParamsOnlyOperationOutput {
  262         -
            crate::output::HttpQueryParamsOnlyOperationOutput {}
         254  +
        fn build_enforcing_all_constraints(self) -> crate::output::StringPayloadOutput {
         255  +
            crate::output::StringPayloadOutput {
         256  +
                payload: self.payload,
         257  +
            }
  263    258   
        }
  264    259   
    }
  265    260   
}
  266         -
/// See [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
  267         -
pub mod query_precedence_output {
         261  +
/// See [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         262  +
pub mod primitive_int_header_output {
  268    263   
  269         -
    impl ::std::convert::From<Builder> for crate::output::QueryPrecedenceOutput {
         264  +
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntHeaderOutput {
  270    265   
        fn from(builder: Builder) -> Self {
  271    266   
            builder.build()
  272    267   
        }
  273    268   
    }
  274         -
    /// A builder for [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         269  +
    /// A builder for [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
  275    270   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  276         -
    pub struct Builder {}
         271  +
    pub struct Builder {
         272  +
        pub(crate) field: ::std::option::Option<i32>,
         273  +
    }
  277    274   
    impl Builder {
  278         -
        /// Consumes the builder and constructs a [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
  279         -
        pub fn build(self) -> crate::output::QueryPrecedenceOutput {
         275  +
        #[allow(missing_docs)] // documentation missing in model
         276  +
        pub fn field(mut self, input: i32) -> Self {
         277  +
            self.field = Some(input);
         278  +
            self
         279  +
        }
         280  +
        /// Consumes the builder and constructs a [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         281  +
        pub fn build(self) -> crate::output::PrimitiveIntHeaderOutput {
  280    282   
            self.build_enforcing_all_constraints()
  281    283   
        }
  282         -
        fn build_enforcing_all_constraints(self) -> crate::output::QueryPrecedenceOutput {
  283         -
            crate::output::QueryPrecedenceOutput {}
         284  +
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntHeaderOutput {
         285  +
            crate::output::PrimitiveIntHeaderOutput {
         286  +
                field: self.field.unwrap_or(0i32),
         287  +
            }
  284    288   
        }
  285    289   
    }
  286    290   
}
  287         -
/// See [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
  288         -
pub mod empty_struct_with_content_on_wire_op_output {
         291  +
/// See [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         292  +
pub mod enum_query_output {
  289    293   
  290         -
    impl ::std::convert::From<Builder> for crate::output::EmptyStructWithContentOnWireOpOutput {
         294  +
    impl ::std::convert::From<Builder> for crate::output::EnumQueryOutput {
  291    295   
        fn from(builder: Builder) -> Self {
  292    296   
            builder.build()
  293    297   
        }
  294    298   
    }
  295         -
    /// A builder for [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         299  +
    /// A builder for [`EnumQueryOutput`](crate::output::EnumQueryOutput).
  296    300   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  297         -
    pub struct Builder {
  298         -
        pub(crate) empty: ::std::option::Option<crate::model::EmptyStruct>,
  299         -
    }
         301  +
    pub struct Builder {}
  300    302   
    impl Builder {
  301         -
        #[allow(missing_docs)] // documentation missing in model
  302         -
        pub fn empty(mut self, input: ::std::option::Option<crate::model::EmptyStruct>) -> Self {
  303         -
            self.empty = input;
  304         -
            self
  305         -
        }
  306         -
        /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
  307         -
        pub fn build(self) -> crate::output::EmptyStructWithContentOnWireOpOutput {
         303  +
        /// Consumes the builder and constructs a [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         304  +
        pub fn build(self) -> crate::output::EnumQueryOutput {
  308    305   
            self.build_enforcing_all_constraints()
  309    306   
        }
  310         -
        fn build_enforcing_all_constraints(
  311         -
            self,
  312         -
        ) -> crate::output::EmptyStructWithContentOnWireOpOutput {
  313         -
            crate::output::EmptyStructWithContentOnWireOpOutput { empty: self.empty }
         307  +
        fn build_enforcing_all_constraints(self) -> crate::output::EnumQueryOutput {
         308  +
            crate::output::EnumQueryOutput {}
  314    309   
        }
  315    310   
    }
  316    311   
}
  317         -
/// See [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
  318         -
pub mod case_insensitive_error_operation_output {
         312  +
/// See [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         313  +
pub mod status_response_output {
  319    314   
  320         -
    impl ::std::convert::From<Builder> for crate::output::CaseInsensitiveErrorOperationOutput {
         315  +
    impl ::std::convert::From<Builder> for crate::output::StatusResponseOutput {
  321    316   
        fn from(builder: Builder) -> Self {
  322    317   
            builder.build()
  323    318   
        }
  324    319   
    }
  325         -
    /// A builder for [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         320  +
    /// A builder for [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  326    321   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  327         -
    pub struct Builder {}
         322  +
    pub struct Builder {
         323  +
        pub(crate) field: ::std::option::Option<i32>,
         324  +
    }
  328    325   
    impl Builder {
  329         -
        /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
  330         -
        pub fn build(self) -> crate::output::CaseInsensitiveErrorOperationOutput {
         326  +
        #[allow(missing_docs)] // documentation missing in model
         327  +
        pub fn field(mut self, input: i32) -> Self {
         328  +
            self.field = Some(input);
         329  +
            self
         330  +
        }
         331  +
        /// Consumes the builder and constructs a [`StatusResponseOutput`](crate::output::StatusResponseOutput).
         332  +
        pub fn build(self) -> crate::output::StatusResponseOutput {
  331    333   
            self.build_enforcing_all_constraints()
  332    334   
        }
  333         -
        fn build_enforcing_all_constraints(
  334         -
            self,
  335         -
        ) -> crate::output::CaseInsensitiveErrorOperationOutput {
  336         -
            crate::output::CaseInsensitiveErrorOperationOutput {}
         335  +
        fn build_enforcing_all_constraints(self) -> crate::output::StatusResponseOutput {
         336  +
            crate::output::StatusResponseOutput {
         337  +
                field: self.field.unwrap_or(0i32),
         338  +
            }
  337    339   
        }
  338    340   
    }
  339    341   
}
  340         -
/// See [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
  341         -
pub mod null_in_non_sparse_output {
         342  +
/// See [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         343  +
pub mod map_with_enum_key_op_output {
  342    344   
  343         -
    impl ::std::convert::From<Builder> for crate::output::NullInNonSparseOutput {
         345  +
    impl ::std::convert::From<Builder> for crate::output::MapWithEnumKeyOpOutput {
  344    346   
        fn from(builder: Builder) -> Self {
  345    347   
            builder.build()
  346    348   
        }
  347    349   
    }
  348         -
    /// A builder for [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         350  +
    /// A builder for [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  349    351   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  350    352   
    pub struct Builder {
  351         -
        pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  352    353   
        pub(crate) map: ::std::option::Option<
  353         -
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         354  +
            ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  354    355   
        >,
  355         -
        pub(crate) union: ::std::option::Option<crate::model::SingleElementUnion>,
  356    356   
    }
  357    357   
    impl Builder {
  358         -
        #[allow(missing_docs)] // documentation missing in model
  359         -
        pub fn list(
  360         -
            mut self,
  361         -
            input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  362         -
        ) -> Self {
  363         -
            self.list = input;
  364         -
            self
  365         -
        }
  366    358   
        #[allow(missing_docs)] // documentation missing in model
  367    359   
        pub fn map(
  368    360   
            mut self,
  369    361   
            input: ::std::option::Option<
  370         -
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         362  +
                ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  371    363   
            >,
  372    364   
        ) -> Self {
  373    365   
            self.map = input;
  374    366   
            self
  375    367   
        }
         368  +
        /// Consumes the builder and constructs a [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
         369  +
        pub fn build(self) -> crate::output::MapWithEnumKeyOpOutput {
         370  +
            self.build_enforcing_all_constraints()
         371  +
        }
         372  +
        fn build_enforcing_all_constraints(self) -> crate::output::MapWithEnumKeyOpOutput {
         373  +
            crate::output::MapWithEnumKeyOpOutput { map: self.map }
         374  +
        }
         375  +
    }
         376  +
}
         377  +
/// See [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         378  +
pub mod primitive_int_op_output {
         379  +
         380  +
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntOpOutput {
         381  +
        fn from(builder: Builder) -> Self {
         382  +
            builder.build()
         383  +
        }
         384  +
    }
         385  +
    /// A builder for [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         386  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         387  +
    pub struct Builder {
         388  +
        pub(crate) value: ::std::option::Option<i32>,
         389  +
    }
         390  +
    impl Builder {
  376    391   
        #[allow(missing_docs)] // documentation missing in model
  377         -
        pub fn union(
  378         -
            mut self,
  379         -
            input: ::std::option::Option<crate::model::SingleElementUnion>,
  380         -
        ) -> Self {
  381         -
            self.union = input;
         392  +
        pub fn value(mut self, input: i32) -> Self {
         393  +
            self.value = Some(input);
  382    394   
            self
  383    395   
        }
  384         -
        /// Consumes the builder and constructs a [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
  385         -
        pub fn build(self) -> crate::output::NullInNonSparseOutput {
         396  +
        /// Consumes the builder and constructs a [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         397  +
        pub fn build(self) -> crate::output::PrimitiveIntOpOutput {
  386    398   
            self.build_enforcing_all_constraints()
  387    399   
        }
  388         -
        fn build_enforcing_all_constraints(self) -> crate::output::NullInNonSparseOutput {
  389         -
            crate::output::NullInNonSparseOutput {
  390         -
                list: self.list,
  391         -
                map: self.map,
  392         -
                union: self.union,
         400  +
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntOpOutput {
         401  +
            crate::output::PrimitiveIntOpOutput {
         402  +
                value: self.value.unwrap_or(0i32),
  393    403   
            }
  394    404   
        }
  395    405   
    }
  396    406   
}
  397    407   
/// See [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
  398    408   
pub mod escaped_string_values_output {
  399    409   
  400    410   
    impl ::std::convert::From<Builder> for crate::output::EscapedStringValuesOutput {
  401    411   
        fn from(builder: Builder) -> Self {
  402    412   
            builder.build()
  403    413   
        }
  404    414   
    }
  405    415   
    /// A builder for [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
  406    416   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  407    417   
    pub struct Builder {
  408    418   
        pub(crate) r#enum: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  409    419   
        pub(crate) some_string: ::std::option::Option<::std::string::String>,
  410    420   
    }
  411    421   
    impl Builder {
  412    422   
        #[allow(missing_docs)] // documentation missing in model
  413    423   
        pub fn r#enum(
  414    424   
            mut self,
  415    425   
            input: ::std::option::Option<crate::model::EnumWithEscapedChars>,
  416    426   
        ) -> Self {
  417    427   
            self.r#enum = input;
  418    428   
            self
  419    429   
        }
  420    430   
        #[allow(missing_docs)] // documentation missing in model
  421    431   
        pub fn some_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  422    432   
            self.some_string = input;
  423    433   
            self
  424    434   
        }
  425    435   
        /// Consumes the builder and constructs a [`EscapedStringValuesOutput`](crate::output::EscapedStringValuesOutput).
  426    436   
        pub fn build(self) -> crate::output::EscapedStringValuesOutput {
  427    437   
            self.build_enforcing_all_constraints()
  428    438   
        }
  429    439   
        fn build_enforcing_all_constraints(self) -> crate::output::EscapedStringValuesOutput {
  430    440   
            crate::output::EscapedStringValuesOutput {
  431    441   
                r#enum: self.r#enum,
  432    442   
                some_string: self.some_string,
  433    443   
            }
  434    444   
        }
  435    445   
    }
  436    446   
}
  437         -
/// See [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
  438         -
pub mod primitive_int_op_output {
         447  +
/// See [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         448  +
pub mod null_in_non_sparse_output {
  439    449   
  440         -
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntOpOutput {
         450  +
    impl ::std::convert::From<Builder> for crate::output::NullInNonSparseOutput {
  441    451   
        fn from(builder: Builder) -> Self {
  442    452   
            builder.build()
  443    453   
        }
  444    454   
    }
  445         -
    /// A builder for [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
         455  +
    /// A builder for [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
  446    456   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  447    457   
    pub struct Builder {
  448         -
        pub(crate) value: ::std::option::Option<i32>,
         458  +
        pub(crate) list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         459  +
        pub(crate) map: ::std::option::Option<
         460  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         461  +
        >,
         462  +
        pub(crate) union: ::std::option::Option<crate::model::SingleElementUnion>,
  449    463   
    }
  450    464   
    impl Builder {
  451    465   
        #[allow(missing_docs)] // documentation missing in model
  452         -
        pub fn value(mut self, input: i32) -> Self {
  453         -
            self.value = Some(input);
         466  +
        pub fn list(
         467  +
            mut self,
         468  +
            input: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         469  +
        ) -> Self {
         470  +
            self.list = input;
  454    471   
            self
  455    472   
        }
  456         -
        /// Consumes the builder and constructs a [`PrimitiveIntOpOutput`](crate::output::PrimitiveIntOpOutput).
  457         -
        pub fn build(self) -> crate::output::PrimitiveIntOpOutput {
  458         -
            self.build_enforcing_all_constraints()
  459         -
        }
  460         -
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntOpOutput {
  461         -
            crate::output::PrimitiveIntOpOutput {
  462         -
                value: self.value.unwrap_or(0i32),
  463         -
            }
  464         -
        }
  465         -
    }
  466         -
}
  467         -
/// See [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  468         -
pub mod map_with_enum_key_op_output {
  469         -
  470         -
    impl ::std::convert::From<Builder> for crate::output::MapWithEnumKeyOpOutput {
  471         -
        fn from(builder: Builder) -> Self {
  472         -
            builder.build()
  473         -
        }
  474         -
    }
  475         -
    /// A builder for [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  476         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  477         -
    pub struct Builder {
  478         -
        pub(crate) map: ::std::option::Option<
  479         -
            ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
  480         -
        >,
  481         -
    }
  482         -
    impl Builder {
  483    473   
        #[allow(missing_docs)] // documentation missing in model
  484    474   
        pub fn map(
  485    475   
            mut self,
  486    476   
            input: ::std::option::Option<
  487         -
                ::std::collections::HashMap<crate::model::StringEnum, ::std::string::String>,
         477  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  488    478   
            >,
  489    479   
        ) -> Self {
  490    480   
            self.map = input;
  491    481   
            self
  492    482   
        }
  493         -
        /// Consumes the builder and constructs a [`MapWithEnumKeyOpOutput`](crate::output::MapWithEnumKeyOpOutput).
  494         -
        pub fn build(self) -> crate::output::MapWithEnumKeyOpOutput {
  495         -
            self.build_enforcing_all_constraints()
  496         -
        }
  497         -
        fn build_enforcing_all_constraints(self) -> crate::output::MapWithEnumKeyOpOutput {
  498         -
            crate::output::MapWithEnumKeyOpOutput { map: self.map }
  499         -
        }
  500         -
    }
  501         -
}
  502         -
/// See [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  503         -
pub mod status_response_output {
  504         -
  505         -
    impl ::std::convert::From<Builder> for crate::output::StatusResponseOutput {
  506         -
        fn from(builder: Builder) -> Self {
  507         -
            builder.build()
  508         -
        }
  509         -
    }
  510         -
    /// A builder for [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  511         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  512         -
    pub struct Builder {
  513         -
        pub(crate) field: ::std::option::Option<i32>,
  514         -
    }
  515         -
    impl Builder {
  516    483   
        #[allow(missing_docs)] // documentation missing in model
  517         -
        pub fn field(mut self, input: i32) -> Self {
  518         -
            self.field = Some(input);
         484  +
        pub fn union(
         485  +
            mut self,
         486  +
            input: ::std::option::Option<crate::model::SingleElementUnion>,
         487  +
        ) -> Self {
         488  +
            self.union = input;
  519    489   
            self
  520    490   
        }
  521         -
        /// Consumes the builder and constructs a [`StatusResponseOutput`](crate::output::StatusResponseOutput).
  522         -
        pub fn build(self) -> crate::output::StatusResponseOutput {
         491  +
        /// Consumes the builder and constructs a [`NullInNonSparseOutput`](crate::output::NullInNonSparseOutput).
         492  +
        pub fn build(self) -> crate::output::NullInNonSparseOutput {
  523    493   
            self.build_enforcing_all_constraints()
  524    494   
        }
  525         -
        fn build_enforcing_all_constraints(self) -> crate::output::StatusResponseOutput {
  526         -
            crate::output::StatusResponseOutput {
  527         -
                field: self.field.unwrap_or(0i32),
         495  +
        fn build_enforcing_all_constraints(self) -> crate::output::NullInNonSparseOutput {
         496  +
            crate::output::NullInNonSparseOutput {
         497  +
                list: self.list,
         498  +
                map: self.map,
         499  +
                union: self.union,
  528    500   
            }
  529    501   
        }
  530    502   
    }
  531    503   
}
  532         -
/// See [`EnumQueryOutput`](crate::output::EnumQueryOutput).
  533         -
pub mod enum_query_output {
         504  +
/// See [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         505  +
pub mod case_insensitive_error_operation_output {
  534    506   
  535         -
    impl ::std::convert::From<Builder> for crate::output::EnumQueryOutput {
         507  +
    impl ::std::convert::From<Builder> for crate::output::CaseInsensitiveErrorOperationOutput {
  536    508   
        fn from(builder: Builder) -> Self {
  537    509   
            builder.build()
  538    510   
        }
  539    511   
    }
  540         -
    /// A builder for [`EnumQueryOutput`](crate::output::EnumQueryOutput).
         512  +
    /// A builder for [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
  541    513   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  542    514   
    pub struct Builder {}
  543    515   
    impl Builder {
  544         -
        /// Consumes the builder and constructs a [`EnumQueryOutput`](crate::output::EnumQueryOutput).
  545         -
        pub fn build(self) -> crate::output::EnumQueryOutput {
         516  +
        /// Consumes the builder and constructs a [`CaseInsensitiveErrorOperationOutput`](crate::output::CaseInsensitiveErrorOperationOutput).
         517  +
        pub fn build(self) -> crate::output::CaseInsensitiveErrorOperationOutput {
  546    518   
            self.build_enforcing_all_constraints()
  547    519   
        }
  548         -
        fn build_enforcing_all_constraints(self) -> crate::output::EnumQueryOutput {
  549         -
            crate::output::EnumQueryOutput {}
         520  +
        fn build_enforcing_all_constraints(
         521  +
            self,
         522  +
        ) -> crate::output::CaseInsensitiveErrorOperationOutput {
         523  +
            crate::output::CaseInsensitiveErrorOperationOutput {}
  550    524   
        }
  551    525   
    }
  552    526   
}
  553         -
/// See [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
  554         -
pub mod primitive_int_header_output {
         527  +
/// See [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         528  +
pub mod empty_struct_with_content_on_wire_op_output {
  555    529   
  556         -
    impl ::std::convert::From<Builder> for crate::output::PrimitiveIntHeaderOutput {
         530  +
    impl ::std::convert::From<Builder> for crate::output::EmptyStructWithContentOnWireOpOutput {
  557    531   
        fn from(builder: Builder) -> Self {
  558    532   
            builder.build()
  559    533   
        }
  560    534   
    }
  561         -
    /// A builder for [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
         535  +
    /// A builder for [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
  562    536   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  563    537   
    pub struct Builder {
  564         -
        pub(crate) field: ::std::option::Option<i32>,
         538  +
        pub(crate) empty: ::std::option::Option<crate::model::EmptyStruct>,
  565    539   
    }
  566    540   
    impl Builder {
  567    541   
        #[allow(missing_docs)] // documentation missing in model
  568         -
        pub fn field(mut self, input: i32) -> Self {
  569         -
            self.field = Some(input);
         542  +
        pub fn empty(mut self, input: ::std::option::Option<crate::model::EmptyStruct>) -> Self {
         543  +
            self.empty = input;
  570    544   
            self
  571    545   
        }
  572         -
        /// Consumes the builder and constructs a [`PrimitiveIntHeaderOutput`](crate::output::PrimitiveIntHeaderOutput).
  573         -
        pub fn build(self) -> crate::output::PrimitiveIntHeaderOutput {
         546  +
        /// Consumes the builder and constructs a [`EmptyStructWithContentOnWireOpOutput`](crate::output::EmptyStructWithContentOnWireOpOutput).
         547  +
        pub fn build(self) -> crate::output::EmptyStructWithContentOnWireOpOutput {
  574    548   
            self.build_enforcing_all_constraints()
  575    549   
        }
  576         -
        fn build_enforcing_all_constraints(self) -> crate::output::PrimitiveIntHeaderOutput {
  577         -
            crate::output::PrimitiveIntHeaderOutput {
  578         -
                field: self.field.unwrap_or(0i32),
  579         -
            }
         550  +
        fn build_enforcing_all_constraints(
         551  +
            self,
         552  +
        ) -> crate::output::EmptyStructWithContentOnWireOpOutput {
         553  +
            crate::output::EmptyStructWithContentOnWireOpOutput { empty: self.empty }
  580    554   
        }
  581    555   
    }
  582    556   
}
  583         -
/// See [`StringPayloadOutput`](crate::output::StringPayloadOutput).
  584         -
pub mod string_payload_output {
         557  +
/// See [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         558  +
pub mod query_precedence_output {
  585    559   
  586         -
    impl ::std::convert::From<Builder> for crate::output::StringPayloadOutput {
         560  +
    impl ::std::convert::From<Builder> for crate::output::QueryPrecedenceOutput {
  587    561   
        fn from(builder: Builder) -> Self {
  588    562   
            builder.build()
  589    563   
        }
  590    564   
    }
  591         -
    /// A builder for [`StringPayloadOutput`](crate::output::StringPayloadOutput).
         565  +
    /// A builder for [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
  592    566   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  593         -
    pub struct Builder {
  594         -
        pub(crate) payload: ::std::option::Option<::std::string::String>,
  595         -
    }
         567  +
    pub struct Builder {}
  596    568   
    impl Builder {
  597         -
        #[allow(missing_docs)] // documentation missing in model
  598         -
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  599         -
            self.payload = input;
  600         -
            self
  601         -
        }
  602         -
        /// Consumes the builder and constructs a [`StringPayloadOutput`](crate::output::StringPayloadOutput).
  603         -
        pub fn build(self) -> crate::output::StringPayloadOutput {
         569  +
        /// Consumes the builder and constructs a [`QueryPrecedenceOutput`](crate::output::QueryPrecedenceOutput).
         570  +
        pub fn build(self) -> crate::output::QueryPrecedenceOutput {
  604    571   
            self.build_enforcing_all_constraints()
  605    572   
        }
  606         -
        fn build_enforcing_all_constraints(self) -> crate::output::StringPayloadOutput {
  607         -
            crate::output::StringPayloadOutput {
  608         -
                payload: self.payload,
  609         -
            }
         573  +
        fn build_enforcing_all_constraints(self) -> crate::output::QueryPrecedenceOutput {
         574  +
            crate::output::QueryPrecedenceOutput {}
  610    575   
        }
  611    576   
    }
  612    577   
}

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

@@ -1,1 +41,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) mod shape_case_insensitive_error_operation;
    3      3   
    4      4   
pub(crate) mod shape_empty_struct_with_content_on_wire_op;
    5      5   
    6      6   
pub(crate) mod shape_enum_query;
    7      7   
    8      8   
pub(crate) mod shape_escaped_string_values;
    9      9   
   10         -
pub(crate) mod shape_http_query_params_only_operation;
   11         -
   12     10   
pub(crate) mod shape_map_with_enum_key_op;
   13     11   
   14     12   
pub(crate) mod shape_null_in_non_sparse;
   15     13   
   16     14   
pub(crate) mod shape_primitive_int_header;
   17     15   
   18     16   
pub(crate) mod shape_primitive_int_op;
   19     17   
   20     18   
pub(crate) mod shape_query_precedence;
   21     19   

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

@@ -1,1 +40,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
/// The service builder for [`RestJsonExtras`].
    3      3   
///
    4      4   
/// Constructed via [`RestJsonExtras::builder`].
    5      5   
pub struct RestJsonExtrasBuilder<Body, L, HttpPl, ModelPl> {
    6      6   
    case_insensitive_error_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
    7      7   
    empty_struct_with_content_on_wire_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
    8      8   
    enum_query: Option<::aws_smithy_http_server::routing::Route<Body>>,
    9      9   
    escaped_string_values: Option<::aws_smithy_http_server::routing::Route<Body>>,
   10         -
    http_query_params_only_operation: Option<::aws_smithy_http_server::routing::Route<Body>>,
   11     10   
    map_with_enum_key_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
   12     11   
    null_in_non_sparse: Option<::aws_smithy_http_server::routing::Route<Body>>,
   13     12   
    primitive_int_header: Option<::aws_smithy_http_server::routing::Route<Body>>,
   14     13   
    primitive_int_op: Option<::aws_smithy_http_server::routing::Route<Body>>,
   15     14   
    query_precedence: Option<::aws_smithy_http_server::routing::Route<Body>>,
   16     15   
    status_response: Option<::aws_smithy_http_server::routing::Route<Body>>,
   17     16   
    string_payload: Option<::aws_smithy_http_server::routing::Route<Body>>,
   18     17   
    layer: L,
   19     18   
    http_plugin: HttpPl,
   20     19   
    model_plugin: ModelPl,
@@ -596,595 +806,654 @@
  616    615   
                Error = ::std::convert::Infallible,
  617    616   
            > + Clone
  618    617   
            + Send
  619    618   
            + 'static,
  620    619   
        S::Future: Send + 'static,
  621    620   
    {
  622    621   
        self.escaped_string_values = Some(::aws_smithy_http_server::routing::Route::new(svc));
  623    622   
        self
  624    623   
    }
  625    624   
  626         -
    /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
  627         -
    ///
  628         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  629         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  630         -
    ///
  631         -
    /// # Example
  632         -
    ///
  633         -
    /// ```no_run
  634         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  635         -
    ///
  636         -
    /// use rest_json_extras::{input, output, error};
  637         -
    ///
  638         -
    /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, error::HttpQueryParamsOnlyOperationError> {
  639         -
    ///     todo!()
  640         -
    /// }
  641         -
    ///
  642         -
    /// let config = RestJsonExtrasConfig::builder().build();
  643         -
    /// let app = RestJsonExtras::builder(config)
  644         -
    ///     .http_query_params_only_operation(handler)
  645         -
    ///     /* Set other handlers */
  646         -
    ///     .build()
  647         -
    ///     .unwrap();
  648         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  649         -
    /// ```
  650         -
    ///
  651         -
                    pub fn http_query_params_only_operation<HandlerType, HandlerExtractors, UpgradeExtractors>(self, handler: HandlerType) -> Self
  652         -
                    where
  653         -
                        HandlerType: ::aws_smithy_http_server::operation::Handler<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerExtractors>,
  654         -
  655         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  656         -
                            RestJsonExtras<L>,
  657         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  658         -
                            ::aws_smithy_http_server::operation::IntoService<crate::operation_shape::HttpQueryParamsOnlyOperation, HandlerType>
  659         -
                        >,
  660         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  661         -
                            RestJsonExtras<L>,
  662         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  663         -
                            ModelPl::Output
  664         -
                        >,
  665         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  666         -
                            RestJsonExtras<L>,
  667         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  668         -
                            <
  669         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  670         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  671         -
                                    RestJsonExtras<L>,
  672         -
                                    crate::operation_shape::HttpQueryParamsOnlyOperation,
  673         -
                                    ModelPl::Output
  674         -
                                >
  675         -
                            >::Output
  676         -
                        >,
  677         -
  678         -
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  679         -
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  680         -
  681         -
                    {
  682         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  683         -
        use ::aws_smithy_http_server::plugin::Plugin;
  684         -
        let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_handler(handler);
  685         -
        let svc = self.model_plugin.apply(svc);
  686         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  687         -
            .apply(svc);
  688         -
        let svc = self.http_plugin.apply(svc);
  689         -
        self.http_query_params_only_operation_custom(svc)
  690         -
    }
  691         -
  692         -
    /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) operation.
  693         -
    ///
  694         -
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  695         -
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  696         -
    ///
  697         -
    /// # Example
  698         -
    ///
  699         -
    /// ```no_run
  700         -
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  701         -
    ///
  702         -
    /// use rest_json_extras::{input, output, error};
  703         -
    ///
  704         -
    /// async fn handler(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, error::HttpQueryParamsOnlyOperationError> {
  705         -
    ///     todo!()
  706         -
    /// }
  707         -
    ///
  708         -
    /// let config = RestJsonExtrasConfig::builder().build();
  709         -
    /// let svc = ::tower::util::service_fn(handler);
  710         -
    /// let app = RestJsonExtras::builder(config)
  711         -
    ///     .http_query_params_only_operation_service(svc)
  712         -
    ///     /* Set other handlers */
  713         -
    ///     .build()
  714         -
    ///     .unwrap();
  715         -
    /// # let app: RestJsonExtras<::aws_smithy_http_server::routing::RoutingService<::aws_smithy_http_server::protocol::rest::router::RestRouter<::aws_smithy_http_server::routing::Route>, ::aws_smithy_http_server::protocol::rest_json_1::RestJson1>> = app;
  716         -
    /// ```
  717         -
    ///
  718         -
                    pub fn http_query_params_only_operation_service<S, ServiceExtractors, UpgradeExtractors>(self, service: S) -> Self
  719         -
                    where
  720         -
                        S: ::aws_smithy_http_server::operation::OperationService<crate::operation_shape::HttpQueryParamsOnlyOperation, ServiceExtractors>,
  721         -
  722         -
                        ModelPl: ::aws_smithy_http_server::plugin::Plugin<
  723         -
                            RestJsonExtras<L>,
  724         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  725         -
                            ::aws_smithy_http_server::operation::Normalize<crate::operation_shape::HttpQueryParamsOnlyOperation, S>
  726         -
                        >,
  727         -
                        ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>: ::aws_smithy_http_server::plugin::Plugin<
  728         -
                            RestJsonExtras<L>,
  729         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  730         -
                            ModelPl::Output
  731         -
                        >,
  732         -
                        HttpPl: ::aws_smithy_http_server::plugin::Plugin<
  733         -
                            RestJsonExtras<L>,
  734         -
                            crate::operation_shape::HttpQueryParamsOnlyOperation,
  735         -
                            <
  736         -
                                ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>
  737         -
                                as ::aws_smithy_http_server::plugin::Plugin<
  738         -
                                    RestJsonExtras<L>,
  739         -
                                    crate::operation_shape::HttpQueryParamsOnlyOperation,
  740         -
                                    ModelPl::Output
  741         -
                                >
  742         -
                            >::Output
  743         -
                        >,
  744         -
  745         -
                        HttpPl::Output: ::tower::Service<::http_1x::Request<Body>, Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>, Error = ::std::convert::Infallible> + Clone + Send + 'static,
  746         -
                        <HttpPl::Output as ::tower::Service<::http_1x::Request<Body>>>::Future: Send + 'static,
  747         -
  748         -
                    {
  749         -
        use ::aws_smithy_http_server::operation::OperationShapeExt;
  750         -
        use ::aws_smithy_http_server::plugin::Plugin;
  751         -
        let svc = crate::operation_shape::HttpQueryParamsOnlyOperation::from_service(service);
  752         -
        let svc = self.model_plugin.apply(svc);
  753         -
        let svc = ::aws_smithy_http_server::operation::UpgradePlugin::<UpgradeExtractors>::new()
  754         -
            .apply(svc);
  755         -
        let svc = self.http_plugin.apply(svc);
  756         -
        self.http_query_params_only_operation_custom(svc)
  757         -
    }
  758         -
  759         -
    /// Sets the [`HttpQueryParamsOnlyOperation`](crate::operation_shape::HttpQueryParamsOnlyOperation) to a custom [`Service`](tower::Service).
  760         -
    /// not constrained by the Smithy contract.
  761         -
    fn http_query_params_only_operation_custom<S>(mut self, svc: S) -> Self
  762         -
    where
  763         -
        S: ::tower::Service<
  764         -
                ::http_1x::Request<Body>,
  765         -
                Response = ::http_1x::Response<::aws_smithy_http_server::body::BoxBody>,
  766         -
                Error = ::std::convert::Infallible,
  767         -
            > + Clone
  768         -
            + Send
  769         -
            + 'static,
  770         -
        S::Future: Send + 'static,
  771         -
    {
  772         -
        self.http_query_params_only_operation =
  773         -
            Some(::aws_smithy_http_server::routing::Route::new(svc));
  774         -
        self
  775         -
    }
  776         -
  777    625   
    /// Sets the [`MapWithEnumKeyOp`](crate::operation_shape::MapWithEnumKeyOp) operation.
  778    626   
    ///
  779    627   
    /// This should be an async function satisfying the [`Handler`](::aws_smithy_http_server::operation::Handler) trait.
  780    628   
    /// See the [operation module documentation](::aws_smithy_http_server::operation) for more information.
  781    629   
    ///
  782    630   
    /// # Example
  783    631   
    ///
  784    632   
    /// ```no_run
  785    633   
    /// use rest_json_extras::{RestJsonExtras, RestJsonExtrasConfig};
  786    634   
    ///
@@ -1844,1692 +1909,1751 @@
 1864   1712   
            if self.enum_query.is_none() {
 1865   1713   
                missing_operation_names
 1866   1714   
                    .insert(crate::operation_shape::EnumQuery::ID, ".enum_query()");
 1867   1715   
            }
 1868   1716   
            if self.escaped_string_values.is_none() {
 1869   1717   
                missing_operation_names.insert(
 1870   1718   
                    crate::operation_shape::EscapedStringValues::ID,
 1871   1719   
                    ".escaped_string_values()",
 1872   1720   
                );
 1873   1721   
            }
 1874         -
            if self.http_query_params_only_operation.is_none() {
 1875         -
                missing_operation_names.insert(
 1876         -
                    crate::operation_shape::HttpQueryParamsOnlyOperation::ID,
 1877         -
                    ".http_query_params_only_operation()",
 1878         -
                );
 1879         -
            }
 1880   1722   
            if self.map_with_enum_key_op.is_none() {
 1881   1723   
                missing_operation_names.insert(
 1882   1724   
                    crate::operation_shape::MapWithEnumKeyOp::ID,
 1883   1725   
                    ".map_with_enum_key_op()",
 1884   1726   
                );
 1885   1727   
            }
 1886   1728   
            if self.null_in_non_sparse.is_none() {
 1887   1729   
                missing_operation_names.insert(
 1888   1730   
                    crate::operation_shape::NullInNonSparse::ID,
 1889   1731   
                    ".null_in_non_sparse()",
@@ -1918,1760 +1982,1819 @@
 1938   1780   
                        .expect(unexpected_error_msg),
 1939   1781   
                ),
 1940   1782   
                (
 1941   1783   
                    request_specs::enum_query(),
 1942   1784   
                    self.enum_query.expect(unexpected_error_msg),
 1943   1785   
                ),
 1944   1786   
                (
 1945   1787   
                    request_specs::escaped_string_values(),
 1946   1788   
                    self.escaped_string_values.expect(unexpected_error_msg),
 1947   1789   
                ),
 1948         -
                (
 1949         -
                    request_specs::http_query_params_only_operation(),
 1950         -
                    self.http_query_params_only_operation
 1951         -
                        .expect(unexpected_error_msg),
 1952         -
                ),
 1953   1790   
                (
 1954   1791   
                    request_specs::map_with_enum_key_op(),
 1955   1792   
                    self.map_with_enum_key_op.expect(unexpected_error_msg),
 1956   1793   
                ),
 1957   1794   
                (
 1958   1795   
                    request_specs::null_in_non_sparse(),
 1959   1796   
                    self.null_in_non_sparse.expect(unexpected_error_msg),
 1960   1797   
                ),
 1961   1798   
                (
 1962   1799   
                    request_specs::primitive_int_header(),
@@ -2013,1850 +2081,1909 @@
 2033   1870   
            ),
 2034   1871   
            (
 2035   1872   
                request_specs::escaped_string_values(),
 2036   1873   
                self.escaped_string_values.unwrap_or_else(|| {
 2037   1874   
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2038   1875   
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2039   1876   
                    >::default();
 2040   1877   
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2041   1878   
                }),
 2042   1879   
            ),
 2043         -
            (
 2044         -
                request_specs::http_query_params_only_operation(),
 2045         -
                self.http_query_params_only_operation.unwrap_or_else(|| {
 2046         -
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2047         -
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2048         -
                    >::default();
 2049         -
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2050         -
                }),
 2051         -
            ),
 2052   1880   
            (
 2053   1881   
                request_specs::map_with_enum_key_op(),
 2054   1882   
                self.map_with_enum_key_op.unwrap_or_else(|| {
 2055   1883   
                    let svc = ::aws_smithy_http_server::operation::MissingFailure::<
 2056   1884   
                        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
 2057   1885   
                    >::default();
 2058   1886   
                    ::aws_smithy_http_server::routing::Route::new(svc)
 2059   1887   
                }),
 2060   1888   
            ),
 2061   1889   
            (
@@ -2180,2008 +2254,2067 @@
 2200   2028   
    pub(super) fn escaped_string_values(
 2201   2029   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2202   2030   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2203   2031   
                    ::http_1x::Method::POST,
 2204   2032   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2205   2033   
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2206   2034   
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2207   2035   
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("escaped-string-values")),
 2208   2036   
]),
 2209   2037   
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2210         -
])
 2211         -
                        )
 2212         -
                    ),
 2213         -
                )
 2214         -
    }
 2215         -
    pub(super) fn http_query_params_only_operation(
 2216         -
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2217         -
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2218         -
                    ::http_1x::Method::GET,
 2219         -
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
 2220         -
                        ::aws_smithy_http_server::routing::request_spec::PathAndQuerySpec::new(
 2221         -
                            ::aws_smithy_http_server::routing::request_spec::PathSpec::from_vector_unchecked(vec![
 2222         -
    ::aws_smithy_http_server::routing::request_spec::PathSegment::Literal(String::from("http-query-params-only")),
 2223         -
]),
 2224         -
                            ::aws_smithy_http_server::routing::request_spec::QuerySpec::from_vector_unchecked(vec![
 2225   2038   
])
 2226   2039   
                        )
 2227   2040   
                    ),
 2228   2041   
                )
 2229   2042   
    }
 2230   2043   
    pub(super) fn map_with_enum_key_op(
 2231   2044   
    ) -> ::aws_smithy_http_server::routing::request_spec::RequestSpec {
 2232   2045   
        ::aws_smithy_http_server::routing::request_spec::RequestSpec::new(
 2233   2046   
                    ::http_1x::Method::POST,
 2234   2047   
                    ::aws_smithy_http_server::routing::request_spec::UriSpec::new(
@@ -2338,2151 +2437,2248 @@
 2358   2171   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 2359   2172   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 2360   2173   
    >(
 2361   2174   
        config: RestJsonExtrasConfig<L, HttpPl, ModelPl>,
 2362   2175   
    ) -> RestJsonExtrasBuilder<Body, L, HttpPl, ModelPl> {
 2363   2176   
        RestJsonExtrasBuilder {
 2364   2177   
            case_insensitive_error_operation: None,
 2365   2178   
            empty_struct_with_content_on_wire_op: None,
 2366   2179   
            enum_query: None,
 2367   2180   
            escaped_string_values: None,
 2368         -
            http_query_params_only_operation: None,
 2369   2181   
            map_with_enum_key_op: None,
 2370   2182   
            null_in_non_sparse: None,
 2371   2183   
            primitive_int_header: None,
 2372   2184   
            primitive_int_op: None,
 2373   2185   
            query_precedence: None,
 2374   2186   
            status_response: None,
 2375   2187   
            string_payload: None,
 2376   2188   
            layer: config.layers,
 2377   2189   
            http_plugin: config.http_plugins,
 2378   2190   
            model_plugin: config.model_plugins,
 2379   2191   
        }
 2380   2192   
    }
 2381   2193   
 2382   2194   
    /// Constructs a builder for [`RestJsonExtras`].
 2383   2195   
    /// You must specify what plugins should be applied to the operations in this service.
 2384   2196   
    ///
 2385   2197   
    /// Use [`RestJsonExtras::builder_without_plugins`] if you don't need to apply plugins.
 2386   2198   
    ///
 2387   2199   
    /// Check out [`HttpPlugins`](::aws_smithy_http_server::plugin::HttpPlugins) and
 2388   2200   
    /// [`ModelPlugins`](::aws_smithy_http_server::plugin::ModelPlugins) if you need to apply
 2389   2201   
    /// multiple plugins.
 2390   2202   
    #[deprecated(
 2391   2203   
        since = "0.57.0",
 2392   2204   
        note = "please use the `builder` constructor and register plugins on the `RestJsonExtrasConfig` object instead; see https://github.com/smithy-lang/smithy-rs/discussions/3096"
 2393   2205   
    )]
 2394   2206   
    pub fn builder_with_plugins<
 2395   2207   
        Body,
 2396   2208   
        HttpPl: ::aws_smithy_http_server::plugin::HttpMarker,
 2397   2209   
        ModelPl: ::aws_smithy_http_server::plugin::ModelMarker,
 2398   2210   
    >(
 2399   2211   
        http_plugin: HttpPl,
 2400   2212   
        model_plugin: ModelPl,
 2401   2213   
    ) -> RestJsonExtrasBuilder<Body, ::tower::layer::util::Identity, HttpPl, ModelPl> {
 2402   2214   
        RestJsonExtrasBuilder {
 2403   2215   
            case_insensitive_error_operation: None,
 2404   2216   
            empty_struct_with_content_on_wire_op: None,
 2405   2217   
            enum_query: None,
 2406   2218   
            escaped_string_values: None,
 2407         -
            http_query_params_only_operation: None,
 2408   2219   
            map_with_enum_key_op: None,
 2409   2220   
            null_in_non_sparse: None,
 2410   2221   
            primitive_int_header: None,
 2411   2222   
            primitive_int_op: None,
 2412   2223   
            query_precedence: None,
 2413   2224   
            status_response: None,
 2414   2225   
            string_payload: None,
 2415   2226   
            layer: ::tower::layer::util::Identity::new(),
 2416   2227   
            http_plugin,
 2417   2228   
            model_plugin,
@@ -2511,2322 +2615,2418 @@
 2531   2342   
}
 2532   2343   
 2533   2344   
/// An enumeration of all [operations](https://smithy.io/2.0/spec/service-types.html#operation) in RestJsonExtras.
 2534   2345   
#[allow(clippy::enum_variant_names)]
 2535   2346   
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
 2536   2347   
pub enum Operation {
 2537   2348   
    CaseInsensitiveErrorOperation,
 2538   2349   
    EmptyStructWithContentOnWireOp,
 2539   2350   
    EnumQuery,
 2540   2351   
    EscapedStringValues,
 2541         -
    HttpQueryParamsOnlyOperation,
 2542   2352   
    MapWithEnumKeyOp,
 2543   2353   
    NullInNonSparse,
 2544   2354   
    PrimitiveIntHeader,
 2545   2355   
    PrimitiveIntOp,
 2546   2356   
    QueryPrecedence,
 2547   2357   
    StatusResponse,
 2548   2358   
    StringPayload,
 2549   2359   
}
 2550   2360   
 2551   2361   
impl Operation {
 2552   2362   
    /// Returns the [operations](https://smithy.io/2.0/spec/service-types.html#operation) [`ShapeId`](::aws_smithy_http_server::shape_id::ShapeId).
 2553   2363   
    pub fn shape_id(&self) -> ::aws_smithy_http_server::shape_id::ShapeId {
 2554   2364   
        match self {
 2555   2365   
            Operation::CaseInsensitiveErrorOperation => {
 2556   2366   
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 2557   2367   
                    "aws.protocoltests.restjson#CaseInsensitiveErrorOperation",
 2558   2368   
                    "aws.protocoltests.restjson",
 2559   2369   
                    "CaseInsensitiveErrorOperation",
 2560   2370   
                )
 2561   2371   
            }
 2562   2372   
            Operation::EmptyStructWithContentOnWireOp => {
 2563   2373   
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 2564   2374   
                    "aws.protocoltests.restjson#EmptyStructWithContentOnWireOp",
 2565   2375   
                    "aws.protocoltests.restjson",
 2566   2376   
                    "EmptyStructWithContentOnWireOp",
 2567   2377   
                )
 2568   2378   
            }
 2569   2379   
            Operation::EnumQuery => ::aws_smithy_http_server::shape_id::ShapeId::new(
 2570   2380   
                "aws.protocoltests.restjson#EnumQuery",
 2571   2381   
                "aws.protocoltests.restjson",
 2572   2382   
                "EnumQuery",
 2573   2383   
            ),
 2574   2384   
            Operation::EscapedStringValues => ::aws_smithy_http_server::shape_id::ShapeId::new(
 2575   2385   
                "aws.protocoltests.restjson#EscapedStringValues",
 2576   2386   
                "aws.protocoltests.restjson",
 2577   2387   
                "EscapedStringValues",
 2578   2388   
            ),
 2579         -
            Operation::HttpQueryParamsOnlyOperation => {
 2580         -
                ::aws_smithy_http_server::shape_id::ShapeId::new(
 2581         -
                    "aws.protocoltests.restjson#HttpQueryParamsOnlyOperation",
 2582         -
                    "aws.protocoltests.restjson",
 2583         -
                    "HttpQueryParamsOnlyOperation",
 2584         -
                )
 2585         -
            }
 2586   2389   
            Operation::MapWithEnumKeyOp => ::aws_smithy_http_server::shape_id::ShapeId::new(
 2587   2390   
                "aws.protocoltests.restjson#MapWithEnumKeyOp",
 2588   2391   
                "aws.protocoltests.restjson",
 2589   2392   
                "MapWithEnumKeyOp",
 2590   2393   
            ),
 2591   2394   
            Operation::NullInNonSparse => ::aws_smithy_http_server::shape_id::ShapeId::new(
 2592   2395   
                "aws.protocoltests.restjson#NullInNonSparse",
 2593   2396   
                "aws.protocoltests.restjson",
 2594   2397   
                "NullInNonSparse",
 2595   2398   
            ),
@@ -2620,2423 +2686,2482 @@
 2640   2443   
{
 2641   2444   
    const VALUE: Operation = Operation::EnumQuery;
 2642   2445   
}
 2643   2446   
impl<L>
 2644   2447   
    ::aws_smithy_http_server::service::ContainsOperation<
 2645   2448   
        crate::operation_shape::EscapedStringValues,
 2646   2449   
    > for RestJsonExtras<L>
 2647   2450   
{
 2648   2451   
    const VALUE: Operation = Operation::EscapedStringValues;
 2649   2452   
}
 2650         -
impl<L>
 2651         -
    ::aws_smithy_http_server::service::ContainsOperation<
 2652         -
        crate::operation_shape::HttpQueryParamsOnlyOperation,
 2653         -
    > for RestJsonExtras<L>
 2654         -
{
 2655         -
    const VALUE: Operation = Operation::HttpQueryParamsOnlyOperation;
 2656         -
}
 2657   2453   
impl<L>
 2658   2454   
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::MapWithEnumKeyOp>
 2659   2455   
    for RestJsonExtras<L>
 2660   2456   
{
 2661   2457   
    const VALUE: Operation = Operation::MapWithEnumKeyOp;
 2662   2458   
}
 2663   2459   
impl<L>
 2664   2460   
    ::aws_smithy_http_server::service::ContainsOperation<crate::operation_shape::NullInNonSparse>
 2665   2461   
    for RestJsonExtras<L>
 2666   2462   
{
@@ -2891,2687 +2959,2746 @@
 2911   2707   
 2912   2708   
                        // EscapedStringValues match found, pop from both `member` and `not_member`
 2913   2709   
                        (@ $ name: ident, $ contains: ident (EscapedStringValues $($ member: ident)*) ($($ temp: ident)*) (EscapedStringValues $($ not_member: ident)*)) => {
 2914   2710   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 2915   2711   
                        };
 2916   2712   
                        // EscapedStringValues match not found, pop from `not_member` into `temp` stack
 2917   2713   
                        (@ $ name: ident, $ contains: ident (EscapedStringValues $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 2918   2714   
                            scope! { @ $ name, $ contains (EscapedStringValues $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 2919   2715   
                        };
 2920   2716   
 2921         -
                        // HttpQueryParamsOnlyOperation match found, pop from both `member` and `not_member`
 2922         -
                        (@ $ name: ident, $ contains: ident (HttpQueryParamsOnlyOperation $($ member: ident)*) ($($ temp: ident)*) (HttpQueryParamsOnlyOperation $($ not_member: ident)*)) => {
 2923         -
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 2924         -
                        };
 2925         -
                        // HttpQueryParamsOnlyOperation match not found, pop from `not_member` into `temp` stack
 2926         -
                        (@ $ name: ident, $ contains: ident (HttpQueryParamsOnlyOperation $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 2927         -
                            scope! { @ $ name, $ contains (HttpQueryParamsOnlyOperation $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 2928         -
                        };
 2929         -
 2930   2717   
                        // MapWithEnumKeyOp match found, pop from both `member` and `not_member`
 2931   2718   
                        (@ $ name: ident, $ contains: ident (MapWithEnumKeyOp $($ member: ident)*) ($($ temp: ident)*) (MapWithEnumKeyOp $($ not_member: ident)*)) => {
 2932   2719   
                            scope! { @ $ name, $ contains ($($ member)*) ($($ temp)*) ($($ not_member)*) }
 2933   2720   
                        };
 2934   2721   
                        // MapWithEnumKeyOp match not found, pop from `not_member` into `temp` stack
 2935   2722   
                        (@ $ name: ident, $ contains: ident (MapWithEnumKeyOp $($ member: ident)*) ($($ temp: ident)*) ($ other: ident $($ not_member: ident)*)) => {
 2936   2723   
                            scope! { @ $ name, $ contains (MapWithEnumKeyOp $($ member)*) ($ other $($ temp)*) ($($ not_member)*) }
 2937   2724   
                        };
 2938   2725   
 2939   2726   
                        // NullInNonSparse match found, pop from both `member` and `not_member`
@@ -2977,2764 +3026,2813 @@
 2997   2784   
                        }
 2998   2785   
                    ) => {
 2999   2786   
                        use $ crate::operation_shape::*;
 3000   2787   
                        $ crate::server::scope! {
 3001   2788   
                            $(#[$ attrs])*
 3002   2789   
                            $ vis struct $ name {
 3003   2790   
                                includes: [$($ include),*],
 3004   2791   
                                excludes: []
 3005   2792   
                            }
 3006   2793   
                        }
 3007         -
                        scope! { @ $ name, False ($($ include)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues HttpQueryParamsOnlyOperation MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
        2794  +
                        scope! { @ $ name, False ($($ include)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
 3008   2795   
                    };
 3009   2796   
                    (
 3010   2797   
                        $(#[$ attrs:meta])*
 3011   2798   
                        $ vis:vis struct $ name:ident {
 3012   2799   
                            excludes: [$($ exclude:ident),*]
 3013   2800   
                        }
 3014   2801   
                    ) => {
 3015   2802   
                        use $ crate::operation_shape::*;
 3016   2803   
 3017   2804   
                        $ crate::server::scope! {
 3018   2805   
                            $(#[$ attrs])*
 3019   2806   
                            $ vis struct $ name {
 3020   2807   
                                includes: [],
 3021   2808   
                                excludes: [$($ exclude),*]
 3022   2809   
                            }
 3023   2810   
                        }
 3024         -
                        scope! { @ $ name, True ($($ exclude)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues HttpQueryParamsOnlyOperation MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
        2811  +
                        scope! { @ $ name, True ($($ exclude)*) () (CaseInsensitiveErrorOperation EmptyStructWithContentOnWireOp EnumQuery EscapedStringValues MapWithEnumKeyOp NullInNonSparse PrimitiveIntHeader PrimitiveIntOp QueryPrecedence StatusResponse StringPayload) }
 3025   2812   
                    };
 3026   2813   
                }

tmp-codegen-diff/codegen-server-test/rest_json_validation-http0x/rust-server-codegen/src/constrained.rs

@@ -1,1 +192,192 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
pub(crate) mod pattern_map_override_constrained {
           3  +
pub(crate) mod enum_list_constrained {
    4      4   
    5      5   
    #[derive(Debug, Clone)]
    6         -
    pub(crate) struct PatternMapOverrideConstrained(
    7         -
        pub(crate)  std::collections::HashMap<
    8         -
            crate::model::pattern_map_override::Key,
    9         -
            crate::model::pattern_map_override::Value,
   10         -
        >,
           6  +
    pub(crate) struct EnumListConstrained(pub(crate) std::vec::Vec<crate::model::EnumString>);
           7  +
           8  +
    impl crate::constrained::Constrained for EnumListConstrained {
           9  +
        type Unconstrained = crate::unconstrained::enum_list_unconstrained::EnumListUnconstrained;
          10  +
    }
          11  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::EnumString>> for EnumListConstrained {
          12  +
        fn from(v: ::std::vec::Vec<crate::model::EnumString>) -> Self {
          13  +
            Self(v)
          14  +
        }
          15  +
    }
          16  +
          17  +
    impl ::std::convert::From<EnumListConstrained> for ::std::vec::Vec<crate::model::EnumString> {
          18  +
        fn from(v: EnumListConstrained) -> Self {
          19  +
            v.0
          20  +
        }
          21  +
    }
          22  +
}
          23  +
pub(crate) mod enum_map_constrained {
          24  +
          25  +
    #[derive(Debug, Clone)]
          26  +
    pub(crate) struct EnumMapConstrained(
          27  +
        pub(crate) std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
   11     28   
    );
   12     29   
   13         -
    impl crate::constrained::Constrained for PatternMapOverrideConstrained {
   14         -
        type Unconstrained = crate::unconstrained::pattern_map_override_unconstrained::PatternMapOverrideUnconstrained;
          30  +
    impl crate::constrained::Constrained for EnumMapConstrained {
          31  +
        type Unconstrained = crate::unconstrained::enum_map_unconstrained::EnumMapUnconstrained;
   15     32   
    }
   16     33   
    impl
   17     34   
        ::std::convert::From<
   18         -
            ::std::collections::HashMap<
   19         -
                crate::model::pattern_map_override::Key,
   20         -
                crate::model::pattern_map_override::Value,
   21         -
            >,
   22         -
        > for PatternMapOverrideConstrained
          35  +
            ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
          36  +
        > for EnumMapConstrained
   23     37   
    {
   24     38   
        fn from(
   25         -
            v: ::std::collections::HashMap<
   26         -
                crate::model::pattern_map_override::Key,
   27         -
                crate::model::pattern_map_override::Value,
   28         -
            >,
          39  +
            v: ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
   29     40   
        ) -> Self {
   30     41   
            Self(v)
   31     42   
        }
   32     43   
    }
   33     44   
   34         -
    impl ::std::convert::From<PatternMapOverrideConstrained>
   35         -
        for ::std::collections::HashMap<
   36         -
            crate::model::pattern_map_override::Key,
   37         -
            crate::model::pattern_map_override::Value,
   38         -
        >
          45  +
    impl ::std::convert::From<EnumMapConstrained>
          46  +
        for ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>
   39     47   
    {
   40         -
        fn from(v: PatternMapOverrideConstrained) -> Self {
          48  +
        fn from(v: EnumMapConstrained) -> Self {
   41     49   
            v.0
   42     50   
        }
   43     51   
    }
   44     52   
}
   45         -
pub(crate) mod pattern_list_override_constrained {
          53  +
pub(crate) mod pattern_list_constrained {
   46     54   
   47     55   
    #[derive(Debug, Clone)]
   48         -
    pub(crate) struct PatternListOverrideConstrained(
   49         -
        pub(crate) std::vec::Vec<crate::model::pattern_list_override::Member>,
   50         -
    );
          56  +
    pub(crate) struct PatternListConstrained(pub(crate) std::vec::Vec<crate::model::PatternString>);
   51     57   
   52         -
    impl crate::constrained::Constrained for PatternListOverrideConstrained {
   53         -
        type Unconstrained = crate::unconstrained::pattern_list_override_unconstrained::PatternListOverrideUnconstrained;
          58  +
    impl crate::constrained::Constrained for PatternListConstrained {
          59  +
        type Unconstrained =
          60  +
            crate::unconstrained::pattern_list_unconstrained::PatternListUnconstrained;
   54     61   
    }
   55         -
    impl ::std::convert::From<::std::vec::Vec<crate::model::pattern_list_override::Member>>
   56         -
        for PatternListOverrideConstrained
   57         -
    {
   58         -
        fn from(v: ::std::vec::Vec<crate::model::pattern_list_override::Member>) -> Self {
          62  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::PatternString>> for PatternListConstrained {
          63  +
        fn from(v: ::std::vec::Vec<crate::model::PatternString>) -> Self {
   59     64   
            Self(v)
   60     65   
        }
   61     66   
    }
   62     67   
   63         -
    impl ::std::convert::From<PatternListOverrideConstrained>
   64         -
        for ::std::vec::Vec<crate::model::pattern_list_override::Member>
   65         -
    {
   66         -
        fn from(v: PatternListOverrideConstrained) -> Self {
          68  +
    impl ::std::convert::From<PatternListConstrained> for ::std::vec::Vec<crate::model::PatternString> {
          69  +
        fn from(v: PatternListConstrained) -> Self {
   67     70   
            v.0
   68     71   
        }
   69     72   
    }
   70     73   
}
   71     74   
pub(crate) mod pattern_map_constrained {
   72     75   
   73     76   
    #[derive(Debug, Clone)]
   74     77   
    pub(crate) struct PatternMapConstrained(
   75     78   
        pub(crate) 
   76     79   
            std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
   77     80   
    );
   78     81   
   79     82   
    impl crate::constrained::Constrained for PatternMapConstrained {
   80     83   
        type Unconstrained =
   81     84   
            crate::unconstrained::pattern_map_unconstrained::PatternMapUnconstrained;
   82     85   
    }
   83     86   
    impl
   84     87   
        ::std::convert::From<
   85     88   
            ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>,
   86     89   
        > for PatternMapConstrained
   87     90   
    {
   88     91   
        fn from(
   89     92   
            v: ::std::collections::HashMap<
   90     93   
                crate::model::PatternString,
   91     94   
                crate::model::PatternString,
   92     95   
            >,
   93     96   
        ) -> Self {
   94     97   
            Self(v)
   95     98   
        }
   96     99   
    }
   97    100   
   98    101   
    impl ::std::convert::From<PatternMapConstrained>
   99    102   
        for ::std::collections::HashMap<crate::model::PatternString, crate::model::PatternString>
  100    103   
    {
  101    104   
        fn from(v: PatternMapConstrained) -> Self {
  102    105   
            v.0
  103    106   
        }
  104    107   
    }
  105    108   
}
  106         -
pub(crate) mod pattern_list_constrained {
         109  +
pub(crate) mod pattern_list_override_constrained {
  107    110   
  108    111   
    #[derive(Debug, Clone)]
  109         -
    pub(crate) struct PatternListConstrained(pub(crate) std::vec::Vec<crate::model::PatternString>);
         112  +
    pub(crate) struct PatternListOverrideConstrained(
         113  +
        pub(crate) std::vec::Vec<crate::model::pattern_list_override::Member>,
         114  +
    );
  110    115   
  111         -
    impl crate::constrained::Constrained for PatternListConstrained {
  112         -
        type Unconstrained =
  113         -
            crate::unconstrained::pattern_list_unconstrained::PatternListUnconstrained;
         116  +
    impl crate::constrained::Constrained for PatternListOverrideConstrained {
         117  +
        type Unconstrained = crate::unconstrained::pattern_list_override_unconstrained::PatternListOverrideUnconstrained;
  114    118   
    }
  115         -
    impl ::std::convert::From<::std::vec::Vec<crate::model::PatternString>> for PatternListConstrained {
  116         -
        fn from(v: ::std::vec::Vec<crate::model::PatternString>) -> Self {
         119  +
    impl ::std::convert::From<::std::vec::Vec<crate::model::pattern_list_override::Member>>
         120  +
        for PatternListOverrideConstrained
         121  +
    {
         122  +
        fn from(v: ::std::vec::Vec<crate::model::pattern_list_override::Member>) -> Self {
  117    123   
            Self(v)
  118    124   
        }
  119    125   
    }
  120    126   
  121         -
    impl ::std::convert::From<PatternListConstrained> for ::std::vec::Vec<crate::model::PatternString> {
  122         -
        fn from(v: PatternListConstrained) -> Self {
         127  +
    impl ::std::convert::From<PatternListOverrideConstrained>
         128  +
        for ::std::vec::Vec<crate::model::pattern_list_override::Member>
         129  +
    {
         130  +
        fn from(v: PatternListOverrideConstrained) -> Self {
  123    131   
            v.0
  124    132   
        }
  125    133   
    }
  126    134   
}
  127         -
pub(crate) mod enum_map_constrained {
         135  +
pub(crate) mod pattern_map_override_constrained {
  128    136   
  129    137   
    #[derive(Debug, Clone)]
  130         -
    pub(crate) struct EnumMapConstrained(
  131         -
        pub(crate) std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
         138  +
    pub(crate) struct PatternMapOverrideConstrained(
         139  +
        pub(crate)  std::collections::HashMap<
         140  +
            crate::model::pattern_map_override::Key,
         141  +
            crate::model::pattern_map_override::Value,
         142  +
        >,
  132    143   
    );
  133    144   
  134         -
    impl crate::constrained::Constrained for EnumMapConstrained {
  135         -
        type Unconstrained = crate::unconstrained::enum_map_unconstrained::EnumMapUnconstrained;
         145  +
    impl crate::constrained::Constrained for PatternMapOverrideConstrained {
         146  +
        type Unconstrained = crate::unconstrained::pattern_map_override_unconstrained::PatternMapOverrideUnconstrained;
  136    147   
    }
  137    148   
    impl
  138    149   
        ::std::convert::From<
  139         -
            ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
  140         -
        > for EnumMapConstrained
         150  +
            ::std::collections::HashMap<
         151  +
                crate::model::pattern_map_override::Key,
         152  +
                crate::model::pattern_map_override::Value,
         153  +
            >,
         154  +
        > for PatternMapOverrideConstrained
  141    155   
    {
  142    156   
        fn from(
  143         -
            v: ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>,
         157  +
            v: ::std::collections::HashMap<
         158  +
                crate::model::pattern_map_override::Key,
         159  +
                crate::model::pattern_map_override::Value,
         160  +
            >,
  144    161   
        ) -> Self {
  145    162   
            Self(v)
  146    163   
        }
  147    164   
    }
  148    165   
  149         -
    impl ::std::convert::From<EnumMapConstrained>
  150         -
        for ::std::collections::HashMap<crate::model::EnumString, crate::model::EnumString>
         166  +
    impl ::std::convert::From<PatternMapOverrideConstrained>
         167  +
        for ::std::collections::HashMap<
         168  +
            crate::model::pattern_map_override::Key,
         169  +
            crate::model::pattern_map_override::Value,
         170  +
        >
  151    171   
    {
  152         -
        fn from(v: EnumMapConstrained) -> Self {
  153         -
            v.0
  154         -
        }
  155         -
    }
  156         -
}
  157         -
pub(crate) mod enum_list_constrained {
  158         -
  159         -
    #[derive(Debug, Clone)]
  160         -
    pub(crate) struct EnumListConstrained(pub(crate) std::vec::Vec<crate::model::EnumString>);
  161         -
  162         -
    impl crate::constrained::Constrained for EnumListConstrained {
  163         -
        type Unconstrained = crate::unconstrained::enum_list_unconstrained::EnumListUnconstrained;
  164         -
    }
  165         -
    impl ::std::convert::From<::std::vec::Vec<crate::model::EnumString>> for EnumListConstrained {
  166         -
        fn from(v: ::std::vec::Vec<crate::model::EnumString>) -> Self {
  167         -
            Self(v)
  168         -
        }
  169         -
    }
  170         -
  171         -
    impl ::std::convert::From<EnumListConstrained> for ::std::vec::Vec<crate::model::EnumString> {
  172         -
        fn from(v: EnumListConstrained) -> Self {
         172  +
        fn from(v: PatternMapOverrideConstrained) -> Self {
  173    173   
            v.0
  174    174   
        }
  175    175   
    }
  176    176   
}
  177    177   
  178    178   
/*
  179    179   
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  180    180   
 * SPDX-License-Identifier: Apache-2.0
  181    181   
 */
  182    182   

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

@@ -1,1 +571,571 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Error type for the `SensitiveValidation` operation.
    3         -
/// Each variant represents an error that can occur for the `SensitiveValidation` operation.
           2  +
/// Error type for the `MalformedEnum` operation.
           3  +
/// Each variant represents an error that can occur for the `MalformedEnum` operation.
    4      4   
#[derive(::std::fmt::Debug)]
    5         -
pub enum SensitiveValidationError {
           5  +
pub enum MalformedEnumError {
    6      6   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
    7      7   
    ValidationException(crate::error::ValidationException),
    8      8   
}
    9         -
impl ::std::fmt::Display for SensitiveValidationError {
           9  +
impl ::std::fmt::Display for MalformedEnumError {
   10     10   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   11     11   
        match &self {
   12         -
            SensitiveValidationError::ValidationException(_inner) => _inner.fmt(f),
          12  +
            MalformedEnumError::ValidationException(_inner) => _inner.fmt(f),
   13     13   
        }
   14     14   
    }
   15     15   
}
   16         -
impl SensitiveValidationError {
   17         -
    /// Returns `true` if the error kind is `SensitiveValidationError::ValidationException`.
          16  +
impl MalformedEnumError {
          17  +
    /// Returns `true` if the error kind is `MalformedEnumError::ValidationException`.
   18     18   
    pub fn is_validation_exception(&self) -> bool {
   19         -
        matches!(&self, SensitiveValidationError::ValidationException(_))
          19  +
        matches!(&self, MalformedEnumError::ValidationException(_))
   20     20   
    }
   21     21   
    /// Returns the error name string by matching the correct variant.
   22     22   
    pub fn name(&self) -> &'static str {
   23     23   
        match &self {
   24         -
            SensitiveValidationError::ValidationException(_inner) => _inner.name(),
          24  +
            MalformedEnumError::ValidationException(_inner) => _inner.name(),
   25     25   
        }
   26     26   
    }
   27     27   
}
   28         -
impl ::std::error::Error for SensitiveValidationError {
          28  +
impl ::std::error::Error for MalformedEnumError {
   29     29   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   30     30   
        match &self {
   31         -
            SensitiveValidationError::ValidationException(_inner) => Some(_inner),
          31  +
            MalformedEnumError::ValidationException(_inner) => Some(_inner),
   32     32   
        }
   33     33   
    }
   34     34   
}
   35         -
impl ::std::convert::From<crate::error::ValidationException>
   36         -
    for crate::error::SensitiveValidationError
   37         -
{
   38         -
    fn from(variant: crate::error::ValidationException) -> crate::error::SensitiveValidationError {
          35  +
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MalformedEnumError {
          36  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedEnumError {
   39     37   
        Self::ValidationException(variant)
   40     38   
    }
   41     39   
}
   42     40   
   43         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
   44         -
#[derive(
   45         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   46         -
)]
   47         -
pub struct ValidationException {
   48         -
    /// A summary of the validation failure.
   49         -
    pub message: ::std::string::String,
   50         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   51         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
          41  +
/// Error type for the `MalformedLength` operation.
          42  +
/// Each variant represents an error that can occur for the `MalformedLength` operation.
          43  +
#[derive(::std::fmt::Debug)]
          44  +
pub enum MalformedLengthError {
          45  +
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          46  +
    ValidationException(crate::error::ValidationException),
   52     47   
}
   53         -
impl ValidationException {
   54         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   55         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
   56         -
        self.field_list.as_deref()
          48  +
impl ::std::fmt::Display for MalformedLengthError {
          49  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          50  +
        match &self {
          51  +
            MalformedLengthError::ValidationException(_inner) => _inner.fmt(f),
          52  +
        }
   57     53   
    }
   58     54   
}
   59         -
impl ValidationException {
   60         -
    /// Returns the error message.
   61         -
    pub fn message(&self) -> &str {
   62         -
        &self.message
          55  +
impl MalformedLengthError {
          56  +
    /// Returns `true` if the error kind is `MalformedLengthError::ValidationException`.
          57  +
    pub fn is_validation_exception(&self) -> bool {
          58  +
        matches!(&self, MalformedLengthError::ValidationException(_))
   63     59   
    }
   64         -
    #[doc(hidden)]
   65         -
    /// Returns the error name.
          60  +
    /// Returns the error name string by matching the correct variant.
   66     61   
    pub fn name(&self) -> &'static str {
   67         -
        "ValidationException"
          62  +
        match &self {
          63  +
            MalformedLengthError::ValidationException(_inner) => _inner.name(),
          64  +
        }
   68     65   
    }
   69     66   
}
   70         -
impl ::std::fmt::Display for ValidationException {
   71         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   72         -
        ::std::write!(f, "ValidationException")?;
   73         -
        {
   74         -
            ::std::write!(f, ": {}", &self.message)?;
          67  +
impl ::std::error::Error for MalformedLengthError {
          68  +
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          69  +
        match &self {
          70  +
            MalformedLengthError::ValidationException(_inner) => Some(_inner),
   75     71   
        }
   76         -
        Ok(())
   77     72   
    }
   78     73   
}
   79         -
impl ::std::error::Error for ValidationException {}
   80         -
impl ValidationException {
   81         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
   82         -
    pub fn builder() -> crate::error::validation_exception::Builder {
   83         -
        crate::error::validation_exception::Builder::default()
          74  +
impl ::std::convert::From<crate::error::ValidationException>
          75  +
    for crate::error::MalformedLengthError
          76  +
{
          77  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedLengthError {
          78  +
        Self::ValidationException(variant)
   84     79   
    }
   85     80   
}
   86     81   
   87         -
/// Error type for the `RecursiveStructures` operation.
   88         -
/// Each variant represents an error that can occur for the `RecursiveStructures` operation.
          82  +
/// Error type for the `MalformedLengthOverride` operation.
          83  +
/// Each variant represents an error that can occur for the `MalformedLengthOverride` operation.
   89     84   
#[derive(::std::fmt::Debug)]
   90         -
pub enum RecursiveStructuresError {
          85  +
pub enum MalformedLengthOverrideError {
   91     86   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
   92     87   
    ValidationException(crate::error::ValidationException),
   93     88   
}
   94         -
impl ::std::fmt::Display for RecursiveStructuresError {
          89  +
impl ::std::fmt::Display for MalformedLengthOverrideError {
   95     90   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   96     91   
        match &self {
   97         -
            RecursiveStructuresError::ValidationException(_inner) => _inner.fmt(f),
          92  +
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.fmt(f),
   98     93   
        }
   99     94   
    }
  100     95   
}
  101         -
impl RecursiveStructuresError {
  102         -
    /// Returns `true` if the error kind is `RecursiveStructuresError::ValidationException`.
          96  +
impl MalformedLengthOverrideError {
          97  +
    /// Returns `true` if the error kind is `MalformedLengthOverrideError::ValidationException`.
  103     98   
    pub fn is_validation_exception(&self) -> bool {
  104         -
        matches!(&self, RecursiveStructuresError::ValidationException(_))
          99  +
        matches!(&self, MalformedLengthOverrideError::ValidationException(_))
  105    100   
    }
  106    101   
    /// Returns the error name string by matching the correct variant.
  107    102   
    pub fn name(&self) -> &'static str {
  108    103   
        match &self {
  109         -
            RecursiveStructuresError::ValidationException(_inner) => _inner.name(),
         104  +
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.name(),
  110    105   
        }
  111    106   
    }
  112    107   
}
  113         -
impl ::std::error::Error for RecursiveStructuresError {
         108  +
impl ::std::error::Error for MalformedLengthOverrideError {
  114    109   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  115    110   
        match &self {
  116         -
            RecursiveStructuresError::ValidationException(_inner) => Some(_inner),
         111  +
            MalformedLengthOverrideError::ValidationException(_inner) => Some(_inner),
  117    112   
        }
  118    113   
    }
  119    114   
}
  120    115   
impl ::std::convert::From<crate::error::ValidationException>
  121         -
    for crate::error::RecursiveStructuresError
         116  +
    for crate::error::MalformedLengthOverrideError
  122    117   
{
  123         -
    fn from(variant: crate::error::ValidationException) -> crate::error::RecursiveStructuresError {
         118  +
    fn from(
         119  +
        variant: crate::error::ValidationException,
         120  +
    ) -> crate::error::MalformedLengthOverrideError {
  124    121   
        Self::ValidationException(variant)
  125    122   
    }
  126    123   
}
  127    124   
  128         -
/// Error type for the `MalformedUniqueItems` operation.
  129         -
/// Each variant represents an error that can occur for the `MalformedUniqueItems` operation.
         125  +
/// Error type for the `MalformedLengthQueryString` operation.
         126  +
/// Each variant represents an error that can occur for the `MalformedLengthQueryString` operation.
  130    127   
#[derive(::std::fmt::Debug)]
  131         -
pub enum MalformedUniqueItemsError {
         128  +
pub enum MalformedLengthQueryStringError {
  132    129   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  133    130   
    ValidationException(crate::error::ValidationException),
  134    131   
}
  135         -
impl ::std::fmt::Display for MalformedUniqueItemsError {
         132  +
impl ::std::fmt::Display for MalformedLengthQueryStringError {
  136    133   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  137    134   
        match &self {
  138         -
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.fmt(f),
         135  +
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.fmt(f),
  139    136   
        }
  140    137   
    }
  141    138   
}
  142         -
impl MalformedUniqueItemsError {
  143         -
    /// Returns `true` if the error kind is `MalformedUniqueItemsError::ValidationException`.
         139  +
impl MalformedLengthQueryStringError {
         140  +
    /// Returns `true` if the error kind is `MalformedLengthQueryStringError::ValidationException`.
  144    141   
    pub fn is_validation_exception(&self) -> bool {
  145         -
        matches!(&self, MalformedUniqueItemsError::ValidationException(_))
         142  +
        matches!(
         143  +
            &self,
         144  +
            MalformedLengthQueryStringError::ValidationException(_)
         145  +
        )
  146    146   
    }
  147    147   
    /// Returns the error name string by matching the correct variant.
  148    148   
    pub fn name(&self) -> &'static str {
  149    149   
        match &self {
  150         -
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.name(),
         150  +
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.name(),
  151    151   
        }
  152    152   
    }
  153    153   
}
  154         -
impl ::std::error::Error for MalformedUniqueItemsError {
         154  +
impl ::std::error::Error for MalformedLengthQueryStringError {
  155    155   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  156    156   
        match &self {
  157         -
            MalformedUniqueItemsError::ValidationException(_inner) => Some(_inner),
         157  +
            MalformedLengthQueryStringError::ValidationException(_inner) => Some(_inner),
  158    158   
        }
  159    159   
    }
  160    160   
}
  161    161   
impl ::std::convert::From<crate::error::ValidationException>
  162         -
    for crate::error::MalformedUniqueItemsError
         162  +
    for crate::error::MalformedLengthQueryStringError
  163    163   
{
  164         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedUniqueItemsError {
         164  +
    fn from(
         165  +
        variant: crate::error::ValidationException,
         166  +
    ) -> crate::error::MalformedLengthQueryStringError {
  165    167   
        Self::ValidationException(variant)
  166    168   
    }
  167    169   
}
  168    170   
  169         -
/// Error type for the `MalformedRequired` operation.
  170         -
/// Each variant represents an error that can occur for the `MalformedRequired` operation.
         171  +
/// Error type for the `MalformedPattern` operation.
         172  +
/// Each variant represents an error that can occur for the `MalformedPattern` operation.
  171    173   
#[derive(::std::fmt::Debug)]
  172         -
pub enum MalformedRequiredError {
         174  +
pub enum MalformedPatternError {
  173    175   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  174    176   
    ValidationException(crate::error::ValidationException),
  175    177   
}
  176         -
impl ::std::fmt::Display for MalformedRequiredError {
         178  +
impl ::std::fmt::Display for MalformedPatternError {
  177    179   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  178    180   
        match &self {
  179         -
            MalformedRequiredError::ValidationException(_inner) => _inner.fmt(f),
         181  +
            MalformedPatternError::ValidationException(_inner) => _inner.fmt(f),
  180    182   
        }
  181    183   
    }
  182    184   
}
  183         -
impl MalformedRequiredError {
  184         -
    /// Returns `true` if the error kind is `MalformedRequiredError::ValidationException`.
         185  +
impl MalformedPatternError {
         186  +
    /// Returns `true` if the error kind is `MalformedPatternError::ValidationException`.
  185    187   
    pub fn is_validation_exception(&self) -> bool {
  186         -
        matches!(&self, MalformedRequiredError::ValidationException(_))
         188  +
        matches!(&self, MalformedPatternError::ValidationException(_))
  187    189   
    }
  188    190   
    /// Returns the error name string by matching the correct variant.
  189    191   
    pub fn name(&self) -> &'static str {
  190    192   
        match &self {
  191         -
            MalformedRequiredError::ValidationException(_inner) => _inner.name(),
         193  +
            MalformedPatternError::ValidationException(_inner) => _inner.name(),
  192    194   
        }
  193    195   
    }
  194    196   
}
  195         -
impl ::std::error::Error for MalformedRequiredError {
         197  +
impl ::std::error::Error for MalformedPatternError {
  196    198   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  197    199   
        match &self {
  198         -
            MalformedRequiredError::ValidationException(_inner) => Some(_inner),
         200  +
            MalformedPatternError::ValidationException(_inner) => Some(_inner),
  199    201   
        }
  200    202   
    }
  201    203   
}
  202    204   
impl ::std::convert::From<crate::error::ValidationException>
  203         -
    for crate::error::MalformedRequiredError
         205  +
    for crate::error::MalformedPatternError
  204    206   
{
  205         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedRequiredError {
         207  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedPatternError {
  206    208   
        Self::ValidationException(variant)
  207    209   
    }
  208    210   
}
  209    211   
  210         -
/// Error type for the `MalformedRangeOverride` operation.
  211         -
/// Each variant represents an error that can occur for the `MalformedRangeOverride` operation.
         212  +
/// Error type for the `MalformedPatternOverride` operation.
         213  +
/// Each variant represents an error that can occur for the `MalformedPatternOverride` operation.
  212    214   
#[derive(::std::fmt::Debug)]
  213         -
pub enum MalformedRangeOverrideError {
         215  +
pub enum MalformedPatternOverrideError {
  214    216   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  215    217   
    ValidationException(crate::error::ValidationException),
  216    218   
}
  217         -
impl ::std::fmt::Display for MalformedRangeOverrideError {
         219  +
impl ::std::fmt::Display for MalformedPatternOverrideError {
  218    220   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  219    221   
        match &self {
  220         -
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.fmt(f),
         222  +
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.fmt(f),
  221    223   
        }
  222    224   
    }
  223    225   
}
  224         -
impl MalformedRangeOverrideError {
  225         -
    /// Returns `true` if the error kind is `MalformedRangeOverrideError::ValidationException`.
         226  +
impl MalformedPatternOverrideError {
         227  +
    /// Returns `true` if the error kind is `MalformedPatternOverrideError::ValidationException`.
  226    228   
    pub fn is_validation_exception(&self) -> bool {
  227         -
        matches!(&self, MalformedRangeOverrideError::ValidationException(_))
         229  +
        matches!(&self, MalformedPatternOverrideError::ValidationException(_))
  228    230   
    }
  229    231   
    /// Returns the error name string by matching the correct variant.
  230    232   
    pub fn name(&self) -> &'static str {
  231    233   
        match &self {
  232         -
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.name(),
         234  +
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.name(),
  233    235   
        }
  234    236   
    }
  235    237   
}
  236         -
impl ::std::error::Error for MalformedRangeOverrideError {
         238  +
impl ::std::error::Error for MalformedPatternOverrideError {
  237    239   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  238    240   
        match &self {
  239         -
            MalformedRangeOverrideError::ValidationException(_inner) => Some(_inner),
         241  +
            MalformedPatternOverrideError::ValidationException(_inner) => Some(_inner),
  240    242   
        }
  241    243   
    }
  242    244   
}
  243    245   
impl ::std::convert::From<crate::error::ValidationException>
  244         -
    for crate::error::MalformedRangeOverrideError
         246  +
    for crate::error::MalformedPatternOverrideError
  245    247   
{
  246    248   
    fn from(
  247    249   
        variant: crate::error::ValidationException,
  248         -
    ) -> crate::error::MalformedRangeOverrideError {
         250  +
    ) -> crate::error::MalformedPatternOverrideError {
  249    251   
        Self::ValidationException(variant)
  250    252   
    }
  251    253   
}
  252    254   
  253    255   
/// Error type for the `MalformedRange` operation.
  254    256   
/// Each variant represents an error that can occur for the `MalformedRange` operation.
  255    257   
#[derive(::std::fmt::Debug)]
  256    258   
pub enum MalformedRangeError {
  257    259   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  258    260   
    ValidationException(crate::error::ValidationException),
  259    261   
}
  260    262   
impl ::std::fmt::Display for MalformedRangeError {
  261    263   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  262    264   
        match &self {
  263    265   
            MalformedRangeError::ValidationException(_inner) => _inner.fmt(f),
  264    266   
        }
  265    267   
    }
  266    268   
}
  267    269   
impl MalformedRangeError {
  268    270   
    /// Returns `true` if the error kind is `MalformedRangeError::ValidationException`.
  269    271   
    pub fn is_validation_exception(&self) -> bool {
  270    272   
        matches!(&self, MalformedRangeError::ValidationException(_))
  271    273   
    }
  272    274   
    /// Returns the error name string by matching the correct variant.
  273    275   
    pub fn name(&self) -> &'static str {
  274    276   
        match &self {
  275    277   
            MalformedRangeError::ValidationException(_inner) => _inner.name(),
  276    278   
        }
  277    279   
    }
  278    280   
}
  279    281   
impl ::std::error::Error for MalformedRangeError {
  280    282   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  281    283   
        match &self {
  282    284   
            MalformedRangeError::ValidationException(_inner) => Some(_inner),
  283    285   
        }
  284    286   
    }
  285    287   
}
  286    288   
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MalformedRangeError {
  287    289   
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedRangeError {
  288    290   
        Self::ValidationException(variant)
  289    291   
    }
  290    292   
}
  291    293   
  292         -
/// Error type for the `MalformedPatternOverride` operation.
  293         -
/// Each variant represents an error that can occur for the `MalformedPatternOverride` operation.
         294  +
/// Error type for the `MalformedRangeOverride` operation.
         295  +
/// Each variant represents an error that can occur for the `MalformedRangeOverride` operation.
  294    296   
#[derive(::std::fmt::Debug)]
  295         -
pub enum MalformedPatternOverrideError {
         297  +
pub enum MalformedRangeOverrideError {
  296    298   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  297    299   
    ValidationException(crate::error::ValidationException),
  298    300   
}
  299         -
impl ::std::fmt::Display for MalformedPatternOverrideError {
         301  +
impl ::std::fmt::Display for MalformedRangeOverrideError {
  300    302   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  301    303   
        match &self {
  302         -
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.fmt(f),
         304  +
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.fmt(f),
  303    305   
        }
  304    306   
    }
  305    307   
}
  306         -
impl MalformedPatternOverrideError {
  307         -
    /// Returns `true` if the error kind is `MalformedPatternOverrideError::ValidationException`.
         308  +
impl MalformedRangeOverrideError {
         309  +
    /// Returns `true` if the error kind is `MalformedRangeOverrideError::ValidationException`.
  308    310   
    pub fn is_validation_exception(&self) -> bool {
  309         -
        matches!(&self, MalformedPatternOverrideError::ValidationException(_))
         311  +
        matches!(&self, MalformedRangeOverrideError::ValidationException(_))
  310    312   
    }
  311    313   
    /// Returns the error name string by matching the correct variant.
  312    314   
    pub fn name(&self) -> &'static str {
  313    315   
        match &self {
  314         -
            MalformedPatternOverrideError::ValidationException(_inner) => _inner.name(),
         316  +
            MalformedRangeOverrideError::ValidationException(_inner) => _inner.name(),
  315    317   
        }
  316    318   
    }
  317    319   
}
  318         -
impl ::std::error::Error for MalformedPatternOverrideError {
         320  +
impl ::std::error::Error for MalformedRangeOverrideError {
  319    321   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  320    322   
        match &self {
  321         -
            MalformedPatternOverrideError::ValidationException(_inner) => Some(_inner),
         323  +
            MalformedRangeOverrideError::ValidationException(_inner) => Some(_inner),
  322    324   
        }
  323    325   
    }
  324    326   
}
  325    327   
impl ::std::convert::From<crate::error::ValidationException>
  326         -
    for crate::error::MalformedPatternOverrideError
         328  +
    for crate::error::MalformedRangeOverrideError
  327    329   
{
  328    330   
    fn from(
  329    331   
        variant: crate::error::ValidationException,
  330         -
    ) -> crate::error::MalformedPatternOverrideError {
         332  +
    ) -> crate::error::MalformedRangeOverrideError {
  331    333   
        Self::ValidationException(variant)
  332    334   
    }
  333    335   
}
  334    336   
  335         -
/// Error type for the `MalformedPattern` operation.
  336         -
/// Each variant represents an error that can occur for the `MalformedPattern` operation.
         337  +
/// Error type for the `MalformedRequired` operation.
         338  +
/// Each variant represents an error that can occur for the `MalformedRequired` operation.
  337    339   
#[derive(::std::fmt::Debug)]
  338         -
pub enum MalformedPatternError {
         340  +
pub enum MalformedRequiredError {
  339    341   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  340    342   
    ValidationException(crate::error::ValidationException),
  341    343   
}
  342         -
impl ::std::fmt::Display for MalformedPatternError {
         344  +
impl ::std::fmt::Display for MalformedRequiredError {
  343    345   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  344    346   
        match &self {
  345         -
            MalformedPatternError::ValidationException(_inner) => _inner.fmt(f),
         347  +
            MalformedRequiredError::ValidationException(_inner) => _inner.fmt(f),
  346    348   
        }
  347    349   
    }
  348    350   
}
  349         -
impl MalformedPatternError {
  350         -
    /// Returns `true` if the error kind is `MalformedPatternError::ValidationException`.
         351  +
impl MalformedRequiredError {
         352  +
    /// Returns `true` if the error kind is `MalformedRequiredError::ValidationException`.
  351    353   
    pub fn is_validation_exception(&self) -> bool {
  352         -
        matches!(&self, MalformedPatternError::ValidationException(_))
         354  +
        matches!(&self, MalformedRequiredError::ValidationException(_))
  353    355   
    }
  354    356   
    /// Returns the error name string by matching the correct variant.
  355    357   
    pub fn name(&self) -> &'static str {
  356    358   
        match &self {
  357         -
            MalformedPatternError::ValidationException(_inner) => _inner.name(),
         359  +
            MalformedRequiredError::ValidationException(_inner) => _inner.name(),
  358    360   
        }
  359    361   
    }
  360    362   
}
  361         -
impl ::std::error::Error for MalformedPatternError {
         363  +
impl ::std::error::Error for MalformedRequiredError {
  362    364   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  363    365   
        match &self {
  364         -
            MalformedPatternError::ValidationException(_inner) => Some(_inner),
         366  +
            MalformedRequiredError::ValidationException(_inner) => Some(_inner),
  365    367   
        }
  366    368   
    }
  367    369   
}
  368    370   
impl ::std::convert::From<crate::error::ValidationException>
  369         -
    for crate::error::MalformedPatternError
         371  +
    for crate::error::MalformedRequiredError
  370    372   
{
  371         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedPatternError {
         373  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedRequiredError {
  372    374   
        Self::ValidationException(variant)
  373    375   
    }
  374    376   
}
  375    377   
  376         -
/// Error type for the `MalformedLengthQueryString` operation.
  377         -
/// Each variant represents an error that can occur for the `MalformedLengthQueryString` operation.
         378  +
/// Error type for the `MalformedUniqueItems` operation.
         379  +
/// Each variant represents an error that can occur for the `MalformedUniqueItems` operation.
  378    380   
#[derive(::std::fmt::Debug)]
  379         -
pub enum MalformedLengthQueryStringError {
         381  +
pub enum MalformedUniqueItemsError {
  380    382   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  381    383   
    ValidationException(crate::error::ValidationException),
  382    384   
}
  383         -
impl ::std::fmt::Display for MalformedLengthQueryStringError {
         385  +
impl ::std::fmt::Display for MalformedUniqueItemsError {
  384    386   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  385    387   
        match &self {
  386         -
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.fmt(f),
         388  +
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.fmt(f),
  387    389   
        }
  388    390   
    }
  389    391   
}
  390         -
impl MalformedLengthQueryStringError {
  391         -
    /// Returns `true` if the error kind is `MalformedLengthQueryStringError::ValidationException`.
         392  +
impl MalformedUniqueItemsError {
         393  +
    /// Returns `true` if the error kind is `MalformedUniqueItemsError::ValidationException`.
  392    394   
    pub fn is_validation_exception(&self) -> bool {
  393         -
        matches!(
  394         -
            &self,
  395         -
            MalformedLengthQueryStringError::ValidationException(_)
  396         -
        )
         395  +
        matches!(&self, MalformedUniqueItemsError::ValidationException(_))
  397    396   
    }
  398    397   
    /// Returns the error name string by matching the correct variant.
  399    398   
    pub fn name(&self) -> &'static str {
  400    399   
        match &self {
  401         -
            MalformedLengthQueryStringError::ValidationException(_inner) => _inner.name(),
         400  +
            MalformedUniqueItemsError::ValidationException(_inner) => _inner.name(),
  402    401   
        }
  403    402   
    }
  404    403   
}
  405         -
impl ::std::error::Error for MalformedLengthQueryStringError {
         404  +
impl ::std::error::Error for MalformedUniqueItemsError {
  406    405   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  407    406   
        match &self {
  408         -
            MalformedLengthQueryStringError::ValidationException(_inner) => Some(_inner),
         407  +
            MalformedUniqueItemsError::ValidationException(_inner) => Some(_inner),
  409    408   
        }
  410    409   
    }
  411    410   
}
  412    411   
impl ::std::convert::From<crate::error::ValidationException>
  413         -
    for crate::error::MalformedLengthQueryStringError
         412  +
    for crate::error::MalformedUniqueItemsError
  414    413   
{
  415         -
    fn from(
  416         -
        variant: crate::error::ValidationException,
  417         -
    ) -> crate::error::MalformedLengthQueryStringError {
         414  +
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedUniqueItemsError {
  418    415   
        Self::ValidationException(variant)
  419    416   
    }
  420    417   
}
  421    418   
  422         -
/// Error type for the `MalformedLengthOverride` operation.
  423         -
/// Each variant represents an error that can occur for the `MalformedLengthOverride` operation.
         419  +
/// Error type for the `RecursiveStructures` operation.
         420  +
/// Each variant represents an error that can occur for the `RecursiveStructures` operation.
  424    421   
#[derive(::std::fmt::Debug)]
  425         -
pub enum MalformedLengthOverrideError {
         422  +
pub enum RecursiveStructuresError {
  426    423   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  427    424   
    ValidationException(crate::error::ValidationException),
  428    425   
}
  429         -
impl ::std::fmt::Display for MalformedLengthOverrideError {
         426  +
impl ::std::fmt::Display for RecursiveStructuresError {
  430    427   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  431    428   
        match &self {
  432         -
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.fmt(f),
         429  +
            RecursiveStructuresError::ValidationException(_inner) => _inner.fmt(f),
  433    430   
        }
  434    431   
    }
  435    432   
}
  436         -
impl MalformedLengthOverrideError {
  437         -
    /// Returns `true` if the error kind is `MalformedLengthOverrideError::ValidationException`.
         433  +
impl RecursiveStructuresError {
         434  +
    /// Returns `true` if the error kind is `RecursiveStructuresError::ValidationException`.
  438    435   
    pub fn is_validation_exception(&self) -> bool {
  439         -
        matches!(&self, MalformedLengthOverrideError::ValidationException(_))
         436  +
        matches!(&self, RecursiveStructuresError::ValidationException(_))
  440    437   
    }
  441    438   
    /// Returns the error name string by matching the correct variant.
  442    439   
    pub fn name(&self) -> &'static str {
  443    440   
        match &self {
  444         -
            MalformedLengthOverrideError::ValidationException(_inner) => _inner.name(),
         441  +
            RecursiveStructuresError::ValidationException(_inner) => _inner.name(),
  445    442   
        }
  446    443   
    }
  447    444   
}
  448         -
impl ::std::error::Error for MalformedLengthOverrideError {
         445  +
impl ::std::error::Error for RecursiveStructuresError {
  449    446   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  450    447   
        match &self {
  451         -
            MalformedLengthOverrideError::ValidationException(_inner) => Some(_inner),
         448  +
            RecursiveStructuresError::ValidationException(_inner) => Some(_inner),
  452    449   
        }
  453    450   
    }
  454    451   
}
  455    452   
impl ::std::convert::From<crate::error::ValidationException>
  456         -
    for crate::error::MalformedLengthOverrideError
         453  +
    for crate::error::RecursiveStructuresError
  457    454   
{
  458         -
    fn from(
  459         -
        variant: crate::error::ValidationException,
  460         -
    ) -> crate::error::MalformedLengthOverrideError {
         455  +
    fn from(variant: crate::error::ValidationException) -> crate::error::RecursiveStructuresError {
  461    456   
        Self::ValidationException(variant)
  462    457   
    }
  463    458   
}
  464    459   
  465         -
/// Error type for the `MalformedLength` operation.
  466         -
/// Each variant represents an error that can occur for the `MalformedLength` operation.
         460  +
/// Error type for the `SensitiveValidation` operation.
         461  +
/// Each variant represents an error that can occur for the `SensitiveValidation` operation.
  467    462   
#[derive(::std::fmt::Debug)]
  468         -
pub enum MalformedLengthError {
         463  +
pub enum SensitiveValidationError {
  469    464   
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  470    465   
    ValidationException(crate::error::ValidationException),
  471    466   
}
  472         -
impl ::std::fmt::Display for MalformedLengthError {
         467  +
impl ::std::fmt::Display for SensitiveValidationError {
  473    468   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  474    469   
        match &self {
  475         -
            MalformedLengthError::ValidationException(_inner) => _inner.fmt(f),
         470  +
            SensitiveValidationError::ValidationException(_inner) => _inner.fmt(f),
  476    471   
        }
  477    472   
    }
  478    473   
}
  479         -
impl MalformedLengthError {
  480         -
    /// Returns `true` if the error kind is `MalformedLengthError::ValidationException`.
         474  +
impl SensitiveValidationError {
         475  +
    /// Returns `true` if the error kind is `SensitiveValidationError::ValidationException`.
  481    476   
    pub fn is_validation_exception(&self) -> bool {
  482         -
        matches!(&self, MalformedLengthError::ValidationException(_))
         477  +
        matches!(&self, SensitiveValidationError::ValidationException(_))
  483    478   
    }
  484    479   
    /// Returns the error name string by matching the correct variant.
  485    480   
    pub fn name(&self) -> &'static str {
  486    481   
        match &self {
  487         -
            MalformedLengthError::ValidationException(_inner) => _inner.name(),
         482  +
            SensitiveValidationError::ValidationException(_inner) => _inner.name(),
  488    483   
        }
  489    484   
    }
  490    485   
}
  491         -
impl ::std::error::Error for MalformedLengthError {
         486  +
impl ::std::error::Error for SensitiveValidationError {
  492    487   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  493    488   
        match &self {
  494         -
            MalformedLengthError::ValidationException(_inner) => Some(_inner),
         489  +
            SensitiveValidationError::ValidationException(_inner) => Some(_inner),
  495    490   
        }
  496    491   
    }
  497    492   
}
  498    493   
impl ::std::convert::From<crate::error::ValidationException>
  499         -
    for crate::error::MalformedLengthError
         494  +
    for crate::error::SensitiveValidationError
  500    495   
{
  501         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedLengthError {
         496  +
    fn from(variant: crate::error::ValidationException) -> crate::error::SensitiveValidationError {
  502    497   
        Self::ValidationException(variant)
  503    498   
    }
  504    499   
}
  505    500   
  506         -
/// Error type for the `MalformedEnum` operation.
  507         -
/// Each variant represents an error that can occur for the `MalformedEnum` operation.
  508         -
#[derive(::std::fmt::Debug)]
  509         -
pub enum MalformedEnumError {
  510         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
  511         -
    ValidationException(crate::error::ValidationException),
         501  +
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         502  +
#[derive(
         503  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         504  +
)]
         505  +
pub struct ValidationException {
         506  +
    /// A summary of the validation failure.
         507  +
    pub message: ::std::string::String,
         508  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         509  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  512    510   
}
  513         -
impl ::std::fmt::Display for MalformedEnumError {
  514         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  515         -
        match &self {
  516         -
            MalformedEnumError::ValidationException(_inner) => _inner.fmt(f),
  517         -
        }
         511  +
impl ValidationException {
         512  +
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         513  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         514  +
        self.field_list.as_deref()
  518    515   
    }
  519    516   
}
  520         -
impl MalformedEnumError {
  521         -
    /// Returns `true` if the error kind is `MalformedEnumError::ValidationException`.
  522         -
    pub fn is_validation_exception(&self) -> bool {
  523         -
        matches!(&self, MalformedEnumError::ValidationException(_))
         517  +
impl ValidationException {
         518  +
    /// Returns the error message.
         519  +
    pub fn message(&self) -> &str {
         520  +
        &self.message
  524    521   
    }
  525         -
    /// Returns the error name string by matching the correct variant.
         522  +
    #[doc(hidden)]
         523  +
    /// Returns the error name.
  526    524   
    pub fn name(&self) -> &'static str {
  527         -
        match &self {
  528         -
            MalformedEnumError::ValidationException(_inner) => _inner.name(),
  529         -
        }
         525  +
        "ValidationException"
  530    526   
    }
  531    527   
}
  532         -
impl ::std::error::Error for MalformedEnumError {
  533         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  534         -
        match &self {
  535         -
            MalformedEnumError::ValidationException(_inner) => Some(_inner),
         528  +
impl ::std::fmt::Display for ValidationException {
         529  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         530  +
        ::std::write!(f, "ValidationException")?;
         531  +
        {
         532  +
            ::std::write!(f, ": {}", &self.message)?;
  536    533   
        }
         534  +
        Ok(())
  537    535   
    }
  538    536   
}
  539         -
impl ::std::convert::From<crate::error::ValidationException> for crate::error::MalformedEnumError {
  540         -
    fn from(variant: crate::error::ValidationException) -> crate::error::MalformedEnumError {
  541         -
        Self::ValidationException(variant)
         537  +
impl ::std::error::Error for ValidationException {}
         538  +
impl ValidationException {
         539  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         540  +
    pub fn builder() -> crate::error::validation_exception::Builder {
         541  +
        crate::error::validation_exception::Builder::default()
  542    542   
    }
  543    543   
}
  544    544   
/// See [`ValidationException`](crate::error::ValidationException).
  545    545   
pub mod validation_exception {
  546    546   
  547    547   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  548    548   
    /// Holds one variant for each of the ways the builder can fail.
  549    549   
    #[non_exhaustive]
  550    550   
    #[allow(clippy::enum_variant_names)]
  551    551   
    pub enum ConstraintViolation {