Server Test

Server Test

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c

Files changed:

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

@@ -1,1 +31,147 @@
    1      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 OperationWithNestedStructure;
           4  +
           5  +
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithNestedStructure {
           6  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
           7  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
           8  +
            "aws.protocoltests.restjson#OperationWithNestedStructure",
           9  +
            "aws.protocoltests.restjson",
          10  +
            "OperationWithNestedStructure",
          11  +
        );
          12  +
          13  +
    type Input = crate::input::OperationWithNestedStructureInput;
          14  +
    type Output = crate::output::OperationWithNestedStructureOutput;
          15  +
    type Error = crate::error::OperationWithNestedStructureError;
          16  +
}
          17  +
          18  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
          19  +
    for OperationWithNestedStructure
          20  +
{
          21  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
          22  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          23  +
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
          24  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          25  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          26  +
        >,
          27  +
    >;
          28  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
          29  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          30  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          31  +
    >;
          32  +
          33  +
    fn request_fmt() -> Self::RequestFmt {
          34  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          35  +
    }
          36  +
          37  +
    fn response_fmt() -> Self::ResponseFmt {
          38  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          39  +
    }
          40  +
}
          41  +
          42  +
#[allow(missing_docs)] // documentation missing in model
          43  +
pub struct OperationWithDefaults;
          44  +
          45  +
impl ::aws_smithy_http_server::operation::OperationShape for OperationWithDefaults {
          46  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
          47  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          48  +
            "aws.protocoltests.restjson#OperationWithDefaults",
          49  +
            "aws.protocoltests.restjson",
          50  +
            "OperationWithDefaults",
          51  +
        );
          52  +
          53  +
    type Input = crate::input::OperationWithDefaultsInput;
          54  +
    type Output = crate::output::OperationWithDefaultsOutput;
          55  +
    type Error = crate::error::OperationWithDefaultsError;
          56  +
}
          57  +
          58  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for OperationWithDefaults {
          59  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
          60  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          61  +
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
          62  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          63  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
          64  +
        >,
          65  +
    >;
          66  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
          67  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          68  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          69  +
    >;
          70  +
          71  +
    fn request_fmt() -> Self::RequestFmt {
          72  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
          73  +
    }
          74  +
          75  +
    fn response_fmt() -> Self::ResponseFmt {
          76  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
          77  +
    }
          78  +
}
          79  +
          80  +
/// The example tests how servers must support requests containing a `Content-Type` header with parameters.
          81  +
pub struct ContentTypeParameters;
          82  +
          83  +
impl ::aws_smithy_http_server::operation::OperationShape for ContentTypeParameters {
          84  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
          85  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
          86  +
            "aws.protocoltests.restjson#ContentTypeParameters",
          87  +
            "aws.protocoltests.restjson",
          88  +
            "ContentTypeParameters",
          89  +
        );
          90  +
          91  +
    type Input = crate::input::ContentTypeParametersInput;
          92  +
    type Output = crate::output::ContentTypeParametersOutput;
          93  +
    type Error = std::convert::Infallible;
          94  +
}
          95  +
          96  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for ContentTypeParameters {
          97  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
          98  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
          99  +
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
         100  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         101  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         102  +
        >,
         103  +
    >;
         104  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
         105  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         106  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         107  +
    >;
         108  +
         109  +
    fn request_fmt() -> Self::RequestFmt {
         110  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         111  +
    }
         112  +
         113  +
    fn response_fmt() -> Self::ResponseFmt {
         114  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         115  +
    }
         116  +
}
         117  +
    2    118   
#[allow(missing_docs)] // documentation missing in model
    3    119   
pub struct PutWithContentEncoding;
    4    120   
    5    121   
impl ::aws_smithy_http_server::operation::OperationShape for PutWithContentEncoding {
    6    122   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    7    123   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    8    124   
            "aws.protocoltests.restjson#PutWithContentEncoding",
    9    125   
            "aws.protocoltests.restjson",
   10    126   
            "PutWithContentEncoding",
   11    127   
        );
@@ -88,204 +147,301 @@
  108    224   
  109    225   
    fn request_fmt() -> Self::RequestFmt {
  110    226   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  111    227   
    }
  112    228   
  113    229   
    fn response_fmt() -> Self::ResponseFmt {
  114    230   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  115    231   
    }
  116    232   
}
  117    233   
         234  +
/// This example operation has no input and serializes a request without an HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.
         235  +
pub struct TestNoInputNoPayload;
         236  +
         237  +
impl ::aws_smithy_http_server::operation::OperationShape for TestNoInputNoPayload {
         238  +
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
         239  +
        ::aws_smithy_http_server::shape_id::ShapeId::new(
         240  +
            "aws.protocoltests.restjson#TestNoInputNoPayload",
         241  +
            "aws.protocoltests.restjson",
         242  +
            "TestNoInputNoPayload",
         243  +
        );
         244  +
         245  +
    type Input = crate::input::TestNoInputNoPayloadInput;
         246  +
    type Output = crate::output::TestNoInputNoPayloadOutput;
         247  +
    type Error = std::convert::Infallible;
         248  +
}
         249  +
         250  +
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity for TestNoInputNoPayload {
         251  +
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
         252  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         253  +
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
         254  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         255  +
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
         256  +
        >,
         257  +
    >;
         258  +
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
         259  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         260  +
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
         261  +
    >;
         262  +
         263  +
    fn request_fmt() -> Self::RequestFmt {
         264  +
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
         265  +
    }
         266  +
         267  +
    fn response_fmt() -> Self::ResponseFmt {
         268  +
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
         269  +
    }
         270  +
}
         271  +
  118    272   
/// This example operation serializes a request without an HTTP body. These tests are to ensure we do not attach a body or related headers (Content-Length, Content-Type) to operations that semantically cannot produce an HTTP body.
  119    273   
pub struct TestNoPayload;
  120    274   
  121    275   
impl ::aws_smithy_http_server::operation::OperationShape for TestNoPayload {
  122    276   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  123    277   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  124    278   
            "aws.protocoltests.restjson#TestNoPayload",
  125    279   
            "aws.protocoltests.restjson",
  126    280   
            "TestNoPayload",
  127    281   
        );

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

@@ -1,1 +85,338 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           4  +
pub struct OperationWithNestedStructureOutput {
           5  +
    #[allow(missing_docs)] // documentation missing in model
           6  +
    pub dialog: crate::model::Dialog,
           7  +
    #[allow(missing_docs)] // documentation missing in model
           8  +
    pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
          11  +
}
          12  +
impl OperationWithNestedStructureOutput {
          13  +
    #[allow(missing_docs)] // documentation missing in model
          14  +
    pub fn dialog(&self) -> &crate::model::Dialog {
          15  +
        &self.dialog
          16  +
    }
          17  +
    #[allow(missing_docs)] // documentation missing in model
          18  +
    pub fn dialog_list(&self) -> &[crate::model::Dialog] {
          19  +
        use std::ops::Deref;
          20  +
        self.dialog_list.deref()
          21  +
    }
          22  +
    #[allow(missing_docs)] // documentation missing in model
          23  +
    pub fn dialog_map(
          24  +
        &self,
          25  +
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
          26  +
        &self.dialog_map
          27  +
    }
          28  +
}
          29  +
