Server Test

Server Test

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943 (ignoring whitespace)

Files changed:

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/types.rs

@@ -1,1 +0,7 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* SmithyTypesPubUseExtra.kt:66 */
    2      3   
pub use ::aws_smithy_types::date_time::Format as DateTimeFormat;
           4  +
/* ServerRequiredCustomizations.kt:69 */
    3      5   
pub use ::aws_smithy_types::error::display::DisplayErrorContext;
    4      6   
pub use ::aws_smithy_types::Blob;
    5         -
pub use ::aws_smithy_types::DateTime;
           7  +
/* SmithyTypesPubUseExtra.kt:69 */ pub use ::aws_smithy_types::DateTime;

tmp-codegen-diff/codegen-server-test/json_rpc11/rust-server-codegen/src/unconstrained.rs

@@ -1,1 +182,222 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* UnconstrainedUnionGenerator.kt:121 */
    3      4   
impl crate::constrained::Constrained for crate::model::MyUnion {
    4      5   
    type Unconstrained = crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained;
    5      6   
}
    6      7   
    7      8   
impl From<crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained>
    8      9   
    for crate::constrained::MaybeConstrained<crate::model::MyUnion>
    9     10   
{
   10     11   
    fn from(value: crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained) -> Self {
   11     12   
        Self::Unconstrained(value)
   12     13   
    }
   13     14   
}
   14     15   
   15     16   
pub(crate) mod my_union_unconstrained {
   16     17   
          18  +
    /* UnconstrainedUnionGenerator.kt:82 */
   17     19   
    #[allow(clippy::enum_variant_names)]
   18     20   
    #[derive(Debug, Clone)]
   19     21   
    pub(crate) enum MyUnionUnconstrained {
   20         -
        BlobValue(::aws_smithy_types::Blob),
   21         -
        BooleanValue(bool),
   22         -
        EnumValue(::std::string::String),
          22  +
        /* UnconstrainedUnionGenerator.kt:95 */ BlobValue(::aws_smithy_types::Blob),
          23  +
        /* UnconstrainedUnionGenerator.kt:95 */ BooleanValue(bool),
          24  +
        /* UnconstrainedUnionGenerator.kt:95 */ EnumValue(::std::string::String),
          25  +
        /* UnconstrainedUnionGenerator.kt:95 */
   23     26   
        ListValue(::std::vec::Vec<::std::string::String>),
          27  +
        /* UnconstrainedUnionGenerator.kt:95 */
   24     28   
        MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
   25         -
        NumberValue(i32),
   26         -
        StringValue(::std::string::String),
          29  +
        /* UnconstrainedUnionGenerator.kt:95 */ NumberValue(i32),
          30  +
        /* UnconstrainedUnionGenerator.kt:95 */ StringValue(::std::string::String),
          31  +
        /* UnconstrainedUnionGenerator.kt:95 */
   27     32   
        StructureValue(crate::model::GreetingStruct),
          33  +
        /* UnconstrainedUnionGenerator.kt:95 */
   28     34   
        TimestampValue(::aws_smithy_types::DateTime),
          35  +
        /* UnconstrainedUnionGenerator.kt:82 */
   29     36   
    }
          37  +
    /* UnconstrainedUnionGenerator.kt:103 */
   30     38   
    impl ::std::convert::TryFrom<MyUnionUnconstrained> for crate::model::MyUnion {
   31     39   
        type Error = crate::model::my_union::ConstraintViolation;
   32     40   
   33     41   
        fn try_from(value: MyUnionUnconstrained) -> ::std::result::Result<Self, Self::Error> {
   34     42   
            Ok(
   35     43   
        match value {
   36     44   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BlobValue(unconstrained) => Self::BlobValue(
   37     45   
                unconstrained
   38     46   
            ),
   39     47   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::BooleanValue(unconstrained) => Self::BooleanValue(
   40     48   
                unconstrained
   41     49   
            ),
   42     50   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::EnumValue(unconstrained) => Self::EnumValue(
   43     51   
                unconstrained
   44     52   
                                        .try_into()
   45     53   
                                        
   46     54   
                                        
   47     55   
                                        .map_err(Self::Error::EnumValue)?
   48     56   
            ),
   49     57   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::ListValue(unconstrained) => Self::ListValue(
   50     58   
                unconstrained
   51     59   
            ),
   52     60   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::MapValue(unconstrained) => Self::MapValue(
   53     61   
                unconstrained
   54     62   
            ),
   55     63   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::NumberValue(unconstrained) => Self::NumberValue(
   56     64   
                unconstrained
   57     65   
            ),
   58     66   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StringValue(unconstrained) => Self::StringValue(
   59     67   
                unconstrained
   60     68   
            ),
   61     69   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::StructureValue(unconstrained) => Self::StructureValue(
   62     70   
                unconstrained
   63     71   
            ),
   64     72   
            crate::unconstrained::my_union_unconstrained::MyUnionUnconstrained::TimestampValue(unconstrained) => Self::TimestampValue(
   65     73   
                unconstrained
   66     74   
            ),
   67     75   
        }
   68     76   
    )
   69     77   
        }
   70     78   
    }
          79  +
          80  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
   71     81   
}
   72     82   
pub(crate) mod foo_enum_map_unconstrained {
   73     83   
          84  +
    /* UnconstrainedMapGenerator.kt:79 */
   74     85   
    #[derive(Debug, Clone)]
   75     86   
    pub(crate) struct FooEnumMapUnconstrained(
   76     87   
        pub(crate) std::collections::HashMap<::std::string::String, ::std::string::String>,
   77     88   
    );
   78     89   
   79     90   
    impl From<FooEnumMapUnconstrained>
   80     91   
        for crate::constrained::MaybeConstrained<
   81     92   
            crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained,
   82     93   
        >
   83     94   
    {
   84     95   
        fn from(value: FooEnumMapUnconstrained) -> Self {
   85     96   
            Self::Unconstrained(value)
   86     97   
        }
   87     98   
    }
          99  +
    /* UnconstrainedMapGenerator.kt:101 */
   88    100   
    impl std::convert::TryFrom<FooEnumMapUnconstrained>
   89    101   
        for crate::constrained::foo_enum_map_constrained::FooEnumMapConstrained
   90    102   
    {
         103  +
        /* UnconstrainedMapGenerator.kt:102 */
   91    104   
        type Error = crate::model::foo_enum_map::ConstraintViolation;
         105  +
        /* UnconstrainedMapGenerator.kt:104 */
   92    106   
        fn try_from(value: FooEnumMapUnconstrained) -> std::result::Result<Self, Self::Error> {
         107  +
            /* UnconstrainedMapGenerator.kt:186 */
   93    108   
            let res: ::std::result::Result<
   94    109   
                ::std::collections::HashMap<::std::string::String, crate::model::FooEnum>,
   95    110   
                Self::Error,
   96    111   
            > = value
   97    112   
                .0
   98    113   
                .into_iter()
   99    114   
                .map(|(k, v)| match crate::model::FooEnum::try_from(v) {
  100    115   
                    Ok(v) => Ok((k, v)),
  101    116   
                    Err(inner_constraint_violation) => {
  102    117   
                        Err(Self::Error::Value(k, inner_constraint_violation))
  103    118   
                    }
  104    119   
                })
  105    120   
                .collect();
  106    121   
            let hm = res?;
         122  +
            /* UnconstrainedMapGenerator.kt:247 */
  107    123   
            Ok(Self(hm))
         124  +
            /* UnconstrainedMapGenerator.kt:104 */
  108    125   
        }
         126  +
        /* UnconstrainedMapGenerator.kt:101 */
  109    127   
    }
         128  +
         129  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  110    130   
}
  111    131   
pub(crate) mod foo_enum_set_unconstrained {
  112    132   
         133  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  113    134   
    #[derive(Debug, Clone)]
  114    135   
    pub(crate) struct FooEnumSetUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
  115    136   
  116    137   
    impl From<FooEnumSetUnconstrained>
  117    138   
        for crate::constrained::MaybeConstrained<crate::model::FooEnumSet>
  118    139   
    {
  119    140   
        fn from(value: FooEnumSetUnconstrained) -> Self {
  120    141   
            Self::Unconstrained(value)
  121    142   
        }
  122    143   
    }
         144  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  123    145   
    impl std::convert::TryFrom<FooEnumSetUnconstrained> for crate::model::FooEnumSet {
         146  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  124    147   
        type Error = crate::model::foo_enum_set::ConstraintViolation;
         148  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  125    149   
        fn try_from(value: FooEnumSetUnconstrained) -> std::result::Result<Self, Self::Error> {
         150  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  126    151   
            let res: ::std::result::Result<
  127    152   
                ::std::vec::Vec<crate::model::FooEnum>,
  128    153   
                (usize, crate::model::foo_enum::ConstraintViolation),
  129    154   
            > = value
  130    155   
                .0
  131    156   
                .into_iter()
  132    157   
                .enumerate()
  133    158   
                .map(|(idx, inner)| {
  134    159   
                    inner
  135    160   
                        .try_into()
  136    161   
                        .map_err(|inner_violation| (idx, inner_violation))
  137    162   
                })
  138    163   
                .collect();
  139    164   
            let inner =
  140    165   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         166  +
            /* UnconstrainedCollectionGenerator.kt:189 */
  141    167   
            Self::try_from(inner)
         168  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  142    169   
        }
         170  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  143    171   
    }
         172  +
         173  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  144    174   
}
  145    175   
pub(crate) mod foo_enum_list_unconstrained {
  146    176   
         177  +
    /* UnconstrainedCollectionGenerator.kt:77 */
  147    178   
    #[derive(Debug, Clone)]
  148    179   
    pub(crate) struct FooEnumListUnconstrained(pub(crate) std::vec::Vec<::std::string::String>);
  149    180   
  150    181   
    impl From<FooEnumListUnconstrained>
  151    182   
        for crate::constrained::MaybeConstrained<
  152    183   
            crate::constrained::foo_enum_list_constrained::FooEnumListConstrained,
  153    184   
        >
  154    185   
    {
  155    186   
        fn from(value: FooEnumListUnconstrained) -> Self {
  156    187   
            Self::Unconstrained(value)
  157    188   
        }
  158    189   
    }
         190  +
    /* UnconstrainedCollectionGenerator.kt:97 */
  159    191   
    impl std::convert::TryFrom<FooEnumListUnconstrained>
  160    192   
        for crate::constrained::foo_enum_list_constrained::FooEnumListConstrained
  161    193   
    {
         194  +
        /* UnconstrainedCollectionGenerator.kt:98 */
  162    195   
        type Error = crate::model::foo_enum_list::ConstraintViolation;
         196  +
        /* UnconstrainedCollectionGenerator.kt:100 */
  163    197   
        fn try_from(value: FooEnumListUnconstrained) -> std::result::Result<Self, Self::Error> {
         198  +
            /* UnconstrainedCollectionGenerator.kt:127 */
  164    199   
            let res: ::std::result::Result<
  165    200   
                ::std::vec::Vec<crate::model::FooEnum>,
  166    201   
                (usize, crate::model::foo_enum::ConstraintViolation),
  167    202   
            > = value
  168    203   
                .0
  169    204   
                .into_iter()
  170    205   
                .enumerate()
  171    206   
                .map(|(idx, inner)| {
  172    207   
                    inner
  173    208   
                        .try_into()
  174    209   
                        .map_err(|inner_violation| (idx, inner_violation))
  175    210   
                })
  176    211   
                .collect();
  177    212   
            let inner =
  178    213   
                res.map_err(|(idx, inner_violation)| Self::Error::Member(idx, inner_violation))?;
         214  +
            /* UnconstrainedCollectionGenerator.kt:191 */
  179    215   
            Ok(Self(inner))
         216  +
            /* UnconstrainedCollectionGenerator.kt:100 */
  180    217   
        }
         218  +
        /* UnconstrainedCollectionGenerator.kt:97 */
  181    219   
    }
         220  +
         221  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  182    222   
}

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

@@ -1,1 +202,370 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
           3  +
/* ServerOperationErrorGenerator.kt:63 */
    3      4   
/// Error type for the `RequiredHeaderCollectionOperation` operation.
           5  +
/* ServerOperationErrorGenerator.kt:64 */
    4      6   
/// Each variant represents an error that can occur for the `RequiredHeaderCollectionOperation` operation.
           7  +
/* RustType.kt:516 */
    5      8   
#[derive(::std::fmt::Debug)]
    6         -
pub enum RequiredHeaderCollectionOperationError {
    7         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
           9  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum RequiredHeaderCollectionOperationError {
          10  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          11  +
    /* ServerOperationErrorGenerator.kt:71 */
    8     12   
    ValidationException(crate::error::ValidationException),
          13  +
    /* ServerOperationErrorGenerator.kt:66 */
    9     14   
}
          15  +
/* ServerOperationErrorGenerator.kt:75 */
   10     16   
impl ::std::fmt::Display for RequiredHeaderCollectionOperationError {
          17  +
    /* ServerOperationErrorGenerator.kt:76 */
   11     18   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
          19  +
        /* ServerOperationErrorGenerator.kt:139 */
   12     20   
        match &self {
   13         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => _inner.fmt(f),
          21  +
            /* ServerOperationErrorGenerator.kt:142 */
          22  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
          23  +
            /* ServerOperationErrorGenerator.kt:78 */
          24  +
            {
          25  +
                _inner.fmt(f)
          26  +
            }
          27  +
            /* ServerOperationErrorGenerator.kt:139 */
   14     28   
        }
          29  +
        /* ServerOperationErrorGenerator.kt:76 */
   15     30   
    }
          31  +
    /* ServerOperationErrorGenerator.kt:75 */
   16     32   
}
          33  +
/* ServerOperationErrorGenerator.kt:83 */
   17     34   
impl RequiredHeaderCollectionOperationError {
          35  +
    /* ServerOperationErrorGenerator.kt:87 */
   18     36   
    /// Returns `true` if the error kind is `RequiredHeaderCollectionOperationError::ValidationException`.
          37  +
    /* ServerOperationErrorGenerator.kt:88 */
   19     38   
    pub fn is_validation_exception(&self) -> bool {
          39  +
        /* ServerOperationErrorGenerator.kt:89 */
   20     40   
        matches!(
   21     41   
            &self,
   22     42   
            RequiredHeaderCollectionOperationError::ValidationException(_)
   23     43   
        )
          44  +
        /* ServerOperationErrorGenerator.kt:88 */
   24     45   
    }
          46  +
    /* ServerOperationErrorGenerator.kt:92 */
   25     47   
    /// Returns the error name string by matching the correct variant.
          48  +
    /* ServerOperationErrorGenerator.kt:93 */
   26     49   
    pub fn name(&self) -> &'static str {
          50  +
        /* ServerOperationErrorGenerator.kt:139 */
   27     51   
        match &self {
   28         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => _inner.name(),
          52  +
            /* ServerOperationErrorGenerator.kt:142 */
          53  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
          54  +
            /* ServerOperationErrorGenerator.kt:95 */
          55  +
            {
          56  +
                _inner.name()
          57  +
            }
          58  +
            /* ServerOperationErrorGenerator.kt:139 */
   29     59   
        }
          60  +
        /* ServerOperationErrorGenerator.kt:93 */
   30     61   
    }
          62  +
    /* ServerOperationErrorGenerator.kt:83 */
   31     63   
}
          64  +
/* ServerOperationErrorGenerator.kt:100 */
   32     65   
impl ::std::error::Error for RequiredHeaderCollectionOperationError {
          66  +
    /* ServerOperationErrorGenerator.kt:101 */
   33     67   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
          68  +
        /* ServerOperationErrorGenerator.kt:139 */
   34     69   
        match &self {
   35         -
            RequiredHeaderCollectionOperationError::ValidationException(_inner) => Some(_inner),
          70  +
            /* ServerOperationErrorGenerator.kt:142 */
          71  +
            RequiredHeaderCollectionOperationError::ValidationException(_inner) =>
          72  +
            /* ServerOperationErrorGenerator.kt:103 */
          73  +
            {
          74  +
                Some(_inner)
          75  +
            }
          76  +
            /* ServerOperationErrorGenerator.kt:139 */
   36     77   
        }
          78  +
        /* ServerOperationErrorGenerator.kt:101 */
   37     79   
    }
          80  +
    /* ServerOperationErrorGenerator.kt:100 */
   38     81   
}
          82  +
/* ServerOperationErrorGenerator.kt:110 */
   39     83   
impl ::std::convert::From<crate::error::ValidationException>
   40     84   
    for crate::error::RequiredHeaderCollectionOperationError
   41     85   
{
          86  +
    /* ServerOperationErrorGenerator.kt:111 */
   42     87   
    fn from(
   43     88   
        variant: crate::error::ValidationException,
   44     89   
    ) -> crate::error::RequiredHeaderCollectionOperationError {
          90  +
        /* ServerOperationErrorGenerator.kt:112 */
   45     91   
        Self::ValidationException(variant)
          92  +
        /* ServerOperationErrorGenerator.kt:111 */
   46     93   
    }
          94  +
    /* ServerOperationErrorGenerator.kt:110 */
   47     95   
}
   48     96   
   49         -
/// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          97  +
/// /* StructureGenerator.kt:197 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
          98  +
/* RustType.kt:516 */
   50     99   
#[derive(
   51    100   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   52    101   
)]
   53         -
pub struct ValidationException {
   54         -
    /// A summary of the validation failure.
         102  +
pub /* StructureGenerator.kt:201 */ struct ValidationException {
         103  +
    /// /* StructureGenerator.kt:231 */A summary of the validation failure.
   55    104   
    pub message: ::std::string::String,
   56         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         105  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
   57    106   
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         107  +
    /* StructureGenerator.kt:201 */
   58    108   
}
         109  +
/* StructureGenerator.kt:135 */
   59    110   
impl ValidationException {
   60         -
    /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         111  +
    /// /* StructureGenerator.kt:231 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         112  +
    /* StructureGenerator.kt:166 */
   61    113   
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         114  +
        /* StructureGenerator.kt:169 */
   62    115   
        self.field_list.as_deref()
         116  +
        /* StructureGenerator.kt:166 */
   63    117   
    }
         118  +
    /* StructureGenerator.kt:135 */
   64    119   
}
         120  +
/* ErrorImplGenerator.kt:99 */
   65    121   
impl ValidationException {
         122  +
    /* ErrorImplGenerator.kt:128 */
   66    123   
    /// Returns the error message.
   67    124   
    pub fn message(&self) -> &str {
   68    125   
        &self.message
   69    126   
    }
         127  +
    /* ErrorImplGenerator.kt:141 */
   70    128   
    #[doc(hidden)]
   71    129   
    /// Returns the error name.
   72    130   
    pub fn name(&self) -> &'static str {
   73    131   
        "ValidationException"
   74    132   
    }
         133  +
    /* ErrorImplGenerator.kt:99 */
   75    134   
}
         135  +
/* ErrorImplGenerator.kt:153 */
   76    136   
impl ::std::fmt::Display for ValidationException {
         137  +
    /* ErrorImplGenerator.kt:154 */
   77    138   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         139  +
        /* ErrorImplGenerator.kt:161 */
   78    140   
        ::std::write!(f, "ValidationException")?;
         141  +
        /* ErrorImplGenerator.kt:166 */
   79    142   
        {
         143  +
            /* ErrorImplGenerator.kt:167 */
   80    144   
            ::std::write!(f, ": {}", &self.message)?;
         145  +
            /* ErrorImplGenerator.kt:166 */
   81    146   
        }
         147  +
        /* ErrorImplGenerator.kt:171 */
   82    148   
        Ok(())
         149  +
        /* ErrorImplGenerator.kt:154 */
   83    150   
    }
         151  +
    /* ErrorImplGenerator.kt:153 */
   84    152   
}
         153  +
/* ErrorImplGenerator.kt:175 */
   85    154   
impl ::std::error::Error for ValidationException {}
         155  +
/* ServerCodegenVisitor.kt:345 */
   86    156   
impl ValidationException {
   87         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         157  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         158  +
    /* ServerBuilderGenerator.kt:295 */
   88    159   
    pub fn builder() -> crate::error::validation_exception::Builder {
         160  +
        /* ServerBuilderGenerator.kt:296 */
   89    161   
        crate::error::validation_exception::Builder::default()
         162  +
        /* ServerBuilderGenerator.kt:295 */
   90    163   
    }
         164  +
    /* ServerCodegenVisitor.kt:345 */
   91    165   
}
   92    166   
         167  +
