Server Test

Server Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9 (ignoring whitespace)

Files changed:

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

@@ -0,1 +0,209 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
pub struct RpcEcho;
           4  +
           5  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for RpcEcho {
           6  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
           7  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
           8  +
            "crate#RPCEcho",
           9  +
            "crate",
          10  +
            "RPCEcho",
          11  +
        );
          12  +
          13  +
    type Input = crate::input::RpcEchoInput;
          14  +
    type Output = crate::output::RpcEchoOutput;
          15  +
    type Error = crate::error::RPCEchoError;
          16  +
}
          17  +
          18  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for RpcEcho {
          19  +
    type RequestFmt =
          20  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          21  +
    type ResponseFmt =
          22  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          23  +
          24  +
    fn request_fmt() -> Self::RequestFmt {
          25  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
          26  +
    }
          27  +
          28  +
    fn response_fmt() -> Self::ResponseFmt {
          29  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          30  +
    }
          31  +
}
          32  +
          33  +
#[allow(missing_docs)] // documentation missing in model
          34  +
pub struct Match;
          35  +
          36  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Match {
          37  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          38  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Match", "crate", "Match");
          39  +
          40  +
    type Input = crate::input::MatchInput;
          41  +
    type Output = crate::output::MatchOutput;
          42  +
    type Error = crate::error::MatchError;
          43  +
}
          44  +
          45  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Match {
          46  +
    type RequestFmt =
          47  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          48  +
    type ResponseFmt =
          49  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          50  +
          51  +
    fn request_fmt() -> Self::RequestFmt {
          52  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
          53  +
    }
          54  +
          55  +
    fn response_fmt() -> Self::ResponseFmt {
          56  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          57  +
    }
          58  +
}
          59  +
          60  +
#[allow(missing_docs)] // documentation missing in model
          61  +
pub struct Option;
          62  +
          63  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Option {
          64  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          65  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Option", "crate", "Option");
          66  +
          67  +
    type Input = crate::input::OptionInput;
          68  +
    type Output = crate::output::OptionOutput;
          69  +
    type Error = std::convert::Infallible;
          70  +
}
          71  +
          72  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Option {
          73  +
    type RequestFmt =
          74  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
          75  +
    type ResponseFmt =
          76  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
          77  +
          78  +
    fn request_fmt() -> Self::RequestFmt {
          79  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
          80  +
    }
          81  +
          82  +
    fn response_fmt() -> Self::ResponseFmt {
          83  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          84  +
    }
          85  +
}
          86  +
          87  +
#[allow(missing_docs)] // documentation missing in model
          88  +
pub struct Result;
          89  +
          90  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for Result {
          91  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
          92  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new("crate#Result", "crate", "Result");
          93  +
          94  +
    type Input = crate::input::ResultInput;
          95  +
    type Output = crate::output::ResultOutput;
          96  +
    type Error = std::convert::Infallible;
          97  +
}
          98  +
          99  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for Result {
         100  +
    type RequestFmt =
         101  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         102  +
    type ResponseFmt =
         103  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         104  +
         105  +
    fn request_fmt() -> Self::RequestFmt {
         106  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         107  +
    }
         108  +
         109  +
    fn response_fmt() -> Self::ResponseFmt {
         110  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         111  +
    }
         112  +
}
         113  +
         114  +
#[allow(missing_docs)] // documentation missing in model
         115  +
pub struct ErrCollisions;
         116  +
         117  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ErrCollisions {
         118  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         119  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         120  +
            "crate#ErrCollisions",
         121  +
            "crate",
         122  +
            "ErrCollisions",
         123  +
        );
         124  +
         125  +
    type Input = crate::input::ErrCollisionsInput;
         126  +
    type Output = crate::output::ErrCollisionsOutput;
         127  +
    type Error = crate::error::ErrCollisionsError;
         128  +
}
         129  +
         130  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity for ErrCollisions {
         131  +
    type RequestFmt =
         132  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         133  +
    type ResponseFmt =
         134  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         135  +
         136  +
    fn request_fmt() -> Self::RequestFmt {
         137  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         138  +
    }
         139  +
         140  +
    fn response_fmt() -> Self::ResponseFmt {
         141  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         142  +
    }
         143  +
}
         144  +
         145  +
#[allow(missing_docs)] // documentation missing in model
         146  +
pub struct StructureNamePunning;
         147  +
         148  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for StructureNamePunning {
         149  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         150  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         151  +
            "crate#StructureNamePunning",
         152  +
            "crate",
         153  +
            "StructureNamePunning",
         154  +
        );
         155  +
         156  +
    type Input = crate::input::StructureNamePunningInput;
         157  +
    type Output = crate::output::StructureNamePunningOutput;
         158  +
    type Error = std::convert::Infallible;
         159  +
}
         160  +
         161  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         162  +
    for StructureNamePunning
         163  +
{
         164  +
    type RequestFmt =
         165  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         166  +
    type ResponseFmt =
         167  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         168  +
         169  +
    fn request_fmt() -> Self::RequestFmt {
         170  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         171  +
    }
         172  +
         173  +
    fn response_fmt() -> Self::ResponseFmt {
         174  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         175  +
    }
         176  +
}
         177  +
         178  +
