Server Test

Server Test

rev. 7254d43655ed63111c94f599437f2b0d3f55446e (ignoring whitespace)

Files changed:

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

@@ -1,1 +60,52 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// Describes one specific validation failure for an input member.
    4         -
#[derive(
    5         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6         -
)]
    7         -
pub struct ValidationExceptionField {
    8         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    9         -
    pub path: ::std::string::String,
   10         -
    /// A detailed description of the validation failure.
   11         -
    pub message: ::std::string::String,
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           4  +
pub struct InnerShape {
           5  +
    #[allow(missing_docs)] // documentation missing in model
           6  +
    pub required_inner_most_shape: crate::model::InnermostShape,
   12      7   
}
   13         -
impl ValidationExceptionField {
   14         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   15         -
    pub fn path(&self) -> &str {
   16         -
        use std::ops::Deref;
   17         -
        self.path.deref()
   18         -
    }
   19         -
    /// A detailed description of the validation failure.
   20         -
    pub fn message(&self) -> &str {
   21         -
        use std::ops::Deref;
   22         -
        self.message.deref()
           8  +
impl InnerShape {
           9  +
    #[allow(missing_docs)] // documentation missing in model
          10  +
    pub fn required_inner_most_shape(&self) -> &crate::model::InnermostShape {
          11  +
        &self.required_inner_most_shape
   23     12   
    }
   24     13   
}
   25         -
impl ValidationExceptionField {
   26         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
   27         -
    pub fn builder() -> crate::model::validation_exception_field::Builder {
   28         -
        crate::model::validation_exception_field::Builder::default()
          14  +
impl InnerShape {
          15  +
    /// Creates a new builder-style object to manufacture [`InnerShape`](crate::model::InnerShape).
          16  +
    pub fn builder() -> crate::model::inner_shape::Builder {
          17  +
        crate::model::inner_shape::Builder::default()
   29     18   
    }
   30     19   
}
          20  +
impl crate::constrained::Constrained for crate::model::InnerShape {
          21  +
    type Unconstrained = crate::model::inner_shape::Builder;
          22  +
}
   31     23   
   32     24   
#[allow(missing_docs)] // documentation missing in model
   33     25   
///
   34     26   
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
   35     27   
/// [constraint traits]. Use [`HeaderSet::try_from`] to construct values of this type.
   36     28   
///
   37     29   
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
   38     30   
///
   39     31   
#[derive(
   40     32   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
@@ -78,70 +159,129 @@
   98     90   
   99     91   
impl ::std::convert::From<HeaderSet> for ::std::vec::Vec<::std::string::String> {
  100     92   
    fn from(value: HeaderSet) -> Self {
  101     93   
        value.into_inner()
  102     94   
    }
  103     95   
}
  104     96   
impl crate::constrained::Constrained for HeaderSet {
  105     97   
    type Unconstrained = crate::unconstrained::header_set_unconstrained::HeaderSetUnconstrained;
  106     98   
}
  107     99   
  108         -
#[allow(missing_docs)] // documentation missing in model
  109         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  110         -
pub struct InnerShape {
  111         -
    #[allow(missing_docs)] // documentation missing in model
  112         -
    pub required_inner_most_shape: crate::model::InnermostShape,
  113         -
}
  114         -
impl InnerShape {
  115         -
    #[allow(missing_docs)] // documentation missing in model
  116         -
    pub fn required_inner_most_shape(&self) -> &crate::model::InnermostShape {
  117         -
        &self.required_inner_most_shape
  118         -
    }
  119         -
}
  120         -
impl InnerShape {
  121         -
    /// Creates a new builder-style object to manufacture [`InnerShape`](crate::model::InnerShape).
  122         -
    pub fn builder() -> crate::model::inner_shape::Builder {
  123         -
        crate::model::inner_shape::Builder::default()
  124         -
    }
  125         -
}
  126         -
impl crate::constrained::Constrained for crate::model::InnerShape {
  127         -
    type Unconstrained = crate::model::inner_shape::Builder;
  128         -
}
  129         -
  130    100   
#[allow(missing_docs)] // documentation missing in model
  131    101   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  132    102   
pub struct InnermostShape {
  133    103   
    #[allow(missing_docs)] // documentation missing in model
  134    104   
    pub a_string: ::std::string::String,
  135    105   
    #[allow(missing_docs)] // documentation missing in model
  136    106   
    pub a_boolean: bool,
  137    107   
    #[allow(missing_docs)] // documentation missing in model
  138    108   
    pub a_byte: i8,
  139    109   
    #[allow(missing_docs)] // documentation missing in model
@@ -224,194 +283,282 @@
  244    214   
impl InnermostShape {
  245    215   
    /// Creates a new builder-style object to manufacture [`InnermostShape`](crate::model::InnermostShape).
  246    216   
    pub fn builder() -> crate::model::innermost_shape::Builder {
  247    217   
        crate::model::innermost_shape::Builder::default()
  248    218   
    }
  249    219   
}
  250    220   
impl crate::constrained::Constrained for crate::model::InnermostShape {
  251    221   
    type Unconstrained = crate::model::innermost_shape::Builder;
  252    222   
}
  253    223   
         224  +
/// Describes one specific validation failure for an input member.
         225  +
#[derive(
         226  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         227  +
)]
         228  +
pub struct ValidationExceptionField {
         229  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         230  +
    pub path: ::std::string::String,
         231  +
    /// A detailed description of the validation failure.
         232  +
    pub message: ::std::string::String,
         233  +
}
         234  +
impl ValidationExceptionField {
         235  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         236  +
    pub fn path(&self) -> &str {
         237  +
        use std::ops::Deref;
         238  +
        self.path.deref()
         239  +
    }
         240  +
    /// A detailed description of the validation failure.
         241  +
    pub fn message(&self) -> &str {
         242  +
        use std::ops::Deref;
         243  +
        self.message.deref()
         244  +
    }
         245  +
}
         246  +
impl ValidationExceptionField {
         247  +
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         248  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
         249  +
        crate::model::validation_exception_field::Builder::default()
         250  +
    }
         251  +
}
         252  +
  254    253   
#[allow(missing_docs)] // documentation missing in model
  255    254   
#[derive(
  256    255   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  257    256   
)]
  258    257   
pub enum AUnion {
  259    258   
    #[allow(missing_docs)] // documentation missing in model
  260    259   
    I32(i32),
  261    260   
    #[allow(missing_docs)] // documentation missing in model
  262    261   
    String(::std::string::String),
  263    262   
    #[allow(missing_docs)] // documentation missing in model
@@ -292,291 +460,350 @@
  312    311   
pub struct EmptyStructure {}
  313    312   
impl EmptyStructure {
  314    313   
    /// Creates a new builder-style object to manufacture [`EmptyStructure`](crate::model::EmptyStructure).
  315    314   
    pub fn builder() -> crate::model::empty_structure::Builder {
  316    315   
        crate::model::empty_structure::Builder::default()
  317    316   
    }
  318    317   
}
  319    318   
impl crate::constrained::Constrained for crate::model::EmptyStructure {
  320    319   
    type Unconstrained = crate::model::empty_structure::Builder;
  321    320   
}
  322         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  323         -
pub mod validation_exception_field {
  324         -
  325         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  326         -
    /// Holds one variant for each of the ways the builder can fail.
  327         -
    #[non_exhaustive]
  328         -
    #[allow(clippy::enum_variant_names)]
  329         -
    pub enum ConstraintViolation {
  330         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
  331         -
        MissingPath,
  332         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
  333         -
        MissingMessage,
  334         -
    }
  335         -
    impl ::std::fmt::Display for ConstraintViolation {
  336         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  337         -
            match self {
  338         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
  339         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
  340         -
            }
  341         -
        }
  342         -
    }
  343         -
    impl ::std::error::Error for ConstraintViolation {}
  344         -
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
  345         -
        type Error = ConstraintViolation;
  346         -
  347         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  348         -
            builder.build()
  349         -
        }
  350         -
    }
  351         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  352         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  353         -
    pub struct Builder {
  354         -
        pub(crate) path: ::std::option::Option<::std::string::String>,
  355         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
  356         -
    }
  357         -
    impl Builder {
  358         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  359         -
        pub fn path(mut self, input: ::std::string::String) -> Self {
  360         -
            self.path = Some(input);
  361         -
            self
  362         -
        }
  363         -
        /// A detailed description of the validation failure.
  364         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
  365         -
            self.message = Some(input);
  366         -
            self
  367         -
        }
  368         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  369         -
        ///
  370         -
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
  371         -
        ///
  372         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
  373         -
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  374         -
            self.build_enforcing_all_constraints()
  375         -
        }
  376         -
        fn build_enforcing_all_constraints(
  377         -
            self,
  378         -
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  379         -
            Ok(crate::model::ValidationExceptionField {
  380         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  381         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  382         -
            })
  383         -
        }
  384         -
    }
  385         -
}
  386         -
/// See [`HeaderSet`](crate::model::HeaderSet).
  387         -