/* ServerOperationErrorGenerator.kt:63 */
   93    168   
/// Error type for the `RequiredInnerShapeOperation` operation.
         169  +
/* ServerOperationErrorGenerator.kt:64 */
   94    170   
/// Each variant represents an error that can occur for the `RequiredInnerShapeOperation` operation.
         171  +
/* RustType.kt:516 */
   95    172   
#[derive(::std::fmt::Debug)]
   96         -
pub enum RequiredInnerShapeOperationError {
   97         -
    /// A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         173  +
pub /* ServerOperationErrorGenerator.kt:66 */ enum RequiredInnerShapeOperationError {
         174  +
    /// /* ServerOperationErrorGenerator.kt:68 */A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
         175  +
    /* ServerOperationErrorGenerator.kt:71 */
   98    176   
    ValidationException(crate::error::ValidationException),
         177  +
    /* ServerOperationErrorGenerator.kt:66 */
   99    178   
}
         179  +
/* ServerOperationErrorGenerator.kt:75 */
  100    180   
impl ::std::fmt::Display for RequiredInnerShapeOperationError {
         181  +
    /* ServerOperationErrorGenerator.kt:76 */
  101    182   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         183  +
        /* ServerOperationErrorGenerator.kt:139 */
  102    184   
        match &self {
  103         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => _inner.fmt(f),
         185  +
            /* ServerOperationErrorGenerator.kt:142 */
         186  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         187  +
            /* ServerOperationErrorGenerator.kt:78 */
         188  +
            {
         189  +
                _inner.fmt(f)
         190  +
            }
         191  +
            /* ServerOperationErrorGenerator.kt:139 */
  104    192   
        }
         193  +
        /* ServerOperationErrorGenerator.kt:76 */
  105    194   
    }
         195  +
    /* ServerOperationErrorGenerator.kt:75 */
  106    196   
}
         197  +
/* ServerOperationErrorGenerator.kt:83 */
  107    198   
impl RequiredInnerShapeOperationError {
         199  +
    /* ServerOperationErrorGenerator.kt:87 */
  108    200   
    /// Returns `true` if the error kind is `RequiredInnerShapeOperationError::ValidationException`.
         201  +
    /* ServerOperationErrorGenerator.kt:88 */
  109    202   
    pub fn is_validation_exception(&self) -> bool {
         203  +
        /* ServerOperationErrorGenerator.kt:89 */
  110    204   
        matches!(
  111    205   
            &self,
  112    206   
            RequiredInnerShapeOperationError::ValidationException(_)
  113    207   
        )
         208  +
        /* ServerOperationErrorGenerator.kt:88 */
  114    209   
    }
         210  +
    /* ServerOperationErrorGenerator.kt:92 */
  115    211   
    /// Returns the error name string by matching the correct variant.
         212  +
    /* ServerOperationErrorGenerator.kt:93 */
  116    213   
    pub fn name(&self) -> &'static str {
         214  +
        /* ServerOperationErrorGenerator.kt:139 */
  117    215   
        match &self {
  118         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => _inner.name(),
         216  +
            /* ServerOperationErrorGenerator.kt:142 */
         217  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         218  +
            /* ServerOperationErrorGenerator.kt:95 */
         219  +
            {
         220  +
                _inner.name()
         221  +
            }
         222  +
            /* ServerOperationErrorGenerator.kt:139 */
  119    223   
        }
         224  +
        /* ServerOperationErrorGenerator.kt:93 */
  120    225   
    }
         226  +
    /* ServerOperationErrorGenerator.kt:83 */
  121    227   
}
         228  +
/* ServerOperationErrorGenerator.kt:100 */
  122    229   
impl ::std::error::Error for RequiredInnerShapeOperationError {
         230  +
    /* ServerOperationErrorGenerator.kt:101 */
  123    231   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
         232  +
        /* ServerOperationErrorGenerator.kt:139 */
  124    233   
        match &self {
  125         -
            RequiredInnerShapeOperationError::ValidationException(_inner) => Some(_inner),
         234  +
            /* ServerOperationErrorGenerator.kt:142 */
         235  +
            RequiredInnerShapeOperationError::ValidationException(_inner) =>
         236  +
            /* ServerOperationErrorGenerator.kt:103 */
         237  +
            {
         238  +
                Some(_inner)
         239  +
            }
         240  +
            /* ServerOperationErrorGenerator.kt:139 */
  126    241   
        }
         242  +
        /* ServerOperationErrorGenerator.kt:101 */
  127    243   
    }
         244  +
    /* ServerOperationErrorGenerator.kt:100 */
  128    245   
}
         246  +
/* ServerOperationErrorGenerator.kt:110 */
  129    247   
impl ::std::convert::From<crate::error::ValidationException>
  130    248   
    for crate::error::RequiredInnerShapeOperationError
  131    249   
{
         250  +
    /* ServerOperationErrorGenerator.kt:111 */
  132    251   
    fn from(
  133    252   
        variant: crate::error::ValidationException,
  134    253   
    ) -> crate::error::RequiredInnerShapeOperationError {
         254  +
        /* ServerOperationErrorGenerator.kt:112 */
  135    255   
        Self::ValidationException(variant)
         256  +
        /* ServerOperationErrorGenerator.kt:111 */
  136    257   
    }
         258  +
    /* ServerOperationErrorGenerator.kt:110 */
  137    259   
}
  138    260   
  139         -