impl OperationWithNestedStructureOutput {
          30  +
    /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureOutput`](crate::output::OperationWithNestedStructureOutput).
          31  +
    pub fn builder() -> crate::output::operation_with_nested_structure_output::Builder {
          32  +
        crate::output::operation_with_nested_structure_output::Builder::default()
          33  +
    }
          34  +
}
          35  +
          36  +
#[allow(missing_docs)] // documentation missing in model
          37  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          38  +
pub struct OperationWithDefaultsOutput {
          39  +
    #[allow(missing_docs)] // documentation missing in model
          40  +
    pub default_string: ::std::string::String,
          41  +
    #[allow(missing_docs)] // documentation missing in model
          42  +
    pub default_boolean: bool,
          43  +
    #[allow(missing_docs)] // documentation missing in model
          44  +
    pub default_list: ::std::vec::Vec<::std::string::String>,
          45  +
    #[allow(missing_docs)] // documentation missing in model
          46  +
    pub default_document_map: ::aws_smithy_types::Document,
          47  +
    #[allow(missing_docs)] // documentation missing in model
          48  +
    pub default_document_string: ::aws_smithy_types::Document,
          49  +
    #[allow(missing_docs)] // documentation missing in model
          50  +
    pub default_document_boolean: ::aws_smithy_types::Document,
          51  +
    #[allow(missing_docs)] // documentation missing in model
          52  +
    pub default_document_list: ::aws_smithy_types::Document,
          53  +
    #[allow(missing_docs)] // documentation missing in model
          54  +
    pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
          55  +
    #[allow(missing_docs)] // documentation missing in model
          56  +
    pub default_timestamp: ::aws_smithy_types::DateTime,
          57  +
    #[allow(missing_docs)] // documentation missing in model
          58  +
    pub default_blob: ::aws_smithy_types::Blob,
          59  +
    #[allow(missing_docs)] // documentation missing in model
          60  +
    pub default_byte: i8,
          61  +
    #[allow(missing_docs)] // documentation missing in model
          62  +
    pub default_short: i16,
          63  +
    #[allow(missing_docs)] // documentation missing in model
          64  +
    pub default_integer: i32,
          65  +
    #[allow(missing_docs)] // documentation missing in model
          66  +
    pub default_long: i64,
          67  +
    #[allow(missing_docs)] // documentation missing in model
          68  +
    pub default_float: f32,
          69  +
    #[allow(missing_docs)] // documentation missing in model
          70  +
    pub default_double: f64,
          71  +
    #[allow(missing_docs)] // documentation missing in model
          72  +
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
          73  +
    #[allow(missing_docs)] // documentation missing in model
          74  +
    pub default_enum: crate::model::TestEnum,
          75  +
    #[allow(missing_docs)] // documentation missing in model
          76  +
    pub default_int_enum: i32,
          77  +
    #[allow(missing_docs)] // documentation missing in model
          78  +
    pub empty_string: ::std::string::String,
          79  +
    #[allow(missing_docs)] // documentation missing in model
          80  +
    pub false_boolean: bool,
          81  +
    #[allow(missing_docs)] // documentation missing in model
          82  +
    pub empty_blob: ::aws_smithy_types::Blob,
          83  +
    #[allow(missing_docs)] // documentation missing in model
          84  +
    pub zero_byte: i8,
          85  +
    #[allow(missing_docs)] // documentation missing in model
          86  +
    pub zero_short: i16,
          87  +
    #[allow(missing_docs)] // documentation missing in model
          88  +
    pub zero_integer: i32,
          89  +
    #[allow(missing_docs)] // documentation missing in model
          90  +
    pub zero_long: i64,
          91  +
    #[allow(missing_docs)] // documentation missing in model
          92  +
    pub zero_float: f32,
          93  +
    #[allow(missing_docs)] // documentation missing in model
          94  +
    pub zero_double: f64,
          95  +
}
          96  +
impl OperationWithDefaultsOutput {
          97  +
    #[allow(missing_docs)] // documentation missing in model
          98  +
    pub fn default_string(&self) -> &str {
          99  +
        use std::ops::Deref;
         100  +
        self.default_string.deref()
         101  +
    }
         102  +
    #[allow(missing_docs)] // documentation missing in model
         103  +
    pub fn default_boolean(&self) -> bool {
         104  +
        self.default_boolean
         105  +
    }
         106  +
    #[allow(missing_docs)] // documentation missing in model
         107  +
    pub fn default_list(&self) -> &[::std::string::String] {
         108  +
        use std::ops::Deref;
         109  +
        self.default_list.deref()
         110  +
    }
         111  +
    #[allow(missing_docs)] // documentation missing in model
         112  +
    pub fn default_document_map(&self) -> &::aws_smithy_types::Document {
         113  +
        &self.default_document_map
         114  +
    }
         115  +
    #[allow(missing_docs)] // documentation missing in model
         116  +
    pub fn default_document_string(&self) -> &::aws_smithy_types::Document {
         117  +
        &self.default_document_string
         118  +
    }
         119  +
    #[allow(missing_docs)] // documentation missing in model
         120  +
    pub fn default_document_boolean(&self) -> &::aws_smithy_types::Document {
         121  +
        &self.default_document_boolean
         122  +
    }
         123  +
    #[allow(missing_docs)] // documentation missing in model
         124  +
    pub fn default_document_list(&self) -> &::aws_smithy_types::Document {
         125  +
        &self.default_document_list
         126  +
    }
         127  +
    #[allow(missing_docs)] // documentation missing in model
         128  +
    pub fn default_null_document(&self) -> ::std::option::Option<&::aws_smithy_types::Document> {
         129  +
        self.default_null_document.as_ref()
         130  +
    }
         131  +
    #[allow(missing_docs)] // documentation missing in model
         132  +
    pub fn default_timestamp(&self) -> &::aws_smithy_types::DateTime {
         133  +
        &self.default_timestamp
         134  +
    }
         135  +
    #[allow(missing_docs)] // documentation missing in model
         136  +
    pub fn default_blob(&self) -> &::aws_smithy_types::Blob {
         137  +
        &self.default_blob
         138  +
    }
         139  +
    #[allow(missing_docs)] // documentation missing in model
         140  +
    pub fn default_byte(&self) -> i8 {
         141  +
        self.default_byte
         142  +
    }
         143  +
    #[allow(missing_docs)] // documentation missing in model
         144  +
    pub fn default_short(&self) -> i16 {
         145  +
        self.default_short
         146  +
    }
         147  +
    #[allow(missing_docs)] // documentation missing in model
         148  +
    pub fn default_integer(&self) -> i32 {
         149  +
        self.default_integer
         150  +
    }
         151  +
    #[allow(missing_docs)] // documentation missing in model
         152  +
    pub fn default_long(&self) -> i64 {
         153  +
        self.default_long
         154  +
    }
         155  +
    #[allow(missing_docs)] // documentation missing in model
         156  +
    pub fn default_float(&self) -> f32 {
         157  +
        self.default_float
         158  +
    }
         159  +
    #[allow(missing_docs)] // documentation missing in model
         160  +
    pub fn default_double(&self) -> f64 {
         161  +
        self.default_double
         162  +
    }
         163  +
    #[allow(missing_docs)] // documentation missing in model
         164  +
    pub fn default_map(
         165  +
        &self,
         166  +
    ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
         167  +
        &self.default_map
         168  +
    }
         169  +
    #[allow(missing_docs)] // documentation missing in model
         170  +
    pub fn default_enum(&self) -> &crate::model::TestEnum {
         171  +
        &self.default_enum
         172  +
    }
         173  +
    #[allow(missing_docs)] // documentation missing in model
         174  +
    pub fn default_int_enum(&self) -> i32 {
         175  +
        self.default_int_enum
         176  +
    }
         177  +
    #[allow(missing_docs)] // documentation missing in model
         178  +
    pub fn empty_string(&self) -> &str {
         179  +
        use std::ops::Deref;
         180  +
        self.empty_string.deref()
         181  +
    }
         182  +
    #[allow(missing_docs)] // documentation missing in model
         183  +
    pub fn false_boolean(&self) -> bool {
         184  +
        self.false_boolean
         185  +
    }
         186  +
    #[allow(missing_docs)] // documentation missing in model
         187  +
    pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
         188  +
        &self.empty_blob
         189  +
    }
         190  +
    #[allow(missing_docs)] // documentation missing in model
         191  +
    pub fn zero_byte(&self) -> i8 {
         192  +
        self.zero_byte
         193  +
    }
         194  +
    #[allow(missing_docs)] // documentation missing in model
         195  +
    pub fn zero_short(&self) -> i16 {
         196  +
        self.zero_short
         197  +
    }
         198  +
    #[allow(missing_docs)] // documentation missing in model
         199  +
    pub fn zero_integer(&self) -> i32 {
         200  +
        self.zero_integer
         201  +
    }
         202  +
    #[allow(missing_docs)] // documentation missing in model
         203  +
    pub fn zero_long(&self) -> i64 {
         204  +
        self.zero_long
         205  +
    }
         206  +
    #[allow(missing_docs)] // documentation missing in model
         207  +
    pub fn zero_float(&self) -> f32 {
         208  +
        self.zero_float
         209  +
    }
         210  +
    #[allow(missing_docs)] // documentation missing in model
         211  +
    pub fn zero_double(&self) -> f64 {
         212  +
        self.zero_double
         213  +
    }
         214  +
}
         215  +
impl OperationWithDefaultsOutput {
         216  +
    /// Creates a new builder-style object to manufacture [`OperationWithDefaultsOutput`](crate::output::OperationWithDefaultsOutput).
         217  +
    pub fn builder() -> crate::output::operation_with_defaults_output::Builder {
         218  +
        crate::output::operation_with_defaults_output::Builder::default()
         219  +
    }
         220  +
}
         221  +
         222  +
#[allow(missing_docs)] // documentation missing in model
         223  +
#[derive(
         224  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         225  +
)]
         226  +
pub struct ContentTypeParametersOutput {}
         227  +
impl ContentTypeParametersOutput {
         228  +
    /// Creates a new builder-style object to manufacture [`ContentTypeParametersOutput`](crate::output::ContentTypeParametersOutput).
         229  +
    pub fn builder() -> crate::output::content_type_parameters_output::Builder {
         230  +
        crate::output::content_type_parameters_output::Builder::default()
         231  +
    }
         232  +
}
         233  +
    2    234   
#[allow(missing_docs)] // documentation missing in model
    3    235   
#[derive(
    4    236   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5    237   
)]
    6    238   
pub struct PutWithContentEncodingOutput {}
    7    239   
impl PutWithContentEncodingOutput {
    8    240   
    /// Creates a new builder-style object to manufacture [`PutWithContentEncodingOutput`](crate::output::PutWithContentEncodingOutput).
    9    241   
    pub fn builder() -> crate::output::put_with_content_encoding_output::Builder {
   10    242   
        crate::output::put_with_content_encoding_output::Builder::default()
   11    243   
    }
   12    244   
}
   13    245   
   14    246   
#[allow(missing_docs)] // documentation missing in model
   15    247   
#[derive(
   16    248   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   17    249   
)]
   18    250   
pub struct FractionalSecondsOutput {
   19    251   
    #[allow(missing_docs)] // documentation missing in model
   20    252   
    pub datetime: ::std::option::Option<::aws_smithy_types::DateTime>,
   21    253   
}
   22    254   
impl FractionalSecondsOutput {
   23    255   
    #[allow(missing_docs)] // documentation missing in model
   24    256   
    pub fn datetime(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
   25    257   
        self.datetime.as_ref()
   26    258   
    }
   27    259   
}
   28    260   
impl FractionalSecondsOutput {
   29    261   
    /// Creates a new builder-style object to manufacture [`FractionalSecondsOutput`](crate::output::FractionalSecondsOutput).
   30    262   
    pub fn builder() -> crate::output::fractional_seconds_output::Builder {
   31    263   
        crate::output::fractional_seconds_output::Builder::default()
   32    264   
    }
   33    265   
}
   34    266   
   35    267   
#[allow(missing_docs)] // documentation missing in model
   36    268   
#[derive(
   37    269   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   38    270   
)]
   39    271   
pub struct DatetimeOffsetsOutput {
   40    272   
    #[allow(missing_docs)] // documentation missing in model
   41    273   
    pub datetime: ::std::option::Option<::aws_smithy_types::DateTime>,
   42    274   
}
   43    275   
impl DatetimeOffsetsOutput {
   44    276   
    #[allow(missing_docs)] // documentation missing in model
   45    277   
    pub fn datetime(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
   46    278   
        self.datetime.as_ref()
   47    279   
    }
   48    280   
}
   49    281   
impl DatetimeOffsetsOutput {
   50    282   
    /// Creates a new builder-style object to manufacture [`DatetimeOffsetsOutput`](crate::output::DatetimeOffsetsOutput).
   51    283   
    pub fn builder() -> crate::output::datetime_offsets_output::Builder {
   52    284   
        crate::output::datetime_offsets_output::Builder::default()
   53    285   
    }
   54    286   
}
   55    287   
         288  +
#[allow(missing_docs)] // documentation missing in model
         289  +
#[derive(
         290  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         291  +
)]
         292  +
pub struct TestNoInputNoPayloadOutput {
         293  +
    #[allow(missing_docs)] // documentation missing in model
         294  +
    pub test_id: ::std::option::Option<::std::string::String>,
         295  +
}
         296  +
impl TestNoInputNoPayloadOutput {
         297  +
    #[allow(missing_docs)] // documentation missing in model
         298  +
    pub fn test_id(&self) -> ::std::option::Option<&str> {
         299  +
        self.test_id.as_deref()
         300  +
    }
         301  +
}
         302  +
impl TestNoInputNoPayloadOutput {
         303  +
    /// Creates a new builder-style object to manufacture [`TestNoInputNoPayloadOutput`](crate::output::TestNoInputNoPayloadOutput).
         304  +
    pub fn builder() -> crate::output::test_no_input_no_payload_output::Builder {
         305  +
        crate::output::test_no_input_no_payload_output::Builder::default()
         306  +
    }
         307  +
}
         308  +
   56    309   
#[allow(missing_docs)] // documentation missing in model
   57    310   
#[derive(
   58    311   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   59    312   
)]
   60    313   
pub struct TestNoPayloadOutput {
   61    314   
    #[allow(missing_docs)] // documentation missing in model
   62    315   
    pub test_id: ::std::option::Option<::std::string::String>,
   63    316   
}
   64    317   
impl TestNoPayloadOutput {
   65    318   
    #[allow(missing_docs)] // documentation missing in model
@@ -2049,2302 +2108,2730 @@
 2069   2322   
#[derive(
 2070   2323   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2071   2324   
)]
 2072   2325   
pub struct NoInputAndNoOutputOutput {}
 2073   2326   
impl NoInputAndNoOutputOutput {
 2074   2327   
    /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputOutput`](crate::output::NoInputAndNoOutputOutput).
 2075   2328   
    pub fn builder() -> crate::output::no_input_and_no_output_output::Builder {
 2076   2329   
        crate::output::no_input_and_no_output_output::Builder::default()
 2077   2330   
    }
 2078   2331   
}
        2332  +