#[allow(missing_docs)] // documentation missing in model
         179  +
pub struct ReservedWordsAsMembers;
         180  +
         181  +
impl ::aws_smithy_legacy_http_server::operation::OperationShape for ReservedWordsAsMembers {
         182  +
    const ID: ::aws_smithy_legacy_http_server::shape_id::ShapeId =
         183  +
        ::aws_smithy_legacy_http_server::shape_id::ShapeId::new(
         184  +
            "crate#ReservedWordsAsMembers",
         185  +
            "crate",
         186  +
            "ReservedWordsAsMembers",
         187  +
        );
         188  +
         189  +
    type Input = crate::input::ReservedWordsAsMembersInput;
         190  +
    type Output = crate::output::ReservedWordsAsMembersOutput;
         191  +
    type Error = crate::error::ReservedWordsAsMembersError;
         192  +
}
         193  +
         194  +
impl ::aws_smithy_legacy_http_server::instrumentation::sensitivity::Sensitivity
         195  +
    for ReservedWordsAsMembers
         196  +
{
         197  +
    type RequestFmt =
         198  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultRequestFmt;
         199  +
    type ResponseFmt =
         200  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::DefaultResponseFmt;
         201  +
         202  +
    fn request_fmt() -> Self::RequestFmt {
         203  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::RequestFmt::new()
         204  +
    }
         205  +
         206  +
    fn response_fmt() -> Self::ResponseFmt {
         207  +
        ::aws_smithy_legacy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         208  +
    }
         209  +
}

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

@@ -0,1 +0,249 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(
           4  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
           5  +
)]
           6  +
pub struct RpcEchoOutput {}
           7  +
impl RpcEchoOutput {
           8  +
    /// Creates a new builder-style object to manufacture [`RpcEchoOutput`](crate::output::RpcEchoOutput).
           9  +
    pub fn builder() -> crate::output::rpc_echo_output::Builder {
          10  +
        crate::output::rpc_echo_output::Builder::default()
          11  +
    }
          12  +
}
          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 MatchOutput {}
          19  +
impl MatchOutput {
          20  +
    /// Creates a new builder-style object to manufacture [`MatchOutput`](crate::output::MatchOutput).
          21  +
    pub fn builder() -> crate::output::match_output::Builder {
          22  +
        crate::output::match_output::Builder::default()
          23  +
    }
          24  +
}
          25  +
          26  +
#[allow(missing_docs)] // documentation missing in model
          27  +
#[derive(
          28  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          29  +
)]
          30  +
pub struct OptionOutput {}
          31  +
impl OptionOutput {
          32  +
    /// Creates a new builder-style object to manufacture [`OptionOutput`](crate::output::OptionOutput).
          33  +
    pub fn builder() -> crate::output::option_output::Builder {
          34  +
        crate::output::option_output::Builder::default()
          35  +
    }
          36  +
}
          37  +
          38  +
#[allow(missing_docs)] // documentation missing in model
          39  +
#[derive(
          40  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          41  +
)]
          42  +
pub struct ResultOutput {
          43  +
    #[allow(missing_docs)] // documentation missing in model
          44  +
    pub pv_member: ::std::option::Option<bool>,
          45  +
}
          46  +
impl ResultOutput {
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    pub fn pv_member(&self) -> ::std::option::Option<bool> {
          49  +
        self.pv_member
          50  +
    }
          51  +
}
          52  +
impl ResultOutput {
          53  +
    /// Creates a new builder-style object to manufacture [`ResultOutput`](crate::output::ResultOutput).
          54  +
    pub fn builder() -> crate::output::result_output::Builder {
          55  +
        crate::output::result_output::Builder::default()
          56  +
    }
          57  +
}
          58  +
          59  +
#[allow(missing_docs)] // documentation missing in model
          60  +
#[derive(
          61  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          62  +
)]
          63  +
pub struct ErrCollisionsOutput {}
          64  +
impl ErrCollisionsOutput {
          65  +
    /// Creates a new builder-style object to manufacture [`ErrCollisionsOutput`](crate::output::ErrCollisionsOutput).
          66  +
    pub fn builder() -> crate::output::err_collisions_output::Builder {
          67  +
        crate::output::err_collisions_output::Builder::default()
          68  +
    }
          69  +
}
          70  +
          71  +
#[allow(missing_docs)] // documentation missing in model
          72  +
#[derive(
          73  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          74  +
)]
          75  +
pub struct StructureNamePunningOutput {}
          76  +
impl StructureNamePunningOutput {
          77  +
    /// Creates a new builder-style object to manufacture [`StructureNamePunningOutput`](crate::output::StructureNamePunningOutput).
          78  +
    pub fn builder() -> crate::output::structure_name_punning_output::Builder {
          79  +
        crate::output::structure_name_punning_output::Builder::default()
          80  +
    }
          81  +
}
          82  +
          83  +