/// See [`ValidationException`](crate::error::ValidationException).
         261  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationException`](crate::error::ValidationException).
  140    262   
pub mod validation_exception {
  141    263   
         264  +
    /* RustType.kt:516 */
  142    265   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  143         -
    /// Holds one variant for each of the ways the builder can fail.
         266  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         267  +
    /* RustType.kt:516 */
  144    268   
    #[non_exhaustive]
         269  +
    /* ServerBuilderConstraintViolations.kt:75 */
  145    270   
    #[allow(clippy::enum_variant_names)]
  146    271   
    pub enum ConstraintViolation {
  147         -
        /// `message` was not provided but it is required when building `ValidationException`.
         272  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationException`.
         273  +
        /* ServerBuilderConstraintViolations.kt:143 */
  148    274   
        MissingMessage,
         275  +
        /* ServerBuilderConstraintViolations.kt:75 */
  149    276   
    }
         277  +
    /* ServerBuilderConstraintViolations.kt:117 */
  150    278   
    impl ::std::fmt::Display for ConstraintViolation {
         279  +
        /* ServerBuilderConstraintViolations.kt:118 */
  151    280   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         281  +
            /* ServerBuilderConstraintViolations.kt:119 */
  152    282   
            match self {
  153         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
  154         -
            }
         283  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationException`"),
         284  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         285  +
            /* ServerBuilderConstraintViolations.kt:118 */
  155    286   
        }
         287  +
        /* ServerBuilderConstraintViolations.kt:117 */
  156    288   
    }
         289  +
    /* ServerBuilderConstraintViolations.kt:84 */
  157    290   
    impl ::std::error::Error for ConstraintViolation {}
         291  +
    /* ServerBuilderGenerator.kt:446 */
  158    292   
    impl ::std::convert::TryFrom<Builder> for crate::error::ValidationException {
  159    293   
        type Error = ConstraintViolation;
  160    294   
  161    295   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  162    296   
            builder.build()
  163    297   
        }
  164    298   
    }
  165         -
    /// A builder for [`ValidationException`](crate::error::ValidationException).
         299  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationException`](crate::error::ValidationException).
         300  +
    /* RustType.kt:516 */
  166    301   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         302  +
    /* ServerBuilderGenerator.kt:211 */
  167    303   
    pub struct Builder {
         304  +
        /* ServerBuilderGenerator.kt:308 */
  168    305   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         306  +
        /* ServerBuilderGenerator.kt:308 */
  169    307   
        pub(crate) field_list:
  170    308   
            ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         309  +
        /* ServerBuilderGenerator.kt:211 */
  171    310   
    }
         311  +
    /* ServerBuilderGenerator.kt:215 */
  172    312   
    impl Builder {
  173         -
        /// A summary of the validation failure.
         313  +
        /// /* ServerBuilderGenerator.kt:331 */A summary of the validation failure.
         314  +
        /* ServerBuilderGenerator.kt:343 */
  174    315   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  175         -
            self.message = Some(input);
         316  +
            /* ServerBuilderGenerator.kt:344 */
         317  +
            self.message =
         318  +
                /* ServerBuilderGenerator.kt:345 */Some(
         319  +
                    /* ServerBuilderGenerator.kt:376 */input
         320  +
                /* ServerBuilderGenerator.kt:345 */)
         321  +
            /* ServerBuilderGenerator.kt:344 */;
  176    322   
            self
         323  +
            /* ServerBuilderGenerator.kt:343 */
  177    324   
        }
  178         -
        /// A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         325  +
        /// /* ServerBuilderGenerator.kt:331 */A list of specific failures encountered while validating the input. A member can appear in this list more than once if it failed to satisfy multiple constraints.
         326  +
        /* ServerBuilderGenerator.kt:343 */
  179    327   
        pub fn field_list(
  180    328   
            mut self,
  181    329   
            input: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  182    330   
        ) -> Self {
  183         -
            self.field_list = input;
         331  +
            /* ServerBuilderGenerator.kt:344 */
         332  +
            self.field_list =
         333  +
                /* ServerBuilderGenerator.kt:376 */input
         334  +
            /* ServerBuilderGenerator.kt:344 */;
  184    335   
            self
         336  +
            /* ServerBuilderGenerator.kt:343 */
  185    337   
        }
  186         -
        /// Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
  187         -
        ///
         338  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationException`](crate::error::ValidationException).
         339  +
        /// /* ServerBuilderGenerator.kt:260 */
  188    340   
        /// The builder fails to construct a [`ValidationException`](crate::error::ValidationException) if a [`ConstraintViolation`] occurs.
  189    341   
        ///
         342  +
        /* ServerBuilderGenerator.kt:271 */
  190    343   
        pub fn build(self) -> Result<crate::error::ValidationException, ConstraintViolation> {
  191    344   
            self.build_enforcing_all_constraints()
  192    345   
        }
         346  +
        /* ServerBuilderGenerator.kt:283 */
  193    347   
        fn build_enforcing_all_constraints(
  194    348   
            self,
  195    349   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
  196         -
            Ok(crate::error::ValidationException {
  197         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
         350  +
            /* ServerBuilderGenerator.kt:287 */
         351  +
            Ok(
         352  +
                /* ServerBuilderGenerator.kt:542 */
         353  +
                crate::error::ValidationException {
         354  +
                    /* ServerBuilderGenerator.kt:546 */
         355  +
                    message: self
         356  +
                        .message
         357  +
                        /* ServerBuilderGenerator.kt:569 */
         358  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
         359  +
                    /* ServerBuilderGenerator.kt:546 */
  198    360   
                    field_list: self.field_list,
  199         -
            })
         361  +
                    /* ServerBuilderGenerator.kt:542 */
         362  +
                }, /* ServerBuilderGenerator.kt:287 */
         363  +
            )
         364  +
            /* ServerBuilderGenerator.kt:283 */
  200    365   
        }
         366  +
        /* ServerBuilderGenerator.kt:215 */
  201    367   
    }
         368  +
         369  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  202    370   
}

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

@@ -1,1 +551,797 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* StructureGenerator.kt:197 */
    2      3   
#[allow(missing_docs)] // documentation missing in model
           4  +
/* RustType.kt:516 */
    3      5   
#[derive(
    4      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    5      7   
)]
    6         -
pub struct ResponseCodeDefaultOperationInput {}
           8  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeDefaultOperationInput {/* StructureGenerator.kt:201 */}
           9  +
/* ServerCodegenVisitor.kt:345 */
    7     10   
impl ResponseCodeDefaultOperationInput {
    8         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
          11  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
          12  +
    /* ServerBuilderGenerator.kt:295 */
    9     13   
    pub fn builder() -> crate::input::response_code_default_operation_input::Builder {
          14  +
        /* ServerBuilderGenerator.kt:296 */
   10     15   
        crate::input::response_code_default_operation_input::Builder::default()
          16  +
        /* ServerBuilderGenerator.kt:295 */
   11     17   
    }
          18  +
    /* ServerCodegenVisitor.kt:345 */
   12     19   
}
          20  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   13     21   
impl crate::constrained::Constrained for crate::input::ResponseCodeDefaultOperationInput {
   14     22   
    type Unconstrained = crate::input::response_code_default_operation_input::Builder;
   15     23   
}
   16     24   
          25  +
/* StructureGenerator.kt:197 */
   17     26   
#[allow(missing_docs)] // documentation missing in model
          27  +
/* RustType.kt:516 */
   18     28   
#[derive(
   19     29   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   20     30   
)]
   21         -
pub struct ResponseCodeHttpFallbackOperationInput {}
          31  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeHttpFallbackOperationInput {/* StructureGenerator.kt:201 */}
          32  +
/* ServerCodegenVisitor.kt:345 */
   22     33   
impl ResponseCodeHttpFallbackOperationInput {
   23         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
          34  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
          35  +
    /* ServerBuilderGenerator.kt:295 */
   24     36   
    pub fn builder() -> crate::input::response_code_http_fallback_operation_input::Builder {
          37  +
        /* ServerBuilderGenerator.kt:296 */
   25     38   
        crate::input::response_code_http_fallback_operation_input::Builder::default()
          39  +
        /* ServerBuilderGenerator.kt:295 */
   26     40   
    }
          41  +
    /* ServerCodegenVisitor.kt:345 */
   27     42   
}
          43  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   28     44   
impl crate::constrained::Constrained for crate::input::ResponseCodeHttpFallbackOperationInput {
   29     45   
    type Unconstrained = crate::input::response_code_http_fallback_operation_input::Builder;
   30     46   
}
   31     47   
          48  +
/* StructureGenerator.kt:197 */
   32     49   
#[allow(missing_docs)] // documentation missing in model
          50  +
/* RustType.kt:516 */
   33     51   
#[derive(
   34     52   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   35     53   
)]
   36         -
pub struct ResponseCodeRequiredOperationInput {}
          54  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeRequiredOperationInput {/* StructureGenerator.kt:201 */}
          55  +
/* ServerCodegenVisitor.kt:345 */
   37     56   
impl ResponseCodeRequiredOperationInput {
   38         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
          57  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
          58  +
    /* ServerBuilderGenerator.kt:295 */
   39     59   
    pub fn builder() -> crate::input::response_code_required_operation_input::Builder {
          60  +
        /* ServerBuilderGenerator.kt:296 */
   40     61   
        crate::input::response_code_required_operation_input::Builder::default()
          62  +
        /* ServerBuilderGenerator.kt:295 */
   41     63   
    }
          64  +
    /* ServerCodegenVisitor.kt:345 */
   42     65   
}
          66  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   43     67   
impl crate::constrained::Constrained for crate::input::ResponseCodeRequiredOperationInput {
   44     68   
    type Unconstrained = crate::input::response_code_required_operation_input::Builder;
   45     69   
}
   46     70   
          71  +
/* StructureGenerator.kt:197 */
   47     72   
#[allow(missing_docs)] // documentation missing in model
          73  +
/* RustType.kt:516 */
   48     74   
#[derive(
   49     75   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50     76   
)]
   51         -
pub struct RequiredHeaderCollectionOperationInput {
          77  +
pub /* StructureGenerator.kt:201 */ struct RequiredHeaderCollectionOperationInput {
          78  +
    /* StructureGenerator.kt:231 */
   52     79   
    #[allow(missing_docs)] // documentation missing in model
   53     80   
    pub required_header_list: ::std::vec::Vec<::std::string::String>,
          81  +
    /* StructureGenerator.kt:231 */
   54     82   
    #[allow(missing_docs)] // documentation missing in model
   55     83   
    pub required_header_set: crate::model::HeaderSet,
          84  +
    /* StructureGenerator.kt:201 */
   56     85   
}
          86  +
/* StructureGenerator.kt:135 */
   57     87   
impl RequiredHeaderCollectionOperationInput {
          88  +
    /* StructureGenerator.kt:231 */
   58     89   
    #[allow(missing_docs)] // documentation missing in model
          90  +
                           /* StructureGenerator.kt:166 */
   59     91   
    pub fn required_header_list(&self) -> &[::std::string::String] {
          92  +
        /* StructureGenerator.kt:171 */
   60     93   
        use std::ops::Deref;
   61     94   
        self.required_header_list.deref()
          95  +
        /* StructureGenerator.kt:166 */
   62     96   
    }
          97  +
    /* StructureGenerator.kt:231 */
   63     98   
    #[allow(missing_docs)] // documentation missing in model
          99  +
                           /* StructureGenerator.kt:166 */
   64    100   
    pub fn required_header_set(&self) -> &crate::model::HeaderSet {
         101  +
        /* StructureGenerator.kt:172 */
   65    102   
        &self.required_header_set
         103  +
        /* StructureGenerator.kt:166 */
   66    104   
    }
         105  +
    /* StructureGenerator.kt:135 */
   67    106   
}
         107  +
/* ServerCodegenVisitor.kt:345 */
   68    108   
impl RequiredHeaderCollectionOperationInput {
   69         -
    /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         109  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         110  +
    /* ServerBuilderGenerator.kt:295 */
   70    111   
    pub fn builder() -> crate::input::required_header_collection_operation_input::Builder {
         112  +
        /* ServerBuilderGenerator.kt:296 */
   71    113   
        crate::input::required_header_collection_operation_input::Builder::default()
         114  +
        /* ServerBuilderGenerator.kt:295 */
   72    115   
    }
         116  +
    /* ServerCodegenVisitor.kt:345 */
   73    117   
}
         118  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   74    119   
impl crate::constrained::Constrained for crate::input::RequiredHeaderCollectionOperationInput {
   75    120   
    type Unconstrained = crate::input::required_header_collection_operation_input::Builder;
   76    121   
}
   77    122   
         123  +
/* StructureGenerator.kt:197 */
   78    124   
#[allow(missing_docs)] // documentation missing in model
         125  +
/* RustType.kt:516 */
   79    126   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   80         -
pub struct RequiredInnerShapeOperationInput {
         127  +
pub /* StructureGenerator.kt:201 */ struct RequiredInnerShapeOperationInput {
         128  +
    /* StructureGenerator.kt:231 */
   81    129   
    #[allow(missing_docs)] // documentation missing in model
   82    130   
    pub inner: ::std::option::Option<crate::model::InnerShape>,
         131  +
    /* StructureGenerator.kt:201 */
   83    132   
}
         133  +
/* StructureGenerator.kt:135 */
   84    134   
impl RequiredInnerShapeOperationInput {
         135  +
    /* StructureGenerator.kt:231 */
   85    136   
    #[allow(missing_docs)] // documentation missing in model
         137  +
                           /* StructureGenerator.kt:166 */
   86    138   
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
         139  +
        /* StructureGenerator.kt:170 */
   87    140   
        self.inner.as_ref()
         141  +
        /* StructureGenerator.kt:166 */
   88    142   
    }
         143  +
    /* StructureGenerator.kt:135 */
   89    144   
}
         145  +
/* ServerCodegenVisitor.kt:345 */
   90    146   
impl RequiredInnerShapeOperationInput {
   91         -
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         147  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         148  +
    /* ServerBuilderGenerator.kt:295 */
   92    149   
    pub fn builder() -> crate::input::required_inner_shape_operation_input::Builder {
         150  +
        /* ServerBuilderGenerator.kt:296 */
   93    151   
        crate::input::required_inner_shape_operation_input::Builder::default()
         152  +
        /* ServerBuilderGenerator.kt:295 */
   94    153   
    }
         154  +
    /* ServerCodegenVisitor.kt:345 */
   95    155   
}
         156  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
   96    157   
impl crate::constrained::Constrained for crate::input::RequiredInnerShapeOperationInput {
   97    158   
    type Unconstrained = crate::input::required_inner_shape_operation_input::Builder;
   98    159   
}
   99    160   
         161  +
/* StructureGenerator.kt:197 */
  100    162   
#[allow(missing_docs)] // documentation missing in model
         163  +
/* RustType.kt:516 */
  101    164   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  102         -
pub struct TypeComplexityOperationInput {
         165  +
pub /* StructureGenerator.kt:201 */ struct TypeComplexityOperationInput {
         166  +
    /* StructureGenerator.kt:231 */
  103    167   
    #[allow(missing_docs)] // documentation missing in model
  104    168   
    pub list: ::std::option::Option<
  105    169   
        ::std::vec::Vec<
  106    170   
            ::std::vec::Vec<
  107    171   
                ::std::vec::Vec<
  108    172   
                    ::std::collections::HashMap<
  109    173   
                        ::std::string::String,
  110    174   
                        crate::model::EmptyStructure,
  111    175   
                    >,
  112    176   
                >,
  113    177   
            >,
  114    178   
        >,
  115    179   
    >,
         180  +
    /* StructureGenerator.kt:201 */
  116    181   
}
         182  +
/* StructureGenerator.kt:135 */
  117    183   
impl TypeComplexityOperationInput {
         184  +
    /* StructureGenerator.kt:231 */
  118    185   
    #[allow(missing_docs)] // documentation missing in model
         186  +
                           /* StructureGenerator.kt:166 */
  119    187   
    pub fn list(
  120    188   
        &self,
  121    189   
    ) -> ::std::option::Option<
  122    190   
        &[::std::vec::Vec<
  123    191   
            ::std::vec::Vec<
  124    192   
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
  125    193   
            >,
  126    194   
        >],
  127    195   
    > {
         196  +
        /* StructureGenerator.kt:169 */
  128    197   
        self.list.as_deref()
         198  +
        /* StructureGenerator.kt:166 */
  129    199   
    }
         200  +
    /* StructureGenerator.kt:135 */
  130    201   
}
         202  +
/* ServerCodegenVisitor.kt:345 */
  131    203   
impl TypeComplexityOperationInput {
  132         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         204  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         205  +
    /* ServerBuilderGenerator.kt:295 */
  133    206   
    pub fn builder() -> crate::input::type_complexity_operation_input::Builder {
         207  +
        /* ServerBuilderGenerator.kt:296 */
  134    208   
        crate::input::type_complexity_operation_input::Builder::default()
         209  +
        /* ServerBuilderGenerator.kt:295 */
  135    210   
    }
         211  +
    /* ServerCodegenVisitor.kt:345 */
  136    212   
}
         213  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  137    214   
impl crate::constrained::Constrained for crate::input::TypeComplexityOperationInput {
  138    215   
    type Unconstrained = crate::input::type_complexity_operation_input::Builder;
  139    216   
}
  140         -
/// See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         217  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
  141    218   
pub mod response_code_default_operation_input {
  142    219   
         220  +
    /* ServerBuilderGenerator.kt:461 */
  143    221   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeDefaultOperationInput {
  144    222   
        fn from(builder: Builder) -> Self {
  145    223   
            builder.build()
  146    224   
        }
  147    225   
    }
  148         -
    /// A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         226  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         227  +
    /* RustType.kt:516 */
  149    228   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  150         -
    pub struct Builder {}
         229  +
    /* ServerBuilderGenerator.kt:211 */
         230  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         231  +
    /* ServerBuilderGenerator.kt:215 */
  151    232   
    impl Builder {
  152         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         233  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput).
         234  +
        /* ServerBuilderGenerator.kt:271 */
  153    235   
        pub fn build(self) -> crate::input::ResponseCodeDefaultOperationInput {
  154    236   
            self.build_enforcing_all_constraints()
  155    237   
        }
         238  +
        /* ServerBuilderGenerator.kt:283 */
  156    239   
        fn build_enforcing_all_constraints(
  157    240   
            self,
  158    241   
        ) -> crate::input::ResponseCodeDefaultOperationInput {
  159         -
            crate::input::ResponseCodeDefaultOperationInput {}
         242  +
            /* ServerBuilderGenerator.kt:542 */
         243  +
            crate::input::ResponseCodeDefaultOperationInput {
         244  +
            /* ServerBuilderGenerator.kt:542 */}
         245  +
            /* ServerBuilderGenerator.kt:283 */
  160    246   
        }
         247  +
        /* ServerBuilderGenerator.kt:215 */
  161    248   
    }
         249  +
         250  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  162    251   
}
  163         -
/// See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         252  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
  164    253   
pub mod response_code_http_fallback_operation_input {
  165    254   
         255  +
    /* ServerBuilderGenerator.kt:461 */
  166    256   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeHttpFallbackOperationInput {
  167    257   
        fn from(builder: Builder) -> Self {
  168    258   
            builder.build()
  169    259   
        }
  170    260   
    }
  171         -
    /// A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         261  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         262  +
    /* RustType.kt:516 */
  172    263   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  173         -
    pub struct Builder {}
         264  +
    /* ServerBuilderGenerator.kt:211 */
         265  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         266  +
    /* ServerBuilderGenerator.kt:215 */
  174    267   
    impl Builder {
  175         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         268  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput).
         269  +
        /* ServerBuilderGenerator.kt:271 */
  176    270   
        pub fn build(self) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  177    271   
            self.build_enforcing_all_constraints()
  178    272   
        }
         273  +
        /* ServerBuilderGenerator.kt:283 */
  179    274   
        fn build_enforcing_all_constraints(
  180    275   
            self,
  181    276   
        ) -> crate::input::ResponseCodeHttpFallbackOperationInput {
  182         -
            crate::input::ResponseCodeHttpFallbackOperationInput {}
         277  +
            /* ServerBuilderGenerator.kt:542 */
         278  +
            crate::input::ResponseCodeHttpFallbackOperationInput {
         279  +
            /* ServerBuilderGenerator.kt:542 */}
         280  +
            /* ServerBuilderGenerator.kt:283 */
  183    281   
        }
         282  +
        /* ServerBuilderGenerator.kt:215 */
  184    283   
    }
         284  +
         285  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  185    286   
}
  186         -
/// See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         287  +
/// /* ServerBuilderGenerator.kt:171 */See [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
  187    288   
pub mod response_code_required_operation_input {
  188    289   
         290  +
    /* ServerBuilderGenerator.kt:461 */
  189    291   
    impl ::std::convert::From<Builder> for crate::input::ResponseCodeRequiredOperationInput {
  190    292   
        fn from(builder: Builder) -> Self {
  191    293   
            builder.build()
  192    294   
        }
  193    295   
    }
  194         -
    /// A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         296  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         297  +
    /* RustType.kt:516 */
  195    298   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  196         -
    pub struct Builder {}
         299  +
    /* ServerBuilderGenerator.kt:211 */
         300  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
         301  +
    /* ServerBuilderGenerator.kt:215 */
  197    302   
    impl Builder {
  198         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         303  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput).
         304  +
        /* ServerBuilderGenerator.kt:271 */
  199    305   
        pub fn build(self) -> crate::input::ResponseCodeRequiredOperationInput {
  200    306   
            self.build_enforcing_all_constraints()
  201    307   
        }
         308  +
        /* ServerBuilderGenerator.kt:283 */
  202    309   
        fn build_enforcing_all_constraints(
  203    310   
            self,
  204    311   
        ) -> crate::input::ResponseCodeRequiredOperationInput {
  205         -
            crate::input::ResponseCodeRequiredOperationInput {}
         312  +
            /* ServerBuilderGenerator.kt:542 */
         313  +
            crate::input::ResponseCodeRequiredOperationInput {
         314  +
            /* ServerBuilderGenerator.kt:542 */}
         315  +
            /* ServerBuilderGenerator.kt:283 */
  206    316   
        }
         317  +
        /* ServerBuilderGenerator.kt:215 */
  207    318   
    }
         319  +
         320  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  208    321   
}
  209         -
/// See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         322  +
/// /* ServerBuilderGenerator.kt:171 */See [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  210    323   
pub mod required_header_collection_operation_input {
  211    324   
         325  +
    /* RustType.kt:516 */
  212    326   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  213         -
    /// Holds one variant for each of the ways the builder can fail.
         327  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         328  +
    /* RustType.kt:516 */
  214    329   
    #[non_exhaustive]
         330  +
    /* ServerBuilderConstraintViolations.kt:75 */
  215    331   
    #[allow(clippy::enum_variant_names)]
  216    332   
    pub enum ConstraintViolation {
  217         -
        /// `required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         333  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         334  +
        /* ServerBuilderConstraintViolations.kt:143 */
  218    335   
        MissingRequiredHeaderList,
  219         -
        /// `required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         336  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`.
         337  +
        /* ServerBuilderConstraintViolations.kt:143 */
  220    338   
        MissingRequiredHeaderSet,
  221         -
        /// Constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`.
         339  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`.
         340  +
        /* RustType.kt:516 */
  222    341   
        #[doc(hidden)]
         342  +
        /* ServerBuilderConstraintViolations.kt:164 */
  223    343   
        RequiredHeaderSet(crate::model::header_set::ConstraintViolation),
         344  +
        /* ServerBuilderConstraintViolations.kt:75 */
  224    345   
    }
         346  +
    /* ServerBuilderConstraintViolations.kt:117 */
  225    347   
    impl ::std::fmt::Display for ConstraintViolation {
         348  +
        /* ServerBuilderConstraintViolations.kt:118 */
  226    349   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         350  +
            /* ServerBuilderConstraintViolations.kt:119 */
  227    351   
            match self {
  228         -
                ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  229         -
                ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
  230         -
                ConstraintViolation::RequiredHeaderSet(_) => write!(f, "constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`"),
  231         -
            }
         352  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         353  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationInput`"),
         354  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequiredHeaderSet(_) => write!(f, "constraint violation occurred building member `required_header_set` when building `RequiredHeaderCollectionOperationInput`"),
         355  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         356  +
            /* ServerBuilderConstraintViolations.kt:118 */
  232    357   
        }
         358  +
        /* ServerBuilderConstraintViolations.kt:117 */
  233    359   
    }
         360  +
    /* ServerBuilderConstraintViolations.kt:84 */
  234    361   
    impl ::std::error::Error for ConstraintViolation {}
         362  +
    /* ServerBuilderConstraintViolations.kt:171 */
  235    363   
    impl ConstraintViolation {
  236    364   
        pub(crate) fn as_validation_exception_field(
  237    365   
            self,
  238    366   
            path: ::std::string::String,
  239    367   
        ) -> crate::model::ValidationExceptionField {
  240    368   
            match self {
  241    369   
            ConstraintViolation::MissingRequiredHeaderList => crate::model::ValidationExceptionField {
  242    370   
                                                message: format!("Value at '{}/requiredHeaderList' failed to satisfy constraint: Member must not be null", path),
  243    371   
                                                path: path + "/requiredHeaderList",
  244    372   
                                            },
  245    373   
            ConstraintViolation::MissingRequiredHeaderSet => crate::model::ValidationExceptionField {
  246    374   
                                                message: format!("Value at '{}/requiredHeaderSet' failed to satisfy constraint: Member must not be null", path),
  247    375   
                                                path: path + "/requiredHeaderSet",
  248    376   
                                            },
  249    377   
            ConstraintViolation::RequiredHeaderSet(inner) => inner.as_validation_exception_field(path + "/requiredHeaderSet"),
  250    378   
        }
  251    379   
        }
  252    380   
    }
         381  +
    /* ServerBuilderGenerator.kt:234 */
  253    382   
    impl ::std::convert::From<ConstraintViolation>
  254    383   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  255    384   
    {
  256    385   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  257    386   
            let first_validation_exception_field =
  258    387   
                constraint_violation.as_validation_exception_field("".to_owned());
  259    388   
            let validation_exception = crate::error::ValidationException {
  260    389   
                message: format!(
  261    390   
                    "1 validation error detected. {}",
  262    391   
                    &first_validation_exception_field.message
  263    392   
                ),
  264    393   
                field_list: Some(vec![first_validation_exception_field]),
  265    394   
            };
  266    395   
            Self::ConstraintViolation(
  267    396   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  268    397   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  269    398   
                            )
  270    399   
        }
  271    400   
    }
         401  +
    /* ServerBuilderGenerator.kt:244 */
  272    402   
    impl ::std::convert::From<Builder>
  273    403   
        for crate::constrained::MaybeConstrained<
  274    404   
            crate::input::RequiredHeaderCollectionOperationInput,
  275    405   
        >
  276    406   
    {
  277    407   
        fn from(builder: Builder) -> Self {
  278    408   
            Self::Unconstrained(builder)
  279    409   
        }
  280    410   
    }
         411  +
    /* ServerBuilderGenerator.kt:446 */
  281    412   
    impl ::std::convert::TryFrom<Builder> for crate::input::RequiredHeaderCollectionOperationInput {
  282    413   
        type Error = ConstraintViolation;
  283    414   
  284    415   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  285    416   
            builder.build()
  286    417   
        }
  287    418   
    }
  288         -
    /// A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         419  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         420  +
    /* RustType.kt:516 */
  289    421   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         422  +
    /* ServerBuilderGenerator.kt:211 */
  290    423   
    pub struct Builder {
         424  +
        /* ServerBuilderGenerator.kt:308 */
  291    425   
        pub(crate) required_header_list:
  292    426   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         427  +
        /* ServerBuilderGenerator.kt:308 */
  293    428   
        pub(crate) required_header_set:
  294    429   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::HeaderSet>>,
         430  +
        /* ServerBuilderGenerator.kt:211 */
  295    431   
    }
         432  +
    /* ServerBuilderGenerator.kt:215 */
  296    433   
    impl Builder {
         434  +
        /* ServerBuilderGenerator.kt:331 */
  297    435   
        #[allow(missing_docs)] // documentation missing in model
         436  +
                               /* ServerBuilderGenerator.kt:343 */
  298    437   
        pub fn required_header_list(
  299    438   
            mut self,
  300    439   
            input: ::std::vec::Vec<::std::string::String>,
  301    440   
        ) -> Self {
  302         -
            self.required_header_list = Some(input);
         441  +
            /* ServerBuilderGenerator.kt:344 */
         442  +
            self.required_header_list =
         443  +
                /* ServerBuilderGenerator.kt:345 */Some(
         444  +
                    /* ServerBuilderGenerator.kt:376 */input
         445  +
                /* ServerBuilderGenerator.kt:345 */)
         446  +
            /* ServerBuilderGenerator.kt:344 */;
  303    447   
            self
         448  +
            /* ServerBuilderGenerator.kt:343 */
  304    449   
        }
         450  +
        /* ServerBuilderGenerator.kt:426 */
  305    451   
        #[allow(missing_docs)] // documentation missing in model
         452  +
                               /* ServerBuilderGenerator.kt:428 */
  306    453   
        pub(crate) fn set_required_header_list(
  307    454   
            mut self,
  308    455   
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
  309    456   
        ) -> Self {
         457  +
            /* ServerBuilderGenerator.kt:429 */
  310    458   
            self.required_header_list = Some(input.into());
  311    459   
            self
         460  +
            /* ServerBuilderGenerator.kt:428 */
  312    461   
        }
         462  +
        /* ServerBuilderGenerator.kt:331 */
  313    463   
        #[allow(missing_docs)] // documentation missing in model
         464  +
                               /* ServerBuilderGenerator.kt:343 */
  314    465   
        pub fn required_header_set(mut self, input: crate::model::HeaderSet) -> Self {
         466  +
            /* ServerBuilderGenerator.kt:344 */
  315    467   
            self.required_header_set =
  316         -
                Some(crate::constrained::MaybeConstrained::Constrained(input));
         468  +
                /* ServerBuilderGenerator.kt:345 */Some(
         469  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
         470  +
                /* ServerBuilderGenerator.kt:345 */)
         471  +
            /* ServerBuilderGenerator.kt:344 */;
  317    472   
            self
         473  +
            /* ServerBuilderGenerator.kt:343 */
  318    474   
        }
         475  +
        /* ServerBuilderGenerator.kt:426 */
  319    476   
        #[allow(missing_docs)] // documentation missing in model
         477  +
                               /* ServerBuilderGenerator.kt:428 */
  320    478   
        pub(crate) fn set_required_header_set(
  321    479   
            mut self,
  322    480   
            input: impl ::std::convert::Into<
  323    481   
                crate::constrained::MaybeConstrained<crate::model::HeaderSet>,
  324    482   
            >,
  325    483   
        ) -> Self {
         484  +
            /* ServerBuilderGenerator.kt:429 */
  326    485   
            self.required_header_set = Some(input.into());
  327    486   
            self
         487  +
            /* ServerBuilderGenerator.kt:428 */
  328    488   
        }
  329         -
        /// Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
  330         -
        ///
         489  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput).
         490  +
        /// /* ServerBuilderGenerator.kt:260 */
  331    491   
        /// The builder fails to construct a [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) if a [`ConstraintViolation`] occurs.
  332    492   
        ///
  333         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         493  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         494  +
        /* ServerBuilderGenerator.kt:271 */
  334    495   
        pub fn build(
  335    496   
            self,
  336    497   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  337    498   
        {
  338    499   
            self.build_enforcing_all_constraints()
  339    500   
        }
         501  +
        /* ServerBuilderGenerator.kt:283 */
  340    502   
        fn build_enforcing_all_constraints(
  341    503   
            self,
  342    504   
        ) -> Result<crate::input::RequiredHeaderCollectionOperationInput, ConstraintViolation>
  343    505   
        {
  344         -
            Ok(crate::input::RequiredHeaderCollectionOperationInput {
         506  +
            /* ServerBuilderGenerator.kt:287 */
         507  +
            Ok(
         508  +
                /* ServerBuilderGenerator.kt:542 */
         509  +
                crate::input::RequiredHeaderCollectionOperationInput {
         510  +
                    /* ServerBuilderGenerator.kt:546 */
  345    511   
                    required_header_list: self
  346    512   
                        .required_header_list
         513  +
                        /* ServerBuilderGenerator.kt:569 */
  347    514   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
         515  +
                    /* ServerBuilderGenerator.kt:546 */
  348    516   
                    required_header_set: self
  349    517   
                        .required_header_set
         518  +
                        /* ServerBuilderGenerator.kt:602 */
  350    519   
                        .map(|v| match v {
  351    520   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  352    521   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  353    522   
                        })
         523  +
                        /* ServerBuilderGenerator.kt:614 */
  354    524   
                        .map(|res| res.map_err(ConstraintViolation::RequiredHeaderSet))
  355    525   
                        .transpose()?
         526  +
                        /* ServerBuilderGenerator.kt:569 */
  356    527   
                        .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  357         -
            })
         528  +
                    /* ServerBuilderGenerator.kt:542 */
         529  +
                }, /* ServerBuilderGenerator.kt:287 */
         530  +
            )
         531  +
            /* ServerBuilderGenerator.kt:283 */
  358    532   
        }
         533  +
        /* ServerBuilderGenerator.kt:215 */
  359    534   
    }
         535  +
         536  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  360    537   
}
  361         -
/// See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         538  +
/// /* ServerBuilderGenerator.kt:171 */See [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  362    539   
pub mod required_inner_shape_operation_input {
  363    540   
         541  +
    /* RustType.kt:516 */
  364    542   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  365         -
    /// Holds one variant for each of the ways the builder can fail.
         543  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         544  +
    /* RustType.kt:516 */
  366    545   
    #[non_exhaustive]
         546  +
    /* ServerBuilderConstraintViolations.kt:75 */
  367    547   
    #[allow(clippy::enum_variant_names)]
  368    548   
    pub enum ConstraintViolation {
  369         -
        /// Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
         549  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`.
         550  +
        /* RustType.kt:516 */
  370    551   
        #[doc(hidden)]
         552  +
        /* ServerBuilderConstraintViolations.kt:164 */
  371    553   
        Inner(crate::model::inner_shape::ConstraintViolation),
         554  +
        /* ServerBuilderConstraintViolations.kt:75 */
  372    555   
    }
         556  +
    /* ServerBuilderConstraintViolations.kt:117 */
  373    557   
    impl ::std::fmt::Display for ConstraintViolation {
         558  +
        /* ServerBuilderConstraintViolations.kt:118 */
  374    559   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         560  +
            /* ServerBuilderConstraintViolations.kt:119 */
  375    561   
            match self {
  376         -
                ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
  377         -
            }
         562  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::Inner(_) => write!(f, "constraint violation occurred building member `inner` when building `RequiredInnerShapeOperationInput`"),
         563  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         564  +
            /* ServerBuilderConstraintViolations.kt:118 */
  378    565   
        }
         566  +
        /* ServerBuilderConstraintViolations.kt:117 */
  379    567   
    }
         568  +
    /* ServerBuilderConstraintViolations.kt:84 */
  380    569   
    impl ::std::error::Error for ConstraintViolation {}
         570  +
    /* ServerBuilderConstraintViolations.kt:171 */
  381    571   
    impl ConstraintViolation {
  382    572   
        pub(crate) fn as_validation_exception_field(
  383    573   
            self,
  384    574   
            path: ::std::string::String,
  385    575   
        ) -> crate::model::ValidationExceptionField {
  386    576   
            match self {
  387    577   
                ConstraintViolation::Inner(inner) => {
  388    578   
                    inner.as_validation_exception_field(path + "/inner")
  389    579   
                }
  390    580   
            }
  391    581   
        }
  392    582   
    }
         583  +
    /* ServerBuilderGenerator.kt:234 */
  393    584   
    impl ::std::convert::From<ConstraintViolation>
  394    585   
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  395    586   
    {
  396    587   
        fn from(constraint_violation: ConstraintViolation) -> Self {
  397    588   
            let first_validation_exception_field =
  398    589   
                constraint_violation.as_validation_exception_field("".to_owned());
  399    590   
            let validation_exception = crate::error::ValidationException {
  400    591   
                message: format!(
  401    592   
                    "1 validation error detected. {}",
  402    593   
                    &first_validation_exception_field.message
  403    594   
                ),
  404    595   
                field_list: Some(vec![first_validation_exception_field]),
  405    596   
            };
  406    597   
            Self::ConstraintViolation(
  407    598   
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  408    599   
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  409    600   
                            )
  410    601   
        }
  411    602   
    }
         603  +
    /* ServerBuilderGenerator.kt:244 */
  412    604   
    impl ::std::convert::From<Builder>
  413    605   
        for crate::constrained::MaybeConstrained<crate::input::RequiredInnerShapeOperationInput>
  414    606   
    {
  415    607   
        fn from(builder: Builder) -> Self {
  416    608   
            Self::Unconstrained(builder)
  417    609   
        }
  418    610   
    }
         611  +
    /* ServerBuilderGenerator.kt:446 */
  419    612   
    impl ::std::convert::TryFrom<Builder> for crate::input::RequiredInnerShapeOperationInput {
  420    613   
        type Error = ConstraintViolation;
  421    614   
  422    615   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  423    616   
            builder.build()
  424    617   
        }
  425    618   
    }
  426         -
    /// A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         619  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         620  +
    /* RustType.kt:516 */
  427    621   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         622  +
    /* ServerBuilderGenerator.kt:211 */
  428    623   
    pub struct Builder {
         624  +
        /* ServerBuilderGenerator.kt:308 */
  429    625   
        pub(crate) inner:
  430    626   
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::InnerShape>>,
         627  +
        /* ServerBuilderGenerator.kt:211 */
  431    628   
    }
         629  +
    /* ServerBuilderGenerator.kt:215 */
  432    630   
    impl Builder {
         631  +
        /* ServerBuilderGenerator.kt:331 */
  433    632   
        #[allow(missing_docs)] // documentation missing in model
         633  +
                               /* ServerBuilderGenerator.kt:343 */
  434    634   
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  435         -
            self.inner = input.map(
  436         -
                #[allow(clippy::redundant_closure)]
  437         -
                |v| crate::constrained::MaybeConstrained::Constrained(v),
  438         -
            );
         635  +
            /* ServerBuilderGenerator.kt:344 */
         636  +
            self.inner =
         637  +
                /* ServerBuilderGenerator.kt:367 */input.map(crate::constrained::MaybeConstrained::Constrained)
         638  +
            /* ServerBuilderGenerator.kt:344 */;
  439    639   
            self
         640  +
            /* ServerBuilderGenerator.kt:343 */
  440    641   
        }
         642  +
        /* ServerBuilderGenerator.kt:426 */
  441    643   
        #[allow(missing_docs)] // documentation missing in model
         644  +
                               /* ServerBuilderGenerator.kt:428 */
  442    645   
        pub(crate) fn set_inner(
  443    646   
            mut self,
  444    647   
            input: Option<
  445    648   
                impl ::std::convert::Into<
  446    649   
                    crate::constrained::MaybeConstrained<crate::model::InnerShape>,
  447    650   
                >,
  448    651   
            >,
  449    652   
        ) -> Self {
         653  +
            /* ServerBuilderGenerator.kt:429 */
  450    654   
            self.inner = input.map(|v| v.into());
  451    655   
            self
         656  +
            /* ServerBuilderGenerator.kt:428 */
  452    657   
        }
  453         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
  454         -
        ///
         658  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput).
         659  +
        /// /* ServerBuilderGenerator.kt:260 */
  455    660   
        /// The builder fails to construct a [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) if a [`ConstraintViolation`] occurs.
  456    661   
        ///
         662  +
        /* ServerBuilderGenerator.kt:271 */
  457    663   
        pub fn build(
  458    664   
            self,
  459    665   
        ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
  460    666   
            self.build_enforcing_all_constraints()
  461    667   
        }
         668  +
        /* ServerBuilderGenerator.kt:283 */
  462    669   
        fn build_enforcing_all_constraints(
  463    670   
            self,
  464    671   
        ) -> Result<crate::input::RequiredInnerShapeOperationInput, ConstraintViolation> {
  465         -
            Ok(crate::input::RequiredInnerShapeOperationInput {
         672  +
            /* ServerBuilderGenerator.kt:287 */
         673  +
            Ok(
         674  +
                /* ServerBuilderGenerator.kt:542 */
         675  +
                crate::input::RequiredInnerShapeOperationInput {
         676  +
                    /* ServerBuilderGenerator.kt:546 */
  466    677   
                    inner: self
  467    678   
                        .inner
         679  +
                        /* ServerBuilderGenerator.kt:602 */
  468    680   
                        .map(|v| match v {
  469    681   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  470    682   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  471    683   
                        })
         684  +
                        /* ServerBuilderGenerator.kt:614 */
  472    685   
                        .map(|res| res.map_err(ConstraintViolation::Inner))
  473    686   
                        .transpose()?,
  474         -
            })
         687  +
                    /* ServerBuilderGenerator.kt:542 */
         688  +
                }, /* ServerBuilderGenerator.kt:287 */
         689  +
            )
         690  +
            /* ServerBuilderGenerator.kt:283 */
  475    691   
        }
         692  +
        /* ServerBuilderGenerator.kt:215 */
  476    693   
    }
         694  +
         695  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  477    696   
}
  478         -