/// See [`OperationWithNestedStructureOutput`](crate::output::OperationWithNestedStructureOutput).
        2333  +
///
        2334  +
pub mod operation_with_nested_structure_output {
        2335  +
        2336  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        2337  +
    /// Holds one variant for each of the ways the builder can fail.
        2338  +
    #[non_exhaustive]
        2339  +
    #[allow(clippy::enum_variant_names)]
        2340  +
    pub enum ConstraintViolation {
        2341  +
        /// `dialog` was not provided but it is required when building `OperationWithNestedStructureOutput`.
        2342  +
        MissingDialog,
        2343  +
    }
        2344  +
    impl ::std::fmt::Display for ConstraintViolation {
        2345  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2346  +
            match self {
        2347  +
                ConstraintViolation::MissingDialog => write!(f, "`dialog` was not provided but it is required when building `OperationWithNestedStructureOutput`"),
        2348  +
            }
        2349  +
        }
        2350  +
    }
        2351  +
    impl ::std::error::Error for ConstraintViolation {}
        2352  +
    impl ::std::convert::TryFrom<Builder> for crate::output::OperationWithNestedStructureOutput {
        2353  +
        type Error = ConstraintViolation;
        2354  +
        2355  +
        fn try_from(builder: Builder) -> Result<Self, Self::Error> {
        2356  +
            builder.build()
        2357  +
        }
        2358  +
    }
        2359  +
    /// A builder for [`OperationWithNestedStructureOutput`](crate::output::OperationWithNestedStructureOutput).
        2360  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2361  +
    pub struct Builder {
        2362  +
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
        2363  +
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
        2364  +
        pub(crate) dialog_map: ::std::option::Option<
        2365  +
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        2366  +
        >,
        2367  +
    }
        2368  +
    impl Builder {
        2369  +
        #[allow(missing_docs)] // documentation missing in model
        2370  +
        pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
        2371  +
            self.dialog = Some(input);
        2372  +
            self
        2373  +
        }
        2374  +
        #[allow(missing_docs)] // documentation missing in model
        2375  +
        pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
        2376  +
            self.dialog_list = Some(input);
        2377  +
            self
        2378  +
        }
        2379  +
        #[allow(missing_docs)] // documentation missing in model
        2380  +
        pub fn dialog_map(
        2381  +
            mut self,
        2382  +
            input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        2383  +
        ) -> Self {
        2384  +
            self.dialog_map = Some(input);
        2385  +
            self
        2386  +
        }
        2387  +
        /// Consumes the builder and constructs a [`OperationWithNestedStructureOutput`](crate::output::OperationWithNestedStructureOutput).
        2388  +
        ///
        2389  +
        /// The builder fails to construct a [`OperationWithNestedStructureOutput`](crate::output::OperationWithNestedStructureOutput) if a [`ConstraintViolation`] occurs.
        2390  +
        ///
        2391  +
        pub fn build(
        2392  +
            self,
        2393  +
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
        2394  +
        {
        2395  +
            self.build_enforcing_all_constraints()
        2396  +
        }
        2397  +
        fn build_enforcing_all_constraints(
        2398  +
            self,
        2399  +
        ) -> Result<crate::output::OperationWithNestedStructureOutput, ConstraintViolation>
        2400  +
        {
        2401  +
            Ok(crate::output::OperationWithNestedStructureOutput {
        2402  +
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
        2403  +
                dialog_list: self.dialog_list.unwrap_or_else(
        2404  +
                    #[allow(clippy::redundant_closure)]
        2405  +
                    || ::std::vec::Vec::new(),
        2406  +
                ),
        2407  +
                dialog_map: self.dialog_map.unwrap_or_else(
        2408  +
                    #[allow(clippy::redundant_closure)]
        2409  +
                    || ::std::collections::HashMap::new(),
        2410  +
                ),
        2411  +
            })
        2412  +
        }
        2413  +
    }
        2414  +
}
        2415  +