#[allow(missing_docs)] // documentation missing in model
          84  +
#[derive(
          85  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          86  +
)]
          87  +
pub struct ReservedWordsAsMembersOutput {}
          88  +
impl ReservedWordsAsMembersOutput {
          89  +
    /// Creates a new builder-style object to manufacture [`ReservedWordsAsMembersOutput`](crate::output::ReservedWordsAsMembersOutput).
          90  +
    pub fn builder() -> crate::output::reserved_words_as_members_output::Builder {
          91  +
        crate::output::reserved_words_as_members_output::Builder::default()
          92  +
    }
          93  +
}
          94  +
/// See [`RpcEchoOutput`](crate::output::RpcEchoOutput).
          95  +
pub mod rpc_echo_output {
          96  +
          97  +
    impl ::std::convert::From<Builder> for crate::output::RpcEchoOutput {
          98  +
        fn from(builder: Builder) -> Self {
          99  +
            builder.build()
         100  +
        }
         101  +
    }
         102  +
    /// A builder for [`RpcEchoOutput`](crate::output::RpcEchoOutput).
         103  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         104  +
    pub struct Builder {}
         105  +
    impl Builder {
         106  +
        /// Consumes the builder and constructs a [`RpcEchoOutput`](crate::output::RpcEchoOutput).
         107  +
        pub fn build(self) -> crate::output::RpcEchoOutput {
         108  +
            self.build_enforcing_all_constraints()
         109  +
        }
         110  +
        fn build_enforcing_all_constraints(self) -> crate::output::RpcEchoOutput {
         111  +
            crate::output::RpcEchoOutput {}
         112  +
        }
         113  +
    }
         114  +
}
         115  +
/// See [`MatchOutput`](crate::output::MatchOutput).
         116  +
pub mod match_output {
         117  +
         118  +
    impl ::std::convert::From<Builder> for crate::output::MatchOutput {
         119  +
        fn from(builder: Builder) -> Self {
         120  +
            builder.build()
         121  +
        }
         122  +
    }
         123  +
    /// A builder for [`MatchOutput`](crate::output::MatchOutput).
         124  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         125  +
    pub struct Builder {}
         126  +
    impl Builder {
         127  +
        /// Consumes the builder and constructs a [`MatchOutput`](crate::output::MatchOutput).
         128  +
        pub fn build(self) -> crate::output::MatchOutput {
         129  +
            self.build_enforcing_all_constraints()
         130  +
        }
         131  +
        fn build_enforcing_all_constraints(self) -> crate::output::MatchOutput {
         132  +
            crate::output::MatchOutput {}
         133  +
        }
         134  +
    }
         135  +
}
         136  +
/// See [`OptionOutput`](crate::output::OptionOutput).
         137  +
pub mod option_output {
         138  +
         139  +
    impl ::std::convert::From<Builder> for crate::output::OptionOutput {
         140  +
        fn from(builder: Builder) -> Self {
         141  +
            builder.build()
         142  +
        }
         143  +
    }
         144  +
    /// A builder for [`OptionOutput`](crate::output::OptionOutput).
         145  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         146  +
    pub struct Builder {}
         147  +
    impl Builder {
         148  +
        /// Consumes the builder and constructs a [`OptionOutput`](crate::output::OptionOutput).
         149  +
        pub fn build(self) -> crate::output::OptionOutput {
         150  +
            self.build_enforcing_all_constraints()
         151  +
        }
         152  +
        fn build_enforcing_all_constraints(self) -> crate::output::OptionOutput {
         153  +
            crate::output::OptionOutput {}
         154  +
        }
         155  +
    }
         156  +
}
         157  +
/// See [`ResultOutput`](crate::output::ResultOutput).
         158  +
pub mod result_output {
         159  +
         160  +
    impl ::std::convert::From<Builder> for crate::output::ResultOutput {
         161  +
        fn from(builder: Builder) -> Self {
         162  +
            builder.build()
         163  +
        }
         164  +
    }
         165  +
    /// A builder for [`ResultOutput`](crate::output::ResultOutput).
         166  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         167  +
    pub struct Builder {
         168  +
        pub(crate) pv_member: ::std::option::Option<bool>,
         169  +
    }
         170  +
    impl Builder {
         171  +
        #[allow(missing_docs)] // documentation missing in model
         172  +
        pub fn pv_member(mut self, input: ::std::option::Option<bool>) -> Self {
         173  +
            self.pv_member = input;
         174  +
            self
         175  +
        }
         176  +
        /// Consumes the builder and constructs a [`ResultOutput`](crate::output::ResultOutput).
         177  +
        pub fn build(self) -> crate::output::ResultOutput {
         178  +
            self.build_enforcing_all_constraints()
         179  +
        }
         180  +
        fn build_enforcing_all_constraints(self) -> crate::output::ResultOutput {
         181  +
            crate::output::ResultOutput {
         182  +
                pv_member: self.pv_member,
         183  +
            }
         184  +
        }
         185  +
    }
         186  +
}
         187  +