pub mod header_set {
  388         -
  389         -
    #[allow(clippy::enum_variant_names)]
  390         -
    #[derive(Debug, PartialEq)]
  391         -
    pub enum ConstraintViolation {
  392         -
        /// Constraint violation error when the list does not contain unique items
  393         -
        UniqueItems {
  394         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
  395         -
            /// at least two elements.
  396         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
  397         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
  398         -
            /// Nothing is guaranteed about the order of the indices.
  399         -
            duplicate_indices: ::std::vec::Vec<usize>,
  400         -
            /// The original vector, that contains duplicate items.
  401         -
            original: ::std::vec::Vec<::std::string::String>,
  402         -
        },
  403         -
    }
  404         -
  405         -
    impl ::std::fmt::Display for ConstraintViolation {
  406         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  407         -
            let message = match self {
  408         -
                                Self::UniqueItems { duplicate_indices, .. } =>
  409         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.misc#HeaderSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
  410         -
                            };
  411         -
            write!(f, "{message}")
  412         -
        }
  413         -
    }
  414         -
  415         -
    impl ::std::error::Error for ConstraintViolation {}
  416         -
    impl ConstraintViolation {
  417         -
        pub(crate) fn as_validation_exception_field(
  418         -
            self,
  419         -
            path: ::std::string::String,
  420         -
        ) -> crate::model::ValidationExceptionField {
  421         -
            match self {
  422         -
                        Self::UniqueItems { duplicate_indices, .. } =>
  423         -
                                crate::model::ValidationExceptionField {
  424         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
  425         -
                                    path,
  426         -
                                },
  427         -
                    }
  428         -
        }
  429         -
    }
  430         -
}
  431    321   
/// See [`InnerShape`](crate::model::InnerShape).
  432    322   
pub mod inner_shape {
  433    323   
  434    324   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  435    325   
    /// Holds one variant for each of the ways the builder can fail.
  436    326   
    #[non_exhaustive]
  437    327   
    #[allow(clippy::enum_variant_names)]
  438    328   
    pub enum ConstraintViolation {
  439    329   
        /// `required_inner_most_shape` was not provided but it is required when building `InnerShape`.
  440    330   
        MissingRequiredInnerMostShape,
@@ -501,391 +560,495 @@
  521    411   
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  522    412   
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  523    413   
                    })
  524    414   
                    .map(|res| res.map_err(ConstraintViolation::RequiredInnerMostShape))
  525    415   
                    .transpose()?
  526    416   
                    .ok_or(ConstraintViolation::MissingRequiredInnerMostShape)?,
  527    417   
            })
  528    418   
        }
  529    419   
    }
  530    420   
}
         421  +
/// See [`HeaderSet`](crate::model::HeaderSet).
         422  +
pub mod header_set {
         423  +
         424  +
    #[allow(clippy::enum_variant_names)]
         425  +
    #[derive(Debug, PartialEq)]
         426  +
    pub enum ConstraintViolation {
         427  +
        /// Constraint violation error when the list does not contain unique items
         428  +
        UniqueItems {
         429  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
         430  +
            /// at least two elements.
         431  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
         432  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
         433  +
            /// Nothing is guaranteed about the order of the indices.
         434  +
            duplicate_indices: ::std::vec::Vec<usize>,
         435  +
            /// The original vector, that contains duplicate items.
         436  +
            original: ::std::vec::Vec<::std::string::String>,
         437  +
        },
         438  +
    }
         439  +
         440  +
    impl ::std::fmt::Display for ConstraintViolation {
         441  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         442  +
            let message = match self {
         443  +
                                Self::UniqueItems { duplicate_indices, .. } =>
         444  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.misc#HeaderSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
         445  +
                            };
         446  +
            write!(f, "{message}")
         447  +
        }
         448  +
    }
         449  +
         450  +
    impl ::std::error::Error for ConstraintViolation {}
         451  +
    impl ConstraintViolation {
         452  +
        pub(crate) fn as_validation_exception_field(
         453  +
            self,
         454  +
            path: ::std::string::String,
         455  +
        ) -> crate::model::ValidationExceptionField {
         456  +
            match self {
         457  +
                        Self::UniqueItems { duplicate_indices, .. } =>
         458  +
                                crate::model::ValidationExceptionField {
         459  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
         460  +
                                    path,
         461  +
                                },
         462  +
                    }
         463  +
        }
         464  +
    }
         465  +
}
  531    466   
/// See [`InnermostShape`](crate::model::InnermostShape).
  532    467   
pub mod innermost_shape {
  533    468   
  534    469   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  535    470   
    /// Holds one variant for each of the ways the builder can fail.
  536    471   
    #[non_exhaustive]
  537    472   
    #[allow(clippy::enum_variant_names)]
  538    473   
    pub enum ConstraintViolation {
  539    474   
        /// `a_string` was not provided but it is required when building `InnermostShape`.
  540    475   
        MissingAString,
@@ -935,870 +985,984 @@
  955    890   
                    .ok_or(ConstraintViolation::MissingAStringMap)?,
  956    891   
                a_string_set: self
  957    892   
                    .a_string_set
  958    893   
                    .ok_or(ConstraintViolation::MissingAStringSet)?,
  959    894   
                a_blob: self.a_blob.ok_or(ConstraintViolation::MissingABlob)?,
  960    895   
                a_union: self.a_union.ok_or(ConstraintViolation::MissingAUnion)?,
  961    896   
            })
  962    897   
        }
  963    898   
    }
  964    899   
}
         900  +
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         901  +
pub mod validation_exception_field {
         902  +
         903  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         904  +
    /// Holds one variant for each of the ways the builder can fail.
         905  +
    #[non_exhaustive]
         906  +
    #[allow(clippy::enum_variant_names)]
         907  +
    pub enum ConstraintViolation {
         908  +
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
         909  +
        MissingPath,
         910  +
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
         911  +
        MissingMessage,
         912  +
    }
         913  +
    impl ::std::fmt::Display for ConstraintViolation {
         914  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         915  +
            match self {
         916  +
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
         917  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
         918  +
            }
         919  +
        }
         920  +
    }
         921  +
    impl ::std::error::Error for ConstraintViolation {}
         922  +
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
         923  +
        type Error = ConstraintViolation;
         924  +
         925  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         926  +
            builder.build()
         927  +
        }
         928  +
    }
         929  +
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         930  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         931  +
    pub struct Builder {
         932  +
        pub(crate) path: ::std::option::Option<::std::string::String>,
         933  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
         934  +
    }
         935  +
    impl Builder {
         936  +
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         937  +
        pub fn path(mut self, input: ::std::string::String) -> Self {
         938  +
            self.path = Some(input);
         939  +
            self
         940  +
        }
         941  +
        /// A detailed description of the validation failure.
         942  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
         943  +
            self.message = Some(input);
         944  +
            self
         945  +
        }
         946  +
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         947  +
        ///
         948  +
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
         949  +
        ///
         950  +
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         951  +
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
         952  +
            self.build_enforcing_all_constraints()
         953  +
        }
         954  +
        fn build_enforcing_all_constraints(
         955  +
            self,
         956  +
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
         957  +
            Ok(crate::model::ValidationExceptionField {
         958  +
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
         959  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         960  +
            })
         961  +
        }
         962  +
    }
         963  +
}
  965    964   
/// See [`EmptyStructure`](crate::model::EmptyStructure).
  966    965   
pub mod empty_structure {
  967    966   
  968    967   
    impl ::std::convert::From<Builder> for crate::model::EmptyStructure {
  969    968   
        fn from(builder: Builder) -> Self {
  970    969   
            builder.build()
  971    970   
        }
  972    971   
    }
  973    972   
    /// A builder for [`EmptyStructure`](crate::model::EmptyStructure).
  974    973   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]

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

@@ -1,1 +0,580 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4         -
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
    5         -
    pub struct ResponseCodeDefaultOperationInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
           4  +
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
           5  +
    pub struct TypeComplexityOperationInputFuture {
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10         -
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
          10  +
impl std::future::Future for TypeComplexityOperationInputFuture {
   11     11   
    type Output = Result<
   12         -
        crate::input::ResponseCodeDefaultOperationInput,
          12  +
        crate::input::TypeComplexityOperationInput,
   13     13   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26     26   
    ::aws_smithy_http_server::request::FromRequest<
   27     27   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   28     28   
        B,
   29         -
    > for crate::input::ResponseCodeDefaultOperationInput
          29  +
    > for crate::input::TypeComplexityOperationInput
   30     30   
where
   31     31   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35     35   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   36     36   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38     38   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
   39         -
    type Future = ResponseCodeDefaultOperationInputFuture;
          39  +
    type Future = TypeComplexityOperationInputFuture;
   40     40   
   41     41   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
   42     42   
        let fut = async move {
   43     43   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
   44     44   
                request.headers(),
   45     45   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
   46     46   
            ) {
   47     47   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   48     48   
            }
   49         -
            crate::protocol_serde::shape_response_code_default_operation::de_response_code_default_operation_http_request(request)
          49  +
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_request(request)
   50     50   
                            .await
   51     51   
        };
   52     52   
        use ::futures_util::future::TryFutureExt;
   53     53   
        let fut = fut.map_err(
   54     54   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   55     55   
                ::tracing::debug!(error = %e, "failed to deserialize request");
   56     56   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   57     57   
                    e,
   58     58   
                )
   59     59   
            },
   60     60   
        );
   61         -
        ResponseCodeDefaultOperationInputFuture {
          61  +
        TypeComplexityOperationInputFuture {
   62     62   
            inner: Box::pin(fut),
   63     63   
        }
   64     64   
    }
   65     65   
}
   66     66   