/// See [`OperationWithDefaultsOutput`](crate::output::OperationWithDefaultsOutput).
        2416  +
///
        2417  +
pub mod operation_with_defaults_output {
        2418  +
        2419  +
    impl ::std::convert::From<Builder> for crate::output::OperationWithDefaultsOutput {
        2420  +
        fn from(builder: Builder) -> Self {
        2421  +
            builder.build()
        2422  +
        }
        2423  +
    }
        2424  +
    /// A builder for [`OperationWithDefaultsOutput`](crate::output::OperationWithDefaultsOutput).
        2425  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2426  +
    pub struct Builder {
        2427  +
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
        2428  +
        pub(crate) default_boolean: ::std::option::Option<bool>,
        2429  +
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
        2430  +
        pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
        2431  +
        pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
        2432  +
        pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
        2433  +
        pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
        2434  +
        pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
        2435  +
        pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        2436  +
        pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        2437  +
        pub(crate) default_byte: ::std::option::Option<i8>,
        2438  +
        pub(crate) default_short: ::std::option::Option<i16>,
        2439  +
        pub(crate) default_integer: ::std::option::Option<i32>,
        2440  +
        pub(crate) default_long: ::std::option::Option<i64>,
        2441  +
        pub(crate) default_float: ::std::option::Option<f32>,
        2442  +
        pub(crate) default_double: ::std::option::Option<f64>,
        2443  +
        pub(crate) default_map: ::std::option::Option<
        2444  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        2445  +
        >,
        2446  +
        pub(crate) default_enum: ::std::option::Option<crate::model::TestEnum>,
        2447  +
        pub(crate) default_int_enum: ::std::option::Option<i32>,
        2448  +
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
        2449  +
        pub(crate) false_boolean: ::std::option::Option<bool>,
        2450  +
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        2451  +
        pub(crate) zero_byte: ::std::option::Option<i8>,
        2452  +
        pub(crate) zero_short: ::std::option::Option<i16>,
        2453  +
        pub(crate) zero_integer: ::std::option::Option<i32>,
        2454  +
        pub(crate) zero_long: ::std::option::Option<i64>,
        2455  +
        pub(crate) zero_float: ::std::option::Option<f32>,
        2456  +
        pub(crate) zero_double: ::std::option::Option<f64>,
        2457  +
    }
        2458  +
    impl Builder {
        2459  +
        #[allow(missing_docs)] // documentation missing in model
        2460  +
        pub fn default_string(mut self, input: ::std::string::String) -> Self {
        2461  +
            self.default_string = Some(input);
        2462  +
            self
        2463  +
        }
        2464  +
        #[allow(missing_docs)] // documentation missing in model
        2465  +
        pub fn default_boolean(mut self, input: bool) -> Self {
        2466  +
            self.default_boolean = Some(input);
        2467  +
            self
        2468  +
        }
        2469  +
        #[allow(missing_docs)] // documentation missing in model
        2470  +
        pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
        2471  +
            self.default_list = Some(input);
        2472  +
            self
        2473  +
        }
        2474  +
        #[allow(missing_docs)] // documentation missing in model
        2475  +
        pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
        2476  +
            self.default_document_map = Some(input);
        2477  +
            self
        2478  +
        }
        2479  +
        #[allow(missing_docs)] // documentation missing in model
        2480  +
        pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
        2481  +
            self.default_document_string = Some(input);
        2482  +
            self
        2483  +
        }
        2484  +
        #[allow(missing_docs)] // documentation missing in model
        2485  +
        pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
        2486  +
            self.default_document_boolean = Some(input);
        2487  +
            self
        2488  +
        }
        2489  +
        #[allow(missing_docs)] // documentation missing in model
        2490  +
        pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
        2491  +
            self.default_document_list = Some(input);
        2492  +
            self
        2493  +
        }
        2494  +
        #[allow(missing_docs)] // documentation missing in model
        2495  +
        pub fn default_null_document(
        2496  +
            mut self,
        2497  +
            input: ::std::option::Option<::aws_smithy_types::Document>,
        2498  +
        ) -> Self {
        2499  +
            self.default_null_document = input;
        2500  +
            self
        2501  +
        }
        2502  +
        #[allow(missing_docs)] // documentation missing in model
        2503  +
        pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        2504  +
            self.default_timestamp = Some(input);
        2505  +
            self
        2506  +
        }
        2507  +
        #[allow(missing_docs)] // documentation missing in model
        2508  +
        pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        2509  +
            self.default_blob = Some(input);
        2510  +
            self
        2511  +
        }
        2512  +
        #[allow(missing_docs)] // documentation missing in model
        2513  +
        pub fn default_byte(mut self, input: i8) -> Self {
        2514  +
            self.default_byte = Some(input);
        2515  +
            self
        2516  +
        }
        2517  +
        #[allow(missing_docs)] // documentation missing in model
        2518  +
        pub fn default_short(mut self, input: i16) -> Self {
        2519  +
            self.default_short = Some(input);
        2520  +
            self
        2521  +
        }
        2522  +
        #[allow(missing_docs)] // documentation missing in model
        2523  +
        pub fn default_integer(mut self, input: i32) -> Self {
        2524  +
            self.default_integer = Some(input);
        2525  +
            self
        2526  +
        }
        2527  +
        #[allow(missing_docs)] // documentation missing in model
        2528  +
        pub fn default_long(mut self, input: i64) -> Self {
        2529  +
            self.default_long = Some(input);
        2530  +
            self
        2531  +
        }
        2532  +
        #[allow(missing_docs)] // documentation missing in model
        2533  +
        pub fn default_float(mut self, input: f32) -> Self {
        2534  +
            self.default_float = Some(input);
        2535  +
            self
        2536  +
        }
        2537  +
        #[allow(missing_docs)] // documentation missing in model
        2538  +
        pub fn default_double(mut self, input: f64) -> Self {
        2539  +
            self.default_double = Some(input);
        2540  +
            self
        2541  +
        }
        2542  +
        #[allow(missing_docs)] // documentation missing in model
        2543  +
        pub fn default_map(
        2544  +
            mut self,
        2545  +
            input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        2546  +
        ) -> Self {
        2547  +
            self.default_map = Some(input);
        2548  +
            self
        2549  +
        }
        2550  +
        #[allow(missing_docs)] // documentation missing in model
        2551  +
        pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
        2552  +
            self.default_enum = Some(input);
        2553  +
            self
        2554  +
        }
        2555  +
        #[allow(missing_docs)] // documentation missing in model
        2556  +
        pub fn default_int_enum(mut self, input: i32) -> Self {
        2557  +
            self.default_int_enum = Some(input);
        2558  +
            self
        2559  +
        }
        2560  +
        #[allow(missing_docs)] // documentation missing in model
        2561  +
        pub fn empty_string(mut self, input: ::std::string::String) -> Self {
        2562  +
            self.empty_string = Some(input);
        2563  +
            self
        2564  +
        }
        2565  +
        #[allow(missing_docs)] // documentation missing in model
        2566  +
        pub fn false_boolean(mut self, input: bool) -> Self {
        2567  +
            self.false_boolean = Some(input);
        2568  +
            self
        2569  +
        }
        2570  +
        #[allow(missing_docs)] // documentation missing in model
        2571  +
        pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        2572  +
            self.empty_blob = Some(input);
        2573  +
            self
        2574  +
        }
        2575  +
        #[allow(missing_docs)] // documentation missing in model
        2576  +
        pub fn zero_byte(mut self, input: i8) -> Self {
        2577  +
            self.zero_byte = Some(input);
        2578  +
            self
        2579  +
        }
        2580  +
        #[allow(missing_docs)] // documentation missing in model
        2581  +
        pub fn zero_short(mut self, input: i16) -> Self {
        2582  +
            self.zero_short = Some(input);
        2583  +
            self
        2584  +
        }
        2585  +
        #[allow(missing_docs)] // documentation missing in model
        2586  +
        pub fn zero_integer(mut self, input: i32) -> Self {
        2587  +
            self.zero_integer = Some(input);
        2588  +
            self
        2589  +
        }
        2590  +
        #[allow(missing_docs)] // documentation missing in model
        2591  +
        pub fn zero_long(mut self, input: i64) -> Self {
        2592  +
            self.zero_long = Some(input);
        2593  +
            self
        2594  +
        }
        2595  +
        #[allow(missing_docs)] // documentation missing in model
        2596  +
        pub fn zero_float(mut self, input: f32) -> Self {
        2597  +
            self.zero_float = Some(input);
        2598  +
            self
        2599  +
        }
        2600  +
        #[allow(missing_docs)] // documentation missing in model
        2601  +
        pub fn zero_double(mut self, input: f64) -> Self {
        2602  +
            self.zero_double = Some(input);
        2603  +
            self
        2604  +
        }
        2605  +
        /// Consumes the builder and constructs a [`OperationWithDefaultsOutput`](crate::output::OperationWithDefaultsOutput).
        2606  +
        pub fn build(self) -> crate::output::OperationWithDefaultsOutput {
        2607  +
            self.build_enforcing_all_constraints()
        2608  +
        }
        2609  +
        fn build_enforcing_all_constraints(self) -> crate::output::OperationWithDefaultsOutput {
        2610  +
            crate::output::OperationWithDefaultsOutput {
        2611  +
                default_string: self.default_string.unwrap_or_else(
        2612  +
                    #[allow(clippy::redundant_closure)]
        2613  +
                    || String::from("hi"),
        2614  +
                ),
        2615  +
                default_boolean: self.default_boolean.unwrap_or(true),
        2616  +
                default_list: self.default_list.unwrap_or_else(
        2617  +
                    #[allow(clippy::redundant_closure)]
        2618  +
                    || ::std::vec::Vec::new(),
        2619  +
                ),
        2620  +
                default_document_map: self.default_document_map.unwrap_or_else(
        2621  +
                    #[allow(clippy::redundant_closure)]
        2622  +
                    || ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()),
        2623  +
                ),
        2624  +
                default_document_string: self.default_document_string.unwrap_or_else(
        2625  +
                    #[allow(clippy::redundant_closure)]
        2626  +
                    || ::aws_smithy_types::Document::String(::std::string::String::from("hi")),
        2627  +
                ),
        2628  +
                default_document_boolean: self
        2629  +
                    .default_document_boolean
        2630  +
                    .unwrap_or(::aws_smithy_types::Document::Bool(true)),
        2631  +
                default_document_list: self.default_document_list.unwrap_or_else(
        2632  +
                    #[allow(clippy::redundant_closure)]
        2633  +
                    || ::aws_smithy_types::Document::Array(::std::vec::Vec::new()),
        2634  +
                ),
        2635  +
                default_null_document: self.default_null_document,
        2636  +
                default_timestamp: self.default_timestamp.unwrap_or_else(
        2637  +
                    #[allow(clippy::redundant_closure)]
        2638  +
                    || ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64),
        2639  +
                ),
        2640  +
                default_blob: self.default_blob.unwrap_or_else(
        2641  +
                    #[allow(clippy::redundant_closure)]
        2642  +
                    || ::aws_smithy_types::Blob::new("abc"),
        2643  +
                ),
        2644  +
                default_byte: self.default_byte.unwrap_or(1i8),
        2645  +
                default_short: self.default_short.unwrap_or(1i16),
        2646  +
                default_integer: self.default_integer.unwrap_or(10i32),
        2647  +
                default_long: self.default_long.unwrap_or(100i64),
        2648  +
                default_float: self.default_float.unwrap_or(1.0f32),
        2649  +
                default_double: self.default_double.unwrap_or(1.0f64),
        2650  +
                default_map: self.default_map.unwrap_or_else(
        2651  +
                    #[allow(clippy::redundant_closure)]
        2652  +
                    || ::std::collections::HashMap::new(),
        2653  +
                ),
        2654  +
                default_enum: self.default_enum.unwrap_or(
        2655  +
                    "FOO"
        2656  +
                        .parse::<crate::model::TestEnum>()
        2657  +
                        .expect("static value validated to member"),
        2658  +
                ),
        2659  +
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
        2660  +
                empty_string: self.empty_string.unwrap_or_else(
        2661  +
                    #[allow(clippy::redundant_closure)]
        2662  +
                    || String::from(""),
        2663  +
                ),
        2664  +
                false_boolean: self.false_boolean.unwrap_or(false),
        2665  +
                empty_blob: self.empty_blob.unwrap_or_else(
        2666  +
                    #[allow(clippy::redundant_closure)]
        2667  +
                    || ::aws_smithy_types::Blob::new(""),
        2668  +
                ),
        2669  +
                zero_byte: self.zero_byte.unwrap_or(0i8),
        2670  +
                zero_short: self.zero_short.unwrap_or(0i16),
        2671  +
                zero_integer: self.zero_integer.unwrap_or(0i32),
        2672  +
                zero_long: self.zero_long.unwrap_or(0i64),
        2673  +
                zero_float: self.zero_float.unwrap_or(0.0f32),
        2674  +
                zero_double: self.zero_double.unwrap_or(0.0f64),
        2675  +
            }
        2676  +
        }
        2677  +
    }
        2678  +
}
        2679  +