/// See [`ErrCollisionsOutput`](crate::output::ErrCollisionsOutput).
         188  +
pub mod err_collisions_output {
         189  +
         190  +
    impl ::std::convert::From<Builder> for crate::output::ErrCollisionsOutput {
         191  +
        fn from(builder: Builder) -> Self {
         192  +
            builder.build()
         193  +
        }
         194  +
    }
         195  +
    /// A builder for [`ErrCollisionsOutput`](crate::output::ErrCollisionsOutput).
         196  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         197  +
    pub struct Builder {}
         198  +
    impl Builder {
         199  +
        /// Consumes the builder and constructs a [`ErrCollisionsOutput`](crate::output::ErrCollisionsOutput).
         200  +
        pub fn build(self) -> crate::output::ErrCollisionsOutput {
         201  +
            self.build_enforcing_all_constraints()
         202  +
        }
         203  +
        fn build_enforcing_all_constraints(self) -> crate::output::ErrCollisionsOutput {
         204  +
            crate::output::ErrCollisionsOutput {}
         205  +
        }
         206  +
    }
         207  +
}
         208  +
/// See [`StructureNamePunningOutput`](crate::output::StructureNamePunningOutput).
         209  +
pub mod structure_name_punning_output {
         210  +
         211  +
    impl ::std::convert::From<Builder> for crate::output::StructureNamePunningOutput {
         212  +
        fn from(builder: Builder) -> Self {
         213  +
            builder.build()
         214  +
        }
         215  +
    }
         216  +
    /// A builder for [`StructureNamePunningOutput`](crate::output::StructureNamePunningOutput).
         217  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         218  +
    pub struct Builder {}
         219  +
    impl Builder {
         220  +
        /// Consumes the builder and constructs a [`StructureNamePunningOutput`](crate::output::StructureNamePunningOutput).
         221  +
        pub fn build(self) -> crate::output::StructureNamePunningOutput {
         222  +
            self.build_enforcing_all_constraints()
         223  +
        }
         224  +
        fn build_enforcing_all_constraints(self) -> crate::output::StructureNamePunningOutput {
         225  +
            crate::output::StructureNamePunningOutput {}
         226  +
        }
         227  +
    }
         228  +
}
         229  +
/// See [`ReservedWordsAsMembersOutput`](crate::output::ReservedWordsAsMembersOutput).
         230  +
pub mod reserved_words_as_members_output {
         231  +
         232  +
    impl ::std::convert::From<Builder> for crate::output::ReservedWordsAsMembersOutput {
         233  +
        fn from(builder: Builder) -> Self {
         234  +
            builder.build()
         235  +
        }
         236  +
    }
         237  +
    /// A builder for [`ReservedWordsAsMembersOutput`](crate::output::ReservedWordsAsMembersOutput).
         238  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         239  +
    pub struct Builder {}
         240  +
    impl Builder {
         241  +
        /// Consumes the builder and constructs a [`ReservedWordsAsMembersOutput`](crate::output::ReservedWordsAsMembersOutput).
         242  +
        pub fn build(self) -> crate::output::ReservedWordsAsMembersOutput {
         243  +
            self.build_enforcing_all_constraints()
         244  +
        }
         245  +
        fn build_enforcing_all_constraints(self) -> crate::output::ReservedWordsAsMembersOutput {
         246  +
            crate::output::ReservedWordsAsMembersOutput {}
         247  +
        }
         248  +
    }
         249  +
}

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

@@ -0,1 +0,36 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) mod shape_err_collisions;
           3  +
           4  +
pub(crate) mod shape_match;
           5  +
           6  +
pub(crate) mod shape_option;
           7  +
           8  +
pub(crate) mod shape_reserved_words_as_members;
           9  +
          10  +
pub(crate) mod shape_result;
          11  +
          12  +
pub(crate) mod shape_rpc_echo;
          13  +
          14  +
pub(crate) mod shape_structure_name_punning;
          15  +
          16  +
pub(crate) mod shape_colliding_error;
          17  +
          18  +
pub(crate) mod shape_colliding_exception;
          19  +
          20  +
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
          21  +
    if data.is_empty() {
          22  +
        b"{}"
          23  +
    } else {
          24  +
        data
          25  +
    }
          26  +
}
          27  +
          28  +
pub(crate) mod shape_option_output;
          29  +
          30  +
pub(crate) mod shape_result_output;
          31  +
          32  +
pub(crate) mod shape_validation_exception;
          33  +
          34  +
pub(crate) mod shape_vec;
          35  +
          36  +
pub(crate) mod shape_validation_exception_field;

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

@@ -0,1 +0,18 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_colliding_error_error(
           3  +
    value: &crate::error::CollidingError,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_colliding_error::ser_colliding_error(&mut object, value)?;
           8  +
    object.key("__type").string("CollidingError");
           9  +
    object.finish();
          10  +
    Ok(out)
          11  +
}
          12  +
          13  +
pub fn ser_colliding_error(
          14  +
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          15  +
    #[allow(unused_variables)] input: &crate::error::CollidingError,
          16  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          17  +
    Ok(())
          18  +
}

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