impl
   67     67   
    ::aws_smithy_http_server::response::IntoResponse<
   68     68   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   69         -
    > for crate::output::ResponseCodeDefaultOperationOutput
          69  +
    > for crate::output::TypeComplexityOperationOutput
   70     70   
{
   71     71   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   72         -
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
          72  +
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
   73     73   
                        Ok(response) => response,
   74     74   
                        Err(e) => {
   75     75   
                            ::tracing::error!(error = %e, "failed to serialize response");
   76     76   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   77     77   
                        }
   78     78   
                    }
   79     79   
    }
   80     80   
}
   81     81   
   82         -
#[allow(unreachable_code, unused_variables)]
   83         -
#[cfg(test)]
   84         -
mod response_code_default_operation_test {
   85         -
   86         -
    /// Test ID: ResponseCodeDefaultOperation
   87         -
    #[::tokio::test]
   88         -
    #[::tracing_test::traced_test]
   89         -
    async fn response_code_default_operation_response() {
   90         -
        let output = crate::output::ResponseCodeDefaultOperationOutput {};
   91         -
        use ::aws_smithy_http_server::response::IntoResponse;
   92         -
        let http_response = output.into_response();
   93         -
        ::pretty_assertions::assert_eq!(
   94         -
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
   95         -
            http_response.status()
   96         -
        );
   97         -
    }
   98         -
}
   99         -
  100     82   
::pin_project_lite::pin_project! {
  101     83   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  102         -
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
  103         -
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
  104         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
          84  +
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
          85  +
    pub struct RequiredInnerShapeOperationInputFuture {
          86  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  105     87   
    }
  106     88   
}
  107     89   
  108         -
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
          90  +
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
  109     91   
    type Output = Result<
  110         -
        crate::input::ResponseCodeHttpFallbackOperationInput,
          92  +
        crate::input::RequiredInnerShapeOperationInput,
  111     93   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  112     94   
    >;
  113     95   
  114     96   
    fn poll(
  115     97   
        self: std::pin::Pin<&mut Self>,
  116     98   
        cx: &mut std::task::Context<'_>,
  117     99   
    ) -> std::task::Poll<Self::Output> {
  118    100   
        let this = self.project();
  119    101   
        this.inner.as_mut().poll(cx)
  120    102   
    }
  121    103   
}
  122    104   
  123    105   
impl<B>
  124    106   
    ::aws_smithy_http_server::request::FromRequest<
  125    107   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  126    108   
        B,
  127         -
    > for crate::input::ResponseCodeHttpFallbackOperationInput
         109  +
    > for crate::input::RequiredInnerShapeOperationInput
  128    110   
where
  129    111   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  130    112   
    B: 'static,
  131    113   
  132    114   
    B::Data: Send,
  133    115   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  134    116   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  135    117   
{
  136    118   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  137         -
    type Future = ResponseCodeHttpFallbackOperationInputFuture;
         119  +
    type Future = RequiredInnerShapeOperationInputFuture;
  138    120   
  139    121   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  140    122   
        let fut = async move {
  141    123   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  142    124   
                request.headers(),
  143    125   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  144    126   
            ) {
  145    127   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  146    128   
            }
  147         -
            crate::protocol_serde::shape_response_code_http_fallback_operation::de_response_code_http_fallback_operation_http_request(request)
         129  +
            crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation_http_request(request)
  148    130   
                            .await
  149    131   
        };
  150    132   
        use ::futures_util::future::TryFutureExt;
  151    133   
        let fut = fut.map_err(
  152    134   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  153    135   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  154    136   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  155    137   
                    e,
  156    138   
                )
  157    139   
            },
  158    140   
        );
  159         -
        ResponseCodeHttpFallbackOperationInputFuture {
         141  +
        RequiredInnerShapeOperationInputFuture {
  160    142   
            inner: Box::pin(fut),
  161    143   
        }
  162    144   
    }
  163    145   
}
  164    146   
impl
  165    147   
    ::aws_smithy_http_server::response::IntoResponse<
  166    148   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  167         -
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
         149  +
    > for crate::output::RequiredInnerShapeOperationOutput
  168    150   
{
  169    151   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  170         -
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
         152  +
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
  171    153   
                        Ok(response) => response,
  172    154   
                        Err(e) => {
  173    155   
                            ::tracing::error!(error = %e, "failed to serialize response");
  174    156   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  175    157   
                        }
  176    158   
                    }
  177    159   
    }
  178    160   
}
  179         -
  180         -
#[allow(unreachable_code, unused_variables)]
  181         -
#[cfg(test)]
  182         -
mod response_code_http_fallback_operation_test {
  183         -
  184         -
    /// Test ID: ResponseCodeHttpFallbackOperation
  185         -
    #[::tokio::test]
  186         -
    #[::tracing_test::traced_test]
  187         -
    async fn response_code_http_fallback_operation_response() {
  188         -
        let output = crate::output::ResponseCodeHttpFallbackOperationOutput {};
  189         -
        use ::aws_smithy_http_server::response::IntoResponse;
  190         -
        let http_response = output.into_response();
  191         -
        ::pretty_assertions::assert_eq!(
  192         -
            ::http_1x::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
  193         -
            http_response.status()
  194         -
        );
  195         -
        let expected_headers = [("Content-Length", "2")];
  196         -
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  197         -
            http_response.headers(),
  198         -
            expected_headers,
  199         -
        ));
         161  +
impl
         162  +
    ::aws_smithy_http_server::response::IntoResponse<
         163  +
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         164  +
    > for crate::error::RequiredInnerShapeOperationError
         165  +
{
         166  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         167  +
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
         168  +
            Ok(mut response) => {
         169  +
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         170  +
                response
         171  +
            },
         172  +
            Err(e) => {
         173  +
                ::tracing::error!(error = %e, "failed to serialize response");
         174  +
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         175  +
            }
         176  +
        }
  200    177   
    }
  201    178   
}
  202    179   
  203    180   
::pin_project_lite::pin_project! {
  204    181   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  205         -
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
  206         -
    pub struct ResponseCodeRequiredOperationInputFuture {
  207         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         182  +
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
         183  +
    pub struct RequiredHeaderCollectionOperationInputFuture {
         184  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  208    185   
    }
  209    186   
}
  210    187   
  211         -
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
         188  +
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
  212    189   
    type Output = Result<
  213         -
        crate::input::ResponseCodeRequiredOperationInput,
         190  +
        crate::input::RequiredHeaderCollectionOperationInput,
  214    191   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  215    192   
    >;
  216    193   
  217    194   
    fn poll(
  218    195   
        self: std::pin::Pin<&mut Self>,
  219    196   
        cx: &mut std::task::Context<'_>,
  220    197   
    ) -> std::task::Poll<Self::Output> {
  221    198   
        let this = self.project();
  222    199   
        this.inner.as_mut().poll(cx)
  223    200   
    }
  224    201   
}
  225    202   
  226    203   
impl<B>
  227    204   
    ::aws_smithy_http_server::request::FromRequest<
  228    205   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  229    206   
        B,
  230         -
    > for crate::input::ResponseCodeRequiredOperationInput
         207  +
    > for crate::input::RequiredHeaderCollectionOperationInput
  231    208   
where
  232    209   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  233    210   
    B: 'static,
  234    211   
  235    212   
    B::Data: Send,
  236    213   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  237    214   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  238    215   
{
  239    216   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  240         -
    type Future = ResponseCodeRequiredOperationInputFuture;
         217  +
    type Future = RequiredHeaderCollectionOperationInputFuture;
  241    218   
  242    219   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  243    220   
        let fut = async move {
  244    221   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  245    222   
                request.headers(),
  246    223   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  247    224   
            ) {
  248    225   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  249    226   
            }
  250         -
            crate::protocol_serde::shape_response_code_required_operation::de_response_code_required_operation_http_request(request)
         227  +
            crate::protocol_serde::shape_required_header_collection_operation::de_required_header_collection_operation_http_request(request)
  251    228   
                            .await
  252    229   
        };
  253    230   
        use ::futures_util::future::TryFutureExt;
  254    231   
        let fut = fut.map_err(
  255    232   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  256    233   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  257    234   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  258    235   
                    e,
  259    236   
                )
  260    237   
            },
  261    238   
        );
  262         -
        ResponseCodeRequiredOperationInputFuture {
         239  +
        RequiredHeaderCollectionOperationInputFuture {
  263    240   
            inner: Box::pin(fut),
  264    241   
        }
  265    242   
    }
  266    243   
}
  267    244   
impl
  268    245   
    ::aws_smithy_http_server::response::IntoResponse<
  269    246   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  270         -
    > for crate::output::ResponseCodeRequiredOperationOutput
         247  +
    > for crate::output::RequiredHeaderCollectionOperationOutput
  271    248   
{
  272    249   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  273         -
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
         250  +
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
  274    251   
                        Ok(response) => response,
  275    252   
                        Err(e) => {
  276    253   
                            ::tracing::error!(error = %e, "failed to serialize response");
  277    254   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  278    255   
                        }
  279    256   
                    }
  280    257   
    }
  281    258   
}
  282         -
  283         -