/// See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         697  +
/// /* ServerBuilderGenerator.kt:171 */See [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
  479    698   
pub mod type_complexity_operation_input {
  480    699   
         700  +
    /* ServerBuilderGenerator.kt:461 */
  481    701   
    impl ::std::convert::From<Builder> for crate::input::TypeComplexityOperationInput {
  482    702   
        fn from(builder: Builder) -> Self {
  483    703   
            builder.build()
  484    704   
        }
  485    705   
    }
  486         -
    /// A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         706  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         707  +
    /* RustType.kt:516 */
  487    708   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         709  +
    /* ServerBuilderGenerator.kt:211 */
  488    710   
    pub struct Builder {
         711  +
        /* ServerBuilderGenerator.kt:308 */
  489    712   
        pub(crate) list: ::std::option::Option<
  490    713   
            ::std::vec::Vec<
  491    714   
                ::std::vec::Vec<
  492    715   
                    ::std::vec::Vec<
  493    716   
                        ::std::collections::HashMap<
  494    717   
                            ::std::string::String,
  495    718   
                            crate::model::EmptyStructure,
  496    719   
                        >,
  497    720   
                    >,
  498    721   
                >,
  499    722   
            >,
  500    723   
        >,
         724  +
        /* ServerBuilderGenerator.kt:211 */
  501    725   
    }
         726  +
    /* ServerBuilderGenerator.kt:215 */
  502    727   
    impl Builder {
         728  +
        /* ServerBuilderGenerator.kt:331 */
  503    729   
        #[allow(missing_docs)] // documentation missing in model
         730  +
                               /* ServerBuilderGenerator.kt:343 */
  504    731   
        pub fn list(
  505    732   
            mut self,
  506    733   
            input: ::std::option::Option<
  507    734   
                ::std::vec::Vec<
  508    735   
                    ::std::vec::Vec<
  509    736   
                        ::std::vec::Vec<
  510    737   
                            ::std::collections::HashMap<
  511    738   
                                ::std::string::String,
  512    739   
                                crate::model::EmptyStructure,
  513    740   
                            >,
  514    741   
                        >,
  515    742   
                    >,
  516    743   
                >,
  517    744   
            >,
  518    745   
        ) -> Self {
  519         -
            self.list = input;
         746  +
            /* ServerBuilderGenerator.kt:344 */
         747  +
            self.list =
         748  +
                /* ServerBuilderGenerator.kt:376 */input
         749  +
            /* ServerBuilderGenerator.kt:344 */;
  520    750   
            self
         751  +
            /* ServerBuilderGenerator.kt:343 */
  521    752   
        }
         753  +
        /* ServerBuilderGenerator.kt:426 */
  522    754   
        #[allow(missing_docs)] // documentation missing in model
         755  +
                               /* ServerBuilderGenerator.kt:428 */
  523    756   
        pub(crate) fn set_list(
  524    757   
            mut self,
  525    758   
            input: Option<
  526    759   
                impl ::std::convert::Into<
  527    760   
                    ::std::vec::Vec<
  528    761   
                        ::std::vec::Vec<
  529    762   
                            ::std::vec::Vec<
  530    763   
                                ::std::collections::HashMap<
  531    764   
                                    ::std::string::String,
  532    765   
                                    crate::model::EmptyStructure,
  533    766   
                                >,
  534    767   
                            >,
  535    768   
                        >,
  536    769   
                    >,
  537    770   
                >,
  538    771   
            >,
  539    772   
        ) -> Self {
         773  +
            /* ServerBuilderGenerator.kt:429 */
  540    774   
            self.list = input.map(|v| v.into());
  541    775   
            self
         776  +
            /* ServerBuilderGenerator.kt:428 */
  542    777   
        }
  543         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         778  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput).
         779  +
        /* ServerBuilderGenerator.kt:271 */
  544    780   
        pub fn build(self) -> crate::input::TypeComplexityOperationInput {
  545    781   
            self.build_enforcing_all_constraints()
  546    782   
        }
         783  +
        /* ServerBuilderGenerator.kt:283 */
  547    784   
        fn build_enforcing_all_constraints(self) -> crate::input::TypeComplexityOperationInput {
  548         -
            crate::input::TypeComplexityOperationInput { list: self.list }
         785  +
            /* ServerBuilderGenerator.kt:542 */
         786  +
            crate::input::TypeComplexityOperationInput {
         787  +
                /* ServerBuilderGenerator.kt:546 */
         788  +
                list: self.list,
         789  +
                /* ServerBuilderGenerator.kt:542 */
         790  +
            }
         791  +
            /* ServerBuilderGenerator.kt:283 */
  549    792   
        }
         793  +
        /* ServerBuilderGenerator.kt:215 */
  550    794   
    }
         795  +
         796  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  551    797   
}

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

@@ -1,1 +54,55 @@
   15     15   
#![allow(rustdoc::bare_urls)]
   16     16   
#![allow(rustdoc::redundant_explicit_links)]
   17     17   
#![allow(rustdoc::invalid_html_tags)]
   18     18   
#![forbid(unsafe_code)]
   19     19   
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
   20     20   
//! A service to test miscellaneous aspects of code generation where protocol
   21     21   
//! selection is not relevant. If you want to test something protocol-specific,
   22     22   
//! add it to a separate `[protocol]-extras.smithy`.
   23     23   
   24     24   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
          25  +
/* ServerRootGenerator.kt:65 */
   25     26   
//! A fast and customizable Rust implementation of the MiscService Smithy service.
   26     27   
//!
   27     28   
//! # Using MiscService
   28     29   
//!
   29     30   
//! The primary entrypoint is [`MiscService`]: it satisfies the [`Service<http::Request, Response = http::Response>`](::tower::Service)
   30     31   
//! trait and therefore can be handed to a [`hyper` server](https://github.com/hyperium/hyper) via [`MiscService::into_make_service`]
   31     32   
//! or used in AWS Lambda
   32     33   
#![cfg_attr(
   33     34   
    feature = "aws-lambda",
   34     35   
    doc = " via [`LambdaHandler`](crate::server::routing::LambdaHandler)."
@@ -194,195 +273,282 @@
  214    215   
//! }
  215    216   
//!
  216    217   
//! ```
  217    218   
//!
  218    219   
//! [`serve`]: https://docs.rs/hyper/0.14.16/hyper/server/struct.Builder.html#method.serve
  219    220   
//! [`tower::make::MakeService`]: https://docs.rs/tower/latest/tower/make/trait.MakeService.html
  220    221   
//! [HTTP binding traits]: https://smithy.io/2.0/spec/http-bindings.html
  221    222   
//! [operations]: https://smithy.io/2.0/spec/service-types.html#operation
  222    223   
//! [hyper server]: https://docs.rs/hyper/latest/hyper/server/index.html
  223    224   
//! [Service]: https://docs.rs/tower-service/latest/tower_service/trait.Service.html
         225  +
/* ServerRootGenerator.kt:261 */
  224    226   
pub use crate::service::{
  225    227   
    MiscService, MiscServiceBuilder, MiscServiceConfig, MiscServiceConfigBuilder,
  226    228   
    MissingOperationsError,
  227    229   
};
  228    230   
  229         -
/// Contains the types that are re-exported from the `aws-smithy-http-server` crate.
         231  +
/// /* ServerRustModule.kt:55 */Contains the types that are re-exported from the `aws-smithy-http-server` crate.
  230    232   
pub mod server {
  231    233   
    // Re-export all types from the `aws-smithy-http-server` crate.
  232    234   
    pub use ::aws_smithy_http_server::*;
         235  +
         236  +
    /* CodegenDelegator.kt:200 */
  233    237   
}
  234    238   
         239  +
/* CrateVersionCustomization.kt:23 */
  235    240   
/// Crate version number.
  236    241   
pub static PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
  237    242   
  238         -
/// All error types that operations can return. Documentation on these types is copied from the model.
         243  +
/// /* ServerRustModule.kt:55 */All error types that operations can return. Documentation on these types is copied from the model.
  239    244   
pub mod error;
  240    245   
  241         -
/// Input structures for operations. Documentation on these types is copied from the model.
         246  +
/// /* ServerRustModule.kt:55 */Input structures for operations. Documentation on these types is copied from the model.
  242    247   
pub mod input;
  243    248   
  244         -
/// Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
         249  +
/// /* ServerRustModule.kt:55 */Data structures used by operation inputs/outputs. Documentation on these types is copied from the model.
  245    250   
pub mod model;
  246    251   
  247         -
/// All operations that this crate can perform.
         252  +
/// /* ServerRustModule.kt:55 */All operations that this crate can perform.
  248    253   
pub mod operation;
  249    254   
         255  +
/* ServerRustModule.kt:79 */
  250    256   
/// A collection of types representing each operation defined in the service closure.
  251    257   
///
  252    258   
/// The [plugin system](::aws_smithy_http_server::plugin) makes use of these
  253    259   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  254    260   
/// parameterize [`Plugin`](::aws_smithy_http_server::plugin::Plugin) implementations. Their traits, such as
  255    261   
/// [`OperationShape`](::aws_smithy_http_server::operation::OperationShape), can be used to provide
  256    262   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  257    263   
pub mod operation_shape;
  258    264   
  259         -
/// Output structures for operations. Documentation on these types is copied from the model.
         265  +
/// /* ServerRustModule.kt:55 */Output structures for operations. Documentation on these types is copied from the model.
  260    266   
pub mod output;
  261    267   
         268  +
/* RustModule.kt:172 */
  262    269   
mod service;
  263    270   
  264         -
/// Data primitives referenced by other data types.
         271  +
/// /* ServerRustModule.kt:55 */Data primitives referenced by other data types.
  265    272   
pub mod types;
  266    273   
  267         -
/// Unconstrained types for constrained shapes.
         274  +
/// /* ServerRustModule.kt:55 */Unconstrained types for constrained shapes.
         275  +
/* RustModule.kt:172 */
  268    276   
mod unconstrained;
  269    277   
  270         -
/// Constrained types for constrained shapes.
         278  +
/// /* ServerRustModule.kt:55 */Constrained types for constrained shapes.
         279  +
/* RustModule.kt:172 */
  271    280   
mod constrained;
  272    281   
  273    282   
pub(crate) mod protocol_serde;

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

@@ -1,1 +609,911 @@
    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.
           2  +
/* StructureGenerator.kt:197 */
           3  +
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
           4  +
/* RustType.kt:516 */
    4      5   
#[derive(
    5      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    6      7   
)]
    7         -
pub struct ValidationExceptionField {
    8         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
           8  +
pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
           9  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
    9     10   
    pub path: ::std::string::String,
   10         -
    /// A detailed description of the validation failure.
          11  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   11     12   
    pub message: ::std::string::String,
          13  +
    /* StructureGenerator.kt:201 */
   12     14   
}
          15  +
/* StructureGenerator.kt:135 */
   13     16   
impl ValidationExceptionField {
   14         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          17  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
          18  +
    /* StructureGenerator.kt:166 */
   15     19   
    pub fn path(&self) -> &str {
          20  +
        /* StructureGenerator.kt:171 */
   16     21   
        use std::ops::Deref;
   17     22   
        self.path.deref()
          23  +
        /* StructureGenerator.kt:166 */
   18     24   
    }
   19         -
    /// A detailed description of the validation failure.
          25  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
          26  +
    /* StructureGenerator.kt:166 */
   20     27   
    pub fn message(&self) -> &str {
          28  +
        /* StructureGenerator.kt:171 */
   21     29   
        use std::ops::Deref;
   22     30   
        self.message.deref()
          31  +
        /* StructureGenerator.kt:166 */
   23     32   
    }
          33  +
    /* StructureGenerator.kt:135 */
   24     34   
}
          35  +
/* ServerCodegenVisitor.kt:345 */
   25     36   
impl ValidationExceptionField {
   26         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          37  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
          38  +
    /* ServerBuilderGenerator.kt:295 */
   27     39   
    pub fn builder() -> crate::model::validation_exception_field::Builder {
          40  +
        /* ServerBuilderGenerator.kt:296 */
   28     41   
        crate::model::validation_exception_field::Builder::default()
          42  +
        /* ServerBuilderGenerator.kt:295 */
   29     43   
    }
          44  +
    /* ServerCodegenVisitor.kt:345 */
   30     45   
}
   31     46   
          47  +
/* ConstrainedCollectionGenerator.kt:93 */
   32     48   
#[allow(missing_docs)] // documentation missing in model
   33         -
///
          49  +
/// /* ConstrainedCollectionGenerator.kt:94 */
   34     50   
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
   35     51   
/// [constraint traits]. Use [`HeaderSet::try_from`] to construct values of this type.
   36     52   
///
   37     53   
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
   38     54   
///
          55  +
/* RustType.kt:516 */
   39     56   
#[derive(
   40     57   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   41     58   
)]
   42         -
pub struct HeaderSet(pub(crate) ::std::vec::Vec<::std::string::String>);
          59  +
pub /* ConstrainedCollectionGenerator.kt:97 */ struct HeaderSet(
          60  +
    pub(crate) ::std::vec::Vec<::std::string::String>,
          61  +
);
          62  +
/* ConstrainedCollectionGenerator.kt:104 */
   43     63   