@@ -0,1 +0,18 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_colliding_exception_error(
           3  +
    value: &crate::error::CollidingException,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_colliding_exception::ser_colliding_exception(&mut object, value)?;
           8  +
    object.key("__type").string("CollidingException");
           9  +
    object.finish();
          10  +
    Ok(out)
          11  +
}
          12  +
          13  +
pub fn ser_colliding_exception(
          14  +
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          15  +
    #[allow(unused_variables)] input: &crate::error::CollidingException,
          16  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          17  +
    Ok(())
          18  +
}

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

@@ -0,1 +0,107 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_err_collisions_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::ErrCollisionsInput,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::err_collisions_input::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        input.build()
          23  +
    })
          24  +
}
          25  +
          26  +
#[allow(clippy::unnecessary_wraps)]
          27  +
pub fn ser_err_collisions_http_response(
          28  +
    #[allow(unused_variables)] output: crate::output::ErrCollisionsOutput,
          29  +
) -> std::result::Result<
          30  +
    ::aws_smithy_legacy_http_server::response::Response,
          31  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          32  +
> {
          33  +
    Ok({
          34  +
        #[allow(unused_mut)]
          35  +
        let mut builder = ::http::Response::builder();
          36  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          37  +
            builder,
          38  +
            ::http::header::CONTENT_TYPE,
          39  +
            "application/x-amz-json-1.1",
          40  +
        );
          41  +
        let http_status: u16 = 200;
          42  +
        builder = builder.status(http_status);
          43  +
        let payload = "";
          44  +
        let content_length = payload.len();
          45  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          46  +
            builder,
          47  +
            ::http::header::CONTENT_LENGTH,
          48  +
            content_length,
          49  +
        );
          50  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          51  +
        builder.body(body)?
          52  +
    })
          53  +
}
          54  +
          55  +
#[allow(clippy::unnecessary_wraps)]
          56  +
pub fn ser_err_collisions_http_error(
          57  +
    error: &crate::error::ErrCollisionsError,
          58  +
) -> std::result::Result<
          59  +
    ::aws_smithy_legacy_http_server::response::Response,
          60  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          61  +
> {
          62  +
    Ok({
          63  +
        match error {
          64  +
            crate::error::ErrCollisionsError::CollidingError(output) => {
          65  +
                let payload =
          66  +
                    crate::protocol_serde::shape_colliding_error::ser_colliding_error_error(
          67  +
                        output,
          68  +
                    )?;
          69  +
                #[allow(unused_mut)]
          70  +
                let mut builder = ::http::Response::builder();
          71  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          72  +
                    builder,
          73  +
                    ::http::header::CONTENT_TYPE,
          74  +
                    "application/x-amz-json-1.1",
          75  +
                );
          76  +
                let content_length = payload.len();
          77  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          78  +
                    builder,
          79  +
                    ::http::header::CONTENT_LENGTH,
          80  +
                    content_length,
          81  +
                );
          82  +
                builder
          83  +
                    .status(400)
          84  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          85  +
            }
          86  +
            crate::error::ErrCollisionsError::CollidingException(output) => {
          87  +
                let payload = crate::protocol_serde::shape_colliding_exception::ser_colliding_exception_error(output)?;
          88  +
                #[allow(unused_mut)]
          89  +
                let mut builder = ::http::Response::builder();
          90  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          91  +
                    builder,
          92  +
                    ::http::header::CONTENT_TYPE,
          93  +
                    "application/x-amz-json-1.1",
          94  +
                );
          95  +
                let content_length = payload.len();
          96  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          97  +
                    builder,
          98  +
                    ::http::header::CONTENT_LENGTH,
          99  +
                    content_length,
         100  +
                );
         101  +
                builder
         102  +
                    .status(400)
         103  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
         104  +
            }
         105  +
        }
         106  +
    })
         107  +
}

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

@@ -0,1 +0,205 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_match_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::MatchInput,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::match_input::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
        if !bytes.is_empty() {
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
                &headers,
          26  +
                Some("application/x-amz-json-1.1"),
          27  +
            )?;
          28  +
            input = crate::protocol_serde::shape_match::de_match(bytes.as_ref(), input)?;
          29  +
        }
          30  +
        input.build()?
          31  +
    })
          32  +
}
          33  +
          34  +
#[allow(clippy::unnecessary_wraps)]
          35  +
pub fn ser_match_http_response(
          36  +
    #[allow(unused_variables)] output: crate::output::MatchOutput,
          37  +
) -> std::result::Result<
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          40  +
> {
          41  +
    Ok({
          42  +
        #[allow(unused_mut)]
          43  +
        let mut builder = ::http::Response::builder();
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          45  +
            builder,
          46  +
            ::http::header::CONTENT_TYPE,
          47  +
            "application/x-amz-json-1.1",
          48  +
        );
          49  +
        let http_status: u16 = 200;
          50  +
        builder = builder.status(http_status);
          51  +
        let payload = "";
          52  +
        let content_length = payload.len();
          53  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          54  +
            builder,
          55  +
            ::http::header::CONTENT_LENGTH,
          56  +
            content_length,
          57  +
        );
          58  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          59  +
        builder.body(body)?
          60  +
    })
          61  +
}
          62  +
          63  +