#[allow(unreachable_code, unused_variables)]
  284         -
#[cfg(test)]
  285         -
mod response_code_required_operation_test {
  286         -
  287         -
    /// Test ID: ResponseCodeRequiredOperation
  288         -
    #[::tokio::test]
  289         -
    #[::tracing_test::traced_test]
  290         -
    async fn response_code_required_operation_response() {
  291         -
        let output = crate::output::ResponseCodeRequiredOperationOutput { response_code: 201 };
  292         -
        use ::aws_smithy_http_server::response::IntoResponse;
  293         -
        let http_response = output.into_response();
  294         -
        ::pretty_assertions::assert_eq!(
  295         -
            ::http_1x::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
  296         -
            http_response.status()
  297         -
        );
  298         -
        let expected_headers = [("Content-Length", "2")];
  299         -
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
  300         -
            http_response.headers(),
  301         -
            expected_headers,
  302         -
        ));
         259  +
impl
         260  +
    ::aws_smithy_http_server::response::IntoResponse<
         261  +
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
         262  +
    > for crate::error::RequiredHeaderCollectionOperationError
         263  +
{
         264  +
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
         265  +
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
         266  +
            Ok(mut response) => {
         267  +
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
         268  +
                response
         269  +
            },
         270  +
            Err(e) => {
         271  +
                ::tracing::error!(error = %e, "failed to serialize response");
         272  +
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
         273  +
            }
         274  +
        }
  303    275   
    }
  304    276   
}
  305    277   
  306    278   
::pin_project_lite::pin_project! {
  307    279   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  308         -
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
  309         -
    pub struct RequiredHeaderCollectionOperationInputFuture {
  310         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         280  +
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
         281  +
    pub struct ResponseCodeRequiredOperationInputFuture {
         282  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  311    283   
    }
  312    284   
}
  313    285   
  314         -
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
         286  +
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
  315    287   
    type Output = Result<
  316         -
        crate::input::RequiredHeaderCollectionOperationInput,
         288  +
        crate::input::ResponseCodeRequiredOperationInput,
  317    289   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  318    290   
    >;
  319    291   
  320    292   
    fn poll(
  321    293   
        self: std::pin::Pin<&mut Self>,
  322    294   
        cx: &mut std::task::Context<'_>,
  323    295   
    ) -> std::task::Poll<Self::Output> {
  324    296   
        let this = self.project();
  325    297   
        this.inner.as_mut().poll(cx)
  326    298   
    }
  327    299   
}
  328    300   
  329    301   
impl<B>
  330    302   
    ::aws_smithy_http_server::request::FromRequest<
  331    303   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  332    304   
        B,
  333         -
    > for crate::input::RequiredHeaderCollectionOperationInput
         305  +
    > for crate::input::ResponseCodeRequiredOperationInput
  334    306   
where
  335    307   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  336    308   
    B: 'static,
  337    309   
  338    310   
    B::Data: Send,
  339    311   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  340    312   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  341    313   
{
  342    314   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  343         -
    type Future = RequiredHeaderCollectionOperationInputFuture;
         315  +
    type Future = ResponseCodeRequiredOperationInputFuture;
  344    316   
  345    317   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  346    318   
        let fut = async move {
  347    319   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  348    320   
                request.headers(),
  349    321   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  350    322   
            ) {
  351    323   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  352    324   
            }
  353         -
            crate::protocol_serde::shape_required_header_collection_operation::de_required_header_collection_operation_http_request(request)
         325  +
            crate::protocol_serde::shape_response_code_required_operation::de_response_code_required_operation_http_request(request)
  354    326   
                            .await
  355    327   
        };
  356    328   
        use ::futures_util::future::TryFutureExt;
  357    329   
        let fut = fut.map_err(
  358    330   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  359    331   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  360    332   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  361    333   
                    e,
  362    334   
                )
  363    335   
            },
  364    336   
        );
  365         -
        RequiredHeaderCollectionOperationInputFuture {
         337  +
        ResponseCodeRequiredOperationInputFuture {
  366    338   
            inner: Box::pin(fut),
  367    339   
        }
  368    340   
    }
  369    341   
}
  370    342   
impl
  371    343   
    ::aws_smithy_http_server::response::IntoResponse<
  372    344   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  373         -
    > for crate::output::RequiredHeaderCollectionOperationOutput
         345  +
    > for crate::output::ResponseCodeRequiredOperationOutput
  374    346   
{
  375    347   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  376         -
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
         348  +
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
  377    349   
                        Ok(response) => response,
  378    350   
                        Err(e) => {
  379    351   
                            ::tracing::error!(error = %e, "failed to serialize response");
  380    352   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  381    353   
                        }
  382    354   
                    }
  383    355   
    }
  384    356   
}
  385         -
impl
  386         -
    ::aws_smithy_http_server::response::IntoResponse<
  387         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  388         -
    > for crate::error::RequiredHeaderCollectionOperationError
  389         -
{
  390         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  391         -
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
  392         -
            Ok(mut response) => {
  393         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  394         -
                response
  395         -
            },
  396         -
            Err(e) => {
  397         -
                ::tracing::error!(error = %e, "failed to serialize response");
  398         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  399         -
            }
  400         -
        }
         357  +
         358  +
#[allow(unreachable_code, unused_variables)]
         359  +
#[cfg(test)]
         360  +
mod response_code_required_operation_test {
         361  +
         362  +
    /// Test ID: ResponseCodeRequiredOperation
         363  +
    #[::tokio::test]
         364  +
    #[::tracing_test::traced_test]
         365  +
    async fn response_code_required_operation_response() {
         366  +
        let output = crate::output::ResponseCodeRequiredOperationOutput { response_code: 201 };
         367  +
        use ::aws_smithy_http_server::response::IntoResponse;
         368  +
        let http_response = output.into_response();
         369  +
        ::pretty_assertions::assert_eq!(
         370  +
            ::http_1x::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
         371  +
            http_response.status()
         372  +
        );
         373  +
        let expected_headers = [("Content-Length", "2")];
         374  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
         375  +
            http_response.headers(),
         376  +
            expected_headers,
         377  +
        ));
  401    378   
    }
  402    379   
}
  403    380   
  404    381   
::pin_project_lite::pin_project! {
  405    382   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  406         -
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
  407         -
    pub struct RequiredInnerShapeOperationInputFuture {
  408         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         383  +
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
         384  +
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
         385  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  409    386   
    }
  410    387   
}
  411    388   
  412         -
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
         389  +
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
  413    390   
    type Output = Result<
  414         -
        crate::input::RequiredInnerShapeOperationInput,
         391  +
        crate::input::ResponseCodeHttpFallbackOperationInput,
  415    392   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  416    393   
    >;
  417    394   
  418    395   
    fn poll(
  419    396   
        self: std::pin::Pin<&mut Self>,
  420    397   
        cx: &mut std::task::Context<'_>,
  421    398   
    ) -> std::task::Poll<Self::Output> {
  422    399   
        let this = self.project();
  423    400   
        this.inner.as_mut().poll(cx)
  424    401   
    }
  425    402   
}
  426    403   
  427    404   
impl<B>
  428    405   
    ::aws_smithy_http_server::request::FromRequest<
  429    406   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  430    407   
        B,
  431         -
    > for crate::input::RequiredInnerShapeOperationInput
         408  +
    > for crate::input::ResponseCodeHttpFallbackOperationInput
  432    409   
where
  433    410   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  434    411   
    B: 'static,
  435    412   
  436    413   
    B::Data: Send,
  437    414   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  438    415   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  439    416   
{
  440    417   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  441         -
    type Future = RequiredInnerShapeOperationInputFuture;
         418  +
    type Future = ResponseCodeHttpFallbackOperationInputFuture;
  442    419   
  443    420   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  444    421   
        let fut = async move {
  445    422   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  446    423   
                request.headers(),
  447    424   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  448    425   
            ) {
  449    426   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  450    427   
            }
  451         -
            crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation_http_request(request)
         428  +
            crate::protocol_serde::shape_response_code_http_fallback_operation::de_response_code_http_fallback_operation_http_request(request)
  452    429   
                            .await
  453    430   
        };
  454    431   
        use ::futures_util::future::TryFutureExt;
  455    432   
        let fut = fut.map_err(
  456    433   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  457    434   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  458    435   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  459    436   
                    e,
  460    437   
                )
  461    438   
            },
  462    439   
        );
  463         -
        RequiredInnerShapeOperationInputFuture {
         440  +
        ResponseCodeHttpFallbackOperationInputFuture {
  464    441   
            inner: Box::pin(fut),
  465    442   
        }
  466    443   
    }
  467    444   
}
  468    445   
impl
  469    446   
    ::aws_smithy_http_server::response::IntoResponse<
  470    447   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  471         -
    > for crate::output::RequiredInnerShapeOperationOutput
         448  +
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
  472    449   
{
  473    450   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  474         -
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
         451  +
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
  475    452   
                        Ok(response) => response,
  476    453   
                        Err(e) => {
  477    454   
                            ::tracing::error!(error = %e, "failed to serialize response");
  478    455   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  479    456   
                        }
  480    457   
                    }
  481    458   
    }
  482    459   
}
  483         -