/// See [`ContentTypeParametersOutput`](crate::output::ContentTypeParametersOutput).
        2680  +
///
        2681  +
pub mod content_type_parameters_output {
        2682  +
        2683  +
    impl ::std::convert::From<Builder> for crate::output::ContentTypeParametersOutput {
        2684  +
        fn from(builder: Builder) -> Self {
        2685  +
            builder.build()
        2686  +
        }
        2687  +
    }
        2688  +
    /// A builder for [`ContentTypeParametersOutput`](crate::output::ContentTypeParametersOutput).
        2689  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2690  +
    pub struct Builder {}
        2691  +
    impl Builder {
        2692  +
        /// Consumes the builder and constructs a [`ContentTypeParametersOutput`](crate::output::ContentTypeParametersOutput).
        2693  +
        pub fn build(self) -> crate::output::ContentTypeParametersOutput {
        2694  +
            self.build_enforcing_all_constraints()
        2695  +
        }
        2696  +
        fn build_enforcing_all_constraints(self) -> crate::output::ContentTypeParametersOutput {
        2697  +
            crate::output::ContentTypeParametersOutput {}
        2698  +
        }
        2699  +
    }
        2700  +
}
 2079   2701   
/// See [`PutWithContentEncodingOutput`](crate::output::PutWithContentEncodingOutput).
 2080   2702   