#[allow(clippy::unnecessary_wraps)]
          64  +
pub fn ser_match_http_error(
          65  +
    error: &crate::error::MatchError,
          66  +
) -> std::result::Result<
          67  +
    ::aws_smithy_legacy_http_server::response::Response,
          68  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          69  +
> {
          70  +
    Ok({
          71  +
        match error {
          72  +
            crate::error::MatchError::ValidationException(output) => {
          73  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          74  +
                #[allow(unused_mut)]
          75  +
                let mut builder = ::http::Response::builder();
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          77  +
                    builder,
          78  +
                    ::http::header::CONTENT_TYPE,
          79  +
                    "application/x-amz-json-1.1",
          80  +
                );
          81  +
                let content_length = payload.len();
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          83  +
                    builder,
          84  +
                    ::http::header::CONTENT_LENGTH,
          85  +
                    content_length,
          86  +
                );
          87  +
                builder
          88  +
                    .status(400)
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          90  +
            }
          91  +
        }
          92  +
    })
          93  +
}
          94  +
          95  +
pub(crate) fn de_match(
          96  +
    value: &[u8],
          97  +
    mut builder: crate::input::match_input::Builder,
          98  +
) -> ::std::result::Result<
          99  +
    crate::input::match_input::Builder,
         100  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
         101  +
> {
         102  +
    let mut tokens_owned =
         103  +
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
         104  +
            .peekable();
         105  +
    let tokens = &mut tokens_owned;
         106  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         107  +
    loop {
         108  +
        match tokens.next().transpose()? {
         109  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
         110  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         111  +
                match key.to_unescaped()?.as_ref() {
         112  +
                    "as" => {
         113  +
                        builder = builder.set_as(
         114  +
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
         115  +
                                tokens.next(),
         116  +
                            )?
         117  +
                            .map(i32::try_from)
         118  +
                            .transpose()?,
         119  +
                        );
         120  +
                    }
         121  +
                    "async" => {
         122  +
                        builder = builder.set_async(
         123  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         124  +
                                tokens.next(),
         125  +
                            )?,
         126  +
                        );
         127  +
                    }
         128  +
                    "enum" => {
         129  +
                        builder = builder.set_enum(
         130  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         131  +
                                tokens.next(),
         132  +
                            )?
         133  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         134  +
                            .transpose()?,
         135  +
                        );
         136  +
                    }
         137  +
                    "self" => {
         138  +
                        builder = builder.set_self(
         139  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         140  +
                                tokens.next(),
         141  +
                            )?,
         142  +
                        );
         143  +
                    }
         144  +
                    "crate" => {
         145  +
                        builder = builder.set_crate(
         146  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         147  +
                                tokens.next(),
         148  +
                            )?,
         149  +
                        );
         150  +
                    }
         151  +
                    "super" => {
         152  +
                        builder = builder.set_super(
         153  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         154  +
                                tokens.next(),
         155  +
                            )?,
         156  +
                        );
         157  +
                    }
         158  +
                    "build" => {
         159  +
                        builder = builder.set_build(
         160  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         161  +
                                tokens.next(),
         162  +
                            )?
         163  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         164  +
                            .transpose()?,
         165  +
                        );
         166  +
                    }
         167  +
                    "default" => {
         168  +
                        builder = builder.set_default(
         169  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         170  +
                                tokens.next(),
         171  +
                            )?
         172  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         173  +
                            .transpose()?,
         174  +
                        );
         175  +
                    }
         176  +
                    "send" => {
         177  +
                        builder = builder.set_send(
         178  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         179  +
                                tokens.next(),
         180  +
                            )?
         181  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         182  +
                            .transpose()?,
         183  +
                        );
         184  +
                    }
         185  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         186  +
                }
         187  +
            }
         188  +
            other => {
         189  +
                return Err(
         190  +
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
         191  +
                        "expected object key or end object, found: {other:?}"
         192  +
                    )),
         193  +
                )
         194  +
            }
         195  +
        }
         196  +
    }
         197  +
    if tokens.next().is_some() {
         198  +
        return Err(
         199  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         200  +
                "found more JSON tokens after completing parsing",
         201  +
            ),
         202  +
        );
         203  +
    }
         204  +
    Ok(builder)
         205  +
}

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

@@ -0,1 +0,108 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_option_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::OptionInput,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::option_input::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
        if !bytes.is_empty() {
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
                &headers,
          26  +
                Some("application/x-amz-json-1.1"),
          27  +
            )?;
          28  +
            input = crate::protocol_serde::shape_option::de_option(bytes.as_ref(), input)?;
          29  +
        }
          30  +
        input.build()
          31  +
    })
          32  +
}
          33  +
          34  +
#[allow(clippy::unnecessary_wraps)]
          35  +