impl
  484         -
    ::aws_smithy_http_server::response::IntoResponse<
  485         -
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  486         -
    > for crate::error::RequiredInnerShapeOperationError
  487         -
{
  488         -
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  489         -
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
  490         -
            Ok(mut response) => {
  491         -
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  492         -
                response
  493         -
            },
  494         -
            Err(e) => {
  495         -
                ::tracing::error!(error = %e, "failed to serialize response");
  496         -
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  497         -
            }
  498         -
        }
         460  +
         461  +
#[allow(unreachable_code, unused_variables)]
         462  +
#[cfg(test)]
         463  +
mod response_code_http_fallback_operation_test {
         464  +
         465  +
    /// Test ID: ResponseCodeHttpFallbackOperation
         466  +
    #[::tokio::test]
         467  +
    #[::tracing_test::traced_test]
         468  +
    async fn response_code_http_fallback_operation_response() {
         469  +
        let output = crate::output::ResponseCodeHttpFallbackOperationOutput {};
         470  +
        use ::aws_smithy_http_server::response::IntoResponse;
         471  +
        let http_response = output.into_response();
         472  +
        ::pretty_assertions::assert_eq!(
         473  +
            ::http_1x::StatusCode::from_u16(201).expect("invalid expected HTTP status code"),
         474  +
            http_response.status()
         475  +
        );
         476  +
        let expected_headers = [("Content-Length", "2")];
         477  +
        ::aws_smithy_protocol_test::assert_ok(::aws_smithy_protocol_test::validate_headers(
         478  +
            http_response.headers(),
         479  +
            expected_headers,
         480  +
        ));
  499    481   
    }
  500    482   
}
  501    483   
  502    484   
::pin_project_lite::pin_project! {
  503    485   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  504         -
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
  505         -
    pub struct TypeComplexityOperationInputFuture {
  506         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         486  +
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
         487  +
    pub struct ResponseCodeDefaultOperationInputFuture {
         488  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  507    489   
    }
  508    490   
}
  509    491   
  510         -
impl std::future::Future for TypeComplexityOperationInputFuture {
         492  +
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
  511    493   
    type Output = Result<
  512         -
        crate::input::TypeComplexityOperationInput,
         494  +
        crate::input::ResponseCodeDefaultOperationInput,
  513    495   
        ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  514    496   
    >;
  515    497   
  516    498   
    fn poll(
  517    499   
        self: std::pin::Pin<&mut Self>,
  518    500   
        cx: &mut std::task::Context<'_>,
  519    501   
    ) -> std::task::Poll<Self::Output> {
  520    502   
        let this = self.project();
  521    503   
        this.inner.as_mut().poll(cx)
  522    504   
    }
  523    505   
}
  524    506   
  525    507   
impl<B>
  526    508   
    ::aws_smithy_http_server::request::FromRequest<
  527    509   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  528    510   
        B,
  529         -
    > for crate::input::TypeComplexityOperationInput
         511  +
    > for crate::input::ResponseCodeDefaultOperationInput
  530    512   
where
  531    513   
    B: ::aws_smithy_http_server::body::HttpBody + Send,
  532    514   
    B: 'static,
  533    515   
  534    516   
    B::Data: Send,
  535    517   
    ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  536    518   
        From<<B as ::aws_smithy_http_server::body::HttpBody>::Error>,
  537    519   
{
  538    520   
    type Rejection = ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  539         -
    type Future = TypeComplexityOperationInputFuture;
         521  +
    type Future = ResponseCodeDefaultOperationInputFuture;
  540    522   
  541    523   
    fn from_request(request: ::http_1x::Request<B>) -> Self::Future {
  542    524   
        let fut = async move {
  543    525   
            if !::aws_smithy_http_server::protocol::accept_header_classifier(
  544    526   
                request.headers(),
  545    527   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  546    528   
            ) {
  547    529   
                return Err(::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  548    530   
            }
  549         -
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_request(request)
         531  +
            crate::protocol_serde::shape_response_code_default_operation::de_response_code_default_operation_http_request(request)
  550    532   
                            .await
  551    533   
        };
  552    534   
        use ::futures_util::future::TryFutureExt;
  553    535   
        let fut = fut.map_err(
  554    536   
            |e: ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  555    537   
                ::tracing::debug!(error = %e, "failed to deserialize request");
  556    538   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  557    539   
                    e,
  558    540   
                )
  559    541   
            },
  560    542   
        );
  561         -
        TypeComplexityOperationInputFuture {
         543  +
        ResponseCodeDefaultOperationInputFuture {
  562    544   
            inner: Box::pin(fut),
  563    545   
        }
  564    546   
    }
  565    547   
}
  566    548   
impl
  567    549   
    ::aws_smithy_http_server::response::IntoResponse<
  568    550   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  569         -
    > for crate::output::TypeComplexityOperationOutput
         551  +
    > for crate::output::ResponseCodeDefaultOperationOutput
  570    552   
{
  571    553   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  572         -
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
         554  +
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
  573    555   
                        Ok(response) => response,
  574    556   
                        Err(e) => {
  575    557   
                            ::tracing::error!(error = %e, "failed to serialize response");
  576    558   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  577    559   
                        }
  578    560   
                    }
  579    561   
    }
  580    562   
}
         563  +
         564  +
#[allow(unreachable_code, unused_variables)]
         565  +
#[cfg(test)]
         566  +
mod response_code_default_operation_test {
         567  +
         568  +
    /// Test ID: ResponseCodeDefaultOperation
         569  +
    #[::tokio::test]
         570  +
    #[::tracing_test::traced_test]
         571  +
    async fn response_code_default_operation_response() {
         572  +
        let output = crate::output::ResponseCodeDefaultOperationOutput {};
         573  +
        use ::aws_smithy_http_server::response::IntoResponse;
         574  +
        let http_response = output.into_response();
         575  +
        ::pretty_assertions::assert_eq!(
         576  +
            ::http_1x::StatusCode::from_u16(200).expect("invalid expected HTTP status code"),
         577  +
            http_response.status()
         578  +
        );
         579  +
    }
         580  +
}

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

@@ -1,1 +241,241 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
    3         -
/// This operation tests that the response code defaults to 200 when no other code is set.
    4         -
pub struct ResponseCodeDefaultOperation;
           3  +
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
           4  +
pub struct TypeComplexityOperation;
    5      5   
    6         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
           6  +
impl ::aws_smithy_http_server::operation::OperationShape for TypeComplexityOperation {
    7      7   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8      8   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    9         -
            "aws.protocoltests.misc#ResponseCodeDefaultOperation",
           9  +
            "aws.protocoltests.misc#TypeComplexityOperation",
   10     10   
            "aws.protocoltests.misc",
   11         -
            "ResponseCodeDefaultOperation",
          11  +
            "TypeComplexityOperation",
   12     12   
        );
   13     13   
   14         -
    type Input = crate::input::ResponseCodeDefaultOperationInput;
   15         -
    type Output = crate::output::ResponseCodeDefaultOperationOutput;
          14  +
    type Input = crate::input::TypeComplexityOperationInput;
          15  +
    type Output = crate::output::TypeComplexityOperationOutput;
   16     16   
    type Error = std::convert::Infallible;
   17     17   
}
   18     18   
   19     19   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   20         -
    for ResponseCodeDefaultOperation
          20  +
    for TypeComplexityOperation
   21     21   
{
   22     22   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   23     23   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     24   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   25     25   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   26     26   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   27     27   
        >,
   28     28   
    >;
   29     29   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   30     30   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   31     31   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   32     32   
    >;
   33     33   
   34     34   
    fn request_fmt() -> Self::RequestFmt {
   35     35   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   36     36   
    }
   37     37   
   38     38   
    fn response_fmt() -> Self::ResponseFmt {
   39     39   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   40     40   
    }
   41     41   
}
   42     42   
   43         -
/// This operation tests that the response code defaults to `@http`'s code.
   44         -
pub struct ResponseCodeHttpFallbackOperation;
          43  +
/// This operation tests that (de)serializing required values from a nested shape works correctly.
          44  +
pub struct RequiredInnerShapeOperation;
   45     45   
   46         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeHttpFallbackOperation {
          46  +
impl ::aws_smithy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
   47     47   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   48     48   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   49         -
            "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
          49  +
            "aws.protocoltests.misc#RequiredInnerShapeOperation",
   50     50   
            "aws.protocoltests.misc",
   51         -
            "ResponseCodeHttpFallbackOperation",
          51  +
            "RequiredInnerShapeOperation",
   52     52   
        );
   53     53   
   54         -
    type Input = crate::input::ResponseCodeHttpFallbackOperationInput;
   55         -
    type Output = crate::output::ResponseCodeHttpFallbackOperationOutput;
   56         -
    type Error = std::convert::Infallible;
          54  +
    type Input = crate::input::RequiredInnerShapeOperationInput;
          55  +
    type Output = crate::output::RequiredInnerShapeOperationOutput;
          56  +
    type Error = crate::error::RequiredInnerShapeOperationError;
   57     57   
}
   58     58   
   59     59   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   60         -
    for ResponseCodeHttpFallbackOperation
          60  +
    for RequiredInnerShapeOperation
   61     61   
{
   62     62   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   63     63   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64     64   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   65     65   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   66     66   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   67     67   
        >,
   68     68   
    >;
   69     69   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   70     70   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   71     71   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   72     72   
    >;
   73     73   
   74     74   
    fn request_fmt() -> Self::RequestFmt {
   75     75   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   76     76   
    }
   77     77   
   78     78   
    fn response_fmt() -> Self::ResponseFmt {
   79     79   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   80     80   
    }
   81     81   
}
   82     82   
   83         -
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
   84         -
