Server Test

Server Test

rev. ee474c7509d7728618c23068f3741e8e5b339ef9

Files changed:

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

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