pub fn ser_option_http_response(
          36  +
    #[allow(unused_variables)] output: crate::output::OptionOutput,
          37  +
) -> std::result::Result<
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          40  +
> {
          41  +
    Ok({
          42  +
        #[allow(unused_mut)]
          43  +
        let mut builder = ::http::Response::builder();
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          45  +
            builder,
          46  +
            ::http::header::CONTENT_TYPE,
          47  +
            "application/x-amz-json-1.1",
          48  +
        );
          49  +
        let http_status: u16 = 200;
          50  +
        builder = builder.status(http_status);
          51  +
        let payload =
          52  +
            crate::protocol_serde::shape_option_output::ser_option_output_output_output(&output)?;
          53  +
        let content_length = payload.len();
          54  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          55  +
            builder,
          56  +
            ::http::header::CONTENT_LENGTH,
          57  +
            content_length,
          58  +
        );
          59  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          60  +
        builder.body(body)?
          61  +
    })
          62  +
}
          63  +
          64  +
pub(crate) fn de_option(
          65  +
    value: &[u8],
          66  +
    mut builder: crate::input::option_input::Builder,
          67  +
) -> ::std::result::Result<
          68  +
    crate::input::option_input::Builder,
          69  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
          70  +
> {
          71  +
    let mut tokens_owned =
          72  +
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
          73  +
            .peekable();
          74  +
    let tokens = &mut tokens_owned;
          75  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          76  +
    loop {
          77  +
        match tokens.next().transpose()? {
          78  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          79  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          80  +
                match key.to_unescaped()?.as_ref() {
          81  +
                    "pv_member" => {
          82  +
                        builder = builder.set_pv_member(
          83  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
          84  +
                                tokens.next(),
          85  +
                            )?,
          86  +
                        );
          87  +
                    }
          88  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          89  +
                }
          90  +
            }
          91  +
            other => {
          92  +
                return Err(
          93  +
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
          94  +
                        "expected object key or end object, found: {other:?}"
          95  +
                    )),
          96  +
                )
          97  +
            }
          98  +
        }
          99  +
    }
         100  +
    if tokens.next().is_some() {
         101  +
        return Err(
         102  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         103  +
                "found more JSON tokens after completing parsing",
         104  +
            ),
         105  +
        );
         106  +
    }
         107  +
    Ok(builder)
         108  +
}

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

@@ -0,1 +0,17 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub fn ser_option_output_output_output(
           3  +
    value: &crate::output::OptionOutput,
           4  +
) -> ::std::result::Result<String, ::aws_smithy_types::error::operation::SerializationError> {
           5  +
    let mut out = ::std::string::String::new();
           6  +
    let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
           7  +
    crate::protocol_serde::shape_option_output::ser_option_output_output(&mut object, value)?;
           8  +
    object.finish();
           9  +
    Ok(out)
          10  +
}
          11  +
          12  +
pub fn ser_option_output_output(
          13  +
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
          14  +
    #[allow(unused_variables)] input: &crate::output::OptionOutput,
          15  +
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          16  +
    Ok(())
          17  +
}

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

@@ -0,1 +0,205 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_reserved_words_as_members_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::ReservedWordsAsMembersInput,
           7  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::reserved_words_as_members_input::Builder::default();
          18  +
        #[allow(unused_variables)]
          19  +
        let ::aws_smithy_runtime_api::http::RequestParts {
          20  +
            uri, headers, body, ..
          21  +
        } = ::aws_smithy_runtime_api::http::Request::try_from(request)?.into_parts();
          22  +
        let bytes = ::hyper::body::to_bytes(body).await?;
          23  +
        if !bytes.is_empty() {
          24  +
            ::aws_smithy_legacy_http_server::protocol::content_type_header_classifier_smithy(
          25  +
                &headers,
          26  +
                Some("application/x-amz-json-1.1"),
          27  +
            )?;
          28  +
            input = crate::protocol_serde::shape_reserved_words_as_members::de_reserved_words_as_members(bytes.as_ref(), input)?;
          29  +
        }
          30  +
        input.build()?
          31  +
    })
          32  +
}
          33  +
          34  +
#[allow(clippy::unnecessary_wraps)]
          35  +
pub fn ser_reserved_words_as_members_http_response(
          36  +
    #[allow(unused_variables)] output: crate::output::ReservedWordsAsMembersOutput,
          37  +
) -> std::result::Result<
          38  +
    ::aws_smithy_legacy_http_server::response::Response,
          39  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          40  +
> {
          41  +
    Ok({
          42  +
        #[allow(unused_mut)]
          43  +
        let mut builder = ::http::Response::builder();
          44  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          45  +
            builder,
          46  +
            ::http::header::CONTENT_TYPE,
          47  +
            "application/x-amz-json-1.1",
          48  +
        );
          49  +
        let http_status: u16 = 200;
          50  +
        builder = builder.status(http_status);
          51  +
        let payload = "";
          52  +
        let content_length = payload.len();
          53  +
        builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          54  +
            builder,
          55  +
            ::http::header::CONTENT_LENGTH,
          56  +
            content_length,
          57  +
        );
          58  +
        let body = ::aws_smithy_legacy_http_server::body::to_boxed(payload);
          59  +
        builder.body(body)?
          60  +
    })
          61  +
}
          62  +
          63  +