pub struct ResponseCodeRequiredOperation;
          83  +
#[allow(missing_docs)] // documentation missing in model
          84  +
pub struct RequiredHeaderCollectionOperation;
   85     85   
   86         -
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
          86  +
impl ::aws_smithy_http_server::operation::OperationShape for RequiredHeaderCollectionOperation {
   87     87   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   88     88   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   89         -
            "aws.protocoltests.misc#ResponseCodeRequiredOperation",
          89  +
            "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
   90     90   
            "aws.protocoltests.misc",
   91         -
            "ResponseCodeRequiredOperation",
          91  +
            "RequiredHeaderCollectionOperation",
   92     92   
        );
   93     93   
   94         -
    type Input = crate::input::ResponseCodeRequiredOperationInput;
   95         -
    type Output = crate::output::ResponseCodeRequiredOperationOutput;
   96         -
    type Error = std::convert::Infallible;
          94  +
    type Input = crate::input::RequiredHeaderCollectionOperationInput;
          95  +
    type Output = crate::output::RequiredHeaderCollectionOperationOutput;
          96  +
    type Error = crate::error::RequiredHeaderCollectionOperationError;
   97     97   
}
   98     98   
   99     99   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  100         -
    for ResponseCodeRequiredOperation
         100  +
    for RequiredHeaderCollectionOperation
  101    101   
{
  102    102   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  103    103   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104    104   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  105    105   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  106    106   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  107    107   
        >,
  108    108   
    >;
  109    109   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  110    110   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  111    111   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  112    112   
    >;
  113    113   
  114    114   
    fn request_fmt() -> Self::RequestFmt {
  115    115   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  116    116   
    }
  117    117   
  118    118   
    fn response_fmt() -> Self::ResponseFmt {
  119    119   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  120    120   
    }
  121    121   
}
  122    122   
  123         -
#[allow(missing_docs)] // documentation missing in model
  124         -
pub struct RequiredHeaderCollectionOperation;
         123  +
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
         124  +
pub struct ResponseCodeRequiredOperation;
  125    125   
  126         -
impl ::aws_smithy_http_server::operation::OperationShape for RequiredHeaderCollectionOperation {
         126  +
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
  127    127   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  128    128   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  129         -
            "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
         129  +
            "aws.protocoltests.misc#ResponseCodeRequiredOperation",
  130    130   
            "aws.protocoltests.misc",
  131         -
            "RequiredHeaderCollectionOperation",
         131  +
            "ResponseCodeRequiredOperation",
  132    132   
        );
  133    133   
  134         -
    type Input = crate::input::RequiredHeaderCollectionOperationInput;
  135         -
    type Output = crate::output::RequiredHeaderCollectionOperationOutput;
  136         -
    type Error = crate::error::RequiredHeaderCollectionOperationError;
         134  +
    type Input = crate::input::ResponseCodeRequiredOperationInput;
         135  +
    type Output = crate::output::ResponseCodeRequiredOperationOutput;
         136  +
    type Error = std::convert::Infallible;
  137    137   
}
  138    138   
  139    139   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  140         -
    for RequiredHeaderCollectionOperation
         140  +
    for ResponseCodeRequiredOperation
  141    141   
{
  142    142   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  143    143   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  144    144   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  145    145   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146    146   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  147    147   
        >,
  148    148   
    >;
  149    149   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  150    150   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  151    151   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  152    152   
    >;
  153    153   
  154    154   
    fn request_fmt() -> Self::RequestFmt {
  155    155   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  156    156   
    }
  157    157   
  158    158   
    fn response_fmt() -> Self::ResponseFmt {
  159    159   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  160    160   
    }
  161    161   
}
  162    162   
  163         -
/// This operation tests that (de)serializing required values from a nested shape works correctly.
  164         -
pub struct RequiredInnerShapeOperation;
         163  +
/// This operation tests that the response code defaults to `@http`'s code.
         164  +
pub struct ResponseCodeHttpFallbackOperation;
  165    165   
  166         -
impl ::aws_smithy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
         166  +
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeHttpFallbackOperation {
  167    167   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  168    168   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  169         -
            "aws.protocoltests.misc#RequiredInnerShapeOperation",
         169  +
            "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
  170    170   
            "aws.protocoltests.misc",
  171         -
            "RequiredInnerShapeOperation",
         171  +
            "ResponseCodeHttpFallbackOperation",
  172    172   
        );
  173    173   
  174         -
    type Input = crate::input::RequiredInnerShapeOperationInput;
  175         -
    type Output = crate::output::RequiredInnerShapeOperationOutput;
  176         -
    type Error = crate::error::RequiredInnerShapeOperationError;
         174  +
    type Input = crate::input::ResponseCodeHttpFallbackOperationInput;
         175  +
    type Output = crate::output::ResponseCodeHttpFallbackOperationOutput;
         176  +
    type Error = std::convert::Infallible;
  177    177   
}
  178    178   
  179    179   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  180         -
    for RequiredInnerShapeOperation
         180  +
    for ResponseCodeHttpFallbackOperation
  181    181   
{
  182    182   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  183    183   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184    184   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  185    185   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  186    186   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  187    187   
        >,
  188    188   
    >;
  189    189   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  190    190   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  191    191   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  192    192   
    >;
  193    193   
  194    194   
    fn request_fmt() -> Self::RequestFmt {
  195    195   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  196    196   
    }
  197    197   
  198    198   
    fn response_fmt() -> Self::ResponseFmt {
  199    199   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  200    200   
    }
  201    201   
}
  202    202   
  203         -
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
  204         -
pub struct TypeComplexityOperation;
         203  +
/// This operation tests that the response code defaults to 200 when no other code is set.
         204  +
pub struct ResponseCodeDefaultOperation;
  205    205   
  206         -
impl ::aws_smithy_http_server::operation::OperationShape for TypeComplexityOperation {
         206  +
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
  207    207   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  208    208   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  209         -
            "aws.protocoltests.misc#TypeComplexityOperation",
         209  +
            "aws.protocoltests.misc#ResponseCodeDefaultOperation",
  210    210   
            "aws.protocoltests.misc",
  211         -
            "TypeComplexityOperation",
         211  +
            "ResponseCodeDefaultOperation",
  212    212   
        );
  213    213   
  214         -
    type Input = crate::input::TypeComplexityOperationInput;
  215         -
    type Output = crate::output::TypeComplexityOperationOutput;
         214  +
    type Input = crate::input::ResponseCodeDefaultOperationInput;
         215  +
    type Output = crate::output::ResponseCodeDefaultOperationOutput;
  216    216   
    type Error = std::convert::Infallible;
  217    217   
}
  218    218   
  219    219   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  220         -
    for TypeComplexityOperation
         220  +
    for ResponseCodeDefaultOperation
  221    221   
{
  222    222   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  223    223   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  224    224   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  225    225   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  226    226   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  227    227   
        >,
  228    228   
    >;
  229    229   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  230    230   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,

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

@@ -1,1 +262,240 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[allow(missing_docs)] // documentation missing in model
    3         -
#[derive(
    4         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5         -
)]
    6         -
pub struct ResponseCodeDefaultOperationOutput {}
    7         -