///
 2081   2703   
pub mod put_with_content_encoding_output {
 2082   2704   
 2083   2705   
    impl ::std::convert::From<Builder> for crate::output::PutWithContentEncodingOutput {
 2084   2706   
        fn from(builder: Builder) -> Self {
 2085   2707   
            builder.build()
 2086   2708   
        }
 2087   2709   
    }
 2088   2710   
    /// A builder for [`PutWithContentEncodingOutput`](crate::output::PutWithContentEncodingOutput).
@@ -2139,2761 +2198,2851 @@
 2159   2781   
        pub fn build(self) -> crate::output::DatetimeOffsetsOutput {
 2160   2782   
            self.build_enforcing_all_constraints()
 2161   2783   
        }
 2162   2784   
        fn build_enforcing_all_constraints(self) -> crate::output::DatetimeOffsetsOutput {
 2163   2785   
            crate::output::DatetimeOffsetsOutput {
 2164   2786   
                datetime: self.datetime,
 2165   2787   
            }
 2166   2788   
        }
 2167   2789   
    }
 2168   2790   
}
        2791  +
/// See [`TestNoInputNoPayloadOutput`](crate::output::TestNoInputNoPayloadOutput).
        2792  +
///
        2793  +
pub mod test_no_input_no_payload_output {
        2794  +
        2795  +
    impl ::std::convert::From<Builder> for crate::output::TestNoInputNoPayloadOutput {
        2796  +
        fn from(builder: Builder) -> Self {
        2797  +
            builder.build()
        2798  +
        }
        2799  +
    }
        2800  +
    /// A builder for [`TestNoInputNoPayloadOutput`](crate::output::TestNoInputNoPayloadOutput).
        2801  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2802  +
    pub struct Builder {
        2803  +
        pub(crate) test_id: ::std::option::Option<::std::string::String>,
        2804  +
    }
        2805  +
    impl Builder {
        2806  +
        #[allow(missing_docs)] // documentation missing in model
        2807  +
        pub fn test_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2808  +
            self.test_id = input;
        2809  +
            self
        2810  +
        }
        2811  +
        /// Consumes the builder and constructs a [`TestNoInputNoPayloadOutput`](crate::output::TestNoInputNoPayloadOutput).
        2812  +
        pub fn build(self) -> crate::output::TestNoInputNoPayloadOutput {
        2813  +
            self.build_enforcing_all_constraints()
        2814  +
        }
        2815  +
        fn build_enforcing_all_constraints(self) -> crate::output::TestNoInputNoPayloadOutput {
        2816  +
            crate::output::TestNoInputNoPayloadOutput {
        2817  +
                test_id: self.test_id,
        2818  +
            }
        2819  +
        }
        2820  +
    }
        2821  +
}
 2169   2822   
/// See [`TestNoPayloadOutput`](crate::output::TestNoPayloadOutput).
 2170   2823   
///
 2171   2824   