impl HeaderSet {
          64  +
    /* ConstrainedCollectionGenerator.kt:106 */
   44     65   
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<::std::string::String>`].
   45     66   
    pub fn inner(&self) -> &::std::vec::Vec<::std::string::String> {
   46     67   
        &self.0
   47     68   
    }
          69  +
    /* ConstrainedCollectionGenerator.kt:116 */
   48     70   
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
   49     71   
    pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
   50     72   
        self.0
   51     73   
    }
   52     74   
   53     75   
    fn check_unique_items(
   54     76   
        items: ::std::vec::Vec<::std::string::String>,
   55     77   
    ) -> ::std::result::Result<
   56     78   
        ::std::vec::Vec<::std::string::String>,
   57     79   
        crate::model::header_set::ConstraintViolation,
   58     80   
    > {
   59     81   
        let mut seen = ::std::collections::HashMap::new();
   60     82   
        let mut duplicate_indices = ::std::vec::Vec::new();
   61     83   
        for (idx, item) in items.iter().enumerate() {
   62     84   
            if let Some(prev_idx) = seen.insert(item, idx) {
   63     85   
                duplicate_indices.push(prev_idx);
   64     86   
            }
   65     87   
        }
   66     88   
   67     89   
        let mut last_duplicate_indices = ::std::vec::Vec::new();
   68     90   
        for idx in &duplicate_indices {
   69     91   
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
   70     92   
                last_duplicate_indices.push(prev_idx);
   71     93   
            }
   72     94   
        }
   73     95   
        duplicate_indices.extend(last_duplicate_indices);
   74     96   
   75     97   
        if !duplicate_indices.is_empty() {
   76     98   
            debug_assert!(duplicate_indices.len() >= 2);
   77     99   
            Err(crate::model::header_set::ConstraintViolation::UniqueItems {
   78    100   
                duplicate_indices,
   79    101   
                original: items,
   80    102   
            })
   81    103   
        } else {
   82    104   
            Ok(items)
   83    105   
        }
   84    106   
    }
         107  +
    /* ConstrainedCollectionGenerator.kt:104 */
   85    108   
}
         109  +
/* ConstrainedCollectionGenerator.kt:133 */
   86    110   
impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for HeaderSet {
   87    111   
    type Error = crate::model::header_set::ConstraintViolation;
   88    112   
   89    113   
    /// Constructs a `HeaderSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
   90    114   
    fn try_from(
   91    115   
        value: ::std::vec::Vec<::std::string::String>,
   92    116   
    ) -> ::std::result::Result<Self, Self::Error> {
   93    117   
        let value = Self::check_unique_items(value)?;
   94    118   
   95    119   
        Ok(Self(value))
   96    120   
    }
   97    121   
}
   98    122   
   99    123   
impl ::std::convert::From<HeaderSet> for ::std::vec::Vec<::std::string::String> {
  100    124   
    fn from(value: HeaderSet) -> Self {
  101    125   
        value.into_inner()
  102    126   
    }
  103    127   
}
         128  +
/* ConstrainedCollectionGenerator.kt:181 */
  104    129   
impl crate::constrained::Constrained for HeaderSet {
  105    130   
    type Unconstrained = crate::unconstrained::header_set_unconstrained::HeaderSetUnconstrained;
  106    131   
}
  107    132   
         133  +
/* StructureGenerator.kt:197 */
  108    134   
#[allow(missing_docs)] // documentation missing in model
         135  +
/* RustType.kt:516 */
  109    136   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  110         -
pub struct InnerShape {
         137  +
pub /* StructureGenerator.kt:201 */ struct InnerShape {
         138  +
    /* StructureGenerator.kt:231 */
  111    139   
    #[allow(missing_docs)] // documentation missing in model
  112    140   
    pub required_inner_most_shape: crate::model::InnermostShape,
         141  +
    /* StructureGenerator.kt:201 */
  113    142   
}
         143  +
/* StructureGenerator.kt:135 */
  114    144   
impl InnerShape {
         145  +
    /* StructureGenerator.kt:231 */
  115    146   
    #[allow(missing_docs)] // documentation missing in model
         147  +
                           /* StructureGenerator.kt:166 */
  116    148   
    pub fn required_inner_most_shape(&self) -> &crate::model::InnermostShape {
         149  +
        /* StructureGenerator.kt:172 */
  117    150   
        &self.required_inner_most_shape
         151  +
        /* StructureGenerator.kt:166 */
  118    152   
    }
         153  +
    /* StructureGenerator.kt:135 */
  119    154   
}
         155  +
/* ServerCodegenVisitor.kt:345 */
  120    156   
impl InnerShape {
  121         -
    /// Creates a new builder-style object to manufacture [`InnerShape`](crate::model::InnerShape).
         157  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`InnerShape`](crate::model::InnerShape).
         158  +
    /* ServerBuilderGenerator.kt:295 */
  122    159   
    pub fn builder() -> crate::model::inner_shape::Builder {
         160  +
        /* ServerBuilderGenerator.kt:296 */
  123    161   
        crate::model::inner_shape::Builder::default()
         162  +
        /* ServerBuilderGenerator.kt:295 */
  124    163   
    }
         164  +
    /* ServerCodegenVisitor.kt:345 */
  125    165   
}
         166  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  126    167   
impl crate::constrained::Constrained for crate::model::InnerShape {
  127    168   
    type Unconstrained = crate::model::inner_shape::Builder;
  128    169   
}
  129    170   
         171  +
/* StructureGenerator.kt:197 */
  130    172   
#[allow(missing_docs)] // documentation missing in model
         173  +
/* RustType.kt:516 */
  131    174   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  132         -
pub struct InnermostShape {
         175  +
pub /* StructureGenerator.kt:201 */ struct InnermostShape {
         176  +
    /* StructureGenerator.kt:231 */
  133    177   
    #[allow(missing_docs)] // documentation missing in model
  134    178   
    pub a_string: ::std::string::String,
         179  +
    /* StructureGenerator.kt:231 */
  135    180   
    #[allow(missing_docs)] // documentation missing in model
  136    181   
    pub a_boolean: bool,
         182  +
    /* StructureGenerator.kt:231 */
  137    183   
    #[allow(missing_docs)] // documentation missing in model
  138    184   
    pub a_byte: i8,
         185  +
    /* StructureGenerator.kt:231 */
  139    186   
    #[allow(missing_docs)] // documentation missing in model
  140    187   
    pub a_short: i16,
         188  +
    /* StructureGenerator.kt:231 */
  141    189   
    #[allow(missing_docs)] // documentation missing in model
  142    190   
    pub an_int: i32,
         191  +
    /* StructureGenerator.kt:231 */
  143    192   
    #[allow(missing_docs)] // documentation missing in model
  144    193   
    pub a_long: i64,
         194  +
    /* StructureGenerator.kt:231 */
  145    195   
    #[allow(missing_docs)] // documentation missing in model
  146    196   
    pub a_float: f32,
         197  +
    /* StructureGenerator.kt:231 */
  147    198   
    #[allow(missing_docs)] // documentation missing in model
  148    199   
    pub a_double: f64,
         200  +
    /* StructureGenerator.kt:231 */
  149    201   
    #[allow(missing_docs)] // documentation missing in model
  150    202   
    pub a_timestamp: ::aws_smithy_types::DateTime,
         203  +
    /* StructureGenerator.kt:231 */
  151    204   
    #[allow(missing_docs)] // documentation missing in model
  152    205   
    pub a_document: ::aws_smithy_types::DateTime,
         206  +
    /* StructureGenerator.kt:231 */
  153    207   
    #[allow(missing_docs)] // documentation missing in model
  154    208   
    pub a_string_list: ::std::vec::Vec<::std::string::String>,
         209  +
    /* StructureGenerator.kt:231 */
  155    210   
    #[allow(missing_docs)] // documentation missing in model
  156    211   
    pub a_string_map:
  157    212   
        ::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>,
         213  +
    /* StructureGenerator.kt:231 */
  158    214   
    #[allow(missing_docs)] // documentation missing in model
  159    215   
    pub a_string_set: ::std::vec::Vec<::std::string::String>,
         216  +
    /* StructureGenerator.kt:231 */
  160    217   
    #[allow(missing_docs)] // documentation missing in model
  161    218   
    pub a_blob: ::aws_smithy_types::Blob,
         219  +
    /* StructureGenerator.kt:231 */
  162    220   
    #[allow(missing_docs)] // documentation missing in model
  163    221   
    pub a_union: crate::model::AUnion,
         222  +
    /* StructureGenerator.kt:201 */
  164    223   
}
         224  +
/* StructureGenerator.kt:135 */
  165    225   
impl InnermostShape {
         226  +
    /* StructureGenerator.kt:231 */
  166    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* StructureGenerator.kt:166 */
  167    229   
    pub fn a_string(&self) -> &str {
         230  +
        /* StructureGenerator.kt:171 */
  168    231   
        use std::ops::Deref;
  169    232   
        self.a_string.deref()
         233  +
        /* StructureGenerator.kt:166 */
  170    234   
    }
         235  +
    /* StructureGenerator.kt:231 */
  171    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* StructureGenerator.kt:166 */
  172    238   
    pub fn a_boolean(&self) -> bool {
         239  +
        /* StructureGenerator.kt:168 */
  173    240   
        self.a_boolean
         241  +
        /* StructureGenerator.kt:166 */
  174    242   
    }
         243  +
    /* StructureGenerator.kt:231 */
  175    244   
    #[allow(missing_docs)] // documentation missing in model
         245  +
                           /* StructureGenerator.kt:166 */
  176    246   
    pub fn a_byte(&self) -> i8 {
         247  +
        /* StructureGenerator.kt:168 */
  177    248   
        self.a_byte
         249  +
        /* StructureGenerator.kt:166 */
  178    250   
    }
         251  +
    /* StructureGenerator.kt:231 */
  179    252   
    #[allow(missing_docs)] // documentation missing in model
         253  +
                           /* StructureGenerator.kt:166 */
  180    254   
    pub fn a_short(&self) -> i16 {
         255  +
        /* StructureGenerator.kt:168 */
  181    256   
        self.a_short
         257  +
        /* StructureGenerator.kt:166 */
  182    258   
    }
         259  +
    /* StructureGenerator.kt:231 */
  183    260   
    #[allow(missing_docs)] // documentation missing in model
         261  +
                           /* StructureGenerator.kt:166 */
  184    262   
    pub fn an_int(&self) -> i32 {
         263  +
        /* StructureGenerator.kt:168 */
  185    264   
        self.an_int
         265  +
        /* StructureGenerator.kt:166 */
  186    266   
    }
         267  +
    /* StructureGenerator.kt:231 */
  187    268   
    #[allow(missing_docs)] // documentation missing in model
         269  +
                           /* StructureGenerator.kt:166 */
  188    270   
    pub fn a_long(&self) -> i64 {
         271  +
        /* StructureGenerator.kt:168 */
  189    272   
        self.a_long
         273  +
        /* StructureGenerator.kt:166 */
  190    274   
    }
         275  +
    /* StructureGenerator.kt:231 */
  191    276   
    #[allow(missing_docs)] // documentation missing in model
         277  +
                           /* StructureGenerator.kt:166 */
  192    278   
    pub fn a_float(&self) -> f32 {
         279  +
        /* StructureGenerator.kt:168 */
  193    280   
        self.a_float
         281  +
        /* StructureGenerator.kt:166 */
  194    282   
    }
         283  +
    /* StructureGenerator.kt:231 */
  195    284   
    #[allow(missing_docs)] // documentation missing in model
         285  +
                           /* StructureGenerator.kt:166 */
  196    286   
    pub fn a_double(&self) -> f64 {
         287  +
        /* StructureGenerator.kt:168 */
  197    288   
        self.a_double
         289  +
        /* StructureGenerator.kt:166 */
  198    290   
    }
         291  +
    /* StructureGenerator.kt:231 */
  199    292   
    #[allow(missing_docs)] // documentation missing in model
         293  +
                           /* StructureGenerator.kt:166 */
  200    294   
    pub fn a_timestamp(&self) -> &::aws_smithy_types::DateTime {
         295  +
        /* StructureGenerator.kt:172 */
  201    296   
        &self.a_timestamp
         297  +
        /* StructureGenerator.kt:166 */
  202    298   
    }
         299  +
    /* StructureGenerator.kt:231 */
  203    300   
    #[allow(missing_docs)] // documentation missing in model
         301  +
                           /* StructureGenerator.kt:166 */
  204    302   
    pub fn a_document(&self) -> &::aws_smithy_types::DateTime {
         303  +
        /* StructureGenerator.kt:172 */
  205    304   
        &self.a_document
         305  +
        /* StructureGenerator.kt:166 */
  206    306   
    }
         307  +
    /* StructureGenerator.kt:231 */
  207    308   
    #[allow(missing_docs)] // documentation missing in model
         309  +
                           /* StructureGenerator.kt:166 */
  208    310   
    pub fn a_string_list(&self) -> &[::std::string::String] {
         311  +
        /* StructureGenerator.kt:171 */
  209    312   
        use std::ops::Deref;
  210    313   
        self.a_string_list.deref()
         314  +
        /* StructureGenerator.kt:166 */
  211    315   
    }
         316  +
    /* StructureGenerator.kt:231 */
  212    317   
    #[allow(missing_docs)] // documentation missing in model
         318  +
                           /* StructureGenerator.kt:166 */
  213    319   
    pub fn a_string_map(
  214    320   
        &self,
  215    321   
    ) -> &::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime> {
         322  +
        /* StructureGenerator.kt:172 */
  216    323   
        &self.a_string_map
         324  +
        /* StructureGenerator.kt:166 */
  217    325   
    }
         326  +
    /* StructureGenerator.kt:231 */
  218    327   
    #[allow(missing_docs)] // documentation missing in model
         328  +
                           /* StructureGenerator.kt:166 */
  219    329   
    pub fn a_string_set(&self) -> &[::std::string::String] {
         330  +
        /* StructureGenerator.kt:171 */
  220    331   
        use std::ops::Deref;
  221    332   
        self.a_string_set.deref()
         333  +
        /* StructureGenerator.kt:166 */
  222    334   
    }
         335  +
    /* StructureGenerator.kt:231 */
  223    336   
    #[allow(missing_docs)] // documentation missing in model
         337  +
                           /* StructureGenerator.kt:166 */
  224    338   
    pub fn a_blob(&self) -> &::aws_smithy_types::Blob {
         339  +
        /* StructureGenerator.kt:172 */
  225    340   
        &self.a_blob
         341  +
        /* StructureGenerator.kt:166 */
  226    342   
    }
         343  +
    /* StructureGenerator.kt:231 */
  227    344   
    #[allow(missing_docs)] // documentation missing in model
         345  +
                           /* StructureGenerator.kt:166 */
  228    346   
    pub fn a_union(&self) -> &crate::model::AUnion {
         347  +
        /* StructureGenerator.kt:172 */
  229    348   
        &self.a_union
         349  +
        /* StructureGenerator.kt:166 */
  230    350   
    }
         351  +
    /* StructureGenerator.kt:135 */
  231    352   
}
         353  +
/* ServerCodegenVisitor.kt:345 */
  232    354   
impl InnermostShape {
  233         -
    /// Creates a new builder-style object to manufacture [`InnermostShape`](crate::model::InnermostShape).
         355  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`InnermostShape`](crate::model::InnermostShape).
         356  +
    /* ServerBuilderGenerator.kt:295 */
  234    357   
    pub fn builder() -> crate::model::innermost_shape::Builder {
         358  +
        /* ServerBuilderGenerator.kt:296 */
  235    359   
        crate::model::innermost_shape::Builder::default()
         360  +
        /* ServerBuilderGenerator.kt:295 */
  236    361   
    }
         362  +
    /* ServerCodegenVisitor.kt:345 */
  237    363   
}
         364  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  238    365   
impl crate::constrained::Constrained for crate::model::InnermostShape {
  239    366   
    type Unconstrained = crate::model::innermost_shape::Builder;
  240    367   
}
  241    368   
         369  +
/* UnionGenerator.kt:67 */
  242    370   
#[allow(missing_docs)] // documentation missing in model
         371  +
/* RustType.kt:516 */
  243    372   
#[derive(
  244    373   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  245    374   
)]
  246         -
pub enum AUnion {
         375  +
pub /* UnionGenerator.kt:85 */ enum AUnion {
         376  +
    /* UnionGenerator.kt:90 */
  247    377   
    #[allow(missing_docs)] // documentation missing in model
         378  +
    /* UnionGenerator.kt:190 */
  248    379   
    I32(i32),
         380  +
    /* UnionGenerator.kt:90 */
  249    381   
    #[allow(missing_docs)] // documentation missing in model
         382  +
    /* UnionGenerator.kt:190 */
  250    383   
    String(::std::string::String),
         384  +
    /* UnionGenerator.kt:90 */
  251    385   
    #[allow(missing_docs)] // documentation missing in model
         386  +
    /* UnionGenerator.kt:190 */
  252    387   
    Time(::aws_smithy_types::DateTime),
         388  +
    /* UnionGenerator.kt:85 */
  253    389   
}
         390  +
/* UnionGenerator.kt:111 */
  254    391   
impl AUnion {
         392  +
    /* UnionGenerator.kt:217 */
  255    393   
    /// Tries to convert the enum instance into [`I32`](crate::model::AUnion::I32), extracting the inner [`i32`](i32).
         394  +
    /* UnionGenerator.kt:222 */
  256    395   
    /// Returns `Err(&Self)` if it can't be converted.
         396  +
    /* UnionGenerator.kt:223 */
  257    397   
    pub fn as_i32(&self) -> ::std::result::Result<&i32, &Self> {
         398  +
        /* UnionGenerator.kt:227 */
  258    399   
        if let AUnion::I32(val) = &self {
  259    400   
            ::std::result::Result::Ok(val)
  260    401   
        } else {
  261    402   
            ::std::result::Result::Err(self)
  262    403   
        }
         404  +
        /* UnionGenerator.kt:223 */
  263    405   
    }
         406  +
    /* UnionGenerator.kt:121 */
  264    407   
    /// Returns true if this is a [`I32`](crate::model::AUnion::I32).
         408  +
    /* UnionGenerator.kt:122 */
  265    409   
    pub fn is_i32(&self) -> bool {
         410  +
        /* UnionGenerator.kt:123 */
  266    411   
        self.as_i32().is_ok()
         412  +
        /* UnionGenerator.kt:122 */
  267    413   
    }
         414  +
    /* UnionGenerator.kt:217 */
  268    415   
    /// Tries to convert the enum instance into [`String`](crate::model::AUnion::String), extracting the inner [`String`](::std::string::String).
         416  +
    /* UnionGenerator.kt:222 */
  269    417   
    /// Returns `Err(&Self)` if it can't be converted.
         418  +
    /* UnionGenerator.kt:223 */
  270    419   
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         420  +
        /* UnionGenerator.kt:227 */
  271    421   
        if let AUnion::String(val) = &self {
  272    422   
            ::std::result::Result::Ok(val)
  273    423   
        } else {
  274    424   
            ::std::result::Result::Err(self)
  275    425   
        }
         426  +
        /* UnionGenerator.kt:223 */
  276    427   
    }
         428  +
    /* UnionGenerator.kt:121 */
  277    429   
    /// Returns true if this is a [`String`](crate::model::AUnion::String).
         430  +
    /* UnionGenerator.kt:122 */
  278    431   
    pub fn is_string(&self) -> bool {
         432  +
        /* UnionGenerator.kt:123 */
  279    433   
        self.as_string().is_ok()
         434  +
        /* UnionGenerator.kt:122 */
  280    435   
    }
         436  +
    /* UnionGenerator.kt:217 */
  281    437   
    /// Tries to convert the enum instance into [`Time`](crate::model::AUnion::Time), extracting the inner [`DateTime`](::aws_smithy_types::DateTime).
         438  +
    /* UnionGenerator.kt:222 */
  282    439   
    /// Returns `Err(&Self)` if it can't be converted.
         440  +
    /* UnionGenerator.kt:223 */
  283    441   
    pub fn as_time(&self) -> ::std::result::Result<&::aws_smithy_types::DateTime, &Self> {
         442  +
        /* UnionGenerator.kt:227 */
  284    443   
        if let AUnion::Time(val) = &self {
  285    444   
            ::std::result::Result::Ok(val)
  286    445   
        } else {
  287    446   
            ::std::result::Result::Err(self)
  288    447   
        }
         448  +
        /* UnionGenerator.kt:223 */
  289    449   
    }
         450  +
    /* UnionGenerator.kt:121 */
  290    451   
    /// Returns true if this is a [`Time`](crate::model::AUnion::Time).
         452  +
    /* UnionGenerator.kt:122 */
  291    453   
    pub fn is_time(&self) -> bool {
         454  +
        /* UnionGenerator.kt:123 */
  292    455   
        self.as_time().is_ok()
         456  +
        /* UnionGenerator.kt:122 */
  293    457   
    }
         458  +
    /* UnionGenerator.kt:111 */
  294    459   
}
  295    460   
         461  +
/* StructureGenerator.kt:197 */
  296    462   
#[allow(missing_docs)] // documentation missing in model
         463  +
/* RustType.kt:516 */
  297    464   
#[derive(
  298    465   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  299    466   
)]
  300         -
pub struct EmptyStructure {}
         467  +
pub /* StructureGenerator.kt:201 */ struct EmptyStructure {/* StructureGenerator.kt:201 */}
         468  +
/* ServerCodegenVisitor.kt:345 */
  301    469   