impl ResponseCodeDefaultOperationOutput {
    8         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
    9         -
    pub fn builder() -> crate::output::response_code_default_operation_output::Builder {
   10         -
        crate::output::response_code_default_operation_output::Builder::default()
           3  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           4  +
pub struct TypeComplexityOperationOutput {
           5  +
    #[allow(missing_docs)] // documentation missing in model
           6  +
    pub list: ::std::option::Option<
           7  +
        ::std::vec::Vec<
           8  +
            ::std::vec::Vec<
           9  +
                ::std::vec::Vec<
          10  +
                    ::std::collections::HashMap<
          11  +
                        ::std::string::String,
          12  +
                        crate::model::EmptyStructure,
          13  +
                    >,
          14  +
                >,
          15  +
            >,
          16  +
        >,
          17  +
    >,
          18  +
}
          19  +
impl TypeComplexityOperationOutput {
          20  +
    #[allow(missing_docs)] // documentation missing in model
          21  +
    pub fn list(
          22  +
        &self,
          23  +
    ) -> ::std::option::Option<
          24  +
        &[::std::vec::Vec<
          25  +
            ::std::vec::Vec<
          26  +
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
          27  +
            >,
          28  +
        >],
          29  +
    > {
          30  +
        self.list.as_deref()
   11     31   
    }
   12     32   
}
   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 ResponseCodeHttpFallbackOperationOutput {}
   19         -
impl ResponseCodeHttpFallbackOperationOutput {
   20         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
   21         -
    pub fn builder() -> crate::output::response_code_http_fallback_operation_output::Builder {
   22         -
        crate::output::response_code_http_fallback_operation_output::Builder::default()
          33  +
impl TypeComplexityOperationOutput {
          34  +
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
          35  +
    pub fn builder() -> crate::output::type_complexity_operation_output::Builder {
          36  +
        crate::output::type_complexity_operation_output::Builder::default()
   23     37   
    }
   24     38   
}
   25     39   
   26     40   
#[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 ResponseCodeRequiredOperationOutput {
          41  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          42  +
pub struct RequiredInnerShapeOperationOutput {
   31     43   
    #[allow(missing_docs)] // documentation missing in model
   32         -
    pub response_code: i32,
          44  +
    pub inner: ::std::option::Option<crate::model::InnerShape>,
   33     45   
}
   34         -
impl ResponseCodeRequiredOperationOutput {
          46  +
impl RequiredInnerShapeOperationOutput {
   35     47   
    #[allow(missing_docs)] // documentation missing in model
   36         -
    pub fn response_code(&self) -> i32 {
   37         -
        self.response_code
          48  +
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
          49  +
        self.inner.as_ref()
   38     50   
    }
   39     51   
}
   40         -
impl ResponseCodeRequiredOperationOutput {
   41         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
   42         -
    pub fn builder() -> crate::output::response_code_required_operation_output::Builder {
   43         -
        crate::output::response_code_required_operation_output::Builder::default()
          52  +
impl RequiredInnerShapeOperationOutput {
          53  +
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
          54  +
    pub fn builder() -> crate::output::required_inner_shape_operation_output::Builder {
          55  +
        crate::output::required_inner_shape_operation_output::Builder::default()
   44     56   
    }
   45     57   
}
   46     58   
   47     59   
#[allow(missing_docs)] // documentation missing in model
   48     60   
#[derive(
   49     61   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50     62   
)]
   51     63   
pub struct RequiredHeaderCollectionOperationOutput {
   52     64   
    #[allow(missing_docs)] // documentation missing in model
   53     65   
    pub required_header_list: ::std::vec::Vec<::std::string::String>,
   54     66   
    #[allow(missing_docs)] // documentation missing in model
   55     67   
    pub required_header_set: crate::model::HeaderSet,
   56     68   
}
   57     69   
impl RequiredHeaderCollectionOperationOutput {
   58     70   
    #[allow(missing_docs)] // documentation missing in model
   59     71   
    pub fn required_header_list(&self) -> &[::std::string::String] {
   60     72   
        use std::ops::Deref;
   61     73   
        self.required_header_list.deref()
   62     74   
    }
   63     75   
    #[allow(missing_docs)] // documentation missing in model
   64     76   
    pub fn required_header_set(&self) -> &crate::model::HeaderSet {
   65     77   
        &self.required_header_set
   66     78   
    }
   67     79   
}
   68     80   
impl RequiredHeaderCollectionOperationOutput {
   69     81   
    /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
   70     82   
    pub fn builder() -> crate::output::required_header_collection_operation_output::Builder {
   71     83   
        crate::output::required_header_collection_operation_output::Builder::default()
   72     84   
    }
   73     85   
}
   74     86   
   75     87   
#[allow(missing_docs)] // documentation missing in model
   76         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   77         -
pub struct RequiredInnerShapeOperationOutput {
          88  +
#[derive(
          89  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          90  +
)]
          91  +
pub struct ResponseCodeRequiredOperationOutput {
   78     92   
    #[allow(missing_docs)] // documentation missing in model
   79         -
    pub inner: ::std::option::Option<crate::model::InnerShape>,
          93  +
    pub response_code: i32,
   80     94   
}
   81         -
impl RequiredInnerShapeOperationOutput {
          95  +
impl ResponseCodeRequiredOperationOutput {
   82     96   
    #[allow(missing_docs)] // documentation missing in model
   83         -
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
   84         -
        self.inner.as_ref()
          97  +
    pub fn response_code(&self) -> i32 {
          98  +
        self.response_code
   85     99   
    }
   86    100   
}
   87         -
impl RequiredInnerShapeOperationOutput {
   88         -
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
   89         -
    pub fn builder() -> crate::output::required_inner_shape_operation_output::Builder {
   90         -
        crate::output::required_inner_shape_operation_output::Builder::default()
         101  +
impl ResponseCodeRequiredOperationOutput {
         102  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         103  +
    pub fn builder() -> crate::output::response_code_required_operation_output::Builder {
         104  +
        crate::output::response_code_required_operation_output::Builder::default()
   91    105   
    }
   92    106   
}
   93    107   
   94    108   
#[allow(missing_docs)] // documentation missing in model
   95         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   96         -
pub struct TypeComplexityOperationOutput {
   97         -
    #[allow(missing_docs)] // documentation missing in model
   98         -
    pub list: ::std::option::Option<
         109  +
#[derive(
         110  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         111  +
)]
         112  +
pub struct ResponseCodeHttpFallbackOperationOutput {}
         113  +
impl ResponseCodeHttpFallbackOperationOutput {
         114  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         115  +
    pub fn builder() -> crate::output::response_code_http_fallback_operation_output::Builder {
         116  +
        crate::output::response_code_http_fallback_operation_output::Builder::default()
         117  +
    }
         118  +
}
         119  +
         120  +
#[allow(missing_docs)] // documentation missing in model
         121  +
#[derive(
         122  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         123  +
)]
         124  +
pub struct ResponseCodeDefaultOperationOutput {}
         125  +
impl ResponseCodeDefaultOperationOutput {
         126  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         127  +
    pub fn builder() -> crate::output::response_code_default_operation_output::Builder {
         128  +
        crate::output::response_code_default_operation_output::Builder::default()
         129  +
    }
         130  +
}
         131  +
/// See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         132  +
pub mod type_complexity_operation_output {
         133  +
         134  +
    impl ::std::convert::From<Builder> for crate::output::TypeComplexityOperationOutput {
         135  +
        fn from(builder: Builder) -> Self {
         136  +
            builder.build()
         137  +
        }
         138  +
    }
         139  +
    /// A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         140  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         141  +
    pub struct Builder {
         142  +
        pub(crate) list: ::std::option::Option<
   99    143   
            ::std::vec::Vec<
  100    144   
                ::std::vec::Vec<
  101    145   
                    ::std::vec::Vec<
  102    146   
                        ::std::collections::HashMap<
  103    147   
                            ::std::string::String,
  104    148   
                            crate::model::EmptyStructure,
  105    149   
                        >,
  106    150   
                    >,
  107    151   
                >,
  108    152   
            >,
  109    153   
        >,
  110         -
}
  111         -
impl TypeComplexityOperationOutput {
         154  +
    }
         155  +
    impl Builder {
  112    156   
        #[allow(missing_docs)] // documentation missing in model
  113    157   
        pub fn list(
  114         -
        &self,
  115         -
    ) -> ::std::option::Option<
  116         -
        &[::std::vec::Vec<
         158  +
            mut self,
         159  +
            input: ::std::option::Option<
  117    160   
                ::std::vec::Vec<
  118         -
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
         161  +
                    ::std::vec::Vec<
         162  +
                        ::std::vec::Vec<
         163  +
                            ::std::collections::HashMap<
         164  +
                                ::std::string::String,
         165  +
                                crate::model::EmptyStructure,
  119    166   
                            >,
  120         -
        >],
  121         -
    > {
  122         -
        self.list.as_deref()
  123         -
    }
  124         -
}
  125         -
impl TypeComplexityOperationOutput {
  126         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  127         -
    pub fn builder() -> crate::output::type_complexity_operation_output::Builder {
  128         -
        crate::output::type_complexity_operation_output::Builder::default()
  129         -
    }
  130         -
}
  131         -
/// See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  132         -
pub mod response_code_default_operation_output {
  133         -
  134         -
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeDefaultOperationOutput {
  135         -
        fn from(builder: Builder) -> Self {
  136         -
            builder.build()
  137         -
        }
         167  +
                        >,
         168  +
                    >,
         169  +
                >,
         170  +
            >,
         171  +
        ) -> Self {
         172  +
            self.list = input;
         173  +
            self
  138    174   
        }
  139         -
    /// A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  140         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  141         -
    pub struct Builder {}
  142         -
    impl Builder {
  143         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  144         -
        pub fn build(self) -> crate::output::ResponseCodeDefaultOperationOutput {
         175  +
        /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         176  +
        pub fn build(self) -> crate::output::TypeComplexityOperationOutput {
  145    177   
            self.build_enforcing_all_constraints()
  146    178   
        }
  147         -
        fn build_enforcing_all_constraints(
  148         -
            self,
  149         -
        ) -> crate::output::ResponseCodeDefaultOperationOutput {
  150         -
            crate::output::ResponseCodeDefaultOperationOutput {}
         179  +
        fn build_enforcing_all_constraints(self) -> crate::output::TypeComplexityOperationOutput {
         180  +
            crate::output::TypeComplexityOperationOutput { list: self.list }
  151    181   
        }
  152    182   
    }
  153    183   
}
  154         -
/// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  155         -
pub mod response_code_http_fallback_operation_output {
         184  +
/// See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         185  +
pub mod required_inner_shape_operation_output {
  156    186   
  157         -
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
         187  +
    impl ::std::convert::From<Builder> for crate::output::RequiredInnerShapeOperationOutput {
  158    188   
        fn from(builder: Builder) -> Self {
  159    189   
            builder.build()
  160    190   
        }
  161    191   
    }
  162         -
    /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  163         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  164         -
    pub struct Builder {}
  165         -
    impl Builder {
  166         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  167         -
        pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
  168         -
            self.build_enforcing_all_constraints()
  169         -
        }
  170         -
        fn build_enforcing_all_constraints(
  171         -
            self,
  172         -
        ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
  173         -
            crate::output::ResponseCodeHttpFallbackOperationOutput {}
  174         -
        }
  175         -
    }
  176         -
}
  177         -
/// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  178         -
pub mod response_code_required_operation_output {
  179         -
  180         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  181         -
    /// Holds one variant for each of the ways the builder can fail.
  182         -
    #[non_exhaustive]
  183         -
    #[allow(clippy::enum_variant_names)]
  184         -
    pub enum ConstraintViolation {
  185         -
        /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
  186         -
        MissingResponseCode,
  187         -
    }
  188         -
    impl ::std::fmt::Display for ConstraintViolation {
  189         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  190         -
            match self {
  191         -
                ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
  192         -
            }
  193         -
        }
  194         -
    }
  195         -
    impl ::std::error::Error for ConstraintViolation {}
  196         -
    impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
  197         -
        type Error = ConstraintViolation;
  198         -
  199         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  200         -
            builder.build()
  201         -
        }
  202         -
    }
  203         -
    /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         192  +
    /// A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  204    193   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  205    194   
    pub struct Builder {
  206         -
        pub(crate) response_code: ::std::option::Option<i32>,
         195  +
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
  207    196   
    }
  208    197   
    impl Builder {
  209    198   
        #[allow(missing_docs)] // documentation missing in model
  210         -
        pub fn response_code(mut self, input: i32) -> Self {
  211         -
            self.response_code = Some(input);
         199  +
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
         200  +
            self.inner = input;
  212    201   
            self
  213    202   
        }
  214         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  215         -
        ///
  216         -
        /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if a [`ConstraintViolation`] occurs.
  217         -
        ///
  218         -
        pub fn build(
  219         -
            self,
  220         -
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  221         -
        {
         203  +
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         204  +
        pub fn build(self) -> crate::output::RequiredInnerShapeOperationOutput {
  222    205   
            self.build_enforcing_all_constraints()
  223    206   
        }
  224    207   
        fn build_enforcing_all_constraints(
  225    208   
            self,
  226         -
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  227         -
        {
  228         -
            Ok(crate::output::ResponseCodeRequiredOperationOutput {
  229         -
                response_code: self
  230         -
                    .response_code
  231         -
                    .ok_or(ConstraintViolation::MissingResponseCode)?,
  232         -
            })
         209  +
        ) -> crate::output::RequiredInnerShapeOperationOutput {
         210  +
            crate::output::RequiredInnerShapeOperationOutput { inner: self.inner }
  233    211   
        }
  234    212   
    }
  235    213   
}
  236    214   
/// See [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
  237    215   
pub mod required_header_collection_operation_output {
  238    216   
  239    217   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  240    218   
    /// Holds one variant for each of the ways the builder can fail.
  241    219   
    #[non_exhaustive]
  242    220   
    #[allow(clippy::enum_variant_names)]
@@ -282,260 +394,394 @@
  302    280   
                required_header_list: self
  303    281   
                    .required_header_list
  304    282   
                    .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
  305    283   
                required_header_set: self
  306    284   
                    .required_header_set
  307    285   
                    .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  308    286   
            })
  309    287   
        }
  310    288   
    }
  311    289   
}
  312         -
/// See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  313         -
pub mod required_inner_shape_operation_output {
         290  +
/// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         291  +
pub mod response_code_required_operation_output {
  314    292   
  315         -
    impl ::std::convert::From<Builder> for crate::output::RequiredInnerShapeOperationOutput {
  316         -
        fn from(builder: Builder) -> Self {
         293  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         294  +
    /// Holds one variant for each of the ways the builder can fail.
         295  +
    #[non_exhaustive]
         296  +
    #[allow(clippy::enum_variant_names)]
         297  +
    pub enum ConstraintViolation {
         298  +
        /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
         299  +
        MissingResponseCode,
         300  +
    }
         301  +
    impl ::std::fmt::Display for ConstraintViolation {
         302  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         303  +
            match self {
         304  +
                ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
         305  +
            }
         306  +
        }
         307  +
    }
         308  +
    impl ::std::error::Error for ConstraintViolation {}
         309  +
    impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
         310  +
        type Error = ConstraintViolation;
         311  +
         312  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  317    313   
            builder.build()
  318    314   
        }
  319    315   
    }
  320         -
    /// A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         316  +
    /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  321    317   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  322    318   
    pub struct Builder {
  323         -
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
         319  +
        pub(crate) response_code: ::std::option::Option<i32>,
  324    320   
    }
  325    321   
    impl Builder {
  326    322   
        #[allow(missing_docs)] // documentation missing in model
  327         -
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  328         -
            self.inner = input;
         323  +
        pub fn response_code(mut self, input: i32) -> Self {
         324  +
            self.response_code = Some(input);
  329    325   
            self
  330    326   
        }
  331         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  332         -
        pub fn build(self) -> crate::output::RequiredInnerShapeOperationOutput {
         327  +
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         328  +
        ///
         329  +
        /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if a [`ConstraintViolation`] occurs.
         330  +
        ///
         331  +
        pub fn build(
         332  +
            self,
         333  +
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
         334  +
        {
  333    335   
            self.build_enforcing_all_constraints()
  334    336   
        }
  335    337   
        fn build_enforcing_all_constraints(
  336    338   
            self,
  337         -
        ) -> crate::output::RequiredInnerShapeOperationOutput {
  338         -
            crate::output::RequiredInnerShapeOperationOutput { inner: self.inner }
         339  +
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
         340  +
        {
         341  +
            Ok(crate::output::ResponseCodeRequiredOperationOutput {
         342  +
                response_code: self
         343  +
                    .response_code
         344  +
                    .ok_or(ConstraintViolation::MissingResponseCode)?,
         345  +
            })
  339    346   
        }
  340    347   
    }
  341    348   
}
  342         -
/// See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  343         -
pub mod type_complexity_operation_output {
         349  +
/// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         350  +
pub mod response_code_http_fallback_operation_output {
  344    351   
  345         -
    impl ::std::convert::From<Builder> for crate::output::TypeComplexityOperationOutput {
         352  +
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
  346    353   
        fn from(builder: Builder) -> Self {
  347    354   
            builder.build()
  348    355   
        }
  349    356   
    }
  350         -
    /// A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         357  +
    /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  351    358   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  352         -
    pub struct Builder {
  353         -
        pub(crate) list: ::std::option::Option<
  354         -
            ::std::vec::Vec<
  355         -
                ::std::vec::Vec<
  356         -
                    ::std::vec::Vec<
  357         -
                        ::std::collections::HashMap<
  358         -
                            ::std::string::String,
  359         -
                            crate::model::EmptyStructure,
  360         -
                        >,
  361         -
                    >,
  362         -
                >,
  363         -
            >,
  364         -
        >,
  365         -
    }
         359  +
    pub struct Builder {}
  366    360   
    impl Builder {
  367         -
        #[allow(missing_docs)] // documentation missing in model
  368         -
        pub fn list(
  369         -
            mut self,
  370         -
            input: ::std::option::Option<
  371         -
                ::std::vec::Vec<
  372         -
                    ::std::vec::Vec<
  373         -
                        ::std::vec::Vec<
  374         -
                            ::std::collections::HashMap<
  375         -
                                ::std::string::String,
  376         -
                                crate::model::EmptyStructure,
  377         -
                            >,
  378         -
                        >,
  379         -
                    >,
  380         -
                >,
  381         -
            >,
  382         -
        ) -> Self {
  383         -
            self.list = input;
  384         -
            self
         361  +
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         362  +
        pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
         363  +
            self.build_enforcing_all_constraints()
  385    364   
        }
  386         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  387         -
        pub fn build(self) -> crate::output::TypeComplexityOperationOutput {
         365  +
        fn build_enforcing_all_constraints(
         366  +
            self,
         367  +
        ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
         368  +
            crate::output::ResponseCodeHttpFallbackOperationOutput {}
         369  +
        }
         370  +
    }
         371  +
}
         372  +
/// See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         373  +
pub mod response_code_default_operation_output {
         374  +
         375  +
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeDefaultOperationOutput {
         376  +
        fn from(builder: Builder) -> Self {
         377  +
            builder.build()
         378  +
        }
         379  +
    }
         380  +
    /// A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         381  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         382  +
    pub struct Builder {}
         383  +
    impl Builder {
         384  +
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         385  +
        pub fn build(self) -> crate::output::ResponseCodeDefaultOperationOutput {
  388    386   
            self.build_enforcing_all_constraints()
  389    387   
        }
  390         -
        fn build_enforcing_all_constraints(self) -> crate::output::TypeComplexityOperationOutput {
  391         -
            crate::output::TypeComplexityOperationOutput { list: self.list }
         388  +
        fn build_enforcing_all_constraints(
         389  +
            self,
         390  +
        ) -> crate::output::ResponseCodeDefaultOperationOutput {
         391  +
            crate::output::ResponseCodeDefaultOperationOutput {}
  392    392   
        }
  393    393   
    }
  394    394   
}