pub mod test_no_payload_output {
 2172   2825   
 2173   2826   
    impl ::std::convert::From<Builder> for crate::output::TestNoPayloadOutput {
 2174   2827   
        fn from(builder: Builder) -> Self {
 2175   2828   
            builder.build()
 2176   2829   
        }
 2177   2830   
    }
 2178   2831   
    /// A builder for [`TestNoPayloadOutput`](crate::output::TestNoPayloadOutput).

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

@@ -1,1 +37,39 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
pub(crate) mod shape_all_query_string_types;
    3      3   
    4      4   
pub(crate) mod shape_constant_and_variable_query_string;
    5      5   
    6      6   
pub(crate) mod shape_constant_query_string;
    7      7   
           8  +
pub(crate) mod shape_content_type_parameters;
           9  +
    8     10   
pub(crate) mod shape_datetime_offsets;
    9     11   
   10     12   
pub(crate) mod shape_document_type;
   11     13   
   12     14   
pub(crate) mod shape_document_type_as_map_value;
   13     15   
   14     16   
pub(crate) mod shape_document_type_as_payload;
   15     17   
   16     18   
pub(crate) mod shape_empty_input_and_empty_output;
   17     19   
@@ -124,126 +239,249 @@
  144    146   
pub(crate) mod shape_no_input_and_output;
  145    147   
  146    148   
pub(crate) mod shape_null_and_empty_headers_client;
  147    149   
  148    150   
pub(crate) mod shape_null_and_empty_headers_server;
  149    151   
  150    152   
pub(crate) mod shape_omits_null_serializes_empty_string;
  151    153   
  152    154   
pub(crate) mod shape_omits_serializing_empty_lists;
  153    155   
         156  +
pub(crate) mod shape_operation_with_defaults;
         157  +
         158  +
pub(crate) mod shape_operation_with_nested_structure;
         159  +
  154    160   
pub(crate) mod shape_post_player_action;
  155    161   
  156    162   
pub(crate) mod shape_post_union_with_json_name;
  157    163   
  158    164   
pub(crate) mod shape_put_with_content_encoding;
  159    165   
  160    166   
pub(crate) mod shape_query_idempotency_token_auto_fill;
  161    167   
  162    168   
pub(crate) mod shape_query_params_as_string_list_map;
  163    169   
  164    170   
pub(crate) mod shape_query_precedence;
  165    171   
  166    172   
pub(crate) mod shape_recursive_shapes;
  167    173   
  168    174   
pub(crate) mod shape_simple_scalar_properties;
  169    175   
  170    176   
pub(crate) mod shape_sparse_json_lists;
  171    177   
  172    178   
pub(crate) mod shape_sparse_json_maps;
  173    179   
  174    180   
pub(crate) mod shape_streaming_traits;
  175    181   
  176    182   
pub(crate) mod shape_streaming_traits_require_length;
  177    183   
  178    184   
pub(crate) mod shape_streaming_traits_with_media_type;
  179    185   
  180    186   
pub(crate) mod shape_test_body_structure;
  181    187   
         188  +
pub(crate) mod shape_test_no_input_no_payload;
         189  +
  182    190   
pub(crate) mod shape_test_no_payload;
  183    191   
  184    192   
pub(crate) mod shape_test_payload_blob;
  185    193   
  186    194   
pub(crate) mod shape_test_payload_structure;
  187    195   
  188    196   
pub(crate) mod shape_timestamp_format_headers;
  189    197   
  190    198   
pub(crate) mod shape_unit_input_and_output;
  191    199   
  192    200   
pub(crate) mod shape_all_query_string_types_input;
  193    201   
  194    202   
pub(crate) mod shape_complex_error;
  195    203   
  196    204   
pub(crate) mod shape_constant_and_variable_query_string_input;
  197    205   
  198    206   
pub(crate) mod shape_constant_query_string_input;
  199    207   
  200         -
pub(crate) mod shape_datetime_offsets_output;
  201         -
  202    208   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
  203    209   
    if data.is_empty() {
  204    210   
        b"{}"
  205    211   
    } else {
  206    212   
        data
  207    213   
    }
  208    214   
}
  209    215   
         216  +
pub(crate) mod shape_content_type_parameters_output;
         217  +
         218  +
pub(crate) mod shape_datetime_offsets_output;
         219  +
  210    220   
pub(crate) mod shape_document_type_as_map_value_output;
  211    221   
  212    222   
pub(crate) mod shape_document_type_as_payload_input;
  213    223   
  214    224   
pub fn serialize_document(input: &::aws_smithy_types::Document) -> ::std::vec::Vec<u8> {
  215    225   
    let mut out = String::new();
  216    226   
    ::aws_smithy_json::serialize::JsonValueWriter::new(&mut out).document(input);
  217    227   
    out.into_bytes()
  218    228   
}
  219    229   
@@ -336,346 +451,471 @@
  356    366   
pub(crate) mod shape_null_and_empty_headers_client_input;
  357    367   
  358    368   
pub(crate) mod shape_null_and_empty_headers_client_output;
  359    369   
  360    370   
pub(crate) mod shape_null_and_empty_headers_server_input;
  361    371   
  362    372   
pub(crate) mod shape_null_and_empty_headers_server_output;
  363    373   
  364    374   
pub(crate) mod shape_omits_null_serializes_empty_string_input;
  365    375   
         376  +
pub(crate) mod shape_operation_with_defaults_output;
         377  +
         378  +
pub(crate) mod shape_operation_with_nested_structure_output;
         379  +
  366    380   
pub(crate) mod shape_post_player_action_output;
  367    381   
  368    382   
pub(crate) mod shape_post_union_with_json_name_output;
  369    383   
  370    384   
pub(crate) mod shape_put_with_content_encoding_input;
  371    385   
  372    386   
pub(crate) mod shape_query_idempotency_token_auto_fill_input;
  373    387   
  374    388   
pub(crate) mod shape_query_params_as_string_list_map_input;
  375    389   
  376    390   
pub(crate) mod shape_query_precedence_input;
  377    391   
  378    392   
pub(crate) mod shape_recursive_shapes_output;
  379    393   
  380    394   
pub(crate) mod shape_simple_scalar_properties_input;
  381    395   
  382    396   
pub(crate) mod shape_simple_scalar_properties_output;
  383    397   
  384    398   
pub(crate) mod shape_sparse_json_lists_output;
  385    399   
  386    400   
pub(crate) mod shape_sparse_json_maps_output;
  387    401   
  388    402   
pub(crate) mod shape_streaming_traits_input;
  389    403   
  390    404   
pub(crate) mod shape_streaming_traits_output;
  391    405   
  392    406   
pub(crate) mod shape_streaming_traits_require_length_input;
  393    407   
  394    408   
pub(crate) mod shape_streaming_traits_with_media_type_input;
  395    409   
  396    410   
pub(crate) mod shape_streaming_traits_with_media_type_output;
  397    411   
  398    412   
pub(crate) mod shape_test_body_structure_input;
  399    413   
  400    414   
pub(crate) mod shape_test_body_structure_output;
  401    415   
         416  +
pub(crate) mod shape_test_no_input_no_payload_output;
         417  +
  402    418   
pub(crate) mod shape_test_no_payload_input;
  403    419   
  404    420   
pub(crate) mod shape_test_no_payload_output;
  405    421   
  406    422   
pub(crate) mod shape_test_payload_blob_input;
  407    423   
  408    424   
pub(crate) mod shape_test_payload_blob_output;
  409    425   
  410    426   
pub(crate) mod shape_test_payload_structure_input;
  411    427   
  412    428   
pub(crate) mod shape_test_payload_structure_output;
  413    429   
  414    430   
pub(crate) mod shape_timestamp_format_headers_input;
  415    431   
  416    432   
pub(crate) mod shape_timestamp_format_headers_output;
  417    433   
  418    434   
pub(crate) mod shape_validation_exception;
  419    435   
  420    436   
pub(crate) mod shape_boolean_list;
  421    437   
         438  +
pub(crate) mod shape_client_optional_defaults;
         439  +
         440  +
pub(crate) mod shape_defaults;
         441  +
  422    442   
pub(crate) mod shape_dense_boolean_map;
  423    443   
  424    444   
pub(crate) mod shape_dense_number_map;
  425    445   
  426    446   
pub(crate) mod shape_dense_set_map;
  427    447   
  428    448   
pub(crate) mod shape_dense_string_map;
  429    449   
  430    450   
pub(crate) mod shape_dense_struct_map;
  431    451   
@@ -460,480 +0,540 @@
  480    500   
pub(crate) mod shape_string_list;
  481    501   
  482    502   