impl EmptyStructure {
  302         -
    /// Creates a new builder-style object to manufacture [`EmptyStructure`](crate::model::EmptyStructure).
         470  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`EmptyStructure`](crate::model::EmptyStructure).
         471  +
    /* ServerBuilderGenerator.kt:295 */
  303    472   
    pub fn builder() -> crate::model::empty_structure::Builder {
         473  +
        /* ServerBuilderGenerator.kt:296 */
  304    474   
        crate::model::empty_structure::Builder::default()
         475  +
        /* ServerBuilderGenerator.kt:295 */
  305    476   
    }
         477  +
    /* ServerCodegenVisitor.kt:345 */
  306    478   
}
         479  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
  307    480   
impl crate::constrained::Constrained for crate::model::EmptyStructure {
  308    481   
    type Unconstrained = crate::model::empty_structure::Builder;
  309    482   
}
  310         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         483  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  311    484   
pub mod validation_exception_field {
  312    485   
         486  +
    /* RustType.kt:516 */
  313    487   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  314         -
    /// Holds one variant for each of the ways the builder can fail.
         488  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         489  +
    /* RustType.kt:516 */
  315    490   
    #[non_exhaustive]
         491  +
    /* ServerBuilderConstraintViolations.kt:75 */
  316    492   
    #[allow(clippy::enum_variant_names)]
  317    493   
    pub enum ConstraintViolation {
  318         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
         494  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`path` was not provided but it is required when building `ValidationExceptionField`.
         495  +
        /* ServerBuilderConstraintViolations.kt:143 */
  319    496   
        MissingPath,
  320         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
         497  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`message` was not provided but it is required when building `ValidationExceptionField`.
         498  +
        /* ServerBuilderConstraintViolations.kt:143 */
  321    499   
        MissingMessage,
         500  +
        /* ServerBuilderConstraintViolations.kt:75 */
  322    501   
    }
         502  +
    /* ServerBuilderConstraintViolations.kt:117 */
  323    503   
    impl ::std::fmt::Display for ConstraintViolation {
         504  +
        /* ServerBuilderConstraintViolations.kt:118 */
  324    505   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         506  +
            /* ServerBuilderConstraintViolations.kt:119 */
  325    507   
            match self {
  326         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
  327         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
  328         -
            }
         508  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
         509  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
         510  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         511  +
            /* ServerBuilderConstraintViolations.kt:118 */
  329    512   
        }
         513  +
        /* ServerBuilderConstraintViolations.kt:117 */
  330    514   
    }
         515  +
    /* ServerBuilderConstraintViolations.kt:84 */
  331    516   
    impl ::std::error::Error for ConstraintViolation {}
         517  +
    /* ServerBuilderGenerator.kt:446 */
  332    518   
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
  333    519   
        type Error = ConstraintViolation;
  334    520   
  335    521   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  336    522   
            builder.build()
  337    523   
        }
  338    524   
    }
  339         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         525  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         526  +
    /* RustType.kt:516 */
  340    527   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         528  +
    /* ServerBuilderGenerator.kt:211 */
  341    529   
    pub struct Builder {
         530  +
        /* ServerBuilderGenerator.kt:308 */
  342    531   
        pub(crate) path: ::std::option::Option<::std::string::String>,
         532  +
        /* ServerBuilderGenerator.kt:308 */
  343    533   
        pub(crate) message: ::std::option::Option<::std::string::String>,
         534  +
        /* ServerBuilderGenerator.kt:211 */
  344    535   
    }
         536  +
    /* ServerBuilderGenerator.kt:215 */
  345    537   
    impl Builder {
  346         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         538  +
        /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
         539  +
        /* ServerBuilderGenerator.kt:343 */
  347    540   
        pub fn path(mut self, input: ::std::string::String) -> Self {
  348         -
            self.path = Some(input);
         541  +
            /* ServerBuilderGenerator.kt:344 */
         542  +
            self.path =
         543  +
                /* ServerBuilderGenerator.kt:345 */Some(
         544  +
                    /* ServerBuilderGenerator.kt:376 */input
         545  +
                /* ServerBuilderGenerator.kt:345 */)
         546  +
            /* ServerBuilderGenerator.kt:344 */;
  349    547   
            self
         548  +
            /* ServerBuilderGenerator.kt:343 */
  350    549   
        }
  351         -
        /// A detailed description of the validation failure.
         550  +
        /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
         551  +
        /* ServerBuilderGenerator.kt:343 */
  352    552   
        pub fn message(mut self, input: ::std::string::String) -> Self {
  353         -
            self.message = Some(input);
         553  +
            /* ServerBuilderGenerator.kt:344 */
         554  +
            self.message =
         555  +
                /* ServerBuilderGenerator.kt:345 */Some(
         556  +
                    /* ServerBuilderGenerator.kt:376 */input
         557  +
                /* ServerBuilderGenerator.kt:345 */)
         558  +
            /* ServerBuilderGenerator.kt:344 */;
  354    559   
            self
         560  +
            /* ServerBuilderGenerator.kt:343 */
  355    561   
        }
  356         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
  357         -
        ///
         562  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
         563  +
        /// /* ServerBuilderGenerator.kt:260 */
  358    564   
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
  359    565   
        ///
  360         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         566  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         567  +
        /* ServerBuilderGenerator.kt:271 */
  361    568   
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  362    569   
            self.build_enforcing_all_constraints()
  363    570   
        }
         571  +
        /* ServerBuilderGenerator.kt:283 */
  364    572   
        fn build_enforcing_all_constraints(
  365    573   
            self,
  366    574   
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
  367         -
            Ok(crate::model::ValidationExceptionField {
  368         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
  369         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
  370         -
            })
  371         -
        }
         575  +
            /* ServerBuilderGenerator.kt:287 */
         576  +
            Ok(
         577  +
                /* ServerBuilderGenerator.kt:542 */
         578  +
                crate::model::ValidationExceptionField {
         579  +
                    /* ServerBuilderGenerator.kt:546 */
         580  +
                    path: self
         581  +
                        .path
         582  +
                        /* ServerBuilderGenerator.kt:569 */
         583  +
                        .ok_or(ConstraintViolation::MissingPath)?,
         584  +
                    /* ServerBuilderGenerator.kt:546 */
         585  +
                    message: self
         586  +
                        .message
         587  +
                        /* ServerBuilderGenerator.kt:569 */
         588  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
         589  +
                    /* ServerBuilderGenerator.kt:542 */
         590  +
                }, /* ServerBuilderGenerator.kt:287 */
         591  +
            )
         592  +
            /* ServerBuilderGenerator.kt:283 */
         593  +
        }
         594  +
        /* ServerBuilderGenerator.kt:215 */
  372    595   
    }
         596  +
         597  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  373    598   
}
  374         -
/// See [`HeaderSet`](crate::model::HeaderSet).
         599  +
/// /* CodegenDelegator.kt:51 */See [`HeaderSet`](crate::model::HeaderSet).
  375    600   
pub mod header_set {
  376    601   
         602  +
    /* CollectionConstraintViolationGenerator.kt:78 */
  377    603   
    #[allow(clippy::enum_variant_names)]
  378    604   
    #[derive(Debug, PartialEq)]
  379    605   
    pub enum ConstraintViolation {
  380    606   
        /// Constraint violation error when the list does not contain unique items
  381    607   
        UniqueItems {
  382    608   
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
  383    609   
            /// at least two elements.
  384    610   
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
  385    611   
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
  386    612   
            /// Nothing is guaranteed about the order of the indices.
  387    613   
            duplicate_indices: ::std::vec::Vec<usize>,
  388    614   
            /// The original vector, that contains duplicate items.
  389    615   
            original: ::std::vec::Vec<::std::string::String>,
  390    616   
        },
  391    617   
    }
  392    618   
  393    619   
    impl ::std::fmt::Display for ConstraintViolation {
  394    620   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  395    621   
            let message = match self {
  396    622   
                                Self::UniqueItems { duplicate_indices, .. } =>
  397    623   
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.misc#HeaderSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
  398    624   
                            };
  399    625   
            write!(f, "{message}")
  400    626   
        }
  401    627   
    }
  402    628   
  403    629   
    impl ::std::error::Error for ConstraintViolation {}
         630  +
    /* CollectionConstraintViolationGenerator.kt:104 */
  404    631   
    impl ConstraintViolation {
  405    632   
        pub(crate) fn as_validation_exception_field(
  406    633   
            self,
  407    634   
            path: ::std::string::String,
  408    635   
        ) -> crate::model::ValidationExceptionField {
  409    636   
            match self {
  410    637   
                        Self::UniqueItems { duplicate_indices, .. } =>
  411    638   
                                crate::model::ValidationExceptionField {
  412    639   
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
  413    640   
                                    path,
  414    641   
                                },
  415    642   
                    }
  416    643   
        }
  417    644   
    }
         645  +
         646  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  418    647   
}
  419         -
/// See [`InnerShape`](crate::model::InnerShape).
         648  +
/// /* ServerBuilderGenerator.kt:171 */See [`InnerShape`](crate::model::InnerShape).
  420    649   