#[allow(clippy::unnecessary_wraps)]
          64  +
pub fn ser_reserved_words_as_members_http_error(
          65  +
    error: &crate::error::ReservedWordsAsMembersError,
          66  +
) -> std::result::Result<
          67  +
    ::aws_smithy_legacy_http_server::response::Response,
          68  +
    ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::ResponseRejection,
          69  +
> {
          70  +
    Ok({
          71  +
        match error {
          72  +
            crate::error::ReservedWordsAsMembersError::ValidationException(output) => {
          73  +
                let payload = crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(output)?;
          74  +
                #[allow(unused_mut)]
          75  +
                let mut builder = ::http::Response::builder();
          76  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          77  +
                    builder,
          78  +
                    ::http::header::CONTENT_TYPE,
          79  +
                    "application/x-amz-json-1.1",
          80  +
                );
          81  +
                let content_length = payload.len();
          82  +
                builder = ::aws_smithy_legacy_http::header::set_response_header_if_absent(
          83  +
                    builder,
          84  +
                    ::http::header::CONTENT_LENGTH,
          85  +
                    content_length,
          86  +
                );
          87  +
                builder
          88  +
                    .status(400)
          89  +
                    .body(::aws_smithy_legacy_http_server::body::to_boxed(payload))?
          90  +
            }
          91  +
        }
          92  +
    })
          93  +
}
          94  +
          95  +
pub(crate) fn de_reserved_words_as_members(
          96  +
    value: &[u8],
          97  +
    mut builder: crate::input::reserved_words_as_members_input::Builder,
          98  +
) -> ::std::result::Result<
          99  +
    crate::input::reserved_words_as_members_input::Builder,
         100  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
         101  +
> {
         102  +
    let mut tokens_owned =
         103  +
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
         104  +
            .peekable();
         105  +
    let tokens = &mut tokens_owned;
         106  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
         107  +
    loop {
         108  +
        match tokens.next().transpose()? {
         109  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
         110  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
         111  +
                match key.to_unescaped()?.as_ref() {
         112  +
                    "as" => {
         113  +
                        builder = builder.set_as(
         114  +
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
         115  +
                                tokens.next(),
         116  +
                            )?
         117  +
                            .map(i32::try_from)
         118  +
                            .transpose()?,
         119  +
                        );
         120  +
                    }
         121  +
                    "async" => {
         122  +
                        builder = builder.set_async(
         123  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         124  +
                                tokens.next(),
         125  +
                            )?,
         126  +
                        );
         127  +
                    }
         128  +
                    "enum" => {
         129  +
                        builder = builder.set_enum(
         130  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         131  +
                                tokens.next(),
         132  +
                            )?
         133  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         134  +
                            .transpose()?,
         135  +
                        );
         136  +
                    }
         137  +
                    "self" => {
         138  +
                        builder = builder.set_self(
         139  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         140  +
                                tokens.next(),
         141  +
                            )?,
         142  +
                        );
         143  +
                    }
         144  +
                    "crate" => {
         145  +
                        builder = builder.set_crate(
         146  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         147  +
                                tokens.next(),
         148  +
                            )?,
         149  +
                        );
         150  +
                    }
         151  +
                    "super" => {
         152  +
                        builder = builder.set_super(
         153  +
                            ::aws_smithy_json::deserialize::token::expect_bool_or_null(
         154  +
                                tokens.next(),
         155  +
                            )?,
         156  +
                        );
         157  +
                    }
         158  +
                    "build" => {
         159  +
                        builder = builder.set_build(
         160  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         161  +
                                tokens.next(),
         162  +
                            )?
         163  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         164  +
                            .transpose()?,
         165  +
                        );
         166  +
                    }
         167  +
                    "default" => {
         168  +
                        builder = builder.set_default(
         169  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         170  +
                                tokens.next(),
         171  +
                            )?
         172  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         173  +
                            .transpose()?,
         174  +
                        );
         175  +
                    }
         176  +
                    "send" => {
         177  +
                        builder = builder.set_send(
         178  +
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
         179  +
                                tokens.next(),
         180  +
                            )?
         181  +
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
         182  +
                            .transpose()?,
         183  +
                        );
         184  +
                    }
         185  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
         186  +
                }
         187  +
            }
         188  +
            other => {
         189  +
                return Err(
         190  +
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
         191  +
                        "expected object key or end object, found: {other:?}"
         192  +
                    )),
         193  +
                )
         194  +
            }
         195  +
        }
         196  +
    }
         197  +
    if tokens.next().is_some() {
         198  +
        return Err(
         199  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         200  +
                "found more JSON tokens after completing parsing",
         201  +
            ),
         202  +
        );
         203  +
    }
         204  +
    Ok(builder)
         205  +
}