pub(crate) mod shape_string_set;
  483    503   
  484    504   
pub(crate) mod shape_structure_list;
  485    505   
  486    506   
pub(crate) mod shape_test_config;
  487    507   
  488    508   
pub(crate) mod shape_timestamp_list;
  489    509   
         510  +
pub(crate) mod shape_top_level;
         511  +
  490    512   
pub(crate) mod shape_union_payload;
  491    513   
  492    514   
pub(crate) mod shape_union_with_json_name;
  493    515   
  494    516   
pub(crate) mod shape_complex_nested_error_data;
  495    517   
         518  +
pub(crate) mod shape_dialog;
         519  +
         520  +
pub(crate) mod shape_dialog_list;
         521  +
         522  +
pub(crate) mod shape_dialog_map;
         523  +
  496    524   
pub(crate) mod shape_greeting_struct;
  497    525   
  498    526   
pub(crate) mod shape_recursive_shapes_input_output_nested2;
  499    527   
  500    528   
pub(crate) mod shape_renamed_greeting;
  501    529   
  502    530   
pub(crate) mod shape_string_map;
  503    531   
  504    532   
pub(crate) mod shape_structure_list_member;
  505    533   
         534  +
pub(crate) mod shape_test_string_list;
         535  +
         536  +
pub(crate) mod shape_test_string_map;
         537  +
  506    538   
pub(crate) mod shape_validation_exception_field;
         539  +
         540  +
pub(crate) mod shape_farewell;

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

@@ -0,1 +0,57 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub(crate) fn de_client_optional_defaults<'a, I>(
           3  +
    tokens: &mut ::std::iter::Peekable<I>,
           4  +
) -> Result<
           5  +
    Option<crate::model::ClientOptionalDefaults>,
           6  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
           7  +
>
           8  +
where
           9  +
    I: Iterator<
          10  +
        Item = Result<
          11  +
            ::aws_smithy_json::deserialize::Token<'a>,
          12  +
            ::aws_smithy_json::deserialize::error::DeserializeError,
          13  +
        >,
          14  +
    >,
          15  +
{
          16  +
    match tokens.next().transpose()? {
          17  +
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
          18  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          19  +
            #[allow(unused_mut)]
          20  +
            let mut builder = crate::model::client_optional_defaults::Builder::default();
          21  +
            loop {
          22  +
                match tokens.next().transpose()? {
          23  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          24  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          25  +
                        match key.to_unescaped()?.as_ref() {
          26  +
                            "member" => {
          27  +
                                if let Some(v) =
          28  +
                                    ::aws_smithy_json::deserialize::token::expect_number_or_null(
          29  +
                                        tokens.next(),
          30  +
                                    )?
          31  +
                                    .map(i32::try_from)
          32  +
                                    .transpose()?
          33  +
                                {
          34  +
                                    builder = builder.set_member(v);
          35  +
                                }
          36  +
                            }
          37  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          38  +
                        }
          39  +
                    }
          40  +
                    other => {
          41  +
                        return Err(
          42  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          43  +
                                format!("expected object key or end object, found: {:?}", other),
          44  +
                            ),
          45  +
                        )
          46  +
                    }
          47  +
                }
          48  +
            }
          49  +
            Ok(Some(builder.build()))
          50  +
        }
          51  +
        _ => Err(
          52  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          53  +
                "expected start object or null",
          54  +
            ),
          55  +
        ),
          56  +
    }
          57  +
}

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

@@ -0,1 +0,116 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
#[allow(clippy::unnecessary_wraps)]
           3  +
pub async fn de_content_type_parameters_http_request<B>(
           4  +
    #[allow(unused_variables)] request: ::http::Request<B>,
           5  +
) -> std::result::Result<
           6  +
    crate::input::ContentTypeParametersInput,
           7  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection,
           8  +
>
           9  +
where
          10  +
    B: ::aws_smithy_http_server::body::HttpBody + Send,
          11  +
    B::Data: Send,
          12  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
          13  +
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
          14  +
{
          15  +
    Ok({
          16  +
        #[allow(unused_mut)]
          17  +
        let mut input = crate::input::content_type_parameters_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_http_server::protocol::content_type_header_classifier_smithy(
          25  +
                &headers,
          26  +
                Some("application/json"),
          27  +
            )?;
          28  +
            input =
          29  +
                crate::protocol_serde::shape_content_type_parameters::de_content_type_parameters(
          30  +
                    bytes.as_ref(),
          31  +
                    input,
          32  +
                )?;
          33  +
        }
          34  +
        input.build()
          35  +
    })
          36  +
}
          37  +
          38  +
#[allow(clippy::unnecessary_wraps)]
          39  +
pub fn ser_content_type_parameters_http_response(
          40  +
    #[allow(unused_variables)] output: crate::output::ContentTypeParametersOutput,
          41  +
) -> std::result::Result<
          42  +
    ::aws_smithy_http_server::response::Response,
          43  +
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::ResponseRejection,
          44  +
> {
          45  +
    Ok({
          46  +
        #[allow(unused_mut)]
          47  +
        let mut builder = ::http::Response::builder();
          48  +
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          49  +
            builder,
          50  +
            ::http::header::CONTENT_TYPE,
          51  +
            "application/json",
          52  +
        );
          53  +
        let http_status: u16 = 200;
          54  +
        builder = builder.status(http_status);
          55  +
        let payload =
          56  +
            crate::protocol_serde::shape_content_type_parameters_output::ser_content_type_parameters_output_output_output(&output)?
          57  +
        ;
          58  +
        let content_length = payload.len();
          59  +
        builder = ::aws_smithy_http::header::set_response_header_if_absent(
          60  +
            builder,
          61  +
            ::http::header::CONTENT_LENGTH,
          62  +
            content_length,
          63  +
        );
          64  +
        let body = ::aws_smithy_http_server::body::to_boxed(payload);
          65  +
        builder.body(body)?
          66  +
    })
          67  +
}
          68  +
          69  +
pub(crate) fn de_content_type_parameters(
          70  +
    value: &[u8],
          71  +
    mut builder: crate::input::content_type_parameters_input::Builder,
          72  +
) -> Result<
          73  +
    crate::input::content_type_parameters_input::Builder,
          74  +
    ::aws_smithy_json::deserialize::error::DeserializeError,
          75  +
> {
          76  +
    let mut tokens_owned =
          77  +
        ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value))
          78  +
            .peekable();
          79  +
    let tokens = &mut tokens_owned;
          80  +
    ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
          81  +
    loop {
          82  +
        match tokens.next().transpose()? {
          83  +
            Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          84  +
            Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          85  +
                match key.to_unescaped()?.as_ref() {
          86  +
                    "value" => {
          87  +
                        builder = builder.set_value(
          88  +
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
          89  +
                                tokens.next(),
          90  +
                            )?
          91  +
                            .map(i32::try_from)
          92  +
                            .transpose()?,
          93  +
                        );
          94  +
                    }
          95  +
                    _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          96  +
                }
          97  +
            }
          98  +
            other => {
          99  +
                return Err(
         100  +
                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
         101  +
                        "expected object key or end object, found: {:?}",
         102  +
                        other
         103  +
                    )),
         104  +
                )
         105  +
            }
         106  +
        }
         107  +
    }
         108  +
    if tokens.next().is_some() {
         109  +
        return Err(
         110  +
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         111  +
                "found more JSON tokens after completing parsing",
         112  +
            ),
         113  +
        );
         114  +
    }
         115  +
    Ok(builder)
         116  +
}