pub mod inner_shape {
  421    650   
         651  +
    /* RustType.kt:516 */
  422    652   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  423         -
    /// Holds one variant for each of the ways the builder can fail.
         653  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         654  +
    /* RustType.kt:516 */
  424    655   
    #[non_exhaustive]
         656  +
    /* ServerBuilderConstraintViolations.kt:75 */
  425    657   
    #[allow(clippy::enum_variant_names)]
  426    658   
    pub enum ConstraintViolation {
  427         -
        /// `required_inner_most_shape` was not provided but it is required when building `InnerShape`.
         659  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_inner_most_shape` was not provided but it is required when building `InnerShape`.
         660  +
        /* ServerBuilderConstraintViolations.kt:143 */
  428    661   
        MissingRequiredInnerMostShape,
  429         -
        /// Constraint violation occurred building member `required_inner_most_shape` when building `InnerShape`.
         662  +
        /// /* ServerBuilderConstraintViolations.kt:158 */Constraint violation occurred building member `required_inner_most_shape` when building `InnerShape`.
         663  +
        /* RustType.kt:516 */
  430    664   
        #[doc(hidden)]
         665  +
        /* ServerBuilderConstraintViolations.kt:164 */
  431    666   
        RequiredInnerMostShape(crate::model::innermost_shape::ConstraintViolation),
         667  +
        /* ServerBuilderConstraintViolations.kt:75 */
  432    668   
    }
         669  +
    /* ServerBuilderConstraintViolations.kt:117 */
  433    670   
    impl ::std::fmt::Display for ConstraintViolation {
         671  +
        /* ServerBuilderConstraintViolations.kt:118 */
  434    672   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         673  +
            /* ServerBuilderConstraintViolations.kt:119 */
  435    674   
            match self {
  436         -
                ConstraintViolation::MissingRequiredInnerMostShape => write!(f, "`required_inner_most_shape` was not provided but it is required when building `InnerShape`"),
  437         -
                ConstraintViolation::RequiredInnerMostShape(_) => write!(f, "constraint violation occurred building member `required_inner_most_shape` when building `InnerShape`"),
  438         -
            }
         675  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredInnerMostShape => write!(f, "`required_inner_most_shape` was not provided but it is required when building `InnerShape`"),
         676  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::RequiredInnerMostShape(_) => write!(f, "constraint violation occurred building member `required_inner_most_shape` when building `InnerShape`"),
         677  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         678  +
            /* ServerBuilderConstraintViolations.kt:118 */
  439    679   
        }
         680  +
        /* ServerBuilderConstraintViolations.kt:117 */
  440    681   
    }
         682  +
    /* ServerBuilderConstraintViolations.kt:84 */
  441    683   
    impl ::std::error::Error for ConstraintViolation {}
         684  +
    /* ServerBuilderConstraintViolations.kt:171 */
  442    685   
    impl ConstraintViolation {
  443    686   
        pub(crate) fn as_validation_exception_field(
  444    687   
            self,
  445    688   
            path: ::std::string::String,
  446    689   
        ) -> crate::model::ValidationExceptionField {
  447    690   
            match self {
  448    691   
            ConstraintViolation::MissingRequiredInnerMostShape => crate::model::ValidationExceptionField {
  449    692   
                                                message: format!("Value at '{}/requiredInnerMostShape' failed to satisfy constraint: Member must not be null", path),
  450    693   
                                                path: path + "/requiredInnerMostShape",
  451    694   
                                            },
  452    695   
            ConstraintViolation::RequiredInnerMostShape(inner) => inner.as_validation_exception_field(path + "/requiredInnerMostShape"),
  453    696   
        }
  454    697   
        }
  455    698   
    }
         699  +
    /* ServerBuilderGenerator.kt:244 */
  456    700   
    impl ::std::convert::From<Builder>
  457    701   
        for crate::constrained::MaybeConstrained<crate::model::InnerShape>
  458    702   
    {
  459    703   
        fn from(builder: Builder) -> Self {
  460    704   
            Self::Unconstrained(builder)
  461    705   
        }
  462    706   
    }
         707  +
    /* ServerBuilderGenerator.kt:446 */
  463    708   
    impl ::std::convert::TryFrom<Builder> for crate::model::InnerShape {
  464    709   
        type Error = ConstraintViolation;
  465    710   
  466    711   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  467    712   
            builder.build()
  468    713   
        }
  469    714   
    }
  470         -
    /// A builder for [`InnerShape`](crate::model::InnerShape).
         715  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`InnerShape`](crate::model::InnerShape).
         716  +
    /* RustType.kt:516 */
  471    717   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         718  +
    /* ServerBuilderGenerator.kt:211 */
  472    719   
    pub struct Builder {
         720  +
        /* ServerBuilderGenerator.kt:308 */
  473    721   
        pub(crate) required_inner_most_shape: ::std::option::Option<
  474    722   
            crate::constrained::MaybeConstrained<crate::model::InnermostShape>,
  475    723   
        >,
         724  +
        /* ServerBuilderGenerator.kt:211 */
  476    725   
    }
         726  +
    /* ServerBuilderGenerator.kt:215 */
  477    727   
    impl Builder {
         728  +
        /* ServerBuilderGenerator.kt:331 */
  478    729   
        #[allow(missing_docs)] // documentation missing in model
         730  +
                               /* ServerBuilderGenerator.kt:343 */
  479    731   
        pub fn required_inner_most_shape(mut self, input: crate::model::InnermostShape) -> Self {
         732  +
            /* ServerBuilderGenerator.kt:344 */
  480    733   
            self.required_inner_most_shape =
  481         -
                Some(crate::constrained::MaybeConstrained::Constrained(input));
         734  +
                /* ServerBuilderGenerator.kt:345 */Some(
         735  +
                    /* ServerBuilderGenerator.kt:371 */crate::constrained::MaybeConstrained::Constrained(input)
         736  +
                /* ServerBuilderGenerator.kt:345 */)
         737  +
            /* ServerBuilderGenerator.kt:344 */;
  482    738   
            self
         739  +
            /* ServerBuilderGenerator.kt:343 */
  483    740   
        }
         741  +
        /* ServerBuilderGenerator.kt:426 */
  484    742   
        #[allow(missing_docs)] // documentation missing in model
         743  +
                               /* ServerBuilderGenerator.kt:428 */
  485    744   
        pub(crate) fn set_required_inner_most_shape(
  486    745   
            mut self,
  487    746   
            input: impl ::std::convert::Into<
  488    747   
                crate::constrained::MaybeConstrained<crate::model::InnermostShape>,
  489    748   
            >,
  490    749   
        ) -> Self {
         750  +
            /* ServerBuilderGenerator.kt:429 */
  491    751   
            self.required_inner_most_shape = Some(input.into());
  492    752   
            self
         753  +
            /* ServerBuilderGenerator.kt:428 */
  493    754   
        }
  494         -
        /// Consumes the builder and constructs a [`InnerShape`](crate::model::InnerShape).
  495         -
        ///
         755  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`InnerShape`](crate::model::InnerShape).
         756  +
        /// /* ServerBuilderGenerator.kt:260 */
  496    757   
        /// The builder fails to construct a [`InnerShape`](crate::model::InnerShape) if a [`ConstraintViolation`] occurs.
  497    758   
        ///
  498         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         759  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
         760  +
        /* ServerBuilderGenerator.kt:271 */
  499    761   
        pub fn build(self) -> Result<crate::model::InnerShape, ConstraintViolation> {
  500    762   
            self.build_enforcing_all_constraints()
  501    763   
        }
         764  +
        /* ServerBuilderGenerator.kt:283 */
  502    765   
        fn build_enforcing_all_constraints(
  503    766   
            self,
  504    767   
        ) -> Result<crate::model::InnerShape, ConstraintViolation> {
  505         -
            Ok(crate::model::InnerShape {
         768  +
            /* ServerBuilderGenerator.kt:287 */
         769  +
            Ok(
         770  +
                /* ServerBuilderGenerator.kt:542 */
         771  +
                crate::model::InnerShape {
         772  +
                    /* ServerBuilderGenerator.kt:546 */
  506    773   
                    required_inner_most_shape: self
  507    774   
                        .required_inner_most_shape
         775  +
                        /* ServerBuilderGenerator.kt:602 */
  508    776   
                        .map(|v| match v {
  509    777   
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  510    778   
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  511    779   
                        })
         780  +
                        /* ServerBuilderGenerator.kt:614 */
  512    781   
                        .map(|res| res.map_err(ConstraintViolation::RequiredInnerMostShape))
  513    782   
                        .transpose()?
         783  +
                        /* ServerBuilderGenerator.kt:569 */
  514    784   
                        .ok_or(ConstraintViolation::MissingRequiredInnerMostShape)?,
  515         -
            })
         785  +
                    /* ServerBuilderGenerator.kt:542 */
         786  +
                }, /* ServerBuilderGenerator.kt:287 */
         787  +
            )
         788  +
            /* ServerBuilderGenerator.kt:283 */
  516    789   
        }
         790  +
        /* ServerBuilderGenerator.kt:215 */
  517    791   
    }
         792  +
         793  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  518    794   
}
  519         -
/// See [`InnermostShape`](crate::model::InnermostShape).
         795  +
/// /* ServerBuilderGenerator.kt:171 */See [`InnermostShape`](crate::model::InnermostShape).
  520    796   
pub mod innermost_shape {
  521    797   
         798  +
    /* RustType.kt:516 */
  522    799   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  523         -
    /// Holds one variant for each of the ways the builder can fail.
         800  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         801  +
    /* RustType.kt:516 */
  524    802   
    #[non_exhaustive]
         803  +
    /* ServerBuilderConstraintViolations.kt:75 */
  525    804   
    #[allow(clippy::enum_variant_names)]
  526    805   
    pub enum ConstraintViolation {
  527         -
        /// `a_string` was not provided but it is required when building `InnermostShape`.
         806  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_string` was not provided but it is required when building `InnermostShape`.
         807  +
        /* ServerBuilderConstraintViolations.kt:143 */
  528    808   
        MissingAString,
  529         -
        /// `a_boolean` was not provided but it is required when building `InnermostShape`.
         809  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_boolean` was not provided but it is required when building `InnermostShape`.
         810  +
        /* ServerBuilderConstraintViolations.kt:143 */
  530    811   
        MissingABoolean,
  531         -
        /// `a_byte` was not provided but it is required when building `InnermostShape`.
         812  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_byte` was not provided but it is required when building `InnermostShape`.
         813  +
        /* ServerBuilderConstraintViolations.kt:143 */
  532    814   
        MissingAByte,
  533         -
        /// `a_short` was not provided but it is required when building `InnermostShape`.
         815  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_short` was not provided but it is required when building `InnermostShape`.
         816  +
        /* ServerBuilderConstraintViolations.kt:143 */
  534    817   
        MissingAShort,
  535         -
        /// `an_int` was not provided but it is required when building `InnermostShape`.
         818  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`an_int` was not provided but it is required when building `InnermostShape`.
         819  +
        /* ServerBuilderConstraintViolations.kt:143 */
  536    820   
        MissingAnInt,
  537         -
        /// `a_long` was not provided but it is required when building `InnermostShape`.
         821  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_long` was not provided but it is required when building `InnermostShape`.
         822  +
        /* ServerBuilderConstraintViolations.kt:143 */
  538    823   
        MissingALong,
  539         -
        /// `a_float` was not provided but it is required when building `InnermostShape`.
         824  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_float` was not provided but it is required when building `InnermostShape`.
         825  +
        /* ServerBuilderConstraintViolations.kt:143 */
  540    826   
        MissingAFloat,
  541         -
        /// `a_double` was not provided but it is required when building `InnermostShape`.
         827  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_double` was not provided but it is required when building `InnermostShape`.
         828  +
        /* ServerBuilderConstraintViolations.kt:143 */
  542    829   
        MissingADouble,
  543         -
        /// `a_timestamp` was not provided but it is required when building `InnermostShape`.
         830  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_timestamp` was not provided but it is required when building `InnermostShape`.
         831  +
        /* ServerBuilderConstraintViolations.kt:143 */
  544    832   
        MissingATimestamp,
  545         -
        /// `a_document` was not provided but it is required when building `InnermostShape`.
         833  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_document` was not provided but it is required when building `InnermostShape`.
         834  +
        /* ServerBuilderConstraintViolations.kt:143 */
  546    835   
        MissingADocument,
  547         -
        /// `a_string_list` was not provided but it is required when building `InnermostShape`.
         836  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_string_list` was not provided but it is required when building `InnermostShape`.
         837  +
        /* ServerBuilderConstraintViolations.kt:143 */
  548    838   
        MissingAStringList,
  549         -
        /// `a_string_map` was not provided but it is required when building `InnermostShape`.
         839  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_string_map` was not provided but it is required when building `InnermostShape`.
         840  +
        /* ServerBuilderConstraintViolations.kt:143 */
  550    841   
        MissingAStringMap,
  551         -
        /// `a_string_set` was not provided but it is required when building `InnermostShape`.
         842  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_string_set` was not provided but it is required when building `InnermostShape`.
         843  +
        /* ServerBuilderConstraintViolations.kt:143 */
  552    844   
        MissingAStringSet,
  553         -
        /// `a_blob` was not provided but it is required when building `InnermostShape`.
         845  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_blob` was not provided but it is required when building `InnermostShape`.
         846  +
        /* ServerBuilderConstraintViolations.kt:143 */
  554    847   
        MissingABlob,
  555         -
        /// `a_union` was not provided but it is required when building `InnermostShape`.
         848  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`a_union` was not provided but it is required when building `InnermostShape`.
         849  +
        /* ServerBuilderConstraintViolations.kt:143 */
  556    850   
        MissingAUnion,
         851  +
        /* ServerBuilderConstraintViolations.kt:75 */
  557    852   
    }
         853  +
    /* ServerBuilderConstraintViolations.kt:117 */
  558    854   
    impl ::std::fmt::Display for ConstraintViolation {
         855  +
        /* ServerBuilderConstraintViolations.kt:118 */
  559    856   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         857  +
            /* ServerBuilderConstraintViolations.kt:119 */
  560    858   
            match self {
  561         -
                ConstraintViolation::MissingAString => write!(f, "`a_string` was not provided but it is required when building `InnermostShape`"),
  562         -
                ConstraintViolation::MissingABoolean => write!(f, "`a_boolean` was not provided but it is required when building `InnermostShape`"),
  563         -
                ConstraintViolation::MissingAByte => write!(f, "`a_byte` was not provided but it is required when building `InnermostShape`"),
  564         -
                ConstraintViolation::MissingAShort => write!(f, "`a_short` was not provided but it is required when building `InnermostShape`"),
  565         -
                ConstraintViolation::MissingAnInt => write!(f, "`an_int` was not provided but it is required when building `InnermostShape`"),
  566         -
                ConstraintViolation::MissingALong => write!(f, "`a_long` was not provided but it is required when building `InnermostShape`"),
  567         -
                ConstraintViolation::MissingAFloat => write!(f, "`a_float` was not provided but it is required when building `InnermostShape`"),
  568         -
                ConstraintViolation::MissingADouble => write!(f, "`a_double` was not provided but it is required when building `InnermostShape`"),
  569         -
                ConstraintViolation::MissingATimestamp => write!(f, "`a_timestamp` was not provided but it is required when building `InnermostShape`"),
  570         -
                ConstraintViolation::MissingADocument => write!(f, "`a_document` was not provided but it is required when building `InnermostShape`"),
  571         -
                ConstraintViolation::MissingAStringList => write!(f, "`a_string_list` was not provided but it is required when building `InnermostShape`"),
  572         -
                ConstraintViolation::MissingAStringMap => write!(f, "`a_string_map` was not provided but it is required when building `InnermostShape`"),
  573         -
                ConstraintViolation::MissingAStringSet => write!(f, "`a_string_set` was not provided but it is required when building `InnermostShape`"),
  574         -
                ConstraintViolation::MissingABlob => write!(f, "`a_blob` was not provided but it is required when building `InnermostShape`"),
  575         -
                ConstraintViolation::MissingAUnion => write!(f, "`a_union` was not provided but it is required when building `InnermostShape`"),
  576         -
            }
  577         -
        }
  578         -
    }
         859  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAString => write!(f, "`a_string` was not provided but it is required when building `InnermostShape`"),
         860  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingABoolean => write!(f, "`a_boolean` was not provided but it is required when building `InnermostShape`"),
         861  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAByte => write!(f, "`a_byte` was not provided but it is required when building `InnermostShape`"),
         862  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAShort => write!(f, "`a_short` was not provided but it is required when building `InnermostShape`"),
         863  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAnInt => write!(f, "`an_int` was not provided but it is required when building `InnermostShape`"),
         864  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingALong => write!(f, "`a_long` was not provided but it is required when building `InnermostShape`"),
         865  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAFloat => write!(f, "`a_float` was not provided but it is required when building `InnermostShape`"),
         866  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingADouble => write!(f, "`a_double` was not provided but it is required when building `InnermostShape`"),
         867  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingATimestamp => write!(f, "`a_timestamp` was not provided but it is required when building `InnermostShape`"),
         868  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingADocument => write!(f, "`a_document` was not provided but it is required when building `InnermostShape`"),
         869  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAStringList => write!(f, "`a_string_list` was not provided but it is required when building `InnermostShape`"),
         870  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAStringMap => write!(f, "`a_string_map` was not provided but it is required when building `InnermostShape`"),
         871  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAStringSet => write!(f, "`a_string_set` was not provided but it is required when building `InnermostShape`"),
         872  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingABlob => write!(f, "`a_blob` was not provided but it is required when building `InnermostShape`"),
         873  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingAUnion => write!(f, "`a_union` was not provided but it is required when building `InnermostShape`"),
         874  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         875  +
            /* ServerBuilderConstraintViolations.kt:118 */
         876  +
        }
         877  +
        /* ServerBuilderConstraintViolations.kt:117 */
         878  +
    }
         879  +
    /* ServerBuilderConstraintViolations.kt:84 */
  579    880   
    impl ::std::error::Error for ConstraintViolation {}
         881  +
    /* ServerBuilderConstraintViolations.kt:171 */
  580    882   
    impl ConstraintViolation {
  581    883   
        pub(crate) fn as_validation_exception_field(
  582    884   
            self,
  583    885   
            path: ::std::string::String,
  584    886   
        ) -> crate::model::ValidationExceptionField {
  585    887   
            match self {
  586    888   
            ConstraintViolation::MissingAString => crate::model::ValidationExceptionField {
  587    889   
                                                message: format!("Value at '{}/aString' failed to satisfy constraint: Member must not be null", path),
  588    890   
                                                path: path + "/aString",
  589    891   
                                            },
@@ -619,921 +925,1495 @@
  639    941   
                                                message: format!("Value at '{}/aBlob' failed to satisfy constraint: Member must not be null", path),
  640    942   
                                                path: path + "/aBlob",
  641    943   
                                            },
  642    944   
            ConstraintViolation::MissingAUnion => crate::model::ValidationExceptionField {
  643    945   
                                                message: format!("Value at '{}/aUnion' failed to satisfy constraint: Member must not be null", path),
  644    946   
                                                path: path + "/aUnion",
  645    947   
                                            },
  646    948   
        }
  647    949   
        }
  648    950   
    }
         951  +
    /* ServerBuilderGenerator.kt:244 */
  649    952   
    impl ::std::convert::From<Builder>
  650    953   
        for crate::constrained::MaybeConstrained<crate::model::InnermostShape>
  651    954   
    {
  652    955   
        fn from(builder: Builder) -> Self {
  653    956   
            Self::Unconstrained(builder)
  654    957   
        }
  655    958   
    }
         959  +
    /* ServerBuilderGenerator.kt:446 */
  656    960   
    impl ::std::convert::TryFrom<Builder> for crate::model::InnermostShape {
  657    961   
        type Error = ConstraintViolation;
  658    962   
  659    963   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  660    964   
            builder.build()
  661    965   
        }
  662    966   
    }
  663         -
    /// A builder for [`InnermostShape`](crate::model::InnermostShape).
         967  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`InnermostShape`](crate::model::InnermostShape).
         968  +
    /* RustType.kt:516 */
  664    969   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         970  +
    /* ServerBuilderGenerator.kt:211 */
  665    971   
    pub struct Builder {
         972  +
        /* ServerBuilderGenerator.kt:308 */
  666    973   
        pub(crate) a_string: ::std::option::Option<::std::string::String>,
         974  +
        /* ServerBuilderGenerator.kt:308 */
  667    975   
        pub(crate) a_boolean: ::std::option::Option<bool>,
  668         -
        pub(crate) a_byte: ::std::option::Option<i8>,
  669         -
        pub(crate) a_short: ::std::option::Option<i16>,
  670         -
        pub(crate) an_int: ::std::option::Option<i32>,
  671         -
        pub(crate) a_long: ::std::option::Option<i64>,
  672         -
        pub(crate) a_float: ::std::option::Option<f32>,
  673         -
        pub(crate) a_double: ::std::option::Option<f64>,
         976  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) a_byte: ::std::option::Option<i8>,
         977  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) a_short: ::std::option::Option<i16>,
         978  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) an_int: ::std::option::Option<i32>,
         979  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) a_long: ::std::option::Option<i64>,
         980  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) a_float: ::std::option::Option<f32>,
         981  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) a_double: ::std::option::Option<f64>,
         982  +
        /* ServerBuilderGenerator.kt:308 */
  674    983   
        pub(crate) a_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
         984  +
        /* ServerBuilderGenerator.kt:308 */
  675    985   
        pub(crate) a_document: ::std::option::Option<::aws_smithy_types::DateTime>,
         986  +
        /* ServerBuilderGenerator.kt:308 */
  676    987   
        pub(crate) a_string_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         988  +
        /* ServerBuilderGenerator.kt:308 */
  677    989   
        pub(crate) a_string_map: ::std::option::Option<
  678    990   
            ::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>,
  679    991   
        >,
         992  +
        /* ServerBuilderGenerator.kt:308 */
  680    993   
        pub(crate) a_string_set: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         994  +
        /* ServerBuilderGenerator.kt:308 */
  681    995   
        pub(crate) a_blob: ::std::option::Option<::aws_smithy_types::Blob>,
         996  +
        /* ServerBuilderGenerator.kt:308 */
  682    997   
        pub(crate) a_union: ::std::option::Option<crate::model::AUnion>,
         998  +
        /* ServerBuilderGenerator.kt:211 */
  683    999   
    }
        1000  +
    /* ServerBuilderGenerator.kt:215 */
  684   1001   
    impl Builder {
        1002  +
        /* ServerBuilderGenerator.kt:331 */
  685   1003   
        #[allow(missing_docs)] // documentation missing in model
        1004  +
                               /* ServerBuilderGenerator.kt:343 */
  686   1005   
        pub fn a_string(mut self, input: ::std::string::String) -> Self {
  687         -
            self.a_string = Some(input);
        1006  +
            /* ServerBuilderGenerator.kt:344 */
        1007  +
            self.a_string =
        1008  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1009  +
                    /* ServerBuilderGenerator.kt:376 */input
        1010  +
                /* ServerBuilderGenerator.kt:345 */)
        1011  +
            /* ServerBuilderGenerator.kt:344 */;
  688   1012   
            self
        1013  +
            /* ServerBuilderGenerator.kt:343 */
  689   1014   
        }
        1015  +
        /* ServerBuilderGenerator.kt:426 */
  690   1016   
        #[allow(missing_docs)] // documentation missing in model
        1017  +
                               /* ServerBuilderGenerator.kt:428 */
  691   1018   
        pub(crate) fn set_a_string(
  692   1019   
            mut self,
  693   1020   
            input: impl ::std::convert::Into<::std::string::String>,
  694   1021   
        ) -> Self {
        1022  +
            /* ServerBuilderGenerator.kt:429 */
  695   1023   
            self.a_string = Some(input.into());
  696   1024   
            self
        1025  +
            /* ServerBuilderGenerator.kt:428 */
  697   1026   
        }
        1027  +
        /* ServerBuilderGenerator.kt:331 */
  698   1028   
        #[allow(missing_docs)] // documentation missing in model
        1029  +
                               /* ServerBuilderGenerator.kt:343 */
  699   1030   
        pub fn a_boolean(mut self, input: bool) -> Self {
  700         -
            self.a_boolean = Some(input);
        1031  +
            /* ServerBuilderGenerator.kt:344 */
        1032  +
            self.a_boolean =
        1033  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1034  +
                    /* ServerBuilderGenerator.kt:376 */input
        1035  +
                /* ServerBuilderGenerator.kt:345 */)
        1036  +
            /* ServerBuilderGenerator.kt:344 */;
  701   1037   
            self
        1038  +
            /* ServerBuilderGenerator.kt:343 */
  702   1039   
        }
        1040  +
        /* ServerBuilderGenerator.kt:426 */
  703   1041   
        #[allow(missing_docs)] // documentation missing in model
        1042  +
                               /* ServerBuilderGenerator.kt:428 */
  704   1043   
        pub(crate) fn set_a_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
        1044  +
            /* ServerBuilderGenerator.kt:429 */
  705   1045   
            self.a_boolean = Some(input.into());
  706   1046   
            self
        1047  +
            /* ServerBuilderGenerator.kt:428 */
  707   1048   
        }
        1049  +
        /* ServerBuilderGenerator.kt:331 */
  708   1050   
        #[allow(missing_docs)] // documentation missing in model
        1051  +
                               /* ServerBuilderGenerator.kt:343 */
  709   1052   
        pub fn a_byte(mut self, input: i8) -> Self {
  710         -
            self.a_byte = Some(input);
        1053  +
            /* ServerBuilderGenerator.kt:344 */
        1054  +
            self.a_byte =
        1055  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1056  +
                    /* ServerBuilderGenerator.kt:376 */input
        1057  +
                /* ServerBuilderGenerator.kt:345 */)
        1058  +
            /* ServerBuilderGenerator.kt:344 */;
  711   1059   
            self
        1060  +
            /* ServerBuilderGenerator.kt:343 */
  712   1061   
        }
        1062  +
        /* ServerBuilderGenerator.kt:426 */
  713   1063   
        #[allow(missing_docs)] // documentation missing in model
        1064  +
                               /* ServerBuilderGenerator.kt:428 */
  714   1065   
        pub(crate) fn set_a_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        1066  +
            /* ServerBuilderGenerator.kt:429 */
  715   1067   
            self.a_byte = Some(input.into());
  716   1068   
            self
        1069  +
            /* ServerBuilderGenerator.kt:428 */
  717   1070   
        }
        1071  +
        /* ServerBuilderGenerator.kt:331 */
  718   1072   
        #[allow(missing_docs)] // documentation missing in model
        1073  +
                               /* ServerBuilderGenerator.kt:343 */
  719   1074   
        pub fn a_short(mut self, input: i16) -> Self {
  720         -
            self.a_short = Some(input);
        1075  +
            /* ServerBuilderGenerator.kt:344 */
        1076  +
            self.a_short =
        1077  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1078  +
                    /* ServerBuilderGenerator.kt:376 */input
        1079  +
                /* ServerBuilderGenerator.kt:345 */)
        1080  +
            /* ServerBuilderGenerator.kt:344 */;
  721   1081   
            self
        1082  +
            /* ServerBuilderGenerator.kt:343 */
  722   1083   
        }
        1084  +
        /* ServerBuilderGenerator.kt:426 */
  723   1085   
        #[allow(missing_docs)] // documentation missing in model
        1086  +
                               /* ServerBuilderGenerator.kt:428 */
  724   1087   
        pub(crate) fn set_a_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        1088  +
            /* ServerBuilderGenerator.kt:429 */
  725   1089   
            self.a_short = Some(input.into());
  726   1090   
            self
        1091  +
            /* ServerBuilderGenerator.kt:428 */
  727   1092   
        }
        1093  +
        /* ServerBuilderGenerator.kt:331 */
  728   1094   
        #[allow(missing_docs)] // documentation missing in model
        1095  +
                               /* ServerBuilderGenerator.kt:343 */
  729   1096   
        pub fn an_int(mut self, input: i32) -> Self {
  730         -
            self.an_int = Some(input);
        1097  +
            /* ServerBuilderGenerator.kt:344 */
        1098  +
            self.an_int =
        1099  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1100  +
                    /* ServerBuilderGenerator.kt:376 */input
        1101  +
                /* ServerBuilderGenerator.kt:345 */)
        1102  +
            /* ServerBuilderGenerator.kt:344 */;
  731   1103   
            self
        1104  +
            /* ServerBuilderGenerator.kt:343 */
  732   1105   
        }
        1106  +
        /* ServerBuilderGenerator.kt:426 */
  733   1107   
        #[allow(missing_docs)] // documentation missing in model
        1108  +
                               /* ServerBuilderGenerator.kt:428 */
  734   1109   
        pub(crate) fn set_an_int(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        1110  +
            /* ServerBuilderGenerator.kt:429 */
  735   1111   
            self.an_int = Some(input.into());
  736   1112   
            self
        1113  +
            /* ServerBuilderGenerator.kt:428 */
  737   1114   
        }
        1115  +
        /* ServerBuilderGenerator.kt:331 */
  738   1116   
        #[allow(missing_docs)] // documentation missing in model
        1117  +
                               /* ServerBuilderGenerator.kt:343 */
  739   1118   
        pub fn a_long(mut self, input: i64) -> Self {
  740         -
            self.a_long = Some(input);
        1119  +
            /* ServerBuilderGenerator.kt:344 */
        1120  +
            self.a_long =
        1121  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1122  +
                    /* ServerBuilderGenerator.kt:376 */input
        1123  +
                /* ServerBuilderGenerator.kt:345 */)
        1124  +
            /* ServerBuilderGenerator.kt:344 */;
  741   1125   
            self
        1126  +
            /* ServerBuilderGenerator.kt:343 */
  742   1127   
        }
        1128  +
        /* ServerBuilderGenerator.kt:426 */
  743   1129   
        #[allow(missing_docs)] // documentation missing in model
        1130  +
                               /* ServerBuilderGenerator.kt:428 */
  744   1131   
        pub(crate) fn set_a_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        1132  +
            /* ServerBuilderGenerator.kt:429 */
  745   1133   
            self.a_long = Some(input.into());
  746   1134   
            self
        1135  +
            /* ServerBuilderGenerator.kt:428 */
  747   1136   
        }
        1137  +
        /* ServerBuilderGenerator.kt:331 */
  748   1138   
        #[allow(missing_docs)] // documentation missing in model
        1139  +
                               /* ServerBuilderGenerator.kt:343 */
  749   1140   
        pub fn a_float(mut self, input: f32) -> Self {
  750         -
            self.a_float = Some(input);
        1141  +
            /* ServerBuilderGenerator.kt:344 */
        1142  +
            self.a_float =
        1143  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1144  +
                    /* ServerBuilderGenerator.kt:376 */input
        1145  +
                /* ServerBuilderGenerator.kt:345 */)
        1146  +
            /* ServerBuilderGenerator.kt:344 */;
  751   1147   
            self
        1148  +
            /* ServerBuilderGenerator.kt:343 */
  752   1149   
        }
        1150  +
        /* ServerBuilderGenerator.kt:426 */
  753   1151   
        #[allow(missing_docs)] // documentation missing in model
        1152  +
                               /* ServerBuilderGenerator.kt:428 */
  754   1153   
        pub(crate) fn set_a_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        1154  +
            /* ServerBuilderGenerator.kt:429 */
  755   1155   
            self.a_float = Some(input.into());
  756   1156   
            self
        1157  +
            /* ServerBuilderGenerator.kt:428 */
  757   1158   
        }
        1159  +
        /* ServerBuilderGenerator.kt:331 */
  758   1160   
        #[allow(missing_docs)] // documentation missing in model
        1161  +
                               /* ServerBuilderGenerator.kt:343 */
  759   1162   
        pub fn a_double(mut self, input: f64) -> Self {
  760         -
            self.a_double = Some(input);
        1163  +
            /* ServerBuilderGenerator.kt:344 */
        1164  +
            self.a_double =
        1165  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1166  +
                    /* ServerBuilderGenerator.kt:376 */input
        1167  +
                /* ServerBuilderGenerator.kt:345 */)
        1168  +
            /* ServerBuilderGenerator.kt:344 */;
  761   1169   
            self
        1170  +
            /* ServerBuilderGenerator.kt:343 */
  762   1171   
        }
        1172  +
        /* ServerBuilderGenerator.kt:426 */
  763   1173   
        #[allow(missing_docs)] // documentation missing in model
        1174  +
                               /* ServerBuilderGenerator.kt:428 */
  764   1175   
        pub(crate) fn set_a_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
        1176  +
            /* ServerBuilderGenerator.kt:429 */
  765   1177   
            self.a_double = Some(input.into());
  766   1178   
            self
        1179  +
            /* ServerBuilderGenerator.kt:428 */
  767   1180   
        }
        1181  +
        /* ServerBuilderGenerator.kt:331 */
  768   1182   
        #[allow(missing_docs)] // documentation missing in model
        1183  +
                               /* ServerBuilderGenerator.kt:343 */
  769   1184   
        pub fn a_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  770         -
            self.a_timestamp = Some(input);
        1185  +
            /* ServerBuilderGenerator.kt:344 */
        1186  +
            self.a_timestamp =
        1187  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1188  +
                    /* ServerBuilderGenerator.kt:376 */input
        1189  +
                /* ServerBuilderGenerator.kt:345 */)
        1190  +
            /* ServerBuilderGenerator.kt:344 */;
  771   1191   
            self
        1192  +
            /* ServerBuilderGenerator.kt:343 */
  772   1193   
        }
        1194  +
        /* ServerBuilderGenerator.kt:426 */
  773   1195   
        #[allow(missing_docs)] // documentation missing in model
        1196  +
                               /* ServerBuilderGenerator.kt:428 */
  774   1197   
        pub(crate) fn set_a_timestamp(
  775   1198   
            mut self,
  776   1199   
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
  777   1200   
        ) -> Self {
        1201  +
            /* ServerBuilderGenerator.kt:429 */
  778   1202   
            self.a_timestamp = Some(input.into());
  779   1203   
            self
        1204  +
            /* ServerBuilderGenerator.kt:428 */
  780   1205   
        }
        1206  +
        /* ServerBuilderGenerator.kt:331 */
  781   1207   
        #[allow(missing_docs)] // documentation missing in model
        1208  +
                               /* ServerBuilderGenerator.kt:343 */
  782   1209   
        pub fn a_document(mut self, input: ::aws_smithy_types::DateTime) -> Self {
  783         -
            self.a_document = Some(input);
        1210  +
            /* ServerBuilderGenerator.kt:344 */
        1211  +
            self.a_document =
        1212  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1213  +
                    /* ServerBuilderGenerator.kt:376 */input
        1214  +
                /* ServerBuilderGenerator.kt:345 */)
        1215  +
            /* ServerBuilderGenerator.kt:344 */;
  784   1216   
            self
        1217  +
            /* ServerBuilderGenerator.kt:343 */
  785   1218   
        }
        1219  +
        /* ServerBuilderGenerator.kt:426 */
  786   1220   
        #[allow(missing_docs)] // documentation missing in model
        1221  +
                               /* ServerBuilderGenerator.kt:428 */
  787   1222   
        pub(crate) fn set_a_document(
  788   1223   
            mut self,
  789   1224   
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
  790   1225   
        ) -> Self {
        1226  +
            /* ServerBuilderGenerator.kt:429 */
  791   1227   
            self.a_document = Some(input.into());
  792   1228   
            self
        1229  +
            /* ServerBuilderGenerator.kt:428 */
  793   1230   
        }
        1231  +
        /* ServerBuilderGenerator.kt:331 */
  794   1232   
        #[allow(missing_docs)] // documentation missing in model
        1233  +
                               /* ServerBuilderGenerator.kt:343 */
  795   1234   
        pub fn a_string_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
  796         -
            self.a_string_list = Some(input);
        1235  +
            /* ServerBuilderGenerator.kt:344 */
        1236  +
            self.a_string_list =
        1237  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1238  +
                    /* ServerBuilderGenerator.kt:376 */input
        1239  +
                /* ServerBuilderGenerator.kt:345 */)
        1240  +
            /* ServerBuilderGenerator.kt:344 */;
  797   1241   
            self
        1242  +
            /* ServerBuilderGenerator.kt:343 */
  798   1243   
        }
        1244  +
        /* ServerBuilderGenerator.kt:426 */
  799   1245   
        #[allow(missing_docs)] // documentation missing in model
        1246  +
                               /* ServerBuilderGenerator.kt:428 */
  800   1247   
        pub(crate) fn set_a_string_list(
  801   1248   
            mut self,
  802   1249   
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
  803   1250   
        ) -> Self {
        1251  +
            /* ServerBuilderGenerator.kt:429 */
  804   1252   
            self.a_string_list = Some(input.into());
  805   1253   
            self
        1254  +
            /* ServerBuilderGenerator.kt:428 */
  806   1255   
        }
        1256  +
        /* ServerBuilderGenerator.kt:331 */
  807   1257   
        #[allow(missing_docs)] // documentation missing in model
        1258  +
                               /* ServerBuilderGenerator.kt:343 */
  808   1259   
        pub fn a_string_map(
  809   1260   
            mut self,
  810   1261   
            input: ::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>,
  811   1262   
        ) -> Self {
  812         -
            self.a_string_map = Some(input);
        1263  +
            /* ServerBuilderGenerator.kt:344 */
        1264  +
            self.a_string_map =
        1265  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1266  +
                    /* ServerBuilderGenerator.kt:376 */input
        1267  +
                /* ServerBuilderGenerator.kt:345 */)
        1268  +
            /* ServerBuilderGenerator.kt:344 */;
  813   1269   
            self
        1270  +
            /* ServerBuilderGenerator.kt:343 */
  814   1271   
        }
        1272  +
        /* ServerBuilderGenerator.kt:426 */
  815   1273   
        #[allow(missing_docs)] // documentation missing in model
        1274  +
                               /* ServerBuilderGenerator.kt:428 */
  816   1275   
        pub(crate) fn set_a_string_map(
  817   1276   
            mut self,
  818   1277   
            input: impl ::std::convert::Into<
  819   1278   
                ::std::collections::HashMap<::std::string::String, ::aws_smithy_types::DateTime>,
  820   1279   
            >,
  821   1280   
        ) -> Self {
        1281  +
            /* ServerBuilderGenerator.kt:429 */
  822   1282   
            self.a_string_map = Some(input.into());
  823   1283   
            self
        1284  +
            /* ServerBuilderGenerator.kt:428 */
  824   1285   
        }
        1286  +
        /* ServerBuilderGenerator.kt:331 */
  825   1287   
        #[allow(missing_docs)] // documentation missing in model
        1288  +
                               /* ServerBuilderGenerator.kt:343 */
  826   1289   
        pub fn a_string_set(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
  827         -
            self.a_string_set = Some(input);
        1290  +
            /* ServerBuilderGenerator.kt:344 */
        1291  +
            self.a_string_set =
        1292  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1293  +
                    /* ServerBuilderGenerator.kt:376 */input
        1294  +
                /* ServerBuilderGenerator.kt:345 */)
        1295  +
            /* ServerBuilderGenerator.kt:344 */;
  828   1296   
            self
        1297  +
            /* ServerBuilderGenerator.kt:343 */
  829   1298   
        }
        1299  +
        /* ServerBuilderGenerator.kt:426 */
  830   1300   
        #[allow(missing_docs)] // documentation missing in model
        1301  +
                               /* ServerBuilderGenerator.kt:428 */
  831   1302   
        pub(crate) fn set_a_string_set(
  832   1303   
            mut self,
  833   1304   
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
  834   1305   
        ) -> Self {
        1306  +
            /* ServerBuilderGenerator.kt:429 */
  835   1307   
            self.a_string_set = Some(input.into());
  836   1308   
            self
        1309  +
            /* ServerBuilderGenerator.kt:428 */
  837   1310   
        }
        1311  +
        /* ServerBuilderGenerator.kt:331 */
  838   1312   
        #[allow(missing_docs)] // documentation missing in model
        1313  +
                               /* ServerBuilderGenerator.kt:343 */
  839   1314   
        pub fn a_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
  840         -
            self.a_blob = Some(input);
        1315  +
            /* ServerBuilderGenerator.kt:344 */
        1316  +
            self.a_blob =
        1317  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1318  +
                    /* ServerBuilderGenerator.kt:376 */input
        1319  +
                /* ServerBuilderGenerator.kt:345 */)
        1320  +
            /* ServerBuilderGenerator.kt:344 */;
  841   1321   
            self
        1322  +
            /* ServerBuilderGenerator.kt:343 */
  842   1323   
        }
        1324  +
        /* ServerBuilderGenerator.kt:426 */
  843   1325   
        #[allow(missing_docs)] // documentation missing in model
        1326  +
                               /* ServerBuilderGenerator.kt:428 */
  844   1327   
        pub(crate) fn set_a_blob(
  845   1328   
            mut self,
  846   1329   
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
  847   1330   
        ) -> Self {
        1331  +
            /* ServerBuilderGenerator.kt:429 */
  848   1332   
            self.a_blob = Some(input.into());
  849   1333   
            self
        1334  +
            /* ServerBuilderGenerator.kt:428 */
  850   1335   
        }
        1336  +
        /* ServerBuilderGenerator.kt:331 */
  851   1337   
        #[allow(missing_docs)] // documentation missing in model
        1338  +
                               /* ServerBuilderGenerator.kt:343 */
  852   1339   
        pub fn a_union(mut self, input: crate::model::AUnion) -> Self {
  853         -
            self.a_union = Some(input);
        1340  +
            /* ServerBuilderGenerator.kt:344 */
        1341  +
            self.a_union =
        1342  +
                /* ServerBuilderGenerator.kt:345 */Some(
        1343  +
                    /* ServerBuilderGenerator.kt:376 */input
        1344  +
                /* ServerBuilderGenerator.kt:345 */)
        1345  +
            /* ServerBuilderGenerator.kt:344 */;
  854   1346   
            self
        1347  +
            /* ServerBuilderGenerator.kt:343 */
  855   1348   
        }
        1349  +
        /* ServerBuilderGenerator.kt:426 */
  856   1350   
        #[allow(missing_docs)] // documentation missing in model
        1351  +
                               /* ServerBuilderGenerator.kt:428 */
  857   1352   
        pub(crate) fn set_a_union(
  858   1353   
            mut self,
  859   1354   
            input: impl ::std::convert::Into<crate::model::AUnion>,
  860   1355   
        ) -> Self {
        1356  +
            /* ServerBuilderGenerator.kt:429 */
  861   1357   
            self.a_union = Some(input.into());
  862   1358   
            self
        1359  +
            /* ServerBuilderGenerator.kt:428 */
  863   1360   
        }
  864         -
        /// Consumes the builder and constructs a [`InnermostShape`](crate::model::InnermostShape).
  865         -
        ///
        1361  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`InnermostShape`](crate::model::InnermostShape).
        1362  +
        /// /* ServerBuilderGenerator.kt:260 */
  866   1363   
        /// The builder fails to construct a [`InnermostShape`](crate::model::InnermostShape) if a [`ConstraintViolation`] occurs.
  867   1364   
        ///
  868         -
        /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1365  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
        1366  +
        /* ServerBuilderGenerator.kt:271 */
  869   1367   
        pub fn build(self) -> Result<crate::model::InnermostShape, ConstraintViolation> {
  870   1368   
            self.build_enforcing_all_constraints()
  871   1369   
        }
        1370  +
        /* ServerBuilderGenerator.kt:283 */
  872   1371   
        fn build_enforcing_all_constraints(
  873   1372   
            self,
  874   1373   
        ) -> Result<crate::model::InnermostShape, ConstraintViolation> {
  875         -
            Ok(crate::model::InnermostShape {
  876         -
                a_string: self.a_string.ok_or(ConstraintViolation::MissingAString)?,
  877         -
                a_boolean: self.a_boolean.ok_or(ConstraintViolation::MissingABoolean)?,
  878         -
                a_byte: self.a_byte.ok_or(ConstraintViolation::MissingAByte)?,
  879         -
                a_short: self.a_short.ok_or(ConstraintViolation::MissingAShort)?,
  880         -
                an_int: self.an_int.ok_or(ConstraintViolation::MissingAnInt)?,
  881         -
                a_long: self.a_long.ok_or(ConstraintViolation::MissingALong)?,
  882         -
                a_float: self.a_float.ok_or(ConstraintViolation::MissingAFloat)?,
  883         -
                a_double: self.a_double.ok_or(ConstraintViolation::MissingADouble)?,
        1374  +
            /* ServerBuilderGenerator.kt:287 */
        1375  +
            Ok(
        1376  +
                /* ServerBuilderGenerator.kt:542 */
        1377  +
                crate::model::InnermostShape {
        1378  +
                    /* ServerBuilderGenerator.kt:546 */
        1379  +
                    a_string: self
        1380  +
                        .a_string
        1381  +
                        /* ServerBuilderGenerator.kt:569 */
        1382  +
                        .ok_or(ConstraintViolation::MissingAString)?,
        1383  +
                    /* ServerBuilderGenerator.kt:546 */
        1384  +
                    a_boolean: self
        1385  +
                        .a_boolean
        1386  +
                        /* ServerBuilderGenerator.kt:569 */
        1387  +
                        .ok_or(ConstraintViolation::MissingABoolean)?,
        1388  +
                    /* ServerBuilderGenerator.kt:546 */
        1389  +
                    a_byte: self
        1390  +
                        .a_byte
        1391  +
                        /* ServerBuilderGenerator.kt:569 */
        1392  +
                        .ok_or(ConstraintViolation::MissingAByte)?,
        1393  +
                    /* ServerBuilderGenerator.kt:546 */
        1394  +
                    a_short: self
        1395  +
                        .a_short
        1396  +
                        /* ServerBuilderGenerator.kt:569 */
        1397  +
                        .ok_or(ConstraintViolation::MissingAShort)?,
        1398  +
                    /* ServerBuilderGenerator.kt:546 */
        1399  +
                    an_int: self
        1400  +
                        .an_int
        1401  +
                        /* ServerBuilderGenerator.kt:569 */
        1402  +
                        .ok_or(ConstraintViolation::MissingAnInt)?,
        1403  +
                    /* ServerBuilderGenerator.kt:546 */
        1404  +
                    a_long: self
        1405  +
                        .a_long
        1406  +
                        /* ServerBuilderGenerator.kt:569 */
        1407  +
                        .ok_or(ConstraintViolation::MissingALong)?,
        1408  +
                    /* ServerBuilderGenerator.kt:546 */
        1409  +
                    a_float: self
        1410  +
                        .a_float
        1411  +
                        /* ServerBuilderGenerator.kt:569 */
        1412  +
                        .ok_or(ConstraintViolation::MissingAFloat)?,
        1413  +
                    /* ServerBuilderGenerator.kt:546 */
        1414  +
                    a_double: self
        1415  +
                        .a_double
        1416  +
                        /* ServerBuilderGenerator.kt:569 */
        1417  +
                        .ok_or(ConstraintViolation::MissingADouble)?,
        1418  +
                    /* ServerBuilderGenerator.kt:546 */
  884   1419   
                    a_timestamp: self
  885   1420   
                        .a_timestamp
        1421  +
                        /* ServerBuilderGenerator.kt:569 */
  886   1422   
                        .ok_or(ConstraintViolation::MissingATimestamp)?,
        1423  +
                    /* ServerBuilderGenerator.kt:546 */
  887   1424   
                    a_document: self
  888   1425   
                        .a_document
        1426  +
                        /* ServerBuilderGenerator.kt:569 */
  889   1427   
                        .ok_or(ConstraintViolation::MissingADocument)?,
        1428  +
                    /* ServerBuilderGenerator.kt:546 */
  890   1429   
                    a_string_list: self
  891   1430   
                        .a_string_list
        1431  +
                        /* ServerBuilderGenerator.kt:569 */
  892   1432   
                        .ok_or(ConstraintViolation::MissingAStringList)?,
        1433  +
                    /* ServerBuilderGenerator.kt:546 */
  893   1434   
                    a_string_map: self
  894   1435   
                        .a_string_map
        1436  +
                        /* ServerBuilderGenerator.kt:569 */
  895   1437   
                        .ok_or(ConstraintViolation::MissingAStringMap)?,
        1438  +
                    /* ServerBuilderGenerator.kt:546 */
  896   1439   
                    a_string_set: self
  897   1440   
                        .a_string_set
        1441  +
                        /* ServerBuilderGenerator.kt:569 */
  898   1442   
                        .ok_or(ConstraintViolation::MissingAStringSet)?,
  899         -
                a_blob: self.a_blob.ok_or(ConstraintViolation::MissingABlob)?,
  900         -
                a_union: self.a_union.ok_or(ConstraintViolation::MissingAUnion)?,
  901         -
            })
  902         -
        }
        1443  +
                    /* ServerBuilderGenerator.kt:546 */
        1444  +
                    a_blob: self
        1445  +
                        .a_blob
        1446  +
                        /* ServerBuilderGenerator.kt:569 */
        1447  +
                        .ok_or(ConstraintViolation::MissingABlob)?,
        1448  +
                    /* ServerBuilderGenerator.kt:546 */
        1449  +
                    a_union: self
        1450  +
                        .a_union
        1451  +
                        /* ServerBuilderGenerator.kt:569 */
        1452  +
                        .ok_or(ConstraintViolation::MissingAUnion)?,
        1453  +
                    /* ServerBuilderGenerator.kt:542 */
        1454  +
                }, /* ServerBuilderGenerator.kt:287 */
        1455  +
            )
        1456  +
            /* ServerBuilderGenerator.kt:283 */
        1457  +
        }
        1458  +
        /* ServerBuilderGenerator.kt:215 */
  903   1459   
    }
        1460  +
        1461  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  904   1462   
}
  905         -
/// See [`EmptyStructure`](crate::model::EmptyStructure).
        1463  +
/// /* ServerBuilderGenerator.kt:171 */See [`EmptyStructure`](crate::model::EmptyStructure).
  906   1464   
pub mod empty_structure {
  907   1465   
        1466  +
    /* ServerBuilderGenerator.kt:461 */
  908   1467   
    impl ::std::convert::From<Builder> for crate::model::EmptyStructure {
  909   1468   
        fn from(builder: Builder) -> Self {
  910   1469   
            builder.build()
  911   1470   
        }
  912   1471   
    }
  913         -
    /// A builder for [`EmptyStructure`](crate::model::EmptyStructure).
        1472  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`EmptyStructure`](crate::model::EmptyStructure).
        1473  +
    /* RustType.kt:516 */
  914   1474   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  915         -
    pub struct Builder {}
        1475  +
    /* ServerBuilderGenerator.kt:211 */
        1476  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
        1477  +
    /* ServerBuilderGenerator.kt:215 */
  916   1478   
    impl Builder {
  917         -
        /// Consumes the builder and constructs a [`EmptyStructure`](crate::model::EmptyStructure).
        1479  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`EmptyStructure`](crate::model::EmptyStructure).
        1480  +
        /* ServerBuilderGenerator.kt:271 */
  918   1481   
        pub fn build(self) -> crate::model::EmptyStructure {
  919   1482   
            self.build_enforcing_all_constraints()
  920   1483   
        }
        1484  +
        /* ServerBuilderGenerator.kt:283 */
  921   1485   
        fn build_enforcing_all_constraints(self) -> crate::model::EmptyStructure {
  922         -
            crate::model::EmptyStructure {}
        1486  +
            /* ServerBuilderGenerator.kt:542 */
        1487  +
            crate::model::EmptyStructure {
        1488  +
            /* ServerBuilderGenerator.kt:542 */}
        1489  +
            /* ServerBuilderGenerator.kt:283 */
  923   1490   
        }
        1491  +
        /* ServerBuilderGenerator.kt:215 */
  924   1492   
    }
        1493  +
        1494  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  925   1495   
}