Server Test

Server Test

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

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

@@ -1,1 +53,54 @@
    5      5   
#![allow(clippy::large_enum_variant)]
    6      6   
#![allow(clippy::wrong_self_convention)]
    7      7   
#![allow(clippy::should_implement_trait)]
    8      8   
#![allow(clippy::disallowed_names)]
    9      9   
#![allow(clippy::vec_init_then_push)]
   10     10   
#![allow(clippy::type_complexity)]
   11     11   
#![allow(clippy::needless_return)]
   12     12   
#![allow(clippy::derive_partial_eq_without_eq)]
   13     13   
#![allow(clippy::result_large_err)]
   14     14   
#![allow(clippy::unnecessary_map_on_constructor)]
          15  +
#![allow(clippy::useless_conversion)]
   15     16   
#![allow(clippy::deprecated_semver)]
   16     17   
#![allow(clippy::uninlined_format_args)]
   17     18   
#![allow(rustdoc::bare_urls)]
   18     19   
#![allow(rustdoc::redundant_explicit_links)]
   19     20   
#![allow(rustdoc::broken_intra_doc_links)]
   20     21   
#![allow(rustdoc::invalid_html_tags)]
   21     22   
#![forbid(unsafe_code)]
   22     23   
#![cfg_attr(docsrs, feature(doc_cfg))]
   23         -
//! A REST JSON service that sends JSON requests and responses.
          24  +
//! rest_json-http0x
   24     25   
   25     26   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
   26     27   
/* ServerRootGenerator.kt:207 */
   27     28   
//! A fast and customizable Rust implementation of the RestJson Smithy service.
   28     29   
//!
   29     30   
//! # Using RestJson
   30     31   
//!
   31     32   
//! The primary entrypoint is [`RestJson`]: it satisfies the [`Service<http::Request, Response = http::Response>`](::tower::Service)
   32     33   
//! trait and therefore can be handed to a [`hyper` server](https://github.com/hyperium/hyper) via [`RestJson::into_make_service`]
   33     34   
//! or used in AWS Lambda
@@ -151,152 +283,292 @@
  171    172   
//!    let config = RestJsonConfig::builder().build();
  172    173   
//!    let app = RestJson::builder(config)
  173    174   
//!        .all_query_string_types(all_query_string_types)
  174    175   
//!        .constant_and_variable_query_string(constant_and_variable_query_string)
  175    176   
//!        .constant_query_string(constant_query_string)
  176    177   
//!        .content_type_parameters(content_type_parameters)
  177    178   
//!        .datetime_offsets(datetime_offsets)
  178    179   
//!        .document_type(document_type)
  179    180   
//!        .document_type_as_map_value(document_type_as_map_value)
  180    181   
//!        .document_type_as_payload(document_type_as_payload)
         182  +
//!        .duplex_stream(duplex_stream)
         183  +
//!        .duplex_stream_with_distinct_streams(duplex_stream_with_distinct_streams)
         184  +
//!        .duplex_stream_with_initial_messages(duplex_stream_with_initial_messages)
  181    185   
//!        .empty_input_and_empty_output(empty_input_and_empty_output)
  182    186   
//!        .endpoint_operation(endpoint_operation)
  183    187   
//!        .endpoint_with_host_label_operation(endpoint_with_host_label_operation)
  184    188   
//!        .fractional_seconds(fractional_seconds)
  185    189   
//!        .greeting_with_errors(greeting_with_errors)
  186    190   
//!        .host_with_path_operation(host_with_path_operation)
  187    191   
//!        .http_checksum_required(http_checksum_required)
  188    192   
//!        .http_empty_prefix_headers(http_empty_prefix_headers)
  189    193   
//!        .http_enum_payload(http_enum_payload)
  190    194   
//!        .http_payload_traits(http_payload_traits)
  191    195   
//!        .http_payload_traits_with_media_type(http_payload_traits_with_media_type)
  192    196   
//!        .http_payload_with_structure(http_payload_with_structure)
  193    197   
//!        .http_payload_with_union(http_payload_with_union)
  194    198   
//!        .http_prefix_headers(http_prefix_headers)
  195    199   
//!        .http_prefix_headers_in_response(http_prefix_headers_in_response)
         200  +
//!        .http_query_params_only_operation(http_query_params_only_operation)
  196    201   
//!        .http_request_with_float_labels(http_request_with_float_labels)
  197    202   
//!        .http_request_with_greedy_label_in_path(http_request_with_greedy_label_in_path)
  198    203   
//!        .http_request_with_labels(http_request_with_labels)
  199    204   
//!        .http_request_with_labels_and_timestamp_format(http_request_with_labels_and_timestamp_format)
  200    205   
//!        .http_request_with_regex_literal(http_request_with_regex_literal)
  201    206   
//!        .http_response_code(http_response_code)
  202    207   
//!        .http_string_payload(http_string_payload)
  203    208   
//!        .ignore_query_params_in_response(ignore_query_params_in_response)
  204    209   
//!        .input_and_output_with_headers(input_and_output_with_headers)
         210  +
//!        .input_stream(input_stream)
         211  +
//!        .input_stream_with_initial_request(input_stream_with_initial_request)
  205    212   
//!        .json_blobs(json_blobs)
  206    213   
//!        .json_enums(json_enums)
  207    214   
//!        .json_int_enums(json_int_enums)
  208    215   
//!        .json_lists(json_lists)
  209    216   
//!        .json_maps(json_maps)
  210    217   
//!        .json_timestamps(json_timestamps)
  211    218   
//!        .json_unions(json_unions)
  212    219   
//!        .malformed_accept_with_body(malformed_accept_with_body)
  213    220   
//!        .malformed_accept_with_generic_string(malformed_accept_with_generic_string)
  214    221   
//!        .malformed_accept_with_payload(malformed_accept_with_payload)
  215    222   
//!        .malformed_blob(malformed_blob)
  216    223   
//!        .malformed_boolean(malformed_boolean)
  217    224   
//!        .malformed_byte(malformed_byte)
  218    225   
//!        .malformed_content_type_with_body(malformed_content_type_with_body)
  219    226   
//!        .malformed_content_type_with_generic_string(malformed_content_type_with_generic_string)
  220    227   
//!        .malformed_content_type_without_body(malformed_content_type_without_body)
  221    228   
//!        .malformed_content_type_without_body_empty_input(malformed_content_type_without_body_empty_input)
  222    229   
//!        .malformed_content_type_with_payload(malformed_content_type_with_payload)
  223    230   
//!        .malformed_double(malformed_double)
  224    231   
//!        .malformed_float(malformed_float)
  225    232   
//!        .malformed_integer(malformed_integer)
  226    233   
//!        .malformed_list(malformed_list)
  227    234   
//!        .malformed_long(malformed_long)
  228    235   
//!        .malformed_map(malformed_map)
  229    236   
//!        .malformed_request_body(malformed_request_body)
  230    237   
//!        .malformed_short(malformed_short)
  231    238   
//!        .malformed_string(malformed_string)
  232    239   
//!        .malformed_timestamp_body_date_time(malformed_timestamp_body_date_time)
  233    240   
//!        .malformed_timestamp_body_default(malformed_timestamp_body_default)
  234    241   
//!        .malformed_timestamp_body_http_date(malformed_timestamp_body_http_date)
  235    242   
//!        .malformed_timestamp_header_date_time(malformed_timestamp_header_date_time)
  236    243   
//!        .malformed_timestamp_header_default(malformed_timestamp_header_default)
  237    244   
//!        .malformed_timestamp_header_epoch(malformed_timestamp_header_epoch)
  238    245   
//!        .malformed_timestamp_path_default(malformed_timestamp_path_default)
  239    246   
//!        .malformed_timestamp_path_epoch(malformed_timestamp_path_epoch)
  240    247   
//!        .malformed_timestamp_path_http_date(malformed_timestamp_path_http_date)
  241    248   
//!        .malformed_timestamp_query_default(malformed_timestamp_query_default)
  242    249   
//!        .malformed_timestamp_query_epoch(malformed_timestamp_query_epoch)
  243    250   
//!        .malformed_timestamp_query_http_date(malformed_timestamp_query_http_date)
  244    251   
//!        .malformed_union(malformed_union)
  245    252   
//!        .media_type_header(media_type_header)
  246    253   
//!        .no_input_and_no_output(no_input_and_no_output)
  247    254   
//!        .no_input_and_output(no_input_and_output)
  248    255   
//!        .null_and_empty_headers_client(null_and_empty_headers_client)
  249    256   
//!        .null_and_empty_headers_server(null_and_empty_headers_server)
  250    257   
//!        .omits_null_serializes_empty_string(omits_null_serializes_empty_string)
  251    258   
//!        .omits_serializing_empty_lists(omits_serializing_empty_lists)
  252    259   
//!        .operation_with_defaults(operation_with_defaults)
  253    260   
//!        .operation_with_nested_structure(operation_with_nested_structure)
         261  +
//!        .output_stream(output_stream)
         262  +
//!        .output_stream_with_initial_response(output_stream_with_initial_response)
  254    263   
//!        .post_player_action(post_player_action)
  255    264   
//!        .post_union_with_json_name(post_union_with_json_name)
  256    265   
//!        .put_with_content_encoding(put_with_content_encoding)
  257    266   
//!        .query_idempotency_token_auto_fill(query_idempotency_token_auto_fill)
  258    267   
//!        .query_params_as_string_list_map(query_params_as_string_list_map)
  259    268   
//!        .query_precedence(query_precedence)
  260    269   
//!        .recursive_shapes(recursive_shapes)
  261    270   
//!        .response_code_http_fallback(response_code_http_fallback)
  262    271   
//!        .response_code_required(response_code_required)
  263    272   
//!        .simple_scalar_properties(simple_scalar_properties)
@@ -296,305 +451,484 @@
  316    325   
//! }
  317    326   
//!
  318    327   
//! async fn document_type_as_map_value(input: input::DocumentTypeAsMapValueInput) -> output::DocumentTypeAsMapValueOutput {
  319    328   
//!     todo!()
  320    329   
//! }
  321    330   
//!
  322    331   
//! async fn document_type_as_payload(input: input::DocumentTypeAsPayloadInput) -> output::DocumentTypeAsPayloadOutput {
  323    332   
//!     todo!()
  324    333   
//! }
  325    334   
//!
         335  +
//! async fn duplex_stream(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
         336  +
//!     todo!()
         337  +
//! }
         338  +
//!
         339  +
//! async fn duplex_stream_with_distinct_streams(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
         340  +
//!     todo!()
         341  +
//! }
         342  +
//!
         343  +
//! async fn duplex_stream_with_initial_messages(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
         344  +
//!     todo!()
         345  +
//! }
         346  +
//!
  326    347   
//! async fn empty_input_and_empty_output(input: input::EmptyInputAndEmptyOutputInput) -> output::EmptyInputAndEmptyOutputOutput {
  327    348   
//!     todo!()
  328    349   
//! }
  329    350   
//!
  330    351   
//! async fn endpoint_operation(input: input::EndpointOperationInput) -> output::EndpointOperationOutput {
  331    352   
//!     todo!()
  332    353   
//! }
  333    354   
//!
  334    355   
//! async fn endpoint_with_host_label_operation(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
  335    356   
//!     todo!()
  336    357   
//! }
  337    358   
//!
  338    359   
//! async fn fractional_seconds(input: input::FractionalSecondsInput) -> output::FractionalSecondsOutput {
  339    360   
//!     todo!()
  340    361   
//! }
  341    362   
//!
  342    363   
//! async fn greeting_with_errors(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
  343    364   
//!     todo!()
  344    365   
//! }
  345    366   
//!
  346    367   
//! async fn host_with_path_operation(input: input::HostWithPathOperationInput) -> output::HostWithPathOperationOutput {
  347    368   
//!     todo!()
  348    369   
//! }
  349    370   
//!
  350    371   
//! async fn http_checksum_required(input: input::HttpChecksumRequiredInput) -> output::HttpChecksumRequiredOutput {
  351    372   
//!     todo!()
  352    373   
//! }
  353    374   
//!
  354    375   
//! async fn http_empty_prefix_headers(input: input::HttpEmptyPrefixHeadersInput) -> output::HttpEmptyPrefixHeadersOutput {
  355    376   
//!     todo!()
  356    377   
//! }
  357    378   
//!
  358    379   
//! async fn http_enum_payload(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
  359    380   
//!     todo!()
  360    381   
//! }
  361    382   
//!
  362    383   
//! async fn http_payload_traits(input: input::HttpPayloadTraitsInput) -> output::HttpPayloadTraitsOutput {
  363    384   
//!     todo!()
  364    385   
//! }
  365    386   
//!
  366    387   
//! async fn http_payload_traits_with_media_type(input: input::HttpPayloadTraitsWithMediaTypeInput) -> output::HttpPayloadTraitsWithMediaTypeOutput {
  367    388   
//!     todo!()
  368    389   
//! }
  369    390   
//!
  370    391   
//! async fn http_payload_with_structure(input: input::HttpPayloadWithStructureInput) -> output::HttpPayloadWithStructureOutput {
  371    392   
//!     todo!()
  372    393   
//! }
  373    394   
//!
  374    395   
//! async fn http_payload_with_union(input: input::HttpPayloadWithUnionInput) -> output::HttpPayloadWithUnionOutput {
  375    396   
//!     todo!()
  376    397   
//! }
  377    398   
//!
  378    399   
//! async fn http_prefix_headers(input: input::HttpPrefixHeadersInput) -> output::HttpPrefixHeadersOutput {
  379    400   
//!     todo!()
  380    401   
//! }
  381    402   
//!
  382    403   
//! async fn http_prefix_headers_in_response(input: input::HttpPrefixHeadersInResponseInput) -> output::HttpPrefixHeadersInResponseOutput {
  383    404   
//!     todo!()
  384    405   
//! }
  385    406   
//!
         407  +
//! async fn http_query_params_only_operation(input: input::HttpQueryParamsOnlyOperationInput) -> output::HttpQueryParamsOnlyOperationOutput {
         408  +
//!     todo!()
         409  +
//! }
         410  +
//!
  386    411   
//! async fn http_request_with_float_labels(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
  387    412   
//!     todo!()
  388    413   
//! }
  389    414   
//!
  390    415   
//! async fn http_request_with_greedy_label_in_path(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
  391    416   
//!     todo!()
  392    417   
//! }
  393    418   
//!
  394    419   
//! async fn http_request_with_labels(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
  395    420   
//!     todo!()
  396    421   
//! }
  397    422   
//!
  398    423   
//! async fn http_request_with_labels_and_timestamp_format(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
  399    424   
//!     todo!()
  400    425   
//! }
  401    426   
//!
  402    427   
//! async fn http_request_with_regex_literal(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
  403    428   
//!     todo!()
  404    429   
//! }
  405    430   
//!
  406    431   
//! async fn http_response_code(input: input::HttpResponseCodeInput) -> output::HttpResponseCodeOutput {
  407    432   
//!     todo!()
  408    433   
//! }
  409    434   
//!
  410    435   
//! async fn http_string_payload(input: input::HttpStringPayloadInput) -> output::HttpStringPayloadOutput {
  411    436   
//!     todo!()
  412    437   
//! }
  413    438   
//!
  414    439   
//! async fn ignore_query_params_in_response(input: input::IgnoreQueryParamsInResponseInput) -> output::IgnoreQueryParamsInResponseOutput {
  415    440   
//!     todo!()
  416    441   
//! }
  417    442   
//!
  418    443   
//! async fn input_and_output_with_headers(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
  419    444   
//!     todo!()
  420    445   
//! }
  421    446   
//!
         447  +
//! async fn input_stream(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
         448  +
//!     todo!()
         449  +
//! }
         450  +
//!
         451  +
//! async fn input_stream_with_initial_request(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
         452  +
//!     todo!()
         453  +
//! }
         454  +
//!
  422    455   
//! async fn json_blobs(input: input::JsonBlobsInput) -> output::JsonBlobsOutput {
  423    456   
//!     todo!()
  424    457   
//! }
  425    458   
//!
  426    459   
//! async fn json_enums(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
  427    460   
//!     todo!()
  428    461   
//! }
  429    462   
//!
  430    463   
//! async fn json_int_enums(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
  431    464   
//!     todo!()
@@ -588,621 +647,688 @@
  608    641   
//! }
  609    642   
//!
  610    643   
//! async fn operation_with_defaults(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
  611    644   
//!     todo!()
  612    645   
//! }
  613    646   
//!
  614    647   
//! async fn operation_with_nested_structure(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
  615    648   
//!     todo!()
  616    649   
//! }
  617    650   
//!
         651  +
//! async fn output_stream(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
         652  +
//!     todo!()
         653  +
//! }
         654  +
//!
         655  +
//! async fn output_stream_with_initial_response(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
         656  +
//!     todo!()
         657  +
//! }
         658  +
//!
  618    659   
//! async fn post_player_action(input: input::PostPlayerActionInput) -> output::PostPlayerActionOutput {
  619    660   
//!     todo!()
  620    661   
//! }
  621    662   
//!
  622    663   
//! async fn post_union_with_json_name(input: input::PostUnionWithJsonNameInput) -> output::PostUnionWithJsonNameOutput {
  623    664   
//!     todo!()
  624    665   
//! }
  625    666   
//!
  626    667   
//! async fn put_with_content_encoding(input: input::PutWithContentEncodingInput) -> output::PutWithContentEncodingOutput {
  627    668   
//!     todo!()
@@ -751,792 +781,828 @@
  771    812   
/// /* ServerRustModule.kt:55 */Data primitives referenced by other data types.
  772    813   
pub mod types;
  773    814   
  774    815   
/// /* ServerRustModule.kt:55 */Unconstrained types for constrained shapes.
  775    816   
/* RustModule.kt:172 */
  776    817   
mod unconstrained;
  777    818   
  778    819   
/* RustModule.kt:172 */
  779    820   
mod mimes;
  780    821   
         822  +
/// /* CodegenDelegator.kt:52 */Support structures for SigV4 signed event streams
         823  +
pub mod sigv4_event_stream;
         824  +
         825  +
/* RustModule.kt:172 */
         826  +
mod event_stream_serde;
         827  +
  781    828   
pub(crate) mod protocol_serde;

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

@@ -1,1 +0,41 @@
    9      9   
   10     10   
/* ServerHttpBoundProtocolGenerator.kt:394 */
   11     11   
pub(crate) static CONTENT_TYPE_TEXT_PLAIN: std::sync::LazyLock<::mime::Mime> =
   12     12   
    std::sync::LazyLock::new(|| {
   13     13   
        "text/plain"
   14     14   
            .parse::<::mime::Mime>()
   15     15   
            .expect("BUG: MIME parsing failed, content_type is not valid")
   16     16   
    });
   17     17   
   18     18   
/* ServerHttpBoundProtocolGenerator.kt:394 */
   19         -
pub(crate) static CONTENT_TYPE_IMAGE_JPEG: std::sync::LazyLock<::mime::Mime> =
          19  +
pub(crate) static CONTENT_TYPE_APPLICATION_OCTET_STREAM: std::sync::LazyLock<::mime::Mime> =
   20     20   
    std::sync::LazyLock::new(|| {
   21         -
        "image/jpeg"
          21  +
        "application/octet-stream"
   22     22   
            .parse::<::mime::Mime>()
   23     23   
            .expect("BUG: MIME parsing failed, content_type is not valid")
   24     24   
    });
   25     25   
   26     26   
/* ServerHttpBoundProtocolGenerator.kt:394 */
   27         -
pub(crate) static CONTENT_TYPE_APPLICATION_OCTET_STREAM: std::sync::LazyLock<::mime::Mime> =
          27  +
pub(crate) static CONTENT_TYPE_IMAGE_JPEG: std::sync::LazyLock<::mime::Mime> =
   28     28   
    std::sync::LazyLock::new(|| {
   29         -
        "application/octet-stream"
          29  +
        "image/jpeg"
   30     30   
            .parse::<::mime::Mime>()
   31     31   
            .expect("BUG: MIME parsing failed, content_type is not valid")
   32     32   
    });
          33  +
          34  +
/* ServerHttpBoundProtocolGenerator.kt:394 */
          35  +
pub(crate) static CONTENT_TYPE_APPLICATION_VND_AMAZON_EVENTSTREAM: std::sync::LazyLock<
          36  +
    ::mime::Mime,
          37  +
> = std::sync::LazyLock::new(|| {
          38  +
    "application/vnd.amazon.eventstream"
          39  +
        .parse::<::mime::Mime>()
          40  +
        .expect("BUG: MIME parsing failed, content_type is not valid")
          41  +
});

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

@@ -1,1 +480,1440 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/* StructureGenerator.kt:197 */
    3         -
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
           2  +
/* ConstrainedCollectionGenerator.kt:93 */
           3  +
#[allow(missing_docs)] // documentation missing in model
           4  +
/// /* ConstrainedCollectionGenerator.kt:94 */
           5  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
           6  +
/// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
           7  +
///
           8  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
           9  +
///
    4     10   
/* RustType.kt:534 */
    5     11   
#[derive(
    6     12   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    7     13   
)]
    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.
   10         -
    pub path: ::std::string::String,
   11         -
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   12         -
    pub message: ::std::string::String,
   13         -
    /* StructureGenerator.kt:201 */
   14         -
}
   15         -
/* StructureGenerator.kt:135 */
   16         -
impl ValidationExceptionField {
   17         -
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   18         -
    /* StructureGenerator.kt:166 */
   19         -
    pub fn path(&self) -> &str {
   20         -
        /* StructureGenerator.kt:171 */
   21         -
        use std::ops::Deref;
   22         -
        self.path.deref()
   23         -
        /* StructureGenerator.kt:166 */
   24         -
    }
   25         -
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
   26         -
    /* StructureGenerator.kt:166 */
   27         -
    pub fn message(&self) -> &str {
   28         -
        /* StructureGenerator.kt:171 */
   29         -
        use std::ops::Deref;
   30         -
        self.message.deref()
   31         -
        /* StructureGenerator.kt:166 */
          14  +
pub /* ConstrainedCollectionGenerator.kt:97 */ struct StringSet(
          15  +
    pub(crate) ::std::vec::Vec<::std::string::String>,
          16  +
);
          17  +
/* ConstrainedCollectionGenerator.kt:104 */
          18  +
impl StringSet {
          19  +
    /* ConstrainedCollectionGenerator.kt:106 */
          20  +
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<::std::string::String>`].
          21  +
    pub fn inner(&self) -> &::std::vec::Vec<::std::string::String> {
          22  +
        &self.0
   32     23   
    }
   33         -
    /* StructureGenerator.kt:135 */
   34         -
}
   35         -
/* ServerCodegenVisitor.kt:356 */
   36         -
impl ValidationExceptionField {
   37         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
   38         -
    /* ServerBuilderGenerator.kt:295 */
   39         -
    pub fn builder() -> crate::model::validation_exception_field::Builder {
   40         -
        /* ServerBuilderGenerator.kt:296 */
   41         -
        crate::model::validation_exception_field::Builder::default()
   42         -
        /* ServerBuilderGenerator.kt:295 */
          24  +
    /* ConstrainedCollectionGenerator.kt:116 */
          25  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
          26  +
    pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
          27  +
        self.0
   43     28   
    }
   44         -
    /* ServerCodegenVisitor.kt:356 */
   45         -
}
   46     29   
   47         -
/* StructureGenerator.kt:197 */
   48         -
#[allow(missing_docs)] // documentation missing in model
   49         -
/* RustType.kt:534 */
   50         -
#[derive(
   51         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   52         -
)]
   53         -
pub /* StructureGenerator.kt:201 */ struct Dialog {
   54         -
    /* StructureGenerator.kt:231 */
   55         -
    #[allow(missing_docs)] // documentation missing in model
   56         -
    pub language: ::std::option::Option<::std::string::String>,
   57         -
    /* StructureGenerator.kt:231 */
   58         -
    #[allow(missing_docs)] // documentation missing in model
   59         -
    pub greeting: ::std::string::String,
   60         -
    /* StructureGenerator.kt:231 */
   61         -
    #[allow(missing_docs)] // documentation missing in model
   62         -
    pub farewell: ::std::option::Option<crate::model::Farewell>,
   63         -
    /* StructureGenerator.kt:201 */
   64         -
}
   65         -
/* StructureGenerator.kt:135 */
   66         -
impl Dialog {
   67         -
    /* StructureGenerator.kt:231 */
   68         -
    #[allow(missing_docs)] // documentation missing in model
   69         -
                           /* StructureGenerator.kt:166 */
   70         -
    pub fn language(&self) -> ::std::option::Option<&str> {
   71         -
        /* StructureGenerator.kt:169 */
   72         -
        self.language.as_deref()
   73         -
        /* StructureGenerator.kt:166 */
          30  +
    fn check_unique_items(
          31  +
        items: ::std::vec::Vec<::std::string::String>,
          32  +
    ) -> ::std::result::Result<
          33  +
        ::std::vec::Vec<::std::string::String>,
          34  +
        crate::model::string_set::ConstraintViolation,
          35  +
    > {
          36  +
        let mut seen = ::std::collections::HashMap::new();
          37  +
        let mut duplicate_indices = ::std::vec::Vec::new();
          38  +
        for (idx, item) in items.iter().enumerate() {
          39  +
            if let Some(prev_idx) = seen.insert(item, idx) {
          40  +
                duplicate_indices.push(prev_idx);
   74     41   
            }
   75         -
    /* StructureGenerator.kt:231 */
   76         -
    #[allow(missing_docs)] // documentation missing in model
   77         -
                           /* StructureGenerator.kt:166 */
   78         -
    pub fn greeting(&self) -> &str {
   79         -
        /* StructureGenerator.kt:171 */
   80         -
        use std::ops::Deref;
   81         -
        self.greeting.deref()
   82         -
        /* StructureGenerator.kt:166 */
   83     42   
        }
   84         -
    /* StructureGenerator.kt:231 */
   85         -
    #[allow(missing_docs)] // documentation missing in model
   86         -
                           /* StructureGenerator.kt:166 */
   87         -
    pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
   88         -
        /* StructureGenerator.kt:170 */
   89         -
        self.farewell.as_ref()
   90         -
        /* StructureGenerator.kt:166 */
          43  +
          44  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
          45  +
        for idx in &duplicate_indices {
          46  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
          47  +
                last_duplicate_indices.push(prev_idx);
   91     48   
            }
   92         -
    /* StructureGenerator.kt:135 */
   93         -
}
   94         -
/* ServerCodegenVisitor.kt:356 */
   95         -
impl Dialog {
   96         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
   97         -
    /* ServerBuilderGenerator.kt:295 */
   98         -
    pub fn builder() -> crate::model::dialog::Builder {
   99         -
        /* ServerBuilderGenerator.kt:296 */
  100         -
        crate::model::dialog::Builder::default()
  101         -
        /* ServerBuilderGenerator.kt:295 */
  102     49   
        }
  103         -
    /* ServerCodegenVisitor.kt:356 */
  104         -
}
  105         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
  106         -
impl crate::constrained::Constrained for crate::model::Dialog {
  107         -
    type Unconstrained = crate::model::dialog::Builder;
  108         -
}
          50  +
        duplicate_indices.extend(last_duplicate_indices);
  109     51   
  110         -
/* StructureGenerator.kt:197 */
  111         -
#[allow(missing_docs)] // documentation missing in model
  112         -
/* RustType.kt:534 */
  113         -
#[derive(
  114         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  115         -
)]
  116         -
pub /* StructureGenerator.kt:201 */ struct Farewell {
  117         -
    /* StructureGenerator.kt:231 */
  118         -
    #[allow(missing_docs)] // documentation missing in model
  119         -
    pub phrase: ::std::string::String,
  120         -
    /* StructureGenerator.kt:201 */
  121         -
}
  122         -
/* StructureGenerator.kt:135 */
  123         -
impl Farewell {
  124         -
    /* StructureGenerator.kt:231 */
  125         -
    #[allow(missing_docs)] // documentation missing in model
  126         -
                           /* StructureGenerator.kt:166 */
  127         -
    pub fn phrase(&self) -> &str {
  128         -
        /* StructureGenerator.kt:171 */
  129         -
        use std::ops::Deref;
  130         -
        self.phrase.deref()
  131         -
        /* StructureGenerator.kt:166 */
          52  +
        if !duplicate_indices.is_empty() {
          53  +
            debug_assert!(duplicate_indices.len() >= 2);
          54  +
            Err(crate::model::string_set::ConstraintViolation::UniqueItems {
          55  +
                duplicate_indices,
          56  +
                original: items,
          57  +
            })
          58  +
        } else {
          59  +
            Ok(items)
  132     60   
        }
  133         -
    /* StructureGenerator.kt:135 */
  134         -
}
  135         -
/* ServerCodegenVisitor.kt:356 */
  136         -
impl Farewell {
  137         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
  138         -
    /* ServerBuilderGenerator.kt:295 */
  139         -
    pub fn builder() -> crate::model::farewell::Builder {
  140         -
        /* ServerBuilderGenerator.kt:296 */
  141         -
        crate::model::farewell::Builder::default()
  142         -
        /* ServerBuilderGenerator.kt:295 */
  143     61   
    }
  144         -
    /* ServerCodegenVisitor.kt:356 */
  145         -
}
  146         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
  147         -
impl crate::constrained::Constrained for crate::model::Farewell {
  148         -
    type Unconstrained = crate::model::farewell::Builder;
          62  +
    /* ConstrainedCollectionGenerator.kt:104 */
  149     63   
}
          64  +
/* ConstrainedCollectionGenerator.kt:133 */
          65  +
impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
          66  +
    type Error = crate::model::string_set::ConstraintViolation;
  150     67   
  151         -
/* StructureGenerator.kt:197 */
  152         -
#[allow(missing_docs)] // documentation missing in model
  153         -
/* RustType.kt:534 */
  154         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  155         -
pub /* StructureGenerator.kt:201 */ struct TopLevel {
  156         -
    /* StructureGenerator.kt:231 */
  157         -
    #[allow(missing_docs)] // documentation missing in model
  158         -
    pub dialog: crate::model::Dialog,
  159         -
    /* StructureGenerator.kt:231 */
  160         -
    #[allow(missing_docs)] // documentation missing in model
  161         -
    pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
  162         -
    /* StructureGenerator.kt:231 */
  163         -
    #[allow(missing_docs)] // documentation missing in model
  164         -
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
  165         -
    /* StructureGenerator.kt:201 */
  166         -
}
  167         -
/* StructureGenerator.kt:135 */
  168         -
impl TopLevel {
  169         -
    /* StructureGenerator.kt:231 */
  170         -
    #[allow(missing_docs)] // documentation missing in model
  171         -
                           /* StructureGenerator.kt:166 */
  172         -
    pub fn dialog(&self) -> &crate::model::Dialog {
  173         -
        /* StructureGenerator.kt:172 */
  174         -
        &self.dialog
  175         -
        /* StructureGenerator.kt:166 */
  176         -
    }
  177         -
    /* StructureGenerator.kt:231 */
  178         -
    #[allow(missing_docs)] // documentation missing in model
  179         -
                           /* StructureGenerator.kt:166 */
  180         -
    pub fn dialog_list(&self) -> &[crate::model::Dialog] {
  181         -
        /* StructureGenerator.kt:171 */
  182         -
        use std::ops::Deref;
  183         -
        self.dialog_list.deref()
  184         -
        /* StructureGenerator.kt:166 */
  185         -
    }
  186         -
    /* StructureGenerator.kt:231 */
  187         -
    #[allow(missing_docs)] // documentation missing in model
  188         -
                           /* StructureGenerator.kt:166 */
  189         -
    pub fn dialog_map(
  190         -
        &self,
  191         -
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
  192         -
        /* StructureGenerator.kt:172 */
  193         -
        &self.dialog_map
  194         -
        /* StructureGenerator.kt:166 */
          68  +
    /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
          69  +
    fn try_from(
          70  +
        value: ::std::vec::Vec<::std::string::String>,
          71  +
    ) -> ::std::result::Result<Self, Self::Error> {
          72  +
        let value = Self::check_unique_items(value)?;
          73  +
          74  +
        Ok(Self(value))
  195     75   
    }
  196         -
    /* StructureGenerator.kt:135 */
  197     76   
}
  198         -
/* ServerCodegenVisitor.kt:356 */
  199         -
impl TopLevel {
  200         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
  201         -
    /* ServerBuilderGenerator.kt:295 */
  202         -
    pub fn builder() -> crate::model::top_level::Builder {
  203         -
        /* ServerBuilderGenerator.kt:296 */
  204         -
        crate::model::top_level::Builder::default()
  205         -
        /* ServerBuilderGenerator.kt:295 */
          77  +
          78  +
impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
          79  +
    fn from(value: StringSet) -> Self {
          80  +
        value.into_inner()
  206     81   
    }
  207         -
    /* ServerCodegenVisitor.kt:356 */
  208     82   
}
  209         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
  210         -
impl crate::constrained::Constrained for crate::model::TopLevel {
  211         -
    type Unconstrained = crate::model::top_level::Builder;
          83  +
/* ConstrainedCollectionGenerator.kt:181 */
          84  +
impl crate::constrained::Constrained for StringSet {
          85  +
    type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
  212     86   
}
  213     87   
  214     88   
/* EnumGenerator.kt:181 */
  215     89   
#[allow(missing_docs)] // documentation missing in model
  216     90   
/* RustType.kt:534 */
  217     91   
#[derive(
  218     92   
    ::std::clone::Clone,
  219     93   
    ::std::cmp::Eq,
  220     94   
    ::std::cmp::Ord,
  221     95   
    ::std::cmp::PartialEq,
  222     96   
    ::std::cmp::PartialOrd,
  223     97   
    ::std::fmt::Debug,
  224     98   
    ::std::hash::Hash,
  225     99   
)]
  226         -
pub /* EnumGenerator.kt:298 */ enum TestEnum {
         100  +
pub /* EnumGenerator.kt:298 */ enum FooEnum {
         101  +
    /* EnumGenerator.kt:181 */
         102  +
    #[allow(missing_docs)] // documentation missing in model
         103  +
    /* EnumGenerator.kt:170 */
         104  +
    Zero,
         105  +
    /* EnumGenerator.kt:181 */
         106  +
    #[allow(missing_docs)] // documentation missing in model
         107  +
    /* EnumGenerator.kt:170 */
         108  +
    One,
  227    109   
    /* EnumGenerator.kt:181 */
  228    110   
    #[allow(missing_docs)] // documentation missing in model
  229    111   
    /* EnumGenerator.kt:170 */
  230    112   
    Bar,
  231    113   
    /* EnumGenerator.kt:181 */
  232    114   
    #[allow(missing_docs)] // documentation missing in model
  233    115   
    /* EnumGenerator.kt:170 */
  234    116   
    Baz,
  235    117   
    /* EnumGenerator.kt:181 */
  236    118   
    #[allow(missing_docs)] // documentation missing in model
  237    119   
    /* EnumGenerator.kt:170 */
  238    120   
    Foo,
  239    121   
    /* EnumGenerator.kt:298 */
  240    122   
}
  241         -
/// /* CodegenDelegator.kt:52 */See [`TestEnum`](crate::model::TestEnum).
  242         -
pub mod test_enum {
         123  +
/// /* CodegenDelegator.kt:52 */See [`FooEnum`](crate::model::FooEnum).
         124  +
pub mod foo_enum {
  243    125   
    #[derive(Debug, PartialEq)]
  244    126   
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
  245    127   
  246    128   
    impl ::std::fmt::Display for ConstraintViolation {
  247    129   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  248    130   
            write!(
  249    131   
                f,
  250         -
                r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
         132  +
                r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
  251    133   
            )
  252    134   
        }
  253    135   
    }
  254    136   
  255    137   
    impl ::std::error::Error for ConstraintViolation {}
  256    138   
    impl ConstraintViolation {
  257    139   
        pub(crate) fn as_validation_exception_field(
  258    140   
            self,
  259    141   
            path: ::std::string::String,
  260    142   
        ) -> crate::model::ValidationExceptionField {
  261    143   
            crate::model::ValidationExceptionField {
  262    144   
                message: format!(
  263         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
         145  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
  264    146   
                    &path
  265    147   
                ),
  266    148   
                path,
  267    149   
            }
  268    150   
        }
  269    151   
    }
  270    152   
  271    153   
    /* ServerEnumGenerator.kt:47 */
  272    154   
}
  273    155   
/* ServerEnumGenerator.kt:88 */
  274         -
impl ::std::convert::TryFrom<&str> for TestEnum {
  275         -
    type Error = crate::model::test_enum::ConstraintViolation;
         156  +
impl ::std::convert::TryFrom<&str> for FooEnum {
         157  +
    type Error = crate::model::foo_enum::ConstraintViolation;
  276    158   
    fn try_from(
  277    159   
        s: &str,
  278    160   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
  279    161   
        match s {
  280         -
            "BAR" => Ok(TestEnum::Bar),
  281         -
            "BAZ" => Ok(TestEnum::Baz),
  282         -
            "FOO" => Ok(TestEnum::Foo),
  283         -
            _ => Err(crate::model::test_enum::ConstraintViolation(s.to_owned())),
         162  +
            "0" => Ok(FooEnum::Zero),
         163  +
            "1" => Ok(FooEnum::One),
         164  +
            "Bar" => Ok(FooEnum::Bar),
         165  +
            "Baz" => Ok(FooEnum::Baz),
         166  +
            "Foo" => Ok(FooEnum::Foo),
         167  +
            _ => Err(crate::model::foo_enum::ConstraintViolation(s.to_owned())),
  284    168   
        }
  285    169   
    }
  286    170   
}
  287         -
impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
  288         -
    type Error = crate::model::test_enum::ConstraintViolation;
         171  +
impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
         172  +
    type Error = crate::model::foo_enum::ConstraintViolation;
  289    173   
    fn try_from(
  290    174   
        s: ::std::string::String,
  291    175   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
  292    176   
    {
  293    177   
        s.as_str().try_into()
  294    178   
    }
  295    179   
}
  296    180   
/* ServerEnumGenerator.kt:148 */
  297         -
impl std::str::FromStr for TestEnum {
  298         -
    type Err = crate::model::test_enum::ConstraintViolation;
         181  +
impl std::str::FromStr for FooEnum {
         182  +
    type Err = crate::model::foo_enum::ConstraintViolation;
  299    183   
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
  300    184   
        Self::try_from(s)
  301    185   
    }
  302    186   
}
  303    187   
/* EnumGenerator.kt:309 */
  304         -
impl TestEnum {
         188  +
impl FooEnum {
  305    189   
    /// Returns the `&str` value of the enum member.
  306    190   
    pub fn as_str(&self) -> &str {
  307    191   
        match self {
  308         -
            TestEnum::Bar => "BAR",
  309         -
            TestEnum::Baz => "BAZ",
  310         -
            TestEnum::Foo => "FOO",
         192  +
            FooEnum::Zero => "0",
         193  +
            FooEnum::One => "1",
         194  +
            FooEnum::Bar => "Bar",
         195  +
            FooEnum::Baz => "Baz",
         196  +
            FooEnum::Foo => "Foo",
  311    197   
        }
  312    198   
    }
  313    199   
    /// Returns all the `&str` representations of the enum members.
  314    200   
    pub const fn values() -> &'static [&'static str] {
  315         -
        &["BAR", "BAZ", "FOO"]
         201  +
        &["0", "1", "Bar", "Baz", "Foo"]
  316    202   
    }
  317    203   
}
  318    204   
/* EnumGenerator.kt:254 */
  319         -
impl ::std::convert::AsRef<str> for TestEnum {
         205  +
impl ::std::convert::AsRef<str> for FooEnum {
  320    206   
    fn as_ref(&self) -> &str {
  321    207   
        self.as_str()
  322    208   
    }
  323    209   
}
  324    210   
/* ConstrainedTraitForEnumGenerator.kt:36 */
  325         -
impl crate::constrained::Constrained for TestEnum {
         211  +
impl crate::constrained::Constrained for FooEnum {
  326    212   
    type Unconstrained = ::std::string::String;
  327    213   
}
  328    214   
  329    215   
impl ::std::convert::From<::std::string::String>
  330         -
    for crate::constrained::MaybeConstrained<crate::model::TestEnum>
         216  +
    for crate::constrained::MaybeConstrained<crate::model::FooEnum>
  331    217   
{
  332    218   
    fn from(value: ::std::string::String) -> Self {
  333    219   
        Self::Unconstrained(value)
  334    220   
    }
  335    221   
}
  336    222   
         223  +
/* ConstrainedCollectionGenerator.kt:93 */
         224  +
#[allow(missing_docs)] // documentation missing in model
         225  +
/// /* ConstrainedCollectionGenerator.kt:94 */
         226  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         227  +
/// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
         228  +
///
         229  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         230  +
///
         231  +
/* RustType.kt:534 */
         232  +
#[derive(
         233  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         234  +
)]
         235  +
pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
         236  +
/* ConstrainedCollectionGenerator.kt:104 */
         237  +
impl IntegerSet {
         238  +
    /* ConstrainedCollectionGenerator.kt:106 */
         239  +
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
         240  +
    pub fn inner(&self) -> &::std::vec::Vec<i32> {
         241  +
        &self.0
         242  +
    }
         243  +
    /* ConstrainedCollectionGenerator.kt:116 */
         244  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
         245  +
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
         246  +
        self.0
         247  +
    }
         248  +
         249  +
    fn check_unique_items(
         250  +
        items: ::std::vec::Vec<i32>,
         251  +
    ) -> ::std::result::Result<::std::vec::Vec<i32>, crate::model::integer_set::ConstraintViolation>
         252  +
    {
         253  +
        let mut seen = ::std::collections::HashMap::new();
         254  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         255  +
        for (idx, item) in items.iter().enumerate() {
         256  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         257  +
                duplicate_indices.push(prev_idx);
         258  +
            }
         259  +
        }
         260  +
         261  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         262  +
        for idx in &duplicate_indices {
         263  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         264  +
                last_duplicate_indices.push(prev_idx);
         265  +
            }
         266  +
        }
         267  +
        duplicate_indices.extend(last_duplicate_indices);
         268  +
         269  +
        if !duplicate_indices.is_empty() {
         270  +
            debug_assert!(duplicate_indices.len() >= 2);
         271  +
            Err(
         272  +
                crate::model::integer_set::ConstraintViolation::UniqueItems {
         273  +
                    duplicate_indices,
         274  +
                    original: items,
         275  +
                },
         276  +
            )
         277  +
        } else {
         278  +
            Ok(items)
         279  +
        }
         280  +
    }
         281  +
    /* ConstrainedCollectionGenerator.kt:104 */
         282  +
}
         283  +
/* ConstrainedCollectionGenerator.kt:133 */
         284  +
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
         285  +
    type Error = crate::model::integer_set::ConstraintViolation;
         286  +
         287  +
    /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
         288  +
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
         289  +
        let value = Self::check_unique_items(value)?;
         290  +
         291  +
        Ok(Self(value))
         292  +
    }
         293  +
}
         294  +
         295  +
impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
         296  +
    fn from(value: IntegerSet) -> Self {
         297  +
        value.into_inner()
         298  +
    }
         299  +
}
         300  +
/* ConstrainedCollectionGenerator.kt:181 */
         301  +
impl crate::constrained::Constrained for IntegerSet {
         302  +
    type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
         303  +
}
         304  +
  337    305   
/* StructureGenerator.kt:197 */
  338    306   
#[allow(missing_docs)] // documentation missing in model
  339    307   
/* RustType.kt:534 */
  340    308   
#[derive(
  341    309   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  342    310   
)]
  343         -
pub /* StructureGenerator.kt:201 */ struct ClientOptionalDefaults {
         311  +
pub /* StructureGenerator.kt:201 */ struct NestedPayload {
  344    312   
    /* StructureGenerator.kt:231 */
  345    313   
    #[allow(missing_docs)] // documentation missing in model
  346         -
    pub member: i32,
         314  +
    pub greeting: ::std::option::Option<::std::string::String>,
         315  +
    /* StructureGenerator.kt:231 */
         316  +
    #[allow(missing_docs)] // documentation missing in model
         317  +
    pub name: ::std::option::Option<::std::string::String>,
  347    318   
    /* StructureGenerator.kt:201 */
  348    319   
}
  349    320   
/* StructureGenerator.kt:135 */
  350         -
impl ClientOptionalDefaults {
         321  +
impl NestedPayload {
  351    322   
    /* StructureGenerator.kt:231 */
  352    323   
    #[allow(missing_docs)] // documentation missing in model
  353    324   
                           /* StructureGenerator.kt:166 */
  354         -
    pub fn member(&self) -> i32 {
  355         -
        /* StructureGenerator.kt:168 */
  356         -
        self.member
         325  +
    pub fn greeting(&self) -> ::std::option::Option<&str> {
         326  +
        /* StructureGenerator.kt:169 */
         327  +
        self.greeting.as_deref()
         328  +
        /* StructureGenerator.kt:166 */
         329  +
    }
         330  +
    /* StructureGenerator.kt:231 */
         331  +
    #[allow(missing_docs)] // documentation missing in model
         332  +
                           /* StructureGenerator.kt:166 */
         333  +
    pub fn name(&self) -> ::std::option::Option<&str> {
         334  +
        /* StructureGenerator.kt:169 */
         335  +
        self.name.as_deref()
  357    336   
        /* StructureGenerator.kt:166 */
  358    337   
    }
  359    338   
    /* StructureGenerator.kt:135 */
  360    339   
}
  361    340   
/* ServerCodegenVisitor.kt:356 */
  362         -
impl ClientOptionalDefaults {
  363         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
         341  +
impl NestedPayload {
         342  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
  364    343   
    /* ServerBuilderGenerator.kt:295 */
  365         -
    pub fn builder() -> crate::model::client_optional_defaults::Builder {
         344  +
    pub fn builder() -> crate::model::nested_payload::Builder {
  366    345   
        /* ServerBuilderGenerator.kt:296 */
  367         -
        crate::model::client_optional_defaults::Builder::default()
         346  +
        crate::model::nested_payload::Builder::default()
  368    347   
        /* ServerBuilderGenerator.kt:295 */
  369    348   
    }
  370    349   
    /* ServerCodegenVisitor.kt:356 */
  371    350   
}
  372    351   
/* ServerStructureConstrainedTraitImpl.kt:21 */
  373         -
impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
  374         -
    type Unconstrained = crate::model::client_optional_defaults::Builder;
         352  +
impl crate::constrained::Constrained for crate::model::NestedPayload {
         353  +
    type Unconstrained = crate::model::nested_payload::Builder;
  375    354   
}
  376    355   
  377         -
/* StructureGenerator.kt:197 */
         356  +
/* EnumGenerator.kt:181 */
  378    357   
#[allow(missing_docs)] // documentation missing in model
  379    358   
/* RustType.kt:534 */
  380         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  381         -
pub /* StructureGenerator.kt:201 */ struct Defaults {
  382         -
    /* StructureGenerator.kt:231 */
  383         -
    #[allow(missing_docs)] // documentation missing in model
  384         -
    pub default_string: ::std::string::String,
  385         -
    /* StructureGenerator.kt:231 */
  386         -
    #[allow(missing_docs)] // documentation missing in model
  387         -
    pub default_boolean: bool,
  388         -
    /* StructureGenerator.kt:231 */
  389         -
    #[allow(missing_docs)] // documentation missing in model
  390         -
    pub default_list: ::std::vec::Vec<::std::string::String>,
  391         -
    /* StructureGenerator.kt:231 */
  392         -
    #[allow(missing_docs)] // documentation missing in model
  393         -
    pub default_document_map: ::aws_smithy_types::Document,
  394         -
    /* StructureGenerator.kt:231 */
  395         -
    #[allow(missing_docs)] // documentation missing in model
  396         -
    pub default_document_string: ::aws_smithy_types::Document,
  397         -
    /* StructureGenerator.kt:231 */
  398         -
    #[allow(missing_docs)] // documentation missing in model
  399         -
    pub default_document_boolean: ::aws_smithy_types::Document,
  400         -
    /* StructureGenerator.kt:231 */
  401         -
    #[allow(missing_docs)] // documentation missing in model
  402         -
    pub default_document_list: ::aws_smithy_types::Document,
  403         -
    /* StructureGenerator.kt:231 */
  404         -
    #[allow(missing_docs)] // documentation missing in model
  405         -
    pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
  406         -
    /* StructureGenerator.kt:231 */
  407         -
    #[allow(missing_docs)] // documentation missing in model
  408         -
    pub default_timestamp: ::aws_smithy_types::DateTime,
  409         -
    /* StructureGenerator.kt:231 */
  410         -
    #[allow(missing_docs)] // documentation missing in model
  411         -
    pub default_blob: ::aws_smithy_types::Blob,
  412         -
    /* StructureGenerator.kt:231 */
  413         -
    #[allow(missing_docs)] // documentation missing in model
  414         -
    pub default_byte: i8,
  415         -
    /* StructureGenerator.kt:231 */
  416         -
    #[allow(missing_docs)] // documentation missing in model
  417         -
    pub default_short: i16,
  418         -
    /* StructureGenerator.kt:231 */
  419         -
    #[allow(missing_docs)] // documentation missing in model
  420         -
    pub default_integer: i32,
  421         -
    /* StructureGenerator.kt:231 */
  422         -
    #[allow(missing_docs)] // documentation missing in model
  423         -
    pub default_long: i64,
  424         -
    /* StructureGenerator.kt:231 */
  425         -
    #[allow(missing_docs)] // documentation missing in model
  426         -
    pub default_float: f32,
  427         -
    /* StructureGenerator.kt:231 */
  428         -
    #[allow(missing_docs)] // documentation missing in model
  429         -
    pub default_double: f64,
  430         -
    /* StructureGenerator.kt:231 */
  431         -
    #[allow(missing_docs)] // documentation missing in model
  432         -
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  433         -
    /* StructureGenerator.kt:231 */
  434         -
    #[allow(missing_docs)] // documentation missing in model
  435         -
    pub default_enum: crate::model::TestEnum,
  436         -
    /* StructureGenerator.kt:231 */
  437         -
    #[allow(missing_docs)] // documentation missing in model
  438         -
    pub default_int_enum: i32,
  439         -
    /* StructureGenerator.kt:231 */
  440         -
    #[allow(missing_docs)] // documentation missing in model
  441         -
    pub empty_string: ::std::string::String,
  442         -
    /* StructureGenerator.kt:231 */
  443         -
    #[allow(missing_docs)] // documentation missing in model
  444         -
    pub false_boolean: bool,
  445         -
    /* StructureGenerator.kt:231 */
  446         -
    #[allow(missing_docs)] // documentation missing in model
  447         -
    pub empty_blob: ::aws_smithy_types::Blob,
  448         -
    /* StructureGenerator.kt:231 */
         359  +
#[derive(
         360  +
    ::std::clone::Clone,
         361  +
    ::std::cmp::Eq,
         362  +
    ::std::cmp::Ord,
         363  +
    ::std::cmp::PartialEq,
         364  +
    ::std::cmp::PartialOrd,
         365  +
    ::std::fmt::Debug,
         366  +
    ::std::hash::Hash,
         367  +
)]
         368  +
pub /* EnumGenerator.kt:298 */ enum StringEnum {
         369  +
    /* EnumGenerator.kt:181 */
  449    370   
    #[allow(missing_docs)] // documentation missing in model
  450         -
    pub zero_byte: i8,
         371  +
    /* EnumGenerator.kt:170 */
         372  +
    V,
         373  +
    /* EnumGenerator.kt:298 */
         374  +
}
         375  +
/// /* CodegenDelegator.kt:52 */See [`StringEnum`](crate::model::StringEnum).
         376  +
pub mod string_enum {
         377  +
    #[derive(Debug, PartialEq)]
         378  +
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
         379  +
         380  +
    impl ::std::fmt::Display for ConstraintViolation {
         381  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         382  +
            write!(
         383  +
                f,
         384  +
                r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
         385  +
            )
         386  +
        }
         387  +
    }
         388  +
         389  +
    impl ::std::error::Error for ConstraintViolation {}
         390  +
    impl ConstraintViolation {
         391  +
        pub(crate) fn as_validation_exception_field(
         392  +
            self,
         393  +
            path: ::std::string::String,
         394  +
        ) -> crate::model::ValidationExceptionField {
         395  +
            crate::model::ValidationExceptionField {
         396  +
                message: format!(
         397  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
         398  +
                    &path
         399  +
                ),
         400  +
                path,
         401  +
            }
         402  +
        }
         403  +
    }
         404  +
         405  +
    /* ServerEnumGenerator.kt:47 */
         406  +
}
         407  +
/* ServerEnumGenerator.kt:88 */
         408  +
impl ::std::convert::TryFrom<&str> for StringEnum {
         409  +
    type Error = crate::model::string_enum::ConstraintViolation;
         410  +
    fn try_from(
         411  +
        s: &str,
         412  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
         413  +
        match s {
         414  +
            "enumvalue" => Ok(StringEnum::V),
         415  +
            _ => Err(crate::model::string_enum::ConstraintViolation(s.to_owned())),
         416  +
        }
         417  +
    }
         418  +
}
         419  +
impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
         420  +
    type Error = crate::model::string_enum::ConstraintViolation;
         421  +
    fn try_from(
         422  +
        s: ::std::string::String,
         423  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
         424  +
    {
         425  +
        s.as_str().try_into()
         426  +
    }
         427  +
}
         428  +
/* ServerEnumGenerator.kt:148 */
         429  +
impl std::str::FromStr for StringEnum {
         430  +
    type Err = crate::model::string_enum::ConstraintViolation;
         431  +
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
         432  +
        Self::try_from(s)
         433  +
    }
         434  +
}
         435  +
/* EnumGenerator.kt:309 */
         436  +
impl StringEnum {
         437  +
    /// Returns the `&str` value of the enum member.
         438  +
    pub fn as_str(&self) -> &str {
         439  +
        match self {
         440  +
            StringEnum::V => "enumvalue",
         441  +
        }
         442  +
    }
         443  +
    /// Returns all the `&str` representations of the enum members.
         444  +
    pub const fn values() -> &'static [&'static str] {
         445  +
        &["enumvalue"]
         446  +
    }
         447  +
}
         448  +
/* EnumGenerator.kt:254 */
         449  +
impl ::std::convert::AsRef<str> for StringEnum {
         450  +
    fn as_ref(&self) -> &str {
         451  +
        self.as_str()
         452  +
    }
         453  +
}
         454  +
/* ConstrainedTraitForEnumGenerator.kt:36 */
         455  +
impl crate::constrained::Constrained for StringEnum {
         456  +
    type Unconstrained = ::std::string::String;
         457  +
}
         458  +
         459  +
impl ::std::convert::From<::std::string::String>
         460  +
    for crate::constrained::MaybeConstrained<crate::model::StringEnum>
         461  +
{
         462  +
    fn from(value: ::std::string::String) -> Self {
         463  +
        Self::Unconstrained(value)
         464  +
    }
         465  +
}
         466  +
         467  +
/* UnionGenerator.kt:67 */
         468  +
#[allow(missing_docs)] // documentation missing in model
         469  +
/* RustType.kt:534 */
         470  +
#[derive(
         471  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         472  +
)]
         473  +
pub /* UnionGenerator.kt:85 */ enum UnionPayload {
         474  +
    /* UnionGenerator.kt:90 */
         475  +
    #[allow(missing_docs)] // documentation missing in model
         476  +
    /* UnionGenerator.kt:190 */
         477  +
    Greeting(::std::string::String),
         478  +
    /* UnionGenerator.kt:85 */
         479  +
}
         480  +
/* UnionGenerator.kt:111 */
         481  +
impl UnionPayload {
         482  +
    /* RustType.kt:534 */
         483  +
    #[allow(irrefutable_let_patterns)]
         484  +
    /* UnionGenerator.kt:217 */
         485  +
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
         486  +
    /* UnionGenerator.kt:222 */
         487  +
    /// Returns `Err(&Self)` if it can't be converted.
         488  +
    /* UnionGenerator.kt:223 */
         489  +
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         490  +
        /* UnionGenerator.kt:227 */
         491  +
        if let UnionPayload::Greeting(val) = &self {
         492  +
            ::std::result::Result::Ok(val)
         493  +
        } else {
         494  +
            ::std::result::Result::Err(self)
         495  +
        }
         496  +
        /* UnionGenerator.kt:223 */
         497  +
    }
         498  +
    /* UnionGenerator.kt:121 */
         499  +
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
         500  +
    /* UnionGenerator.kt:122 */
         501  +
    pub fn is_greeting(&self) -> bool {
         502  +
        /* UnionGenerator.kt:123 */
         503  +
        self.as_greeting().is_ok()
         504  +
        /* UnionGenerator.kt:122 */
         505  +
    }
         506  +
    /* UnionGenerator.kt:111 */
         507  +
}
         508  +
         509  +
/* StructureGenerator.kt:197 */
         510  +
#[allow(missing_docs)] // documentation missing in model
         511  +
/* RustType.kt:534 */
         512  +
#[derive(
         513  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         514  +
)]
         515  +
pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
         516  +
    /* StructureGenerator.kt:231 */
         517  +
    #[allow(missing_docs)] // documentation missing in model
         518  +
    pub foo: ::std::option::Option<::std::string::String>,
         519  +
    /* StructureGenerator.kt:201 */
         520  +
}
         521  +
/* StructureGenerator.kt:135 */
         522  +
impl ComplexNestedErrorData {
         523  +
    /* StructureGenerator.kt:231 */
         524  +
    #[allow(missing_docs)] // documentation missing in model
         525  +
                           /* StructureGenerator.kt:166 */
         526  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
         527  +
        /* StructureGenerator.kt:169 */
         528  +
        self.foo.as_deref()
         529  +
        /* StructureGenerator.kt:166 */
         530  +
    }
         531  +
    /* StructureGenerator.kt:135 */
         532  +
}
         533  +
/* ServerCodegenVisitor.kt:356 */
         534  +
impl ComplexNestedErrorData {
         535  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
         536  +
    /* ServerBuilderGenerator.kt:295 */
         537  +
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
         538  +
        /* ServerBuilderGenerator.kt:296 */
         539  +
        crate::model::complex_nested_error_data::Builder::default()
         540  +
        /* ServerBuilderGenerator.kt:295 */
         541  +
    }
         542  +
    /* ServerCodegenVisitor.kt:356 */
         543  +
}
         544  +
         545  +
/* ConstrainedCollectionGenerator.kt:93 */
         546  +
#[allow(missing_docs)] // documentation missing in model
         547  +
/// /* ConstrainedCollectionGenerator.kt:94 */
         548  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         549  +
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
         550  +
///
         551  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         552  +
///
         553  +
/* RustType.kt:534 */
         554  +
#[derive(
         555  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         556  +
)]
         557  +
pub /* ConstrainedCollectionGenerator.kt:97 */ struct FooEnumSet(
         558  +
    pub(crate) ::std::vec::Vec<crate::model::FooEnum>,
         559  +
);
         560  +
/* ConstrainedCollectionGenerator.kt:104 */
         561  +
impl FooEnumSet {
         562  +
    /* ConstrainedCollectionGenerator.kt:106 */
         563  +
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
         564  +
    pub fn inner(&self) -> &::std::vec::Vec<crate::model::FooEnum> {
         565  +
        &self.0
         566  +
    }
         567  +
    /* ConstrainedCollectionGenerator.kt:116 */
         568  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
         569  +
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
         570  +
        self.0
         571  +
    }
         572  +
         573  +
    fn check_unique_items(
         574  +
        items: ::std::vec::Vec<crate::model::FooEnum>,
         575  +
    ) -> ::std::result::Result<
         576  +
        ::std::vec::Vec<crate::model::FooEnum>,
         577  +
        crate::model::foo_enum_set::ConstraintViolation,
         578  +
    > {
         579  +
        let mut seen = ::std::collections::HashMap::new();
         580  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         581  +
        for (idx, item) in items.iter().enumerate() {
         582  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         583  +
                duplicate_indices.push(prev_idx);
         584  +
            }
         585  +
        }
         586  +
         587  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         588  +
        for idx in &duplicate_indices {
         589  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         590  +
                last_duplicate_indices.push(prev_idx);
         591  +
            }
         592  +
        }
         593  +
        duplicate_indices.extend(last_duplicate_indices);
         594  +
         595  +
        if !duplicate_indices.is_empty() {
         596  +
            debug_assert!(duplicate_indices.len() >= 2);
         597  +
            Err(
         598  +
                crate::model::foo_enum_set::ConstraintViolation::UniqueItems {
         599  +
                    duplicate_indices,
         600  +
                    original: items,
         601  +
                },
         602  +
            )
         603  +
        } else {
         604  +
            Ok(items)
         605  +
        }
         606  +
    }
         607  +
    /* ConstrainedCollectionGenerator.kt:104 */
         608  +
}
         609  +
/* ConstrainedCollectionGenerator.kt:133 */
         610  +
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
         611  +
    type Error = crate::model::foo_enum_set::ConstraintViolation;
         612  +
         613  +
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
         614  +
    fn try_from(
         615  +
        value: ::std::vec::Vec<crate::model::FooEnum>,
         616  +
    ) -> ::std::result::Result<Self, Self::Error> {
         617  +
        let value = Self::check_unique_items(value)?;
         618  +
         619  +
        Ok(Self(value))
         620  +
    }
         621  +
}
         622  +
         623  +
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
         624  +
    fn from(value: FooEnumSet) -> Self {
         625  +
        value.into_inner()
         626  +
    }
         627  +
}
         628  +
/* ConstrainedCollectionGenerator.kt:181 */
         629  +
impl crate::constrained::Constrained for FooEnumSet {
         630  +
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
         631  +
}
         632  +
         633  +
/* ConstrainedCollectionGenerator.kt:93 */
         634  +
#[allow(missing_docs)] // documentation missing in model
         635  +
/// /* ConstrainedCollectionGenerator.kt:94 */
         636  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         637  +
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
         638  +
///
         639  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         640  +
///
         641  +
/* RustType.kt:534 */
         642  +
#[derive(
         643  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         644  +
)]
         645  +
pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerEnumSet(
         646  +
    pub(crate) ::std::vec::Vec<i32>,
         647  +
);
         648  +
/* ConstrainedCollectionGenerator.kt:104 */
         649  +
impl IntegerEnumSet {
         650  +
    /* ConstrainedCollectionGenerator.kt:106 */
         651  +
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
         652  +
    pub fn inner(&self) -> &::std::vec::Vec<i32> {
         653  +
        &self.0
         654  +
    }
         655  +
    /* ConstrainedCollectionGenerator.kt:116 */
         656  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
         657  +
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
         658  +
        self.0
         659  +
    }
         660  +
         661  +
    fn check_unique_items(
         662  +
        items: ::std::vec::Vec<i32>,
         663  +
    ) -> ::std::result::Result<
         664  +
        ::std::vec::Vec<i32>,
         665  +
        crate::model::integer_enum_set::ConstraintViolation,
         666  +
    > {
         667  +
        let mut seen = ::std::collections::HashMap::new();
         668  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         669  +
        for (idx, item) in items.iter().enumerate() {
         670  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         671  +
                duplicate_indices.push(prev_idx);
         672  +
            }
         673  +
        }
         674  +
         675  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         676  +
        for idx in &duplicate_indices {
         677  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         678  +
                last_duplicate_indices.push(prev_idx);
         679  +
            }
         680  +
        }
         681  +
        duplicate_indices.extend(last_duplicate_indices);
         682  +
         683  +
        if !duplicate_indices.is_empty() {
         684  +
            debug_assert!(duplicate_indices.len() >= 2);
         685  +
            Err(
         686  +
                crate::model::integer_enum_set::ConstraintViolation::UniqueItems {
         687  +
                    duplicate_indices,
         688  +
                    original: items,
         689  +
                },
         690  +
            )
         691  +
        } else {
         692  +
            Ok(items)
         693  +
        }
         694  +
    }
         695  +
    /* ConstrainedCollectionGenerator.kt:104 */
         696  +
}
         697  +
/* ConstrainedCollectionGenerator.kt:133 */
         698  +
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
         699  +
    type Error = crate::model::integer_enum_set::ConstraintViolation;
         700  +
         701  +
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
         702  +
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
         703  +
        let value = Self::check_unique_items(value)?;
         704  +
         705  +
        Ok(Self(value))
         706  +
    }
         707  +
}
         708  +
         709  +
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
         710  +
    fn from(value: IntegerEnumSet) -> Self {
         711  +
        value.into_inner()
         712  +
    }
         713  +
}
         714  +
/* ConstrainedCollectionGenerator.kt:181 */
         715  +
impl crate::constrained::Constrained for IntegerEnumSet {
         716  +
    type Unconstrained =
         717  +
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
         718  +
}
         719  +
         720  +
/* StructureGenerator.kt:197 */
         721  +
#[allow(missing_docs)] // documentation missing in model
         722  +
/* RustType.kt:534 */
         723  +
#[derive(
         724  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         725  +
)]
         726  +
pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested1 {
         727  +
    /* StructureGenerator.kt:231 */
         728  +
    #[allow(missing_docs)] // documentation missing in model
         729  +
    pub foo: ::std::option::Option<::std::string::String>,
         730  +
    /* StructureGenerator.kt:231 */
         731  +
    #[allow(missing_docs)] // documentation missing in model
         732  +
    pub nested:
         733  +
        ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
         734  +
    /* StructureGenerator.kt:201 */
         735  +
}
         736  +
/* StructureGenerator.kt:135 */
         737  +
impl RecursiveShapesInputOutputNested1 {
         738  +
    /* StructureGenerator.kt:231 */
         739  +
    #[allow(missing_docs)] // documentation missing in model
         740  +
                           /* StructureGenerator.kt:166 */
         741  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
         742  +
        /* StructureGenerator.kt:169 */
         743  +
        self.foo.as_deref()
         744  +
        /* StructureGenerator.kt:166 */
         745  +
    }
         746  +
    /* StructureGenerator.kt:231 */
         747  +
    #[allow(missing_docs)] // documentation missing in model
         748  +
                           /* StructureGenerator.kt:166 */
         749  +
    pub fn nested(
         750  +
        &self,
         751  +
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
         752  +
        /* StructureGenerator.kt:169 */
         753  +
        self.nested.as_deref()
         754  +
        /* StructureGenerator.kt:166 */
         755  +
    }
         756  +
    /* StructureGenerator.kt:135 */
         757  +
}
         758  +
/* ServerCodegenVisitor.kt:356 */
         759  +
impl RecursiveShapesInputOutputNested1 {
         760  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
         761  +
    /* ServerBuilderGenerator.kt:295 */
         762  +
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
         763  +
        /* ServerBuilderGenerator.kt:296 */
         764  +
        crate::model::recursive_shapes_input_output_nested1::Builder::default()
         765  +
        /* ServerBuilderGenerator.kt:295 */
         766  +
    }
         767  +
    /* ServerCodegenVisitor.kt:356 */
         768  +
}
         769  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
         770  +
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
         771  +
    type Unconstrained = crate::model::recursive_shapes_input_output_nested1::Builder;
         772  +
}
         773  +
         774  +
/// /* UnionGenerator.kt:67 */A union with a representative set of types for members.
         775  +
/* RustType.kt:534 */
         776  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         777  +
pub /* UnionGenerator.kt:85 */ enum MyUnion {
         778  +
    /* UnionGenerator.kt:90 */
         779  +
    #[allow(missing_docs)] // documentation missing in model
         780  +
    /* UnionGenerator.kt:190 */
         781  +
    BlobValue(::aws_smithy_types::Blob),
         782  +
    /* UnionGenerator.kt:90 */
         783  +
    #[allow(missing_docs)] // documentation missing in model
         784  +
    /* UnionGenerator.kt:190 */
         785  +
    BooleanValue(bool),
         786  +
    /* UnionGenerator.kt:90 */
         787  +
    #[allow(missing_docs)] // documentation missing in model
         788  +
    /* UnionGenerator.kt:190 */
         789  +
    EnumValue(crate::model::FooEnum),
         790  +
    /* UnionGenerator.kt:90 */
         791  +
    #[allow(missing_docs)] // documentation missing in model
         792  +
    /* UnionGenerator.kt:190 */
         793  +
    ListValue(::std::vec::Vec<::std::string::String>),
         794  +
    /* UnionGenerator.kt:90 */
         795  +
    #[allow(missing_docs)] // documentation missing in model
         796  +
    /* UnionGenerator.kt:190 */
         797  +
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
         798  +
    /* UnionGenerator.kt:90 */
         799  +
    #[allow(missing_docs)] // documentation missing in model
         800  +
    /* UnionGenerator.kt:190 */
         801  +
    NumberValue(i32),
         802  +
    /* UnionGenerator.kt:90 */
         803  +
    #[allow(missing_docs)] // documentation missing in model
         804  +
    /* UnionGenerator.kt:190 */
         805  +
    RenamedStructureValue(crate::model::RenamedGreeting),
         806  +
    /* UnionGenerator.kt:90 */
         807  +
    #[allow(missing_docs)] // documentation missing in model
         808  +
    /* UnionGenerator.kt:190 */
         809  +
    StringValue(::std::string::String),
         810  +
    /* UnionGenerator.kt:90 */
         811  +
    #[allow(missing_docs)] // documentation missing in model
         812  +
    /* UnionGenerator.kt:190 */
         813  +
    StructureValue(crate::model::GreetingStruct),
         814  +
    /* UnionGenerator.kt:90 */
         815  +
    #[allow(missing_docs)] // documentation missing in model
         816  +
    /* UnionGenerator.kt:190 */
         817  +
    TimestampValue(::aws_smithy_types::DateTime),
         818  +
    /* UnionGenerator.kt:85 */
         819  +
}
         820  +
/* UnionGenerator.kt:111 */
         821  +
impl MyUnion {
         822  +
    /* UnionGenerator.kt:217 */
         823  +
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_types::Blob).
         824  +
    /* UnionGenerator.kt:222 */
         825  +
    /// Returns `Err(&Self)` if it can't be converted.
         826  +
    /* UnionGenerator.kt:223 */
         827  +
    pub fn as_blob_value(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> {
         828  +
        /* UnionGenerator.kt:227 */
         829  +
        if let MyUnion::BlobValue(val) = &self {
         830  +
            ::std::result::Result::Ok(val)
         831  +
        } else {
         832  +
            ::std::result::Result::Err(self)
         833  +
        }
         834  +
        /* UnionGenerator.kt:223 */
         835  +
    }
         836  +
    /* UnionGenerator.kt:121 */
         837  +
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
         838  +
    /* UnionGenerator.kt:122 */
         839  +
    pub fn is_blob_value(&self) -> bool {
         840  +
        /* UnionGenerator.kt:123 */
         841  +
        self.as_blob_value().is_ok()
         842  +
        /* UnionGenerator.kt:122 */
         843  +
    }
         844  +
    /* UnionGenerator.kt:217 */
         845  +
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
         846  +
    /* UnionGenerator.kt:222 */
         847  +
    /// Returns `Err(&Self)` if it can't be converted.
         848  +
    /* UnionGenerator.kt:223 */
         849  +
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
         850  +
        /* UnionGenerator.kt:227 */
         851  +
        if let MyUnion::BooleanValue(val) = &self {
         852  +
            ::std::result::Result::Ok(val)
         853  +
        } else {
         854  +
            ::std::result::Result::Err(self)
         855  +
        }
         856  +
        /* UnionGenerator.kt:223 */
         857  +
    }
         858  +
    /* UnionGenerator.kt:121 */
         859  +
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
         860  +
    /* UnionGenerator.kt:122 */
         861  +
    pub fn is_boolean_value(&self) -> bool {
         862  +
        /* UnionGenerator.kt:123 */
         863  +
        self.as_boolean_value().is_ok()
         864  +
        /* UnionGenerator.kt:122 */
         865  +
    }
         866  +
    /* UnionGenerator.kt:217 */
         867  +
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
         868  +
    /* UnionGenerator.kt:222 */
         869  +
    /// Returns `Err(&Self)` if it can't be converted.
         870  +
    /* UnionGenerator.kt:223 */
         871  +
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
         872  +
        /* UnionGenerator.kt:227 */
         873  +
        if let MyUnion::EnumValue(val) = &self {
         874  +
            ::std::result::Result::Ok(val)
         875  +
        } else {
         876  +
            ::std::result::Result::Err(self)
         877  +
        }
         878  +
        /* UnionGenerator.kt:223 */
         879  +
    }
         880  +
    /* UnionGenerator.kt:121 */
         881  +
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
         882  +
    /* UnionGenerator.kt:122 */
         883  +
    pub fn is_enum_value(&self) -> bool {
         884  +
        /* UnionGenerator.kt:123 */
         885  +
        self.as_enum_value().is_ok()
         886  +
        /* UnionGenerator.kt:122 */
         887  +
    }
         888  +
    /* UnionGenerator.kt:217 */
         889  +
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
         890  +
    /* UnionGenerator.kt:222 */
         891  +
    /// Returns `Err(&Self)` if it can't be converted.
         892  +
    /* UnionGenerator.kt:223 */
         893  +
    pub fn as_list_value(
         894  +
        &self,
         895  +
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
         896  +
        /* UnionGenerator.kt:227 */
         897  +
        if let MyUnion::ListValue(val) = &self {
         898  +
            ::std::result::Result::Ok(val)
         899  +
        } else {
         900  +
            ::std::result::Result::Err(self)
         901  +
        }
         902  +
        /* UnionGenerator.kt:223 */
         903  +
    }
         904  +
    /* UnionGenerator.kt:121 */
         905  +
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
         906  +
    /* UnionGenerator.kt:122 */
         907  +
    pub fn is_list_value(&self) -> bool {
         908  +
        /* UnionGenerator.kt:123 */
         909  +
        self.as_list_value().is_ok()
         910  +
        /* UnionGenerator.kt:122 */
         911  +
    }
         912  +
    /* UnionGenerator.kt:217 */
         913  +
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
         914  +
    /* UnionGenerator.kt:222 */
         915  +
    /// Returns `Err(&Self)` if it can't be converted.
         916  +
    /* UnionGenerator.kt:223 */
         917  +
    pub fn as_map_value(
         918  +
        &self,
         919  +
    ) -> ::std::result::Result<
         920  +
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
         921  +
        &Self,
         922  +
    > {
         923  +
        /* UnionGenerator.kt:227 */
         924  +
        if let MyUnion::MapValue(val) = &self {
         925  +
            ::std::result::Result::Ok(val)
         926  +
        } else {
         927  +
            ::std::result::Result::Err(self)
         928  +
        }
         929  +
        /* UnionGenerator.kt:223 */
         930  +
    }
         931  +
    /* UnionGenerator.kt:121 */
         932  +
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
         933  +
    /* UnionGenerator.kt:122 */
         934  +
    pub fn is_map_value(&self) -> bool {
         935  +
        /* UnionGenerator.kt:123 */
         936  +
        self.as_map_value().is_ok()
         937  +
        /* UnionGenerator.kt:122 */
         938  +
    }
         939  +
    /* UnionGenerator.kt:217 */
         940  +
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
         941  +
    /* UnionGenerator.kt:222 */
         942  +
    /// Returns `Err(&Self)` if it can't be converted.
         943  +
    /* UnionGenerator.kt:223 */
         944  +
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
         945  +
        /* UnionGenerator.kt:227 */
         946  +
        if let MyUnion::NumberValue(val) = &self {
         947  +
            ::std::result::Result::Ok(val)
         948  +
        } else {
         949  +
            ::std::result::Result::Err(self)
         950  +
        }
         951  +
        /* UnionGenerator.kt:223 */
         952  +
    }
         953  +
    /* UnionGenerator.kt:121 */
         954  +
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
         955  +
    /* UnionGenerator.kt:122 */
         956  +
    pub fn is_number_value(&self) -> bool {
         957  +
        /* UnionGenerator.kt:123 */
         958  +
        self.as_number_value().is_ok()
         959  +
        /* UnionGenerator.kt:122 */
         960  +
    }
         961  +
    /* UnionGenerator.kt:217 */
         962  +
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
         963  +
    /* UnionGenerator.kt:222 */
         964  +
    /// Returns `Err(&Self)` if it can't be converted.
         965  +
    /* UnionGenerator.kt:223 */
         966  +
    pub fn as_renamed_structure_value(
         967  +
        &self,
         968  +
    ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
         969  +
        /* UnionGenerator.kt:227 */
         970  +
        if let MyUnion::RenamedStructureValue(val) = &self {
         971  +
            ::std::result::Result::Ok(val)
         972  +
        } else {
         973  +
            ::std::result::Result::Err(self)
         974  +
        }
         975  +
        /* UnionGenerator.kt:223 */
         976  +
    }
         977  +
    /* UnionGenerator.kt:121 */
         978  +
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
         979  +
    /* UnionGenerator.kt:122 */
         980  +
    pub fn is_renamed_structure_value(&self) -> bool {
         981  +
        /* UnionGenerator.kt:123 */
         982  +
        self.as_renamed_structure_value().is_ok()
         983  +
        /* UnionGenerator.kt:122 */
         984  +
    }
         985  +
    /* UnionGenerator.kt:217 */
         986  +
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
         987  +
    /* UnionGenerator.kt:222 */
         988  +
    /// Returns `Err(&Self)` if it can't be converted.
         989  +
    /* UnionGenerator.kt:223 */
         990  +
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         991  +
        /* UnionGenerator.kt:227 */
         992  +
        if let MyUnion::StringValue(val) = &self {
         993  +
            ::std::result::Result::Ok(val)
         994  +
        } else {
         995  +
            ::std::result::Result::Err(self)
         996  +
        }
         997  +
        /* UnionGenerator.kt:223 */
         998  +
    }
         999  +
    /* UnionGenerator.kt:121 */
        1000  +
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
        1001  +
    /* UnionGenerator.kt:122 */
        1002  +
    pub fn is_string_value(&self) -> bool {
        1003  +
        /* UnionGenerator.kt:123 */
        1004  +
        self.as_string_value().is_ok()
        1005  +
        /* UnionGenerator.kt:122 */
        1006  +
    }
        1007  +
    /* UnionGenerator.kt:217 */
        1008  +
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
        1009  +
    /* UnionGenerator.kt:222 */
        1010  +
    /// Returns `Err(&Self)` if it can't be converted.
        1011  +
    /* UnionGenerator.kt:223 */
        1012  +
    pub fn as_structure_value(
        1013  +
        &self,
        1014  +
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
        1015  +
        /* UnionGenerator.kt:227 */
        1016  +
        if let MyUnion::StructureValue(val) = &self {
        1017  +
            ::std::result::Result::Ok(val)
        1018  +
        } else {
        1019  +
            ::std::result::Result::Err(self)
        1020  +
        }
        1021  +
        /* UnionGenerator.kt:223 */
        1022  +
    }
        1023  +
    /* UnionGenerator.kt:121 */
        1024  +
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
        1025  +
    /* UnionGenerator.kt:122 */
        1026  +
    pub fn is_structure_value(&self) -> bool {
        1027  +
        /* UnionGenerator.kt:123 */
        1028  +
        self.as_structure_value().is_ok()
        1029  +
        /* UnionGenerator.kt:122 */
        1030  +
    }
        1031  +
    /* UnionGenerator.kt:217 */
        1032  +
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_types::DateTime).
        1033  +
    /* UnionGenerator.kt:222 */
        1034  +
    /// Returns `Err(&Self)` if it can't be converted.
        1035  +
    /* UnionGenerator.kt:223 */
        1036  +
    pub fn as_timestamp_value(
        1037  +
        &self,
        1038  +
    ) -> ::std::result::Result<&::aws_smithy_types::DateTime, &Self> {
        1039  +
        /* UnionGenerator.kt:227 */
        1040  +
        if let MyUnion::TimestampValue(val) = &self {
        1041  +
            ::std::result::Result::Ok(val)
        1042  +
        } else {
        1043  +
            ::std::result::Result::Err(self)
        1044  +
        }
        1045  +
        /* UnionGenerator.kt:223 */
        1046  +
    }
        1047  +
    /* UnionGenerator.kt:121 */
        1048  +
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
        1049  +
    /* UnionGenerator.kt:122 */
        1050  +
    pub fn is_timestamp_value(&self) -> bool {
        1051  +
        /* UnionGenerator.kt:123 */
        1052  +
        self.as_timestamp_value().is_ok()
        1053  +
        /* UnionGenerator.kt:122 */
        1054  +
    }
        1055  +
    /* UnionGenerator.kt:111 */
        1056  +
}
        1057  +
        1058  +
/* UnionGenerator.kt:67 */
        1059  +
#[allow(missing_docs)] // documentation missing in model
        1060  +
/* RustType.kt:534 */
        1061  +
#[derive(
        1062  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1063  +
)]
        1064  +
pub /* UnionGenerator.kt:85 */ enum PlayerAction {
        1065  +
    /// /* UnionGenerator.kt:90 */Quit the game.
        1066  +
    /* UnionGenerator.kt:188 */
        1067  +
    Quit,
        1068  +
    /* UnionGenerator.kt:85 */
        1069  +
}
        1070  +
/* UnionGenerator.kt:111 */
        1071  +
impl PlayerAction {
        1072  +
    /* RustType.kt:534 */
        1073  +
    #[allow(irrefutable_let_patterns)]
        1074  +
    /* UnionGenerator.kt:203 */
        1075  +
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
        1076  +
    /* UnionGenerator.kt:207 */
        1077  +
    /// Returns `Err(&Self)` if it can't be converted.
        1078  +
    /* UnionGenerator.kt:208 */
        1079  +
    pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
        1080  +
        /* UnionGenerator.kt:209 */
        1081  +
        if let PlayerAction::Quit = &self {
        1082  +
            ::std::result::Result::Ok(())
        1083  +
        } else {
        1084  +
            ::std::result::Result::Err(self)
        1085  +
        }
        1086  +
        /* UnionGenerator.kt:208 */
        1087  +
    }
        1088  +
    /* UnionGenerator.kt:121 */
        1089  +
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
        1090  +
    /* UnionGenerator.kt:122 */
        1091  +
    pub fn is_quit(&self) -> bool {
        1092  +
        /* UnionGenerator.kt:123 */
        1093  +
        self.as_quit().is_ok()
        1094  +
        /* UnionGenerator.kt:122 */
        1095  +
    }
        1096  +
    /* UnionGenerator.kt:111 */
        1097  +
}
        1098  +
        1099  +
/* UnionGenerator.kt:67 */
        1100  +
#[allow(missing_docs)] // documentation missing in model
        1101  +
/* RustType.kt:534 */
        1102  +
#[derive(
        1103  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1104  +
)]
        1105  +
pub /* UnionGenerator.kt:85 */ enum UnionWithJsonName {
        1106  +
    /* UnionGenerator.kt:90 */
        1107  +
    #[allow(missing_docs)] // documentation missing in model
        1108  +
    /* UnionGenerator.kt:190 */
        1109  +
    Bar(::std::string::String),
        1110  +
    /* UnionGenerator.kt:90 */
        1111  +
    #[allow(missing_docs)] // documentation missing in model
        1112  +
    /* UnionGenerator.kt:190 */
        1113  +
    Baz(::std::string::String),
        1114  +
    /* UnionGenerator.kt:90 */
        1115  +
    #[allow(missing_docs)] // documentation missing in model
        1116  +
    /* UnionGenerator.kt:190 */
        1117  +
    Foo(::std::string::String),
        1118  +
    /* UnionGenerator.kt:85 */
        1119  +
}
        1120  +
/* UnionGenerator.kt:111 */
        1121  +
impl UnionWithJsonName {
        1122  +
    /* UnionGenerator.kt:217 */
        1123  +
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
        1124  +
    /* UnionGenerator.kt:222 */
        1125  +
    /// Returns `Err(&Self)` if it can't be converted.
        1126  +
    /* UnionGenerator.kt:223 */
        1127  +
    pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1128  +
        /* UnionGenerator.kt:227 */
        1129  +
        if let UnionWithJsonName::Bar(val) = &self {
        1130  +
            ::std::result::Result::Ok(val)
        1131  +
        } else {
        1132  +
            ::std::result::Result::Err(self)
        1133  +
        }
        1134  +
        /* UnionGenerator.kt:223 */
        1135  +
    }
        1136  +
    /* UnionGenerator.kt:121 */
        1137  +
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
        1138  +
    /* UnionGenerator.kt:122 */
        1139  +
    pub fn is_bar(&self) -> bool {
        1140  +
        /* UnionGenerator.kt:123 */
        1141  +
        self.as_bar().is_ok()
        1142  +
        /* UnionGenerator.kt:122 */
        1143  +
    }
        1144  +
    /* UnionGenerator.kt:217 */
        1145  +
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
        1146  +
    /* UnionGenerator.kt:222 */
        1147  +
    /// Returns `Err(&Self)` if it can't be converted.
        1148  +
    /* UnionGenerator.kt:223 */
        1149  +
    pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1150  +
        /* UnionGenerator.kt:227 */
        1151  +
        if let UnionWithJsonName::Baz(val) = &self {
        1152  +
            ::std::result::Result::Ok(val)
        1153  +
        } else {
        1154  +
            ::std::result::Result::Err(self)
        1155  +
        }
        1156  +
        /* UnionGenerator.kt:223 */
        1157  +
    }
        1158  +
    /* UnionGenerator.kt:121 */
        1159  +
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
        1160  +
    /* UnionGenerator.kt:122 */
        1161  +
    pub fn is_baz(&self) -> bool {
        1162  +
        /* UnionGenerator.kt:123 */
        1163  +
        self.as_baz().is_ok()
        1164  +
        /* UnionGenerator.kt:122 */
        1165  +
    }
        1166  +
    /* UnionGenerator.kt:217 */
        1167  +
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
        1168  +
    /* UnionGenerator.kt:222 */
        1169  +
    /// Returns `Err(&Self)` if it can't be converted.
        1170  +
    /* UnionGenerator.kt:223 */
        1171  +
    pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1172  +
        /* UnionGenerator.kt:227 */
        1173  +
        if let UnionWithJsonName::Foo(val) = &self {
        1174  +
            ::std::result::Result::Ok(val)
        1175  +
        } else {
        1176  +
            ::std::result::Result::Err(self)
        1177  +
        }
        1178  +
        /* UnionGenerator.kt:223 */
        1179  +
    }
        1180  +
    /* UnionGenerator.kt:121 */
        1181  +
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
        1182  +
    /* UnionGenerator.kt:122 */
        1183  +
    pub fn is_foo(&self) -> bool {
        1184  +
        /* UnionGenerator.kt:123 */
        1185  +
        self.as_foo().is_ok()
        1186  +
        /* UnionGenerator.kt:122 */
        1187  +
    }
        1188  +
    /* UnionGenerator.kt:111 */
        1189  +
}
        1190  +
        1191  +
/* UnionGenerator.kt:67 */
        1192  +
#[allow(missing_docs)] // documentation missing in model
        1193  +
/* RustType.kt:534 */
        1194  +
#[derive(
        1195  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1196  +
)]
        1197  +
pub /* UnionGenerator.kt:85 */ enum SimpleUnion {
        1198  +
    /* UnionGenerator.kt:90 */
        1199  +
    #[allow(missing_docs)] // documentation missing in model
        1200  +
    /* UnionGenerator.kt:190 */
        1201  +
    Int(i32),
        1202  +
    /* UnionGenerator.kt:90 */
        1203  +
    #[allow(missing_docs)] // documentation missing in model
        1204  +
    /* UnionGenerator.kt:190 */
        1205  +
    String(::std::string::String),
        1206  +
    /* UnionGenerator.kt:85 */
        1207  +
}
        1208  +
/* UnionGenerator.kt:111 */
        1209  +
impl SimpleUnion {
        1210  +
    /* UnionGenerator.kt:217 */
        1211  +
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
        1212  +
    /* UnionGenerator.kt:222 */
        1213  +
    /// Returns `Err(&Self)` if it can't be converted.
        1214  +
    /* UnionGenerator.kt:223 */
        1215  +
    pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
        1216  +
        /* UnionGenerator.kt:227 */
        1217  +
        if let SimpleUnion::Int(val) = &self {
        1218  +
            ::std::result::Result::Ok(val)
        1219  +
        } else {
        1220  +
            ::std::result::Result::Err(self)
        1221  +
        }
        1222  +
        /* UnionGenerator.kt:223 */
        1223  +
    }
        1224  +
    /* UnionGenerator.kt:121 */
        1225  +
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
        1226  +
    /* UnionGenerator.kt:122 */
        1227  +
    pub fn is_int(&self) -> bool {
        1228  +
        /* UnionGenerator.kt:123 */
        1229  +
        self.as_int().is_ok()
        1230  +
        /* UnionGenerator.kt:122 */
        1231  +
    }
        1232  +
    /* UnionGenerator.kt:217 */
        1233  +
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
        1234  +
    /* UnionGenerator.kt:222 */
        1235  +
    /// Returns `Err(&Self)` if it can't be converted.
        1236  +
    /* UnionGenerator.kt:223 */
        1237  +
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1238  +
        /* UnionGenerator.kt:227 */
        1239  +
        if let SimpleUnion::String(val) = &self {
        1240  +
            ::std::result::Result::Ok(val)
        1241  +
        } else {
        1242  +
            ::std::result::Result::Err(self)
        1243  +
        }
        1244  +
        /* UnionGenerator.kt:223 */
        1245  +
    }
        1246  +
    /* UnionGenerator.kt:121 */
        1247  +
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
        1248  +
    /* UnionGenerator.kt:122 */
        1249  +
    pub fn is_string(&self) -> bool {
        1250  +
        /* UnionGenerator.kt:123 */
        1251  +
        self.as_string().is_ok()
        1252  +
        /* UnionGenerator.kt:122 */
        1253  +
    }
        1254  +
    /* UnionGenerator.kt:111 */
        1255  +
}
        1256  +
        1257  +
/* StructureGenerator.kt:197 */
        1258  +
#[allow(missing_docs)] // documentation missing in model
        1259  +
/* RustType.kt:534 */
        1260  +
#[derive(
        1261  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1262  +
)]
        1263  +
pub /* StructureGenerator.kt:201 */ struct TestConfig {
        1264  +
    /* StructureGenerator.kt:231 */
        1265  +
    #[allow(missing_docs)] // documentation missing in model
        1266  +
    pub timeout: ::std::option::Option<i32>,
        1267  +
    /* StructureGenerator.kt:201 */
        1268  +
}
        1269  +
/* StructureGenerator.kt:135 */
        1270  +
impl TestConfig {
        1271  +
    /* StructureGenerator.kt:231 */
        1272  +
    #[allow(missing_docs)] // documentation missing in model
        1273  +
                           /* StructureGenerator.kt:166 */
        1274  +
    pub fn timeout(&self) -> ::std::option::Option<i32> {
        1275  +
        /* StructureGenerator.kt:168 */
        1276  +
        self.timeout
        1277  +
        /* StructureGenerator.kt:166 */
        1278  +
    }
        1279  +
    /* StructureGenerator.kt:135 */
        1280  +
}
        1281  +
/* ServerCodegenVisitor.kt:356 */
        1282  +
impl TestConfig {
        1283  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
        1284  +
    /* ServerBuilderGenerator.kt:295 */
        1285  +
    pub fn builder() -> crate::model::test_config::Builder {
        1286  +
        /* ServerBuilderGenerator.kt:296 */
        1287  +
        crate::model::test_config::Builder::default()
        1288  +
        /* ServerBuilderGenerator.kt:295 */
        1289  +
    }
        1290  +
    /* ServerCodegenVisitor.kt:356 */
        1291  +
}
        1292  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        1293  +
impl crate::constrained::Constrained for crate::model::TestConfig {
        1294  +
    type Unconstrained = crate::model::test_config::Builder;
        1295  +
}
        1296  +
        1297  +
/* StructureGenerator.kt:197 */
        1298  +
#[allow(missing_docs)] // documentation missing in model
        1299  +
/* RustType.kt:534 */
        1300  +
#[derive(
        1301  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1302  +
)]
        1303  +
pub /* StructureGenerator.kt:201 */ struct PayloadConfig {
        1304  +
    /* StructureGenerator.kt:231 */
        1305  +
    #[allow(missing_docs)] // documentation missing in model
        1306  +
    pub data: ::std::option::Option<i32>,
        1307  +
    /* StructureGenerator.kt:201 */
        1308  +
}
        1309  +
/* StructureGenerator.kt:135 */
        1310  +
impl PayloadConfig {
        1311  +
    /* StructureGenerator.kt:231 */
        1312  +
    #[allow(missing_docs)] // documentation missing in model
        1313  +
                           /* StructureGenerator.kt:166 */
        1314  +
    pub fn data(&self) -> ::std::option::Option<i32> {
        1315  +
        /* StructureGenerator.kt:168 */
        1316  +
        self.data
        1317  +
        /* StructureGenerator.kt:166 */
        1318  +
    }
        1319  +
    /* StructureGenerator.kt:135 */
        1320  +
}
        1321  +
/* ServerCodegenVisitor.kt:356 */
        1322  +
impl PayloadConfig {
        1323  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
        1324  +
    /* ServerBuilderGenerator.kt:295 */
        1325  +
    pub fn builder() -> crate::model::payload_config::Builder {
        1326  +
        /* ServerBuilderGenerator.kt:296 */
        1327  +
        crate::model::payload_config::Builder::default()
        1328  +
        /* ServerBuilderGenerator.kt:295 */
        1329  +
    }
        1330  +
    /* ServerCodegenVisitor.kt:356 */
        1331  +
}
        1332  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        1333  +
impl crate::constrained::Constrained for crate::model::PayloadConfig {
        1334  +
    type Unconstrained = crate::model::payload_config::Builder;
        1335  +
}
        1336  +
        1337  +
/* StructureGenerator.kt:197 */
        1338  +
#[allow(missing_docs)] // documentation missing in model
        1339  +
/* RustType.kt:534 */
        1340  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1341  +
pub /* StructureGenerator.kt:201 */ struct Defaults {
        1342  +
    /* StructureGenerator.kt:231 */
        1343  +
    #[allow(missing_docs)] // documentation missing in model
        1344  +
    pub default_string: ::std::string::String,
        1345  +
    /* StructureGenerator.kt:231 */
        1346  +
    #[allow(missing_docs)] // documentation missing in model
        1347  +
    pub default_boolean: bool,
        1348  +
    /* StructureGenerator.kt:231 */
        1349  +
    #[allow(missing_docs)] // documentation missing in model
        1350  +
    pub default_list: ::std::vec::Vec<::std::string::String>,
        1351  +
    /* StructureGenerator.kt:231 */
        1352  +
    #[allow(missing_docs)] // documentation missing in model
        1353  +
    pub default_document_map: ::aws_smithy_types::Document,
        1354  +
    /* StructureGenerator.kt:231 */
        1355  +
    #[allow(missing_docs)] // documentation missing in model
        1356  +
    pub default_document_string: ::aws_smithy_types::Document,
        1357  +
    /* StructureGenerator.kt:231 */
        1358  +
    #[allow(missing_docs)] // documentation missing in model
        1359  +
    pub default_document_boolean: ::aws_smithy_types::Document,
        1360  +
    /* StructureGenerator.kt:231 */
        1361  +
    #[allow(missing_docs)] // documentation missing in model
        1362  +
    pub default_document_list: ::aws_smithy_types::Document,
        1363  +
    /* StructureGenerator.kt:231 */
        1364  +
    #[allow(missing_docs)] // documentation missing in model
        1365  +
    pub default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
        1366  +
    /* StructureGenerator.kt:231 */
        1367  +
    #[allow(missing_docs)] // documentation missing in model
        1368  +
    pub default_timestamp: ::aws_smithy_types::DateTime,
        1369  +
    /* StructureGenerator.kt:231 */
        1370  +
    #[allow(missing_docs)] // documentation missing in model
        1371  +
    pub default_blob: ::aws_smithy_types::Blob,
        1372  +
    /* StructureGenerator.kt:231 */
        1373  +
    #[allow(missing_docs)] // documentation missing in model
        1374  +
    pub default_byte: i8,
        1375  +
    /* StructureGenerator.kt:231 */
        1376  +
    #[allow(missing_docs)] // documentation missing in model
        1377  +
    pub default_short: i16,
        1378  +
    /* StructureGenerator.kt:231 */
        1379  +
    #[allow(missing_docs)] // documentation missing in model
        1380  +
    pub default_integer: i32,
        1381  +
    /* StructureGenerator.kt:231 */
        1382  +
    #[allow(missing_docs)] // documentation missing in model
        1383  +
    pub default_long: i64,
        1384  +
    /* StructureGenerator.kt:231 */
        1385  +
    #[allow(missing_docs)] // documentation missing in model
        1386  +
    pub default_float: f32,
        1387  +
    /* StructureGenerator.kt:231 */
        1388  +
    #[allow(missing_docs)] // documentation missing in model
        1389  +
    pub default_double: f64,
        1390  +
    /* StructureGenerator.kt:231 */
        1391  +
    #[allow(missing_docs)] // documentation missing in model
        1392  +
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        1393  +
    /* StructureGenerator.kt:231 */
        1394  +
    #[allow(missing_docs)] // documentation missing in model
        1395  +
    pub default_enum: crate::model::TestEnum,
        1396  +
    /* StructureGenerator.kt:231 */
        1397  +
    #[allow(missing_docs)] // documentation missing in model
        1398  +
    pub default_int_enum: i32,
        1399  +
    /* StructureGenerator.kt:231 */
        1400  +
    #[allow(missing_docs)] // documentation missing in model
        1401  +
    pub empty_string: ::std::string::String,
        1402  +
    /* StructureGenerator.kt:231 */
        1403  +
    #[allow(missing_docs)] // documentation missing in model
        1404  +
    pub false_boolean: bool,
        1405  +
    /* StructureGenerator.kt:231 */
        1406  +
    #[allow(missing_docs)] // documentation missing in model
        1407  +
    pub empty_blob: ::aws_smithy_types::Blob,
        1408  +
    /* StructureGenerator.kt:231 */
        1409  +
    #[allow(missing_docs)] // documentation missing in model
        1410  +
    pub zero_byte: i8,
  451   1411   
    /* StructureGenerator.kt:231 */
  452   1412   
    #[allow(missing_docs)] // documentation missing in model
  453   1413   
    pub zero_short: i16,
  454   1414   
    /* StructureGenerator.kt:231 */
  455   1415   
    #[allow(missing_docs)] // documentation missing in model
  456   1416   
    pub zero_integer: i32,
  457   1417   
    /* StructureGenerator.kt:231 */
  458   1418   
    #[allow(missing_docs)] // documentation missing in model
  459   1419   
    pub zero_long: i64,
  460   1420   
    /* StructureGenerator.kt:231 */
@@ -588,1548 +4920,6477 @@
  608   1568   
        /* StructureGenerator.kt:166 */
  609   1569   
    }
  610   1570   
    /* StructureGenerator.kt:231 */
  611   1571   
    #[allow(missing_docs)] // documentation missing in model
  612   1572   
                           /* StructureGenerator.kt:166 */
  613   1573   
    pub fn default_enum(&self) -> &crate::model::TestEnum {
  614   1574   
        /* StructureGenerator.kt:172 */
  615   1575   
        &self.default_enum
  616   1576   
        /* StructureGenerator.kt:166 */
  617   1577   
    }
  618         -
    /* StructureGenerator.kt:231 */
  619         -
    #[allow(missing_docs)] // documentation missing in model
  620         -
                           /* StructureGenerator.kt:166 */
  621         -
    pub fn default_int_enum(&self) -> i32 {
  622         -
        /* StructureGenerator.kt:168 */
  623         -
        self.default_int_enum
  624         -
        /* StructureGenerator.kt:166 */
        1578  +
    /* StructureGenerator.kt:231 */
        1579  +
    #[allow(missing_docs)] // documentation missing in model
        1580  +
                           /* StructureGenerator.kt:166 */
        1581  +
    pub fn default_int_enum(&self) -> i32 {
        1582  +
        /* StructureGenerator.kt:168 */
        1583  +
        self.default_int_enum
        1584  +
        /* StructureGenerator.kt:166 */
        1585  +
    }
        1586  +
    /* StructureGenerator.kt:231 */
        1587  +
    #[allow(missing_docs)] // documentation missing in model
        1588  +
                           /* StructureGenerator.kt:166 */
        1589  +
    pub fn empty_string(&self) -> &str {
        1590  +
        /* StructureGenerator.kt:171 */
        1591  +
        use std::ops::Deref;
        1592  +
        self.empty_string.deref()
        1593  +
        /* StructureGenerator.kt:166 */
        1594  +
    }
        1595  +
    /* StructureGenerator.kt:231 */
        1596  +
    #[allow(missing_docs)] // documentation missing in model
        1597  +
                           /* StructureGenerator.kt:166 */
        1598  +
    pub fn false_boolean(&self) -> bool {
        1599  +
        /* StructureGenerator.kt:168 */
        1600  +
        self.false_boolean
        1601  +
        /* StructureGenerator.kt:166 */
        1602  +
    }
        1603  +
    /* StructureGenerator.kt:231 */
        1604  +
    #[allow(missing_docs)] // documentation missing in model
        1605  +
                           /* StructureGenerator.kt:166 */
        1606  +
    pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
        1607  +
        /* StructureGenerator.kt:172 */
        1608  +
        &self.empty_blob
        1609  +
        /* StructureGenerator.kt:166 */
        1610  +
    }
        1611  +
    /* StructureGenerator.kt:231 */
        1612  +
    #[allow(missing_docs)] // documentation missing in model
        1613  +
                           /* StructureGenerator.kt:166 */
        1614  +
    pub fn zero_byte(&self) -> i8 {
        1615  +
        /* StructureGenerator.kt:168 */
        1616  +
        self.zero_byte
        1617  +
        /* StructureGenerator.kt:166 */
        1618  +
    }
        1619  +
    /* StructureGenerator.kt:231 */
        1620  +
    #[allow(missing_docs)] // documentation missing in model
        1621  +
                           /* StructureGenerator.kt:166 */
        1622  +
    pub fn zero_short(&self) -> i16 {
        1623  +
        /* StructureGenerator.kt:168 */
        1624  +
        self.zero_short
        1625  +
        /* StructureGenerator.kt:166 */
        1626  +
    }
        1627  +
    /* StructureGenerator.kt:231 */
        1628  +
    #[allow(missing_docs)] // documentation missing in model
        1629  +
                           /* StructureGenerator.kt:166 */
        1630  +
    pub fn zero_integer(&self) -> i32 {
        1631  +
        /* StructureGenerator.kt:168 */
        1632  +
        self.zero_integer
        1633  +
        /* StructureGenerator.kt:166 */
        1634  +
    }
        1635  +
    /* StructureGenerator.kt:231 */
        1636  +
    #[allow(missing_docs)] // documentation missing in model
        1637  +
                           /* StructureGenerator.kt:166 */
        1638  +
    pub fn zero_long(&self) -> i64 {
        1639  +
        /* StructureGenerator.kt:168 */
        1640  +
        self.zero_long
        1641  +
        /* StructureGenerator.kt:166 */
        1642  +
    }
        1643  +
    /* StructureGenerator.kt:231 */
        1644  +
    #[allow(missing_docs)] // documentation missing in model
        1645  +
                           /* StructureGenerator.kt:166 */
        1646  +
    pub fn zero_float(&self) -> f32 {
        1647  +
        /* StructureGenerator.kt:168 */
        1648  +
        self.zero_float
        1649  +
        /* StructureGenerator.kt:166 */
        1650  +
    }
        1651  +
    /* StructureGenerator.kt:231 */
        1652  +
    #[allow(missing_docs)] // documentation missing in model
        1653  +
                           /* StructureGenerator.kt:166 */
        1654  +
    pub fn zero_double(&self) -> f64 {
        1655  +
        /* StructureGenerator.kt:168 */
        1656  +
        self.zero_double
        1657  +
        /* StructureGenerator.kt:166 */
        1658  +
    }
        1659  +
    /* StructureGenerator.kt:135 */
        1660  +
}
        1661  +
/* ServerCodegenVisitor.kt:356 */
        1662  +
impl Defaults {
        1663  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
        1664  +
    /* ServerBuilderGenerator.kt:295 */
        1665  +
    pub fn builder() -> crate::model::defaults::Builder {
        1666  +
        /* ServerBuilderGenerator.kt:296 */
        1667  +
        crate::model::defaults::Builder::default()
        1668  +
        /* ServerBuilderGenerator.kt:295 */
        1669  +
    }
        1670  +
    /* ServerCodegenVisitor.kt:356 */
        1671  +
}
        1672  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        1673  +
impl crate::constrained::Constrained for crate::model::Defaults {
        1674  +
    type Unconstrained = crate::model::defaults::Builder;
        1675  +
}
        1676  +
        1677  +
/* StructureGenerator.kt:197 */
        1678  +
#[allow(missing_docs)] // documentation missing in model
        1679  +
/* RustType.kt:534 */
        1680  +
#[derive(
        1681  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1682  +
)]
        1683  +
pub /* StructureGenerator.kt:201 */ struct ClientOptionalDefaults {
        1684  +
    /* StructureGenerator.kt:231 */
        1685  +
    #[allow(missing_docs)] // documentation missing in model
        1686  +
    pub member: i32,
        1687  +
    /* StructureGenerator.kt:201 */
        1688  +
}
        1689  +
/* StructureGenerator.kt:135 */
        1690  +
impl ClientOptionalDefaults {
        1691  +
    /* StructureGenerator.kt:231 */
        1692  +
    #[allow(missing_docs)] // documentation missing in model
        1693  +
                           /* StructureGenerator.kt:166 */
        1694  +
    pub fn member(&self) -> i32 {
        1695  +
        /* StructureGenerator.kt:168 */
        1696  +
        self.member
        1697  +
        /* StructureGenerator.kt:166 */
        1698  +
    }
        1699  +
    /* StructureGenerator.kt:135 */
        1700  +
}
        1701  +
/* ServerCodegenVisitor.kt:356 */
        1702  +
impl ClientOptionalDefaults {
        1703  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        1704  +
    /* ServerBuilderGenerator.kt:295 */
        1705  +
    pub fn builder() -> crate::model::client_optional_defaults::Builder {
        1706  +
        /* ServerBuilderGenerator.kt:296 */
        1707  +
        crate::model::client_optional_defaults::Builder::default()
        1708  +
        /* ServerBuilderGenerator.kt:295 */
        1709  +
    }
        1710  +
    /* ServerCodegenVisitor.kt:356 */
        1711  +
}
        1712  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        1713  +
impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
        1714  +
    type Unconstrained = crate::model::client_optional_defaults::Builder;
        1715  +
}
        1716  +
        1717  +
/* EnumGenerator.kt:181 */
        1718  +
#[allow(missing_docs)] // documentation missing in model
        1719  +
/* RustType.kt:534 */
        1720  +
#[derive(
        1721  +
    ::std::clone::Clone,
        1722  +
    ::std::cmp::Eq,
        1723  +
    ::std::cmp::Ord,
        1724  +
    ::std::cmp::PartialEq,
        1725  +
    ::std::cmp::PartialOrd,
        1726  +
    ::std::fmt::Debug,
        1727  +
    ::std::hash::Hash,
        1728  +
)]
        1729  +
pub /* EnumGenerator.kt:298 */ enum TestEnum {
        1730  +
    /* EnumGenerator.kt:181 */
        1731  +
    #[allow(missing_docs)] // documentation missing in model
        1732  +
    /* EnumGenerator.kt:170 */
        1733  +
    Bar,
        1734  +
    /* EnumGenerator.kt:181 */
        1735  +
    #[allow(missing_docs)] // documentation missing in model
        1736  +
    /* EnumGenerator.kt:170 */
        1737  +
    Baz,
        1738  +
    /* EnumGenerator.kt:181 */
        1739  +
    #[allow(missing_docs)] // documentation missing in model
        1740  +
    /* EnumGenerator.kt:170 */
        1741  +
    Foo,
        1742  +
    /* EnumGenerator.kt:298 */
        1743  +
}
        1744  +
/// /* CodegenDelegator.kt:52 */See [`TestEnum`](crate::model::TestEnum).
        1745  +
pub mod test_enum {
        1746  +
    #[derive(Debug, PartialEq)]
        1747  +
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
        1748  +
        1749  +
    impl ::std::fmt::Display for ConstraintViolation {
        1750  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        1751  +
            write!(
        1752  +
                f,
        1753  +
                r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
        1754  +
            )
        1755  +
        }
        1756  +
    }
        1757  +
        1758  +
    impl ::std::error::Error for ConstraintViolation {}
        1759  +
    impl ConstraintViolation {
        1760  +
        pub(crate) fn as_validation_exception_field(
        1761  +
            self,
        1762  +
            path: ::std::string::String,
        1763  +
        ) -> crate::model::ValidationExceptionField {
        1764  +
            crate::model::ValidationExceptionField {
        1765  +
                message: format!(
        1766  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
        1767  +
                    &path
        1768  +
                ),
        1769  +
                path,
        1770  +
            }
        1771  +
        }
        1772  +
    }
        1773  +
        1774  +
    /* ServerEnumGenerator.kt:47 */
        1775  +
}
        1776  +
/* ServerEnumGenerator.kt:88 */
        1777  +
impl ::std::convert::TryFrom<&str> for TestEnum {
        1778  +
    type Error = crate::model::test_enum::ConstraintViolation;
        1779  +
    fn try_from(
        1780  +
        s: &str,
        1781  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
        1782  +
        match s {
        1783  +
            "BAR" => Ok(TestEnum::Bar),
        1784  +
            "BAZ" => Ok(TestEnum::Baz),
        1785  +
            "FOO" => Ok(TestEnum::Foo),
        1786  +
            _ => Err(crate::model::test_enum::ConstraintViolation(s.to_owned())),
        1787  +
        }
        1788  +
    }
        1789  +
}
        1790  +
impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
        1791  +
    type Error = crate::model::test_enum::ConstraintViolation;
        1792  +
    fn try_from(
        1793  +
        s: ::std::string::String,
        1794  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
        1795  +
    {
        1796  +
        s.as_str().try_into()
        1797  +
    }
        1798  +
}
        1799  +
/* ServerEnumGenerator.kt:148 */
        1800  +
impl std::str::FromStr for TestEnum {
        1801  +
    type Err = crate::model::test_enum::ConstraintViolation;
        1802  +
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
        1803  +
        Self::try_from(s)
        1804  +
    }
        1805  +
}
        1806  +
/* EnumGenerator.kt:309 */
        1807  +
impl TestEnum {
        1808  +
    /// Returns the `&str` value of the enum member.
        1809  +
    pub fn as_str(&self) -> &str {
        1810  +
        match self {
        1811  +
            TestEnum::Bar => "BAR",
        1812  +
            TestEnum::Baz => "BAZ",
        1813  +
            TestEnum::Foo => "FOO",
        1814  +
        }
  625   1815   
    }
  626         -
    /* StructureGenerator.kt:231 */
  627         -
    #[allow(missing_docs)] // documentation missing in model
  628         -
                           /* StructureGenerator.kt:166 */
  629         -
    pub fn empty_string(&self) -> &str {
  630         -
        /* StructureGenerator.kt:171 */
  631         -
        use std::ops::Deref;
  632         -
        self.empty_string.deref()
  633         -
        /* StructureGenerator.kt:166 */
        1816  +
    /// Returns all the `&str` representations of the enum members.
        1817  +
    pub const fn values() -> &'static [&'static str] {
        1818  +
        &["BAR", "BAZ", "FOO"]
  634   1819   
    }
  635         -
    /* StructureGenerator.kt:231 */
  636         -
    #[allow(missing_docs)] // documentation missing in model
  637         -
                           /* StructureGenerator.kt:166 */
  638         -
    pub fn false_boolean(&self) -> bool {
  639         -
        /* StructureGenerator.kt:168 */
  640         -
        self.false_boolean
  641         -
        /* StructureGenerator.kt:166 */
        1820  +
}
        1821  +
/* EnumGenerator.kt:254 */
        1822  +
impl ::std::convert::AsRef<str> for TestEnum {
        1823  +
    fn as_ref(&self) -> &str {
        1824  +
        self.as_str()
  642   1825   
    }
  643         -
    /* StructureGenerator.kt:231 */
  644         -
    #[allow(missing_docs)] // documentation missing in model
  645         -
                           /* StructureGenerator.kt:166 */
  646         -
    pub fn empty_blob(&self) -> &::aws_smithy_types::Blob {
  647         -
        /* StructureGenerator.kt:172 */
  648         -
        &self.empty_blob
  649         -
        /* StructureGenerator.kt:166 */
        1826  +
}
        1827  +
/* ConstrainedTraitForEnumGenerator.kt:36 */
        1828  +
impl crate::constrained::Constrained for TestEnum {
        1829  +
    type Unconstrained = ::std::string::String;
        1830  +
}
        1831  +
        1832  +
impl ::std::convert::From<::std::string::String>
        1833  +
    for crate::constrained::MaybeConstrained<crate::model::TestEnum>
        1834  +
{
        1835  +
    fn from(value: ::std::string::String) -> Self {
        1836  +
        Self::Unconstrained(value)
  650   1837   
    }
        1838  +
}
        1839  +
        1840  +
/* StructureGenerator.kt:197 */
        1841  +
#[allow(missing_docs)] // documentation missing in model
        1842  +
/* RustType.kt:534 */
        1843  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1844  +
pub /* StructureGenerator.kt:201 */ struct TopLevel {
  651   1845   
    /* StructureGenerator.kt:231 */
  652   1846   
    #[allow(missing_docs)] // documentation missing in model
  653         -
                           /* StructureGenerator.kt:166 */
  654         -
    pub fn zero_byte(&self) -> i8 {
  655         -
        /* StructureGenerator.kt:168 */
  656         -
        self.zero_byte
  657         -
        /* StructureGenerator.kt:166 */
  658         -
    }
        1847  +
    pub dialog: crate::model::Dialog,
  659   1848   
    /* StructureGenerator.kt:231 */
  660   1849   
    #[allow(missing_docs)] // documentation missing in model
  661         -
                           /* StructureGenerator.kt:166 */
  662         -
    pub fn zero_short(&self) -> i16 {
  663         -
        /* StructureGenerator.kt:168 */
  664         -
        self.zero_short
  665         -
        /* StructureGenerator.kt:166 */
  666         -
    }
        1850  +
    pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
  667   1851   
    /* StructureGenerator.kt:231 */
  668   1852   
    #[allow(missing_docs)] // documentation missing in model
  669         -
                           /* StructureGenerator.kt:166 */
  670         -
    pub fn zero_integer(&self) -> i32 {
  671         -
        /* StructureGenerator.kt:168 */
  672         -
        self.zero_integer
  673         -
        /* StructureGenerator.kt:166 */
  674         -
    }
        1853  +
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        1854  +
    /* StructureGenerator.kt:201 */
        1855  +
}
        1856  +
/* StructureGenerator.kt:135 */
        1857  +
impl TopLevel {
  675   1858   
    /* StructureGenerator.kt:231 */
  676   1859   
    #[allow(missing_docs)] // documentation missing in model
  677   1860   
                           /* StructureGenerator.kt:166 */
  678         -
    pub fn zero_long(&self) -> i64 {
  679         -
        /* StructureGenerator.kt:168 */
  680         -
        self.zero_long
        1861  +
    pub fn dialog(&self) -> &crate::model::Dialog {
        1862  +
        /* StructureGenerator.kt:172 */
        1863  +
        &self.dialog
  681   1864   
        /* StructureGenerator.kt:166 */
  682   1865   
    }
  683   1866   
    /* StructureGenerator.kt:231 */
  684   1867   
    #[allow(missing_docs)] // documentation missing in model
  685   1868   
                           /* StructureGenerator.kt:166 */
  686         -
    pub fn zero_float(&self) -> f32 {
  687         -
        /* StructureGenerator.kt:168 */
  688         -
        self.zero_float
        1869  +
    pub fn dialog_list(&self) -> &[crate::model::Dialog] {
        1870  +
        /* StructureGenerator.kt:171 */
        1871  +
        use std::ops::Deref;
        1872  +
        self.dialog_list.deref()
  689   1873   
        /* StructureGenerator.kt:166 */
  690   1874   
    }
  691   1875   
    /* StructureGenerator.kt:231 */
  692   1876   
    #[allow(missing_docs)] // documentation missing in model
  693   1877   
                           /* StructureGenerator.kt:166 */
  694         -
    pub fn zero_double(&self) -> f64 {
  695         -
        /* StructureGenerator.kt:168 */
  696         -
        self.zero_double
        1878  +
    pub fn dialog_map(
        1879  +
        &self,
        1880  +
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
        1881  +
        /* StructureGenerator.kt:172 */
        1882  +
        &self.dialog_map
  697   1883   
        /* StructureGenerator.kt:166 */
  698   1884   
    }
  699   1885   
    /* StructureGenerator.kt:135 */
  700   1886   
}
  701   1887   
/* ServerCodegenVisitor.kt:356 */
  702         -
impl Defaults {
  703         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
        1888  +
impl TopLevel {
        1889  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
  704   1890   
    /* ServerBuilderGenerator.kt:295 */
  705         -
    pub fn builder() -> crate::model::defaults::Builder {
        1891  +
    pub fn builder() -> crate::model::top_level::Builder {
  706   1892   
        /* ServerBuilderGenerator.kt:296 */
  707         -
        crate::model::defaults::Builder::default()
        1893  +
        crate::model::top_level::Builder::default()
  708   1894   
        /* ServerBuilderGenerator.kt:295 */
  709   1895   
    }
  710   1896   
    /* ServerCodegenVisitor.kt:356 */
  711   1897   
}
  712   1898   
/* ServerStructureConstrainedTraitImpl.kt:21 */
  713         -
impl crate::constrained::Constrained for crate::model::Defaults {
  714         -
    type Unconstrained = crate::model::defaults::Builder;
        1899  +
impl crate::constrained::Constrained for crate::model::TopLevel {
        1900  +
    type Unconstrained = crate::model::top_level::Builder;
  715   1901   
}
  716   1902   
  717   1903   
/* StructureGenerator.kt:197 */
  718   1904   
#[allow(missing_docs)] // documentation missing in model
  719   1905   
/* RustType.kt:534 */
  720   1906   
#[derive(
  721   1907   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  722   1908   
)]
  723         -
pub /* StructureGenerator.kt:201 */ struct PayloadConfig {
        1909  +
pub /* StructureGenerator.kt:201 */ struct Dialog {
  724   1910   
    /* StructureGenerator.kt:231 */
  725   1911   
    #[allow(missing_docs)] // documentation missing in model
  726         -
    pub data: ::std::option::Option<i32>,
        1912  +
    pub language: ::std::option::Option<::std::string::String>,
        1913  +
    /* StructureGenerator.kt:231 */
        1914  +
    #[allow(missing_docs)] // documentation missing in model
        1915  +
    pub greeting: ::std::string::String,
        1916  +
    /* StructureGenerator.kt:231 */
        1917  +
    #[allow(missing_docs)] // documentation missing in model
        1918  +
    pub farewell: ::std::option::Option<crate::model::Farewell>,
  727   1919   
    /* StructureGenerator.kt:201 */
  728   1920   
}
  729   1921   
/* StructureGenerator.kt:135 */
  730         -
impl PayloadConfig {
        1922  +
impl Dialog {
  731   1923   
    /* StructureGenerator.kt:231 */
  732   1924   
    #[allow(missing_docs)] // documentation missing in model
  733   1925   
                           /* StructureGenerator.kt:166 */
  734         -
    pub fn data(&self) -> ::std::option::Option<i32> {
  735         -
        /* StructureGenerator.kt:168 */
  736         -
        self.data
        1926  +
    pub fn language(&self) -> ::std::option::Option<&str> {
        1927  +
        /* StructureGenerator.kt:169 */
        1928  +
        self.language.as_deref()
  737   1929   
        /* StructureGenerator.kt:166 */
  738   1930   
    }
  739         -
    /* StructureGenerator.kt:135 */
  740         -
}
  741         -
/* ServerCodegenVisitor.kt:356 */
  742         -
impl PayloadConfig {
  743         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
  744         -
    /* ServerBuilderGenerator.kt:295 */
  745         -
    pub fn builder() -> crate::model::payload_config::Builder {
  746         -
        /* ServerBuilderGenerator.kt:296 */
  747         -
        crate::model::payload_config::Builder::default()
  748         -
        /* ServerBuilderGenerator.kt:295 */
  749         -
    }
  750         -
    /* ServerCodegenVisitor.kt:356 */
  751         -
}
  752         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
  753         -
impl crate::constrained::Constrained for crate::model::PayloadConfig {
  754         -
    type Unconstrained = crate::model::payload_config::Builder;
  755         -
}
  756         -
  757         -
/* StructureGenerator.kt:197 */
  758         -
#[allow(missing_docs)] // documentation missing in model
  759         -
/* RustType.kt:534 */
  760         -
#[derive(
  761         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  762         -
)]
  763         -
pub /* StructureGenerator.kt:201 */ struct TestConfig {
  764   1931   
    /* StructureGenerator.kt:231 */
  765   1932   
    #[allow(missing_docs)] // documentation missing in model
  766         -
    pub timeout: ::std::option::Option<i32>,
  767         -
    /* StructureGenerator.kt:201 */
  768         -
}
  769         -
/* StructureGenerator.kt:135 */
  770         -
impl TestConfig {
        1933  +
                           /* StructureGenerator.kt:166 */
        1934  +
    pub fn greeting(&self) -> &str {
        1935  +
        /* StructureGenerator.kt:171 */
        1936  +
        use std::ops::Deref;
        1937  +
        self.greeting.deref()
        1938  +
        /* StructureGenerator.kt:166 */
        1939  +
    }
  771   1940   
    /* StructureGenerator.kt:231 */
  772   1941   
    #[allow(missing_docs)] // documentation missing in model
  773   1942   
                           /* StructureGenerator.kt:166 */
  774         -
    pub fn timeout(&self) -> ::std::option::Option<i32> {
  775         -
        /* StructureGenerator.kt:168 */
  776         -
        self.timeout
        1943  +
    pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
        1944  +
        /* StructureGenerator.kt:170 */
        1945  +
        self.farewell.as_ref()
  777   1946   
        /* StructureGenerator.kt:166 */
  778   1947   
    }
  779   1948   
    /* StructureGenerator.kt:135 */
  780   1949   
}
  781   1950   
/* ServerCodegenVisitor.kt:356 */
  782         -
impl TestConfig {
  783         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
        1951  +
impl Dialog {
        1952  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
  784   1953   
    /* ServerBuilderGenerator.kt:295 */
  785         -
    pub fn builder() -> crate::model::test_config::Builder {
        1954  +
    pub fn builder() -> crate::model::dialog::Builder {
  786   1955   
        /* ServerBuilderGenerator.kt:296 */
  787         -
        crate::model::test_config::Builder::default()
        1956  +
        crate::model::dialog::Builder::default()
  788   1957   
        /* ServerBuilderGenerator.kt:295 */
  789   1958   
    }
  790   1959   
    /* ServerCodegenVisitor.kt:356 */
  791   1960   
}
  792   1961   
/* ServerStructureConstrainedTraitImpl.kt:21 */
  793         -
impl crate::constrained::Constrained for crate::model::TestConfig {
  794         -
    type Unconstrained = crate::model::test_config::Builder;
        1962  +
impl crate::constrained::Constrained for crate::model::Dialog {
        1963  +
    type Unconstrained = crate::model::dialog::Builder;
  795   1964   
}
  796   1965   
  797   1966   
/* UnionGenerator.kt:67 */
  798   1967   
#[allow(missing_docs)] // documentation missing in model
  799   1968   
/* RustType.kt:534 */
  800         -
#[derive(
  801         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  802         -
)]
  803         -
pub /* UnionGenerator.kt:85 */ enum SimpleUnion {
        1969  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1970  +
pub /* UnionGenerator.kt:85 */ enum EventStream {
  804   1971   
    /* UnionGenerator.kt:90 */
  805   1972   
    #[allow(missing_docs)] // documentation missing in model
  806   1973   
    /* UnionGenerator.kt:190 */
  807         -
    Int(i32),
        1974  +
    BlobPayload(crate::model::BlobPayloadEvent),
  808   1975   
    /* UnionGenerator.kt:90 */
  809   1976   
    #[allow(missing_docs)] // documentation missing in model
  810   1977   
    /* UnionGenerator.kt:190 */
  811         -
    String(::std::string::String),
        1978  +
    Headers(crate::model::HeadersEvent),
        1979  +
    /* UnionGenerator.kt:90 */
        1980  +
    #[allow(missing_docs)] // documentation missing in model
        1981  +
    /* UnionGenerator.kt:190 */
        1982  +
    HeadersAndExplicitPayload(crate::model::HeadersAndExplicitPayloadEvent),
        1983  +
    /* UnionGenerator.kt:90 */
        1984  +
    #[allow(missing_docs)] // documentation missing in model
        1985  +
    /* UnionGenerator.kt:190 */
        1986  +
    HeadersAndImplicitPayload(crate::model::HeadersAndImplicitPayloadEvent),
        1987  +
    /* UnionGenerator.kt:90 */
        1988  +
    #[allow(missing_docs)] // documentation missing in model
        1989  +
    /* UnionGenerator.kt:190 */
        1990  +
    StringPayload(crate::model::StringPayloadEvent),
        1991  +
    /* UnionGenerator.kt:90 */
        1992  +
    #[allow(missing_docs)] // documentation missing in model
        1993  +
    /* UnionGenerator.kt:190 */
        1994  +
    StructurePayload(crate::model::StructurePayloadEvent),
        1995  +
    /* UnionGenerator.kt:90 */
        1996  +
    #[allow(missing_docs)] // documentation missing in model
        1997  +
    /* UnionGenerator.kt:190 */
        1998  +
    UnionPayload(crate::model::UnionPayloadEvent),
  812   1999   
    /* UnionGenerator.kt:85 */
  813   2000   
}
  814   2001   
/* UnionGenerator.kt:111 */
  815         -
impl SimpleUnion {
        2002  +
impl EventStream {
        2003  +
    /* UnionGenerator.kt:217 */
        2004  +
    /// Tries to convert the enum instance into [`BlobPayload`](crate::model::EventStream::BlobPayload), extracting the inner [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        2005  +
    /* UnionGenerator.kt:222 */
        2006  +
    /// Returns `Err(&Self)` if it can't be converted.
        2007  +
    /* UnionGenerator.kt:223 */
        2008  +
    pub fn as_blob_payload(&self) -> ::std::result::Result<&crate::model::BlobPayloadEvent, &Self> {
        2009  +
        /* UnionGenerator.kt:227 */
        2010  +
        if let EventStream::BlobPayload(val) = &self {
        2011  +
            ::std::result::Result::Ok(val)
        2012  +
        } else {
        2013  +
            ::std::result::Result::Err(self)
        2014  +
        }
        2015  +
        /* UnionGenerator.kt:223 */
        2016  +
    }
        2017  +
    /* UnionGenerator.kt:121 */
        2018  +
    /// Returns true if this is a [`BlobPayload`](crate::model::EventStream::BlobPayload).
        2019  +
    /* UnionGenerator.kt:122 */
        2020  +
    pub fn is_blob_payload(&self) -> bool {
        2021  +
        /* UnionGenerator.kt:123 */
        2022  +
        self.as_blob_payload().is_ok()
        2023  +
        /* UnionGenerator.kt:122 */
        2024  +
    }
        2025  +
    /* UnionGenerator.kt:217 */
        2026  +
    /// Tries to convert the enum instance into [`Headers`](crate::model::EventStream::Headers), extracting the inner [`HeadersEvent`](crate::model::HeadersEvent).
        2027  +
    /* UnionGenerator.kt:222 */
        2028  +
    /// Returns `Err(&Self)` if it can't be converted.
        2029  +
    /* UnionGenerator.kt:223 */
        2030  +
    pub fn as_headers(&self) -> ::std::result::Result<&crate::model::HeadersEvent, &Self> {
        2031  +
        /* UnionGenerator.kt:227 */
        2032  +
        if let EventStream::Headers(val) = &self {
        2033  +
            ::std::result::Result::Ok(val)
        2034  +
        } else {
        2035  +
            ::std::result::Result::Err(self)
        2036  +
        }
        2037  +
        /* UnionGenerator.kt:223 */
        2038  +
    }
        2039  +
    /* UnionGenerator.kt:121 */
        2040  +
    /// Returns true if this is a [`Headers`](crate::model::EventStream::Headers).
        2041  +
    /* UnionGenerator.kt:122 */
        2042  +
    pub fn is_headers(&self) -> bool {
        2043  +
        /* UnionGenerator.kt:123 */
        2044  +
        self.as_headers().is_ok()
        2045  +
        /* UnionGenerator.kt:122 */
        2046  +
    }
        2047  +
    /* UnionGenerator.kt:217 */
        2048  +
    /// Tries to convert the enum instance into [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload), extracting the inner [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        2049  +
    /* UnionGenerator.kt:222 */
        2050  +
    /// Returns `Err(&Self)` if it can't be converted.
        2051  +
    /* UnionGenerator.kt:223 */
        2052  +
    pub fn as_headers_and_explicit_payload(
        2053  +
        &self,
        2054  +
    ) -> ::std::result::Result<&crate::model::HeadersAndExplicitPayloadEvent, &Self> {
        2055  +
        /* UnionGenerator.kt:227 */
        2056  +
        if let EventStream::HeadersAndExplicitPayload(val) = &self {
        2057  +
            ::std::result::Result::Ok(val)
        2058  +
        } else {
        2059  +
            ::std::result::Result::Err(self)
        2060  +
        }
        2061  +
        /* UnionGenerator.kt:223 */
        2062  +
    }
        2063  +
    /* UnionGenerator.kt:121 */
        2064  +
    /// Returns true if this is a [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload).
        2065  +
    /* UnionGenerator.kt:122 */
        2066  +
    pub fn is_headers_and_explicit_payload(&self) -> bool {
        2067  +
        /* UnionGenerator.kt:123 */
        2068  +
        self.as_headers_and_explicit_payload().is_ok()
        2069  +
        /* UnionGenerator.kt:122 */
        2070  +
    }
  816   2071   
    /* UnionGenerator.kt:217 */
  817         -
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
        2072  +
    /// Tries to convert the enum instance into [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload), extracting the inner [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
  818   2073   
    /* UnionGenerator.kt:222 */
  819   2074   
    /// Returns `Err(&Self)` if it can't be converted.
  820   2075   
    /* UnionGenerator.kt:223 */
  821         -
    pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
        2076  +
    pub fn as_headers_and_implicit_payload(
        2077  +
        &self,
        2078  +
    ) -> ::std::result::Result<&crate::model::HeadersAndImplicitPayloadEvent, &Self> {
  822   2079   
        /* UnionGenerator.kt:227 */
  823         -
        if let SimpleUnion::Int(val) = &self {
        2080  +
        if let EventStream::HeadersAndImplicitPayload(val) = &self {
  824   2081   
            ::std::result::Result::Ok(val)
  825   2082   
        } else {
  826   2083   
            ::std::result::Result::Err(self)
  827   2084   
        }
  828   2085   
        /* UnionGenerator.kt:223 */
  829   2086   
    }
  830   2087   
    /* UnionGenerator.kt:121 */
  831         -
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
        2088  +
    /// Returns true if this is a [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload).
  832   2089   
    /* UnionGenerator.kt:122 */
  833         -
    pub fn is_int(&self) -> bool {
        2090  +
    pub fn is_headers_and_implicit_payload(&self) -> bool {
  834   2091   
        /* UnionGenerator.kt:123 */
  835         -
        self.as_int().is_ok()
        2092  +
        self.as_headers_and_implicit_payload().is_ok()
  836   2093   
        /* UnionGenerator.kt:122 */
  837   2094   
    }
  838   2095   
    /* UnionGenerator.kt:217 */
  839         -
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
        2096  +
    /// Tries to convert the enum instance into [`StringPayload`](crate::model::EventStream::StringPayload), extracting the inner [`StringPayloadEvent`](crate::model::StringPayloadEvent).
  840   2097   
    /* UnionGenerator.kt:222 */
  841   2098   
    /// Returns `Err(&Self)` if it can't be converted.
  842   2099   
    /* UnionGenerator.kt:223 */
  843         -
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        2100  +
    pub fn as_string_payload(
        2101  +
        &self,
        2102  +
    ) -> ::std::result::Result<&crate::model::StringPayloadEvent, &Self> {
  844   2103   
        /* UnionGenerator.kt:227 */
  845         -
        if let SimpleUnion::String(val) = &self {
        2104  +
        if let EventStream::StringPayload(val) = &self {
  846   2105   
            ::std::result::Result::Ok(val)
  847   2106   
        } else {
  848   2107   
            ::std::result::Result::Err(self)
  849   2108   
        }
  850   2109   
        /* UnionGenerator.kt:223 */
  851   2110   
    }
  852   2111   
    /* UnionGenerator.kt:121 */
  853         -
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
        2112  +
    /// Returns true if this is a [`StringPayload`](crate::model::EventStream::StringPayload).
  854   2113   
    /* UnionGenerator.kt:122 */
  855         -
    pub fn is_string(&self) -> bool {
        2114  +
    pub fn is_string_payload(&self) -> bool {
  856   2115   
        /* UnionGenerator.kt:123 */
  857         -
        self.as_string().is_ok()
        2116  +
        self.as_string_payload().is_ok()
  858   2117   
        /* UnionGenerator.kt:122 */
  859   2118   
    }
  860         -
    /* UnionGenerator.kt:111 */
  861         -
}
  862         -
  863         -
/* UnionGenerator.kt:67 */
  864         -
#[allow(missing_docs)] // documentation missing in model
  865         -
/* RustType.kt:534 */
  866         -
#[derive(
  867         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  868         -
)]
  869         -
pub /* UnionGenerator.kt:85 */ enum UnionWithJsonName {
  870         -
    /* UnionGenerator.kt:90 */
  871         -
    #[allow(missing_docs)] // documentation missing in model
  872         -
    /* UnionGenerator.kt:190 */
  873         -
    Bar(::std::string::String),
  874         -
    /* UnionGenerator.kt:90 */
  875         -
    #[allow(missing_docs)] // documentation missing in model
  876         -
    /* UnionGenerator.kt:190 */
  877         -
    Baz(::std::string::String),
  878         -
    /* UnionGenerator.kt:90 */
  879         -
    #[allow(missing_docs)] // documentation missing in model
  880         -
    /* UnionGenerator.kt:190 */
  881         -
    Foo(::std::string::String),
  882         -
    /* UnionGenerator.kt:85 */
  883         -
}
  884         -
/* UnionGenerator.kt:111 */
  885         -
impl UnionWithJsonName {
  886   2119   
    /* UnionGenerator.kt:217 */
  887         -
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
        2120  +
    /// Tries to convert the enum instance into [`StructurePayload`](crate::model::EventStream::StructurePayload), extracting the inner [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
  888   2121   
    /* UnionGenerator.kt:222 */
  889   2122   
    /// Returns `Err(&Self)` if it can't be converted.
  890   2123   
    /* UnionGenerator.kt:223 */
  891         -
    pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        2124  +
    pub fn as_structure_payload(
        2125  +
        &self,
        2126  +
    ) -> ::std::result::Result<&crate::model::StructurePayloadEvent, &Self> {
  892   2127   
        /* UnionGenerator.kt:227 */
  893         -
        if let UnionWithJsonName::Bar(val) = &self {
        2128  +
        if let EventStream::StructurePayload(val) = &self {
  894   2129   
            ::std::result::Result::Ok(val)
  895   2130   
        } else {
  896   2131   
            ::std::result::Result::Err(self)
  897   2132   
        }
  898   2133   
        /* UnionGenerator.kt:223 */
  899   2134   
    }
  900   2135   
    /* UnionGenerator.kt:121 */
  901         -
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
        2136  +
    /// Returns true if this is a [`StructurePayload`](crate::model::EventStream::StructurePayload).
  902   2137   
    /* UnionGenerator.kt:122 */
  903         -
    pub fn is_bar(&self) -> bool {
        2138  +
    pub fn is_structure_payload(&self) -> bool {
  904   2139   
        /* UnionGenerator.kt:123 */
  905         -
        self.as_bar().is_ok()
        2140  +
        self.as_structure_payload().is_ok()
  906   2141   
        /* UnionGenerator.kt:122 */
  907   2142   
    }
  908   2143   
    /* UnionGenerator.kt:217 */
  909         -
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
        2144  +
    /// Tries to convert the enum instance into [`UnionPayload`](crate::model::EventStream::UnionPayload), extracting the inner [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
  910   2145   
    /* UnionGenerator.kt:222 */
  911   2146   
    /// Returns `Err(&Self)` if it can't be converted.
  912   2147   
    /* UnionGenerator.kt:223 */
  913         -
    pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        2148  +
    pub fn as_union_payload(
        2149  +
        &self,
        2150  +
    ) -> ::std::result::Result<&crate::model::UnionPayloadEvent, &Self> {
  914   2151   
        /* UnionGenerator.kt:227 */
  915         -
        if let UnionWithJsonName::Baz(val) = &self {
        2152  +
        if let EventStream::UnionPayload(val) = &self {
  916   2153   
            ::std::result::Result::Ok(val)
  917   2154   
        } else {
  918   2155   
            ::std::result::Result::Err(self)
  919   2156   
        }
  920   2157   
        /* UnionGenerator.kt:223 */
  921   2158   
    }
  922   2159   
    /* UnionGenerator.kt:121 */
  923         -
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
        2160  +
    /// Returns true if this is a [`UnionPayload`](crate::model::EventStream::UnionPayload).
  924   2161   
    /* UnionGenerator.kt:122 */
  925         -
    pub fn is_baz(&self) -> bool {
        2162  +
    pub fn is_union_payload(&self) -> bool {
  926   2163   
        /* UnionGenerator.kt:123 */
  927         -
        self.as_baz().is_ok()
        2164  +
        self.as_union_payload().is_ok()
  928   2165   
        /* UnionGenerator.kt:122 */
  929   2166   
    }
        2167  +
    /* UnionGenerator.kt:111 */
        2168  +
}
        2169  +
        2170  +
/* UnionGenerator.kt:67 */
        2171  +
#[allow(missing_docs)] // documentation missing in model
        2172  +
/* RustType.kt:534 */
        2173  +
#[derive(
        2174  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2175  +
)]
        2176  +
pub /* UnionGenerator.kt:85 */ enum SingletonEventStream {
        2177  +
    /* UnionGenerator.kt:90 */
        2178  +
    #[allow(missing_docs)] // documentation missing in model
        2179  +
    /* UnionGenerator.kt:190 */
        2180  +
    Singleton(crate::model::SingletonEvent),
        2181  +
    /* UnionGenerator.kt:85 */
        2182  +
}
        2183  +
/* UnionGenerator.kt:111 */
        2184  +
impl SingletonEventStream {
        2185  +
    /* RustType.kt:534 */
        2186  +
    #[allow(irrefutable_let_patterns)]
  930   2187   
    /* UnionGenerator.kt:217 */
  931         -
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
        2188  +
    /// Tries to convert the enum instance into [`Singleton`](crate::model::SingletonEventStream::Singleton), extracting the inner [`SingletonEvent`](crate::model::SingletonEvent).
  932   2189   
    /* UnionGenerator.kt:222 */
  933   2190   
    /// Returns `Err(&Self)` if it can't be converted.
  934   2191   
    /* UnionGenerator.kt:223 */
  935         -
    pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        2192  +
    pub fn as_singleton(&self) -> ::std::result::Result<&crate::model::SingletonEvent, &Self> {
  936   2193   
        /* UnionGenerator.kt:227 */
  937         -
        if let UnionWithJsonName::Foo(val) = &self {
        2194  +
        if let SingletonEventStream::Singleton(val) = &self {
  938   2195   
            ::std::result::Result::Ok(val)
  939   2196   
        } else {
  940   2197   
            ::std::result::Result::Err(self)
  941   2198   
        }
  942   2199   
        /* UnionGenerator.kt:223 */
  943   2200   
    }
  944   2201   
    /* UnionGenerator.kt:121 */
  945         -
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
        2202  +
    /// Returns true if this is a [`Singleton`](crate::model::SingletonEventStream::Singleton).
  946   2203   
    /* UnionGenerator.kt:122 */
  947         -
    pub fn is_foo(&self) -> bool {
        2204  +
    pub fn is_singleton(&self) -> bool {
  948   2205   
        /* UnionGenerator.kt:123 */
  949         -
        self.as_foo().is_ok()
        2206  +
        self.as_singleton().is_ok()
  950   2207   
        /* UnionGenerator.kt:122 */
  951   2208   
    }
  952         -
    /* UnionGenerator.kt:111 */
        2209  +
    /* UnionGenerator.kt:111 */
        2210  +
}
        2211  +
        2212  +
/// /* StructureGenerator.kt:197 */Describes one specific validation failure for an input member.
        2213  +
/* RustType.kt:534 */
        2214  +
#[derive(
        2215  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2216  +
)]
        2217  +
pub /* StructureGenerator.kt:201 */ struct ValidationExceptionField {
        2218  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        2219  +
    pub path: ::std::string::String,
        2220  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
        2221  +
    pub message: ::std::string::String,
        2222  +
    /* StructureGenerator.kt:201 */
        2223  +
}
        2224  +
/* StructureGenerator.kt:135 */
        2225  +
impl ValidationExceptionField {
        2226  +
    /// /* StructureGenerator.kt:231 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        2227  +
    /* StructureGenerator.kt:166 */
        2228  +
    pub fn path(&self) -> &str {
        2229  +
        /* StructureGenerator.kt:171 */
        2230  +
        use std::ops::Deref;
        2231  +
        self.path.deref()
        2232  +
        /* StructureGenerator.kt:166 */
        2233  +
    }
        2234  +
    /// /* StructureGenerator.kt:231 */A detailed description of the validation failure.
        2235  +
    /* StructureGenerator.kt:166 */
        2236  +
    pub fn message(&self) -> &str {
        2237  +
        /* StructureGenerator.kt:171 */
        2238  +
        use std::ops::Deref;
        2239  +
        self.message.deref()
        2240  +
        /* StructureGenerator.kt:166 */
        2241  +
    }
        2242  +
    /* StructureGenerator.kt:135 */
        2243  +
}
        2244  +
/* ServerCodegenVisitor.kt:356 */
        2245  +
impl ValidationExceptionField {
        2246  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        2247  +
    /* ServerBuilderGenerator.kt:295 */
        2248  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
        2249  +
        /* ServerBuilderGenerator.kt:296 */
        2250  +
        crate::model::validation_exception_field::Builder::default()
        2251  +
        /* ServerBuilderGenerator.kt:295 */
        2252  +
    }
        2253  +
    /* ServerCodegenVisitor.kt:356 */
        2254  +
}
        2255  +
        2256  +
/* StructureGenerator.kt:197 */
        2257  +
#[allow(missing_docs)] // documentation missing in model
        2258  +
/* RustType.kt:534 */
        2259  +
#[derive(
        2260  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2261  +
)]
        2262  +
pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested2 {
        2263  +
    /* StructureGenerator.kt:231 */
        2264  +
    #[allow(missing_docs)] // documentation missing in model
        2265  +
    pub bar: ::std::option::Option<::std::string::String>,
        2266  +
    /* StructureGenerator.kt:231 */
        2267  +
    #[allow(missing_docs)] // documentation missing in model
        2268  +
    pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        2269  +
    /* StructureGenerator.kt:201 */
        2270  +
}
        2271  +
/* StructureGenerator.kt:135 */
        2272  +
impl RecursiveShapesInputOutputNested2 {
        2273  +
    /* StructureGenerator.kt:231 */
        2274  +
    #[allow(missing_docs)] // documentation missing in model
        2275  +
                           /* StructureGenerator.kt:166 */
        2276  +
    pub fn bar(&self) -> ::std::option::Option<&str> {
        2277  +
        /* StructureGenerator.kt:169 */
        2278  +
        self.bar.as_deref()
        2279  +
        /* StructureGenerator.kt:166 */
        2280  +
    }
        2281  +
    /* StructureGenerator.kt:231 */
        2282  +
    #[allow(missing_docs)] // documentation missing in model
        2283  +
                           /* StructureGenerator.kt:166 */
        2284  +
    pub fn recursive_member(
        2285  +
        &self,
        2286  +
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
        2287  +
        /* StructureGenerator.kt:170 */
        2288  +
        self.recursive_member.as_ref()
        2289  +
        /* StructureGenerator.kt:166 */
        2290  +
    }
        2291  +
    /* StructureGenerator.kt:135 */
        2292  +
}
        2293  +
/* ServerCodegenVisitor.kt:356 */
        2294  +
impl RecursiveShapesInputOutputNested2 {
        2295  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        2296  +
    /* ServerBuilderGenerator.kt:295 */
        2297  +
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
        2298  +
        /* ServerBuilderGenerator.kt:296 */
        2299  +
        crate::model::recursive_shapes_input_output_nested2::Builder::default()
        2300  +
        /* ServerBuilderGenerator.kt:295 */
        2301  +
    }
        2302  +
    /* ServerCodegenVisitor.kt:356 */
        2303  +
}
        2304  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2305  +
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
        2306  +
    type Unconstrained = crate::model::recursive_shapes_input_output_nested2::Builder;
        2307  +
}
        2308  +
        2309  +
/* StructureGenerator.kt:197 */
        2310  +
#[allow(missing_docs)] // documentation missing in model
        2311  +
/* RustType.kt:534 */
        2312  +
#[derive(
        2313  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2314  +
)]
        2315  +
pub /* StructureGenerator.kt:201 */ struct StructureListMember {
        2316  +
    /* StructureGenerator.kt:231 */
        2317  +
    #[allow(missing_docs)] // documentation missing in model
        2318  +
    pub a: ::std::option::Option<::std::string::String>,
        2319  +
    /* StructureGenerator.kt:231 */
        2320  +
    #[allow(missing_docs)] // documentation missing in model
        2321  +
    pub b: ::std::option::Option<::std::string::String>,
        2322  +
    /* StructureGenerator.kt:201 */
        2323  +
}
        2324  +
/* StructureGenerator.kt:135 */
        2325  +
impl StructureListMember {
        2326  +
    /* StructureGenerator.kt:231 */
        2327  +
    #[allow(missing_docs)] // documentation missing in model
        2328  +
                           /* StructureGenerator.kt:166 */
        2329  +
    pub fn a(&self) -> ::std::option::Option<&str> {
        2330  +
        /* StructureGenerator.kt:169 */
        2331  +
        self.a.as_deref()
        2332  +
        /* StructureGenerator.kt:166 */
        2333  +
    }
        2334  +
    /* StructureGenerator.kt:231 */
        2335  +
    #[allow(missing_docs)] // documentation missing in model
        2336  +
                           /* StructureGenerator.kt:166 */
        2337  +
    pub fn b(&self) -> ::std::option::Option<&str> {
        2338  +
        /* StructureGenerator.kt:169 */
        2339  +
        self.b.as_deref()
        2340  +
        /* StructureGenerator.kt:166 */
        2341  +
    }
        2342  +
    /* StructureGenerator.kt:135 */
        2343  +
}
        2344  +
/* ServerCodegenVisitor.kt:356 */
        2345  +
impl StructureListMember {
        2346  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
        2347  +
    /* ServerBuilderGenerator.kt:295 */
        2348  +
    pub fn builder() -> crate::model::structure_list_member::Builder {
        2349  +
        /* ServerBuilderGenerator.kt:296 */
        2350  +
        crate::model::structure_list_member::Builder::default()
        2351  +
        /* ServerBuilderGenerator.kt:295 */
        2352  +
    }
        2353  +
    /* ServerCodegenVisitor.kt:356 */
        2354  +
}
        2355  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2356  +
impl crate::constrained::Constrained for crate::model::StructureListMember {
        2357  +
    type Unconstrained = crate::model::structure_list_member::Builder;
        2358  +
}
        2359  +
        2360  +
/* StructureGenerator.kt:197 */
        2361  +
#[allow(missing_docs)] // documentation missing in model
        2362  +
/* RustType.kt:534 */
        2363  +
#[derive(
        2364  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2365  +
)]
        2366  +
pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
        2367  +
    /* StructureGenerator.kt:231 */
        2368  +
    #[allow(missing_docs)] // documentation missing in model
        2369  +
    pub hi: ::std::option::Option<::std::string::String>,
        2370  +
    /* StructureGenerator.kt:201 */
        2371  +
}
        2372  +
/* StructureGenerator.kt:135 */
        2373  +
impl GreetingStruct {
        2374  +
    /* StructureGenerator.kt:231 */
        2375  +
    #[allow(missing_docs)] // documentation missing in model
        2376  +
                           /* StructureGenerator.kt:166 */
        2377  +
    pub fn hi(&self) -> ::std::option::Option<&str> {
        2378  +
        /* StructureGenerator.kt:169 */
        2379  +
        self.hi.as_deref()
        2380  +
        /* StructureGenerator.kt:166 */
        2381  +
    }
        2382  +
    /* StructureGenerator.kt:135 */
        2383  +
}
        2384  +
/* ServerCodegenVisitor.kt:356 */
        2385  +
impl GreetingStruct {
        2386  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
        2387  +
    /* ServerBuilderGenerator.kt:295 */
        2388  +
    pub fn builder() -> crate::model::greeting_struct::Builder {
        2389  +
        /* ServerBuilderGenerator.kt:296 */
        2390  +
        crate::model::greeting_struct::Builder::default()
        2391  +
        /* ServerBuilderGenerator.kt:295 */
        2392  +
    }
        2393  +
    /* ServerCodegenVisitor.kt:356 */
        2394  +
}
        2395  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2396  +
impl crate::constrained::Constrained for crate::model::GreetingStruct {
        2397  +
    type Unconstrained = crate::model::greeting_struct::Builder;
  953   2398   
}
  954   2399   
  955         -
/* UnionGenerator.kt:67 */
        2400  +
/* StructureGenerator.kt:197 */
  956   2401   
#[allow(missing_docs)] // documentation missing in model
  957   2402   
/* RustType.kt:534 */
  958   2403   
#[derive(
  959   2404   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  960   2405   
)]
  961         -
pub /* UnionGenerator.kt:85 */ enum PlayerAction {
  962         -
    /// /* UnionGenerator.kt:90 */Quit the game.
  963         -
    /* UnionGenerator.kt:188 */
  964         -
    Quit,
  965         -
    /* UnionGenerator.kt:85 */
        2406  +
pub /* StructureGenerator.kt:201 */ struct RenamedGreeting {
        2407  +
    /* StructureGenerator.kt:231 */
        2408  +
    #[allow(missing_docs)] // documentation missing in model
        2409  +
    pub salutation: ::std::option::Option<::std::string::String>,
        2410  +
    /* StructureGenerator.kt:201 */
  966   2411   
}
  967         -
/* UnionGenerator.kt:111 */
  968         -
impl PlayerAction {
  969         -
    /* RustType.kt:534 */
  970         -
    #[allow(irrefutable_let_patterns)]
  971         -
    /* UnionGenerator.kt:203 */
  972         -
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
  973         -
    /* UnionGenerator.kt:207 */
  974         -
    /// Returns `Err(&Self)` if it can't be converted.
  975         -
    /* UnionGenerator.kt:208 */
  976         -
    pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
  977         -
        /* UnionGenerator.kt:209 */
  978         -
        if let PlayerAction::Quit = &self {
  979         -
            ::std::result::Result::Ok(())
  980         -
        } else {
  981         -
            ::std::result::Result::Err(self)
  982         -
        }
  983         -
        /* UnionGenerator.kt:208 */
        2412  +
/* StructureGenerator.kt:135 */
        2413  +
impl RenamedGreeting {
        2414  +
    /* StructureGenerator.kt:231 */
        2415  +
    #[allow(missing_docs)] // documentation missing in model
        2416  +
                           /* StructureGenerator.kt:166 */
        2417  +
    pub fn salutation(&self) -> ::std::option::Option<&str> {
        2418  +
        /* StructureGenerator.kt:169 */
        2419  +
        self.salutation.as_deref()
        2420  +
        /* StructureGenerator.kt:166 */
  984   2421   
    }
  985         -
    /* UnionGenerator.kt:121 */
  986         -
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
  987         -
    /* UnionGenerator.kt:122 */
  988         -
    pub fn is_quit(&self) -> bool {
  989         -
        /* UnionGenerator.kt:123 */
  990         -
        self.as_quit().is_ok()
  991         -
        /* UnionGenerator.kt:122 */
        2422  +
    /* StructureGenerator.kt:135 */
        2423  +
}
        2424  +
/* ServerCodegenVisitor.kt:356 */
        2425  +
impl RenamedGreeting {
        2426  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
        2427  +
    /* ServerBuilderGenerator.kt:295 */
        2428  +
    pub fn builder() -> crate::model::renamed_greeting::Builder {
        2429  +
        /* ServerBuilderGenerator.kt:296 */
        2430  +
        crate::model::renamed_greeting::Builder::default()
        2431  +
        /* ServerBuilderGenerator.kt:295 */
  992   2432   
    }
  993         -
    /* UnionGenerator.kt:111 */
        2433  +
    /* ServerCodegenVisitor.kt:356 */
        2434  +
}
        2435  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2436  +
impl crate::constrained::Constrained for crate::model::RenamedGreeting {
        2437  +
    type Unconstrained = crate::model::renamed_greeting::Builder;
  994   2438   
}
  995   2439   
  996   2440   
/* StructureGenerator.kt:197 */
  997   2441   
#[allow(missing_docs)] // documentation missing in model
  998   2442   
/* RustType.kt:534 */
  999   2443   
#[derive(
 1000   2444   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1001   2445   
)]
 1002   2446   
pub /* StructureGenerator.kt:201 */ struct Unit {/* StructureGenerator.kt:201 */}
 1003   2447   
/* ServerCodegenVisitor.kt:356 */
 1004   2448   
impl Unit {
 1005   2449   
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
 1006   2450   
    /* ServerBuilderGenerator.kt:295 */
 1007   2451   
    pub fn builder() -> crate::model::unit::Builder {
 1008   2452   
        /* ServerBuilderGenerator.kt:296 */
 1009   2453   
        crate::model::unit::Builder::default()
 1010   2454   
        /* ServerBuilderGenerator.kt:295 */
 1011   2455   
    }
 1012   2456   
    /* ServerCodegenVisitor.kt:356 */
 1013   2457   
}
 1014   2458   
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1015   2459   
impl crate::constrained::Constrained for crate::model::Unit {
 1016   2460   
    type Unconstrained = crate::model::unit::Builder;
 1017   2461   
}
 1018   2462   
 1019         -
/// /* UnionGenerator.kt:67 */A union with a representative set of types for members.
        2463  +
/* StructureGenerator.kt:197 */
        2464  +
#[allow(missing_docs)] // documentation missing in model
 1020   2465   
/* RustType.kt:534 */
 1021         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
 1022         -
pub /* UnionGenerator.kt:85 */ enum MyUnion {
 1023         -
    /* UnionGenerator.kt:90 */
 1024         -
    #[allow(missing_docs)] // documentation missing in model
 1025         -
    /* UnionGenerator.kt:190 */
 1026         -
    BlobValue(::aws_smithy_types::Blob),
 1027         -
    /* UnionGenerator.kt:90 */
 1028         -
    #[allow(missing_docs)] // documentation missing in model
 1029         -
    /* UnionGenerator.kt:190 */
 1030         -
    BooleanValue(bool),
 1031         -
    /* UnionGenerator.kt:90 */
 1032         -
    #[allow(missing_docs)] // documentation missing in model
 1033         -
    /* UnionGenerator.kt:190 */
 1034         -
    EnumValue(crate::model::FooEnum),
 1035         -
    /* UnionGenerator.kt:90 */
 1036         -
    #[allow(missing_docs)] // documentation missing in model
 1037         -
    /* UnionGenerator.kt:190 */
 1038         -
    ListValue(::std::vec::Vec<::std::string::String>),
 1039         -
    /* UnionGenerator.kt:90 */
 1040         -
    #[allow(missing_docs)] // documentation missing in model
 1041         -
    /* UnionGenerator.kt:190 */
 1042         -
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
 1043         -
    /* UnionGenerator.kt:90 */
 1044         -
    #[allow(missing_docs)] // documentation missing in model
 1045         -
    /* UnionGenerator.kt:190 */
 1046         -
    NumberValue(i32),
 1047         -
    /* UnionGenerator.kt:90 */
 1048         -
    #[allow(missing_docs)] // documentation missing in model
 1049         -
    /* UnionGenerator.kt:190 */
 1050         -
    RenamedStructureValue(crate::model::RenamedGreeting),
 1051         -
    /* UnionGenerator.kt:90 */
 1052         -
    #[allow(missing_docs)] // documentation missing in model
 1053         -
    /* UnionGenerator.kt:190 */
 1054         -
    StringValue(::std::string::String),
 1055         -
    /* UnionGenerator.kt:90 */
 1056         -
    #[allow(missing_docs)] // documentation missing in model
 1057         -
    /* UnionGenerator.kt:190 */
 1058         -
    StructureValue(crate::model::GreetingStruct),
 1059         -
    /* UnionGenerator.kt:90 */
 1060         -
    #[allow(missing_docs)] // documentation missing in model
 1061         -
    /* UnionGenerator.kt:190 */
 1062         -
    TimestampValue(::aws_smithy_types::DateTime),
 1063         -
    /* UnionGenerator.kt:85 */
 1064         -
}
 1065         -
/* UnionGenerator.kt:111 */
 1066         -
impl MyUnion {
 1067         -
    /* UnionGenerator.kt:217 */
 1068         -
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_types::Blob).
 1069         -
    /* UnionGenerator.kt:222 */
 1070         -
    /// Returns `Err(&Self)` if it can't be converted.
 1071         -
    /* UnionGenerator.kt:223 */
 1072         -
    pub fn as_blob_value(&self) -> ::std::result::Result<&::aws_smithy_types::Blob, &Self> {
 1073         -
        /* UnionGenerator.kt:227 */
 1074         -
        if let MyUnion::BlobValue(val) = &self {
 1075         -
            ::std::result::Result::Ok(val)
 1076         -
        } else {
 1077         -
            ::std::result::Result::Err(self)
 1078         -
        }
 1079         -
        /* UnionGenerator.kt:223 */
 1080         -
    }
 1081         -
    /* UnionGenerator.kt:121 */
 1082         -
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
 1083         -
    /* UnionGenerator.kt:122 */
 1084         -
    pub fn is_blob_value(&self) -> bool {
 1085         -
        /* UnionGenerator.kt:123 */
 1086         -
        self.as_blob_value().is_ok()
 1087         -
        /* UnionGenerator.kt:122 */
 1088         -
    }
 1089         -
    /* UnionGenerator.kt:217 */
 1090         -
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
 1091         -
    /* UnionGenerator.kt:222 */
 1092         -
    /// Returns `Err(&Self)` if it can't be converted.
 1093         -
    /* UnionGenerator.kt:223 */
 1094         -
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
 1095         -
        /* UnionGenerator.kt:227 */
 1096         -
        if let MyUnion::BooleanValue(val) = &self {
 1097         -
            ::std::result::Result::Ok(val)
 1098         -
        } else {
 1099         -
            ::std::result::Result::Err(self)
 1100         -
        }
 1101         -
        /* UnionGenerator.kt:223 */
 1102         -
    }
 1103         -
    /* UnionGenerator.kt:121 */
 1104         -
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
 1105         -
    /* UnionGenerator.kt:122 */
 1106         -
    pub fn is_boolean_value(&self) -> bool {
 1107         -
        /* UnionGenerator.kt:123 */
 1108         -
        self.as_boolean_value().is_ok()
 1109         -
        /* UnionGenerator.kt:122 */
 1110         -
    }
 1111         -
    /* UnionGenerator.kt:217 */
 1112         -
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
 1113         -
    /* UnionGenerator.kt:222 */
 1114         -
    /// Returns `Err(&Self)` if it can't be converted.
 1115         -
    /* UnionGenerator.kt:223 */
 1116         -
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
 1117         -
        /* UnionGenerator.kt:227 */
 1118         -
        if let MyUnion::EnumValue(val) = &self {
 1119         -
            ::std::result::Result::Ok(val)
 1120         -
        } else {
 1121         -
            ::std::result::Result::Err(self)
 1122         -
        }
 1123         -
        /* UnionGenerator.kt:223 */
 1124         -
    }
 1125         -
    /* UnionGenerator.kt:121 */
 1126         -
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
 1127         -
    /* UnionGenerator.kt:122 */
 1128         -
    pub fn is_enum_value(&self) -> bool {
 1129         -
        /* UnionGenerator.kt:123 */
 1130         -
        self.as_enum_value().is_ok()
 1131         -
        /* UnionGenerator.kt:122 */
 1132         -
    }
 1133         -
    /* UnionGenerator.kt:217 */
 1134         -
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
 1135         -
    /* UnionGenerator.kt:222 */
 1136         -
    /// Returns `Err(&Self)` if it can't be converted.
 1137         -
    /* UnionGenerator.kt:223 */
 1138         -
    pub fn as_list_value(
 1139         -
        &self,
 1140         -
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
 1141         -
        /* UnionGenerator.kt:227 */
 1142         -
        if let MyUnion::ListValue(val) = &self {
 1143         -
            ::std::result::Result::Ok(val)
 1144         -
        } else {
 1145         -
            ::std::result::Result::Err(self)
 1146         -
        }
 1147         -
        /* UnionGenerator.kt:223 */
 1148         -
    }
 1149         -
    /* UnionGenerator.kt:121 */
 1150         -
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
 1151         -
    /* UnionGenerator.kt:122 */
 1152         -
    pub fn is_list_value(&self) -> bool {
 1153         -
        /* UnionGenerator.kt:123 */
 1154         -
        self.as_list_value().is_ok()
 1155         -
        /* UnionGenerator.kt:122 */
 1156         -
    }
 1157         -
    /* UnionGenerator.kt:217 */
 1158         -
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
 1159         -
    /* UnionGenerator.kt:222 */
 1160         -
    /// Returns `Err(&Self)` if it can't be converted.
 1161         -
    /* UnionGenerator.kt:223 */
 1162         -
    pub fn as_map_value(
 1163         -
        &self,
 1164         -
    ) -> ::std::result::Result<
 1165         -
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1166         -
        &Self,
 1167         -
    > {
 1168         -
        /* UnionGenerator.kt:227 */
 1169         -
        if let MyUnion::MapValue(val) = &self {
 1170         -
            ::std::result::Result::Ok(val)
 1171         -
        } else {
 1172         -
            ::std::result::Result::Err(self)
 1173         -
        }
 1174         -
        /* UnionGenerator.kt:223 */
 1175         -
    }
 1176         -
    /* UnionGenerator.kt:121 */
 1177         -
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
 1178         -
    /* UnionGenerator.kt:122 */
 1179         -
    pub fn is_map_value(&self) -> bool {
 1180         -
        /* UnionGenerator.kt:123 */
 1181         -
        self.as_map_value().is_ok()
 1182         -
        /* UnionGenerator.kt:122 */
 1183         -
    }
 1184         -
    /* UnionGenerator.kt:217 */
 1185         -
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
 1186         -
    /* UnionGenerator.kt:222 */
 1187         -
    /// Returns `Err(&Self)` if it can't be converted.
 1188         -
    /* UnionGenerator.kt:223 */
 1189         -
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
 1190         -
        /* UnionGenerator.kt:227 */
 1191         -
        if let MyUnion::NumberValue(val) = &self {
 1192         -
            ::std::result::Result::Ok(val)
 1193         -
        } else {
 1194         -
            ::std::result::Result::Err(self)
        2466  +
#[derive(
        2467  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2468  +
)]
        2469  +
pub /* StructureGenerator.kt:201 */ struct Farewell {
        2470  +
    /* StructureGenerator.kt:231 */
        2471  +
    #[allow(missing_docs)] // documentation missing in model
        2472  +
    pub phrase: ::std::string::String,
        2473  +
    /* StructureGenerator.kt:201 */
        2474  +
}
        2475  +
/* StructureGenerator.kt:135 */
        2476  +
impl Farewell {
        2477  +
    /* StructureGenerator.kt:231 */
        2478  +
    #[allow(missing_docs)] // documentation missing in model
        2479  +
                           /* StructureGenerator.kt:166 */
        2480  +
    pub fn phrase(&self) -> &str {
        2481  +
        /* StructureGenerator.kt:171 */
        2482  +
        use std::ops::Deref;
        2483  +
        self.phrase.deref()
        2484  +
        /* StructureGenerator.kt:166 */
 1195   2485   
    }
 1196         -
        /* UnionGenerator.kt:223 */
        2486  +
    /* StructureGenerator.kt:135 */
        2487  +
}
        2488  +
/* ServerCodegenVisitor.kt:356 */
        2489  +
impl Farewell {
        2490  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
        2491  +
    /* ServerBuilderGenerator.kt:295 */
        2492  +
    pub fn builder() -> crate::model::farewell::Builder {
        2493  +
        /* ServerBuilderGenerator.kt:296 */
        2494  +
        crate::model::farewell::Builder::default()
        2495  +
        /* ServerBuilderGenerator.kt:295 */
 1197   2496   
    }
 1198         -
    /* UnionGenerator.kt:121 */
 1199         -
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
 1200         -
    /* UnionGenerator.kt:122 */
 1201         -
    pub fn is_number_value(&self) -> bool {
 1202         -
        /* UnionGenerator.kt:123 */
 1203         -
        self.as_number_value().is_ok()
 1204         -
        /* UnionGenerator.kt:122 */
        2497  +
    /* ServerCodegenVisitor.kt:356 */
        2498  +
}
        2499  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2500  +
impl crate::constrained::Constrained for crate::model::Farewell {
        2501  +
    type Unconstrained = crate::model::farewell::Builder;
        2502  +
}
        2503  +
        2504  +
/* StructureGenerator.kt:197 */
        2505  +
#[allow(missing_docs)] // documentation missing in model
        2506  +
/* RustType.kt:534 */
        2507  +
#[derive(
        2508  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2509  +
)]
        2510  +
pub /* StructureGenerator.kt:201 */ struct HeadersEvent {
        2511  +
    /* StructureGenerator.kt:231 */
        2512  +
    #[allow(missing_docs)] // documentation missing in model
        2513  +
    pub boolean_header: ::std::option::Option<bool>,
        2514  +
    /* StructureGenerator.kt:231 */
        2515  +
    #[allow(missing_docs)] // documentation missing in model
        2516  +
    pub byte_header: ::std::option::Option<i8>,
        2517  +
    /* StructureGenerator.kt:231 */
        2518  +
    #[allow(missing_docs)] // documentation missing in model
        2519  +
    pub short_header: ::std::option::Option<i16>,
        2520  +
    /* StructureGenerator.kt:231 */
        2521  +
    #[allow(missing_docs)] // documentation missing in model
        2522  +
    pub int_header: ::std::option::Option<i32>,
        2523  +
    /* StructureGenerator.kt:231 */
        2524  +
    #[allow(missing_docs)] // documentation missing in model
        2525  +
    pub long_header: ::std::option::Option<i64>,
        2526  +
    /* StructureGenerator.kt:231 */
        2527  +
    #[allow(missing_docs)] // documentation missing in model
        2528  +
    pub blob_header: ::std::option::Option<::aws_smithy_types::Blob>,
        2529  +
    /* StructureGenerator.kt:231 */
        2530  +
    #[allow(missing_docs)] // documentation missing in model
        2531  +
    pub string_header: ::std::option::Option<::std::string::String>,
        2532  +
    /* StructureGenerator.kt:231 */
        2533  +
    #[allow(missing_docs)] // documentation missing in model
        2534  +
    pub timestamp_header: ::std::option::Option<::aws_smithy_types::DateTime>,
        2535  +
    /* StructureGenerator.kt:201 */
        2536  +
}
        2537  +
/* StructureGenerator.kt:135 */
        2538  +
impl HeadersEvent {
        2539  +
    /* StructureGenerator.kt:231 */
        2540  +
    #[allow(missing_docs)] // documentation missing in model
        2541  +
                           /* StructureGenerator.kt:166 */
        2542  +
    pub fn boolean_header(&self) -> ::std::option::Option<bool> {
        2543  +
        /* StructureGenerator.kt:168 */
        2544  +
        self.boolean_header
        2545  +
        /* StructureGenerator.kt:166 */
 1205   2546   
    }
 1206         -
    /* UnionGenerator.kt:217 */
 1207         -
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
 1208         -
    /* UnionGenerator.kt:222 */
 1209         -
    /// Returns `Err(&Self)` if it can't be converted.
 1210         -
    /* UnionGenerator.kt:223 */
 1211         -
    pub fn as_renamed_structure_value(
 1212         -
        &self,
 1213         -
    ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
 1214         -
        /* UnionGenerator.kt:227 */
 1215         -
        if let MyUnion::RenamedStructureValue(val) = &self {
 1216         -
            ::std::result::Result::Ok(val)
 1217         -
        } else {
 1218         -
            ::std::result::Result::Err(self)
        2547  +
    /* StructureGenerator.kt:231 */
        2548  +
    #[allow(missing_docs)] // documentation missing in model
        2549  +
                           /* StructureGenerator.kt:166 */
        2550  +
    pub fn byte_header(&self) -> ::std::option::Option<i8> {
        2551  +
        /* StructureGenerator.kt:168 */
        2552  +
        self.byte_header
        2553  +
        /* StructureGenerator.kt:166 */
 1219   2554   
    }
 1220         -
        /* UnionGenerator.kt:223 */
        2555  +
    /* StructureGenerator.kt:231 */
        2556  +
    #[allow(missing_docs)] // documentation missing in model
        2557  +
                           /* StructureGenerator.kt:166 */
        2558  +
    pub fn short_header(&self) -> ::std::option::Option<i16> {
        2559  +
        /* StructureGenerator.kt:168 */
        2560  +
        self.short_header
        2561  +
        /* StructureGenerator.kt:166 */
 1221   2562   
    }
 1222         -
    /* UnionGenerator.kt:121 */
 1223         -
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
 1224         -
    /* UnionGenerator.kt:122 */
 1225         -
    pub fn is_renamed_structure_value(&self) -> bool {
 1226         -
        /* UnionGenerator.kt:123 */
 1227         -
        self.as_renamed_structure_value().is_ok()
 1228         -
        /* UnionGenerator.kt:122 */
        2563  +
    /* StructureGenerator.kt:231 */
        2564  +
    #[allow(missing_docs)] // documentation missing in model
        2565  +
                           /* StructureGenerator.kt:166 */
        2566  +
    pub fn int_header(&self) -> ::std::option::Option<i32> {
        2567  +
        /* StructureGenerator.kt:168 */
        2568  +
        self.int_header
        2569  +
        /* StructureGenerator.kt:166 */
 1229   2570   
    }
 1230         -
    /* UnionGenerator.kt:217 */
 1231         -
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
 1232         -
    /* UnionGenerator.kt:222 */
 1233         -
    /// Returns `Err(&Self)` if it can't be converted.
 1234         -
    /* UnionGenerator.kt:223 */
 1235         -
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1236         -
        /* UnionGenerator.kt:227 */
 1237         -
        if let MyUnion::StringValue(val) = &self {
 1238         -
            ::std::result::Result::Ok(val)
 1239         -
        } else {
 1240         -
            ::std::result::Result::Err(self)
        2571  +
    /* StructureGenerator.kt:231 */
        2572  +
    #[allow(missing_docs)] // documentation missing in model
        2573  +
                           /* StructureGenerator.kt:166 */
        2574  +
    pub fn long_header(&self) -> ::std::option::Option<i64> {
        2575  +
        /* StructureGenerator.kt:168 */
        2576  +
        self.long_header
        2577  +
        /* StructureGenerator.kt:166 */
 1241   2578   
    }
 1242         -
        /* UnionGenerator.kt:223 */
        2579  +
    /* StructureGenerator.kt:231 */
        2580  +
    #[allow(missing_docs)] // documentation missing in model
        2581  +
                           /* StructureGenerator.kt:166 */
        2582  +
    pub fn blob_header(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        2583  +
        /* StructureGenerator.kt:170 */
        2584  +
        self.blob_header.as_ref()
        2585  +
        /* StructureGenerator.kt:166 */
 1243   2586   
    }
 1244         -
    /* UnionGenerator.kt:121 */
 1245         -
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
 1246         -
    /* UnionGenerator.kt:122 */
 1247         -
    pub fn is_string_value(&self) -> bool {
 1248         -
        /* UnionGenerator.kt:123 */
 1249         -
        self.as_string_value().is_ok()
 1250         -
        /* UnionGenerator.kt:122 */
        2587  +
    /* StructureGenerator.kt:231 */
        2588  +
    #[allow(missing_docs)] // documentation missing in model
        2589  +
                           /* StructureGenerator.kt:166 */
        2590  +
    pub fn string_header(&self) -> ::std::option::Option<&str> {
        2591  +
        /* StructureGenerator.kt:169 */
        2592  +
        self.string_header.as_deref()
        2593  +
        /* StructureGenerator.kt:166 */
 1251   2594   
    }
 1252         -
    /* UnionGenerator.kt:217 */
 1253         -
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
 1254         -
    /* UnionGenerator.kt:222 */
 1255         -
    /// Returns `Err(&Self)` if it can't be converted.
 1256         -
    /* UnionGenerator.kt:223 */
 1257         -
    pub fn as_structure_value(
 1258         -
        &self,
 1259         -
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
 1260         -
        /* UnionGenerator.kt:227 */
 1261         -
        if let MyUnion::StructureValue(val) = &self {
 1262         -
            ::std::result::Result::Ok(val)
 1263         -
        } else {
 1264         -
            ::std::result::Result::Err(self)
        2595  +
    /* StructureGenerator.kt:231 */
        2596  +
    #[allow(missing_docs)] // documentation missing in model
        2597  +
                           /* StructureGenerator.kt:166 */
        2598  +
    pub fn timestamp_header(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        2599  +
        /* StructureGenerator.kt:170 */
        2600  +
        self.timestamp_header.as_ref()
        2601  +
        /* StructureGenerator.kt:166 */
 1265   2602   
    }
 1266         -
        /* UnionGenerator.kt:223 */
        2603  +
    /* StructureGenerator.kt:135 */
        2604  +
}
        2605  +
/* ServerCodegenVisitor.kt:356 */
        2606  +
impl HeadersEvent {
        2607  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`HeadersEvent`](crate::model::HeadersEvent).
        2608  +
    /* ServerBuilderGenerator.kt:295 */
        2609  +
    pub fn builder() -> crate::model::headers_event::Builder {
        2610  +
        /* ServerBuilderGenerator.kt:296 */
        2611  +
        crate::model::headers_event::Builder::default()
        2612  +
        /* ServerBuilderGenerator.kt:295 */
 1267   2613   
    }
 1268         -
    /* UnionGenerator.kt:121 */
 1269         -
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
 1270         -
    /* UnionGenerator.kt:122 */
 1271         -
    pub fn is_structure_value(&self) -> bool {
 1272         -
        /* UnionGenerator.kt:123 */
 1273         -
        self.as_structure_value().is_ok()
 1274         -
        /* UnionGenerator.kt:122 */
        2614  +
    /* ServerCodegenVisitor.kt:356 */
        2615  +
}
        2616  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2617  +
impl crate::constrained::Constrained for crate::model::HeadersEvent {
        2618  +
    type Unconstrained = crate::model::headers_event::Builder;
        2619  +
}
        2620  +
        2621  +
/* StructureGenerator.kt:197 */
        2622  +
#[allow(missing_docs)] // documentation missing in model
        2623  +
/* RustType.kt:534 */
        2624  +
#[derive(
        2625  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2626  +
)]
        2627  +
pub /* StructureGenerator.kt:201 */ struct BlobPayloadEvent {
        2628  +
    /* StructureGenerator.kt:231 */
        2629  +
    #[allow(missing_docs)] // documentation missing in model
        2630  +
    pub payload: ::std::option::Option<::aws_smithy_types::Blob>,
        2631  +
    /* StructureGenerator.kt:201 */
        2632  +
}
        2633  +
/* StructureGenerator.kt:135 */
        2634  +
impl BlobPayloadEvent {
        2635  +
    /* StructureGenerator.kt:231 */
        2636  +
    #[allow(missing_docs)] // documentation missing in model
        2637  +
                           /* StructureGenerator.kt:166 */
        2638  +
    pub fn payload(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        2639  +
        /* StructureGenerator.kt:170 */
        2640  +
        self.payload.as_ref()
        2641  +
        /* StructureGenerator.kt:166 */
 1275   2642   
    }
 1276         -
    /* UnionGenerator.kt:217 */
 1277         -
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_types::DateTime).
 1278         -
    /* UnionGenerator.kt:222 */
 1279         -
    /// Returns `Err(&Self)` if it can't be converted.
 1280         -
    /* UnionGenerator.kt:223 */
 1281         -
    pub fn as_timestamp_value(
 1282         -
        &self,
 1283         -
    ) -> ::std::result::Result<&::aws_smithy_types::DateTime, &Self> {
 1284         -
        /* UnionGenerator.kt:227 */
 1285         -
        if let MyUnion::TimestampValue(val) = &self {
 1286         -
            ::std::result::Result::Ok(val)
 1287         -
        } else {
 1288         -
            ::std::result::Result::Err(self)
        2643  +
    /* StructureGenerator.kt:135 */
        2644  +
}
        2645  +
/* ServerCodegenVisitor.kt:356 */
        2646  +
impl BlobPayloadEvent {
        2647  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        2648  +
    /* ServerBuilderGenerator.kt:295 */
        2649  +
    pub fn builder() -> crate::model::blob_payload_event::Builder {
        2650  +
        /* ServerBuilderGenerator.kt:296 */
        2651  +
        crate::model::blob_payload_event::Builder::default()
        2652  +
        /* ServerBuilderGenerator.kt:295 */
 1289   2653   
    }
 1290         -
        /* UnionGenerator.kt:223 */
        2654  +
    /* ServerCodegenVisitor.kt:356 */
        2655  +
}
        2656  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2657  +
impl crate::constrained::Constrained for crate::model::BlobPayloadEvent {
        2658  +
    type Unconstrained = crate::model::blob_payload_event::Builder;
        2659  +
}
        2660  +
        2661  +
/* StructureGenerator.kt:197 */
        2662  +
#[allow(missing_docs)] // documentation missing in model
        2663  +
/* RustType.kt:534 */
        2664  +
#[derive(
        2665  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2666  +
)]
        2667  +
pub /* StructureGenerator.kt:201 */ struct StringPayloadEvent {
        2668  +
    /* StructureGenerator.kt:231 */
        2669  +
    #[allow(missing_docs)] // documentation missing in model
        2670  +
    pub payload: ::std::option::Option<::std::string::String>,
        2671  +
    /* StructureGenerator.kt:201 */
        2672  +
}
        2673  +
/* StructureGenerator.kt:135 */
        2674  +
impl StringPayloadEvent {
        2675  +
    /* StructureGenerator.kt:231 */
        2676  +
    #[allow(missing_docs)] // documentation missing in model
        2677  +
                           /* StructureGenerator.kt:166 */
        2678  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
        2679  +
        /* StructureGenerator.kt:169 */
        2680  +
        self.payload.as_deref()
        2681  +
        /* StructureGenerator.kt:166 */
 1291   2682   
    }
 1292         -
    /* UnionGenerator.kt:121 */
 1293         -
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
 1294         -
    /* UnionGenerator.kt:122 */
 1295         -
    pub fn is_timestamp_value(&self) -> bool {
 1296         -
        /* UnionGenerator.kt:123 */
 1297         -
        self.as_timestamp_value().is_ok()
 1298         -
        /* UnionGenerator.kt:122 */
        2683  +
    /* StructureGenerator.kt:135 */
        2684  +
}
        2685  +
/* ServerCodegenVisitor.kt:356 */
        2686  +
impl StringPayloadEvent {
        2687  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        2688  +
    /* ServerBuilderGenerator.kt:295 */
        2689  +
    pub fn builder() -> crate::model::string_payload_event::Builder {
        2690  +
        /* ServerBuilderGenerator.kt:296 */
        2691  +
        crate::model::string_payload_event::Builder::default()
        2692  +
        /* ServerBuilderGenerator.kt:295 */
 1299   2693   
    }
 1300         -
    /* UnionGenerator.kt:111 */
        2694  +
    /* ServerCodegenVisitor.kt:356 */
        2695  +
}
        2696  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2697  +
impl crate::constrained::Constrained for crate::model::StringPayloadEvent {
        2698  +
    type Unconstrained = crate::model::string_payload_event::Builder;
 1301   2699   
}
 1302   2700   
 1303   2701   
/* StructureGenerator.kt:197 */
 1304   2702   
#[allow(missing_docs)] // documentation missing in model
 1305   2703   
/* RustType.kt:534 */
 1306   2704   
#[derive(
 1307   2705   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1308   2706   
)]
 1309         -
pub /* StructureGenerator.kt:201 */ struct RenamedGreeting {
        2707  +
pub /* StructureGenerator.kt:201 */ struct StructurePayloadEvent {
 1310   2708   
    /* StructureGenerator.kt:231 */
 1311   2709   
    #[allow(missing_docs)] // documentation missing in model
 1312         -
    pub salutation: ::std::option::Option<::std::string::String>,
        2710  +
    pub payload: ::std::option::Option<crate::model::PayloadStructure>,
 1313   2711   
    /* StructureGenerator.kt:201 */
 1314   2712   
}
 1315   2713   
/* StructureGenerator.kt:135 */
 1316         -
impl RenamedGreeting {
        2714  +
impl StructurePayloadEvent {
 1317   2715   
    /* StructureGenerator.kt:231 */
 1318   2716   
    #[allow(missing_docs)] // documentation missing in model
 1319   2717   
                           /* StructureGenerator.kt:166 */
 1320         -
    pub fn salutation(&self) -> ::std::option::Option<&str> {
 1321         -
        /* StructureGenerator.kt:169 */
 1322         -
        self.salutation.as_deref()
        2718  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadStructure> {
        2719  +
        /* StructureGenerator.kt:170 */
        2720  +
        self.payload.as_ref()
 1323   2721   
        /* StructureGenerator.kt:166 */
 1324   2722   
    }
 1325   2723   
    /* StructureGenerator.kt:135 */
 1326   2724   
}
 1327   2725   
/* ServerCodegenVisitor.kt:356 */
 1328         -
impl RenamedGreeting {
 1329         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
        2726  +
impl StructurePayloadEvent {
        2727  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
 1330   2728   
    /* ServerBuilderGenerator.kt:295 */
 1331         -
    pub fn builder() -> crate::model::renamed_greeting::Builder {
        2729  +
    pub fn builder() -> crate::model::structure_payload_event::Builder {
 1332   2730   
        /* ServerBuilderGenerator.kt:296 */
 1333         -
        crate::model::renamed_greeting::Builder::default()
        2731  +
        crate::model::structure_payload_event::Builder::default()
 1334   2732   
        /* ServerBuilderGenerator.kt:295 */
 1335   2733   
    }
 1336   2734   
    /* ServerCodegenVisitor.kt:356 */
 1337   2735   
}
 1338   2736   
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1339         -
impl crate::constrained::Constrained for crate::model::RenamedGreeting {
 1340         -
    type Unconstrained = crate::model::renamed_greeting::Builder;
        2737  +
impl crate::constrained::Constrained for crate::model::StructurePayloadEvent {
        2738  +
    type Unconstrained = crate::model::structure_payload_event::Builder;
 1341   2739   
}
 1342   2740   
 1343   2741   
/* StructureGenerator.kt:197 */
 1344   2742   
#[allow(missing_docs)] // documentation missing in model
 1345   2743   
/* RustType.kt:534 */
 1346   2744   
#[derive(
 1347   2745   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1348   2746   
)]
 1349         -
pub /* StructureGenerator.kt:201 */ struct GreetingStruct {
        2747  +
pub /* StructureGenerator.kt:201 */ struct UnionPayloadEvent {
 1350   2748   
    /* StructureGenerator.kt:231 */
 1351   2749   
    #[allow(missing_docs)] // documentation missing in model
 1352         -
    pub hi: ::std::option::Option<::std::string::String>,
        2750  +
    pub payload: ::std::option::Option<crate::model::PayloadUnion>,
 1353   2751   
    /* StructureGenerator.kt:201 */
 1354   2752   
}
 1355   2753   
/* StructureGenerator.kt:135 */
 1356         -
impl GreetingStruct {
        2754  +
impl UnionPayloadEvent {
 1357   2755   
    /* StructureGenerator.kt:231 */
 1358   2756   
    #[allow(missing_docs)] // documentation missing in model
 1359   2757   
                           /* StructureGenerator.kt:166 */
 1360         -
    pub fn hi(&self) -> ::std::option::Option<&str> {
 1361         -
        /* StructureGenerator.kt:169 */
 1362         -
        self.hi.as_deref()
        2758  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadUnion> {
        2759  +
        /* StructureGenerator.kt:170 */
        2760  +
        self.payload.as_ref()
 1363   2761   
        /* StructureGenerator.kt:166 */
 1364   2762   
    }
 1365   2763   
    /* StructureGenerator.kt:135 */
 1366   2764   
}
 1367   2765   
/* ServerCodegenVisitor.kt:356 */
 1368         -
impl GreetingStruct {
 1369         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
        2766  +
impl UnionPayloadEvent {
        2767  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
 1370   2768   
    /* ServerBuilderGenerator.kt:295 */
 1371         -
    pub fn builder() -> crate::model::greeting_struct::Builder {
        2769  +
    pub fn builder() -> crate::model::union_payload_event::Builder {
 1372   2770   
        /* ServerBuilderGenerator.kt:296 */
 1373         -
        crate::model::greeting_struct::Builder::default()
        2771  +
        crate::model::union_payload_event::Builder::default()
 1374   2772   
        /* ServerBuilderGenerator.kt:295 */
 1375   2773   
    }
 1376   2774   
    /* ServerCodegenVisitor.kt:356 */
 1377   2775   
}
 1378   2776   
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1379         -
impl crate::constrained::Constrained for crate::model::GreetingStruct {
 1380         -
    type Unconstrained = crate::model::greeting_struct::Builder;
        2777  +
impl crate::constrained::Constrained for crate::model::UnionPayloadEvent {
        2778  +
    type Unconstrained = crate::model::union_payload_event::Builder;
 1381   2779   
}
 1382   2780   
 1383         -
/* EnumGenerator.kt:181 */
        2781  +
/* StructureGenerator.kt:197 */
 1384   2782   
#[allow(missing_docs)] // documentation missing in model
 1385   2783   
/* RustType.kt:534 */
 1386   2784   
#[derive(
 1387         -
    ::std::clone::Clone,
 1388         -
    ::std::cmp::Eq,
 1389         -
    ::std::cmp::Ord,
 1390         -
    ::std::cmp::PartialEq,
 1391         -
    ::std::cmp::PartialOrd,
 1392         -
    ::std::fmt::Debug,
 1393         -
    ::std::hash::Hash,
        2785  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1394   2786   
)]
 1395         -
pub /* EnumGenerator.kt:298 */ enum FooEnum {
 1396         -
    /* EnumGenerator.kt:181 */
 1397         -
    #[allow(missing_docs)] // documentation missing in model
 1398         -
    /* EnumGenerator.kt:170 */
 1399         -
    Zero,
 1400         -
    /* EnumGenerator.kt:181 */
 1401         -
    #[allow(missing_docs)] // documentation missing in model
 1402         -
    /* EnumGenerator.kt:170 */
 1403         -
    One,
 1404         -
    /* EnumGenerator.kt:181 */
 1405         -
    #[allow(missing_docs)] // documentation missing in model
 1406         -
    /* EnumGenerator.kt:170 */
 1407         -
    Bar,
 1408         -
    /* EnumGenerator.kt:181 */
        2787  +
pub /* StructureGenerator.kt:201 */ struct HeadersAndExplicitPayloadEvent {
        2788  +
    /* StructureGenerator.kt:231 */
 1409   2789   
    #[allow(missing_docs)] // documentation missing in model
 1410         -
    /* EnumGenerator.kt:170 */
 1411         -
    Baz,
 1412         -
    /* EnumGenerator.kt:181 */
        2790  +
    pub header: ::std::option::Option<::std::string::String>,
        2791  +
    /* StructureGenerator.kt:231 */
 1413   2792   
    #[allow(missing_docs)] // documentation missing in model
 1414         -
    /* EnumGenerator.kt:170 */
 1415         -
    Foo,
 1416         -
    /* EnumGenerator.kt:298 */
 1417         -
}
 1418         -
/// /* CodegenDelegator.kt:52 */See [`FooEnum`](crate::model::FooEnum).
 1419         -
pub mod foo_enum {
 1420         -
    #[derive(Debug, PartialEq)]
 1421         -
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
 1422         -
 1423         -
    impl ::std::fmt::Display for ConstraintViolation {
 1424         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1425         -
            write!(
 1426         -
                f,
 1427         -
                r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
 1428         -
            )
 1429         -
        }
 1430         -
    }
 1431         -
 1432         -
    impl ::std::error::Error for ConstraintViolation {}
 1433         -
    impl ConstraintViolation {
 1434         -
        pub(crate) fn as_validation_exception_field(
 1435         -
            self,
 1436         -
            path: ::std::string::String,
 1437         -
        ) -> crate::model::ValidationExceptionField {
 1438         -
            crate::model::ValidationExceptionField {
 1439         -
                message: format!(
 1440         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
 1441         -
                    &path
 1442         -
                ),
 1443         -
                path,
 1444         -
            }
 1445         -
        }
 1446         -
    }
 1447         -
 1448         -
    /* ServerEnumGenerator.kt:47 */
 1449         -
}
 1450         -
/* ServerEnumGenerator.kt:88 */
 1451         -
impl ::std::convert::TryFrom<&str> for FooEnum {
 1452         -
    type Error = crate::model::foo_enum::ConstraintViolation;
 1453         -
    fn try_from(
 1454         -
        s: &str,
 1455         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
 1456         -
        match s {
 1457         -
            "0" => Ok(FooEnum::Zero),
 1458         -
            "1" => Ok(FooEnum::One),
 1459         -
            "Bar" => Ok(FooEnum::Bar),
 1460         -
            "Baz" => Ok(FooEnum::Baz),
 1461         -
            "Foo" => Ok(FooEnum::Foo),
 1462         -
            _ => Err(crate::model::foo_enum::ConstraintViolation(s.to_owned())),
 1463         -
        }
 1464         -
    }
 1465         -
}
 1466         -
impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
 1467         -
    type Error = crate::model::foo_enum::ConstraintViolation;
 1468         -
    fn try_from(
 1469         -
        s: ::std::string::String,
 1470         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
 1471         -
    {
 1472         -
        s.as_str().try_into()
 1473         -
    }
 1474         -
}
 1475         -
/* ServerEnumGenerator.kt:148 */
 1476         -
impl std::str::FromStr for FooEnum {
 1477         -
    type Err = crate::model::foo_enum::ConstraintViolation;
 1478         -
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
 1479         -
        Self::try_from(s)
 1480         -
    }
 1481         -
}
 1482         -
/* EnumGenerator.kt:309 */
 1483         -
impl FooEnum {
 1484         -
    /// Returns the `&str` value of the enum member.
 1485         -
    pub fn as_str(&self) -> &str {
 1486         -
        match self {
 1487         -
            FooEnum::Zero => "0",
 1488         -
            FooEnum::One => "1",
 1489         -
            FooEnum::Bar => "Bar",
 1490         -
            FooEnum::Baz => "Baz",
 1491         -
            FooEnum::Foo => "Foo",
 1492         -
        }
 1493         -
    }
 1494         -
    /// Returns all the `&str` representations of the enum members.
 1495         -
    pub const fn values() -> &'static [&'static str] {
 1496         -
        &["0", "1", "Bar", "Baz", "Foo"]
 1497         -
    }
 1498         -
}
 1499         -
/* EnumGenerator.kt:254 */
 1500         -
impl ::std::convert::AsRef<str> for FooEnum {
 1501         -
    fn as_ref(&self) -> &str {
 1502         -
        self.as_str()
 1503         -
    }
 1504         -
}
 1505         -
/* ConstrainedTraitForEnumGenerator.kt:36 */
 1506         -
impl crate::constrained::Constrained for FooEnum {
 1507         -
    type Unconstrained = ::std::string::String;
 1508         -
}
 1509         -
 1510         -
impl ::std::convert::From<::std::string::String>
 1511         -
    for crate::constrained::MaybeConstrained<crate::model::FooEnum>
 1512         -
{
 1513         -
    fn from(value: ::std::string::String) -> Self {
 1514         -
        Self::Unconstrained(value)
 1515         -
    }
        2793  +
    pub payload: ::std::option::Option<crate::model::PayloadStructure>,
        2794  +
    /* StructureGenerator.kt:201 */
 1516   2795   
}
 1517         -
 1518         -
/* ConstrainedCollectionGenerator.kt:93 */
 1519         -
#[allow(missing_docs)] // documentation missing in model
 1520         -
/// /* ConstrainedCollectionGenerator.kt:94 */
 1521         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 1522         -
/// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
 1523         -
///
 1524         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 1525         -
///
 1526         -
/* RustType.kt:534 */
 1527         -
#[derive(
 1528         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1529         -
)]
 1530         -
pub /* ConstrainedCollectionGenerator.kt:97 */ struct StringSet(
 1531         -
    pub(crate) ::std::vec::Vec<::std::string::String>,
 1532         -
);
 1533         -
/* ConstrainedCollectionGenerator.kt:104 */
 1534         -
impl StringSet {
 1535         -
    /* ConstrainedCollectionGenerator.kt:106 */
 1536         -
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<::std::string::String>`].
 1537         -
    pub fn inner(&self) -> &::std::vec::Vec<::std::string::String> {
 1538         -
        &self.0
 1539         -
    }
 1540         -
    /* ConstrainedCollectionGenerator.kt:116 */
 1541         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
 1542         -
    pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
 1543         -
        self.0
 1544         -
    }
 1545         -
 1546         -
    fn check_unique_items(
 1547         -
        items: ::std::vec::Vec<::std::string::String>,
 1548         -
    ) -> ::std::result::Result<
 1549         -
        ::std::vec::Vec<::std::string::String>,
 1550         -
        crate::model::string_set::ConstraintViolation,
 1551         -
    > {
 1552         -
        let mut seen = ::std::collections::HashMap::new();
 1553         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 1554         -
        for (idx, item) in items.iter().enumerate() {
 1555         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 1556         -
                duplicate_indices.push(prev_idx);
 1557         -
            }
 1558         -
        }
 1559         -
 1560         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 1561         -
        for idx in &duplicate_indices {
 1562         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 1563         -
                last_duplicate_indices.push(prev_idx);
 1564         -
            }
 1565         -
        }
 1566         -
        duplicate_indices.extend(last_duplicate_indices);
 1567         -
 1568         -
        if !duplicate_indices.is_empty() {
 1569         -
            debug_assert!(duplicate_indices.len() >= 2);
 1570         -
            Err(crate::model::string_set::ConstraintViolation::UniqueItems {
 1571         -
                duplicate_indices,
 1572         -
                original: items,
 1573         -
            })
 1574         -
        } else {
 1575         -
            Ok(items)
 1576         -
        }
        2796  +
/* StructureGenerator.kt:135 */
        2797  +
impl HeadersAndExplicitPayloadEvent {
        2798  +
    /* StructureGenerator.kt:231 */
        2799  +
    #[allow(missing_docs)] // documentation missing in model
        2800  +
                           /* StructureGenerator.kt:166 */
        2801  +
    pub fn header(&self) -> ::std::option::Option<&str> {
        2802  +
        /* StructureGenerator.kt:169 */
        2803  +
        self.header.as_deref()
        2804  +
        /* StructureGenerator.kt:166 */
 1577   2805   
    }
 1578         -
    /* ConstrainedCollectionGenerator.kt:104 */
 1579         -
}
 1580         -
/* ConstrainedCollectionGenerator.kt:133 */
 1581         -
impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
 1582         -
    type Error = crate::model::string_set::ConstraintViolation;
 1583         -
 1584         -
    /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
 1585         -
    fn try_from(
 1586         -
        value: ::std::vec::Vec<::std::string::String>,
 1587         -
    ) -> ::std::result::Result<Self, Self::Error> {
 1588         -
        let value = Self::check_unique_items(value)?;
 1589         -
 1590         -
        Ok(Self(value))
        2806  +
    /* StructureGenerator.kt:231 */
        2807  +
    #[allow(missing_docs)] // documentation missing in model
        2808  +
                           /* StructureGenerator.kt:166 */
        2809  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadStructure> {
        2810  +
        /* StructureGenerator.kt:170 */
        2811  +
        self.payload.as_ref()
        2812  +
        /* StructureGenerator.kt:166 */
 1591   2813   
    }
        2814  +
    /* StructureGenerator.kt:135 */
 1592   2815   
}
 1593         -
 1594         -
impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
 1595         -
    fn from(value: StringSet) -> Self {
 1596         -
        value.into_inner()
        2816  +
/* ServerCodegenVisitor.kt:356 */
        2817  +
impl HeadersAndExplicitPayloadEvent {
        2818  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        2819  +
    /* ServerBuilderGenerator.kt:295 */
        2820  +
    pub fn builder() -> crate::model::headers_and_explicit_payload_event::Builder {
        2821  +
        /* ServerBuilderGenerator.kt:296 */
        2822  +
        crate::model::headers_and_explicit_payload_event::Builder::default()
        2823  +
        /* ServerBuilderGenerator.kt:295 */
 1597   2824   
    }
        2825  +
    /* ServerCodegenVisitor.kt:356 */
 1598   2826   
}
 1599         -
/* ConstrainedCollectionGenerator.kt:181 */
 1600         -
impl crate::constrained::Constrained for StringSet {
 1601         -
    type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
        2827  +
/* ServerStructureConstrainedTraitImpl.kt:21 */
        2828  +
impl crate::constrained::Constrained for crate::model::HeadersAndExplicitPayloadEvent {
        2829  +
    type Unconstrained = crate::model::headers_and_explicit_payload_event::Builder;
 1602   2830   
}
 1603   2831   
 1604   2832   
/* StructureGenerator.kt:197 */
 1605   2833   
#[allow(missing_docs)] // documentation missing in model
 1606   2834   
/* RustType.kt:534 */
 1607   2835   
#[derive(
 1608   2836   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1609   2837   
)]
 1610         -
pub /* StructureGenerator.kt:201 */ struct StructureListMember {
        2838  +
pub /* StructureGenerator.kt:201 */ struct HeadersAndImplicitPayloadEvent {
 1611   2839   
    /* StructureGenerator.kt:231 */
 1612   2840   
    #[allow(missing_docs)] // documentation missing in model
 1613         -
    pub a: ::std::option::Option<::std::string::String>,
        2841  +
    pub header: ::std::option::Option<::std::string::String>,
 1614   2842   
    /* StructureGenerator.kt:231 */
 1615   2843   
    #[allow(missing_docs)] // documentation missing in model
 1616         -
    pub b: ::std::option::Option<::std::string::String>,
        2844  +
    pub payload: ::std::option::Option<::std::string::String>,
 1617   2845   
    /* StructureGenerator.kt:201 */
 1618   2846   
}
 1619   2847   
/* StructureGenerator.kt:135 */
 1620         -
impl StructureListMember {
        2848  +
impl HeadersAndImplicitPayloadEvent {
 1621   2849   
    /* StructureGenerator.kt:231 */
 1622   2850   
    #[allow(missing_docs)] // documentation missing in model
 1623   2851   
                           /* StructureGenerator.kt:166 */
 1624         -
    pub fn a(&self) -> ::std::option::Option<&str> {
        2852  +
    pub fn header(&self) -> ::std::option::Option<&str> {
 1625   2853   
        /* StructureGenerator.kt:169 */
 1626         -
        self.a.as_deref()
        2854  +
        self.header.as_deref()
 1627   2855   
        /* StructureGenerator.kt:166 */
 1628   2856   
    }
 1629   2857   
    /* StructureGenerator.kt:231 */
 1630   2858   
    #[allow(missing_docs)] // documentation missing in model
 1631   2859   
                           /* StructureGenerator.kt:166 */
 1632         -
    pub fn b(&self) -> ::std::option::Option<&str> {
        2860  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
 1633   2861   
        /* StructureGenerator.kt:169 */
 1634         -
        self.b.as_deref()
        2862  +
        self.payload.as_deref()
 1635   2863   
        /* StructureGenerator.kt:166 */
 1636   2864   
    }
 1637   2865   
    /* StructureGenerator.kt:135 */
 1638   2866   
}
 1639   2867   
/* ServerCodegenVisitor.kt:356 */
 1640         -
impl StructureListMember {
 1641         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
        2868  +
impl HeadersAndImplicitPayloadEvent {
        2869  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
 1642   2870   
    /* ServerBuilderGenerator.kt:295 */
 1643         -
    pub fn builder() -> crate::model::structure_list_member::Builder {
        2871  +
    pub fn builder() -> crate::model::headers_and_implicit_payload_event::Builder {
 1644   2872   
        /* ServerBuilderGenerator.kt:296 */
 1645         -
        crate::model::structure_list_member::Builder::default()
        2873  +
        crate::model::headers_and_implicit_payload_event::Builder::default()
 1646   2874   
        /* ServerBuilderGenerator.kt:295 */
 1647   2875   
    }
 1648   2876   
    /* ServerCodegenVisitor.kt:356 */
 1649   2877   
}
 1650   2878   
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1651         -
impl crate::constrained::Constrained for crate::model::StructureListMember {
 1652         -
    type Unconstrained = crate::model::structure_list_member::Builder;
        2879  +
impl crate::constrained::Constrained for crate::model::HeadersAndImplicitPayloadEvent {
        2880  +
    type Unconstrained = crate::model::headers_and_implicit_payload_event::Builder;
 1653   2881   
}
 1654   2882   
 1655   2883   
/* StructureGenerator.kt:197 */
 1656   2884   
#[allow(missing_docs)] // documentation missing in model
 1657   2885   
/* RustType.kt:534 */
 1658   2886   
#[derive(
 1659   2887   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1660   2888   
)]
 1661         -
pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested1 {
 1662         -
    /* StructureGenerator.kt:231 */
 1663         -
    #[allow(missing_docs)] // documentation missing in model
 1664         -
    pub foo: ::std::option::Option<::std::string::String>,
        2889  +
pub /* StructureGenerator.kt:201 */ struct SingletonEvent {
 1665   2890   
    /* StructureGenerator.kt:231 */
 1666   2891   
    #[allow(missing_docs)] // documentation missing in model
 1667         -
    pub nested:
 1668         -
        ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
        2892  +
    pub value: ::std::option::Option<::std::string::String>,
 1669   2893   
    /* StructureGenerator.kt:201 */
 1670   2894   
}
 1671   2895   
/* StructureGenerator.kt:135 */
 1672         -
impl RecursiveShapesInputOutputNested1 {
        2896  +
impl SingletonEvent {
 1673   2897   
    /* StructureGenerator.kt:231 */
 1674   2898   
    #[allow(missing_docs)] // documentation missing in model
 1675   2899   
                           /* StructureGenerator.kt:166 */
 1676         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
        2900  +
    pub fn value(&self) -> ::std::option::Option<&str> {
 1677   2901   
        /* StructureGenerator.kt:169 */
 1678         -
        self.foo.as_deref()
        2902  +
        self.value.as_deref()
 1679   2903   
        /* StructureGenerator.kt:166 */
 1680   2904   
    }
        2905  +
    /* StructureGenerator.kt:135 */
        2906  +
}
        2907  +
/* ServerCodegenVisitor.kt:356 */
        2908  +
impl SingletonEvent {
        2909  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`SingletonEvent`](crate::model::SingletonEvent).
        2910  +
    /* ServerBuilderGenerator.kt:295 */
        2911  +
    pub fn builder() -> crate::model::singleton_event::Builder {
        2912  +
        /* ServerBuilderGenerator.kt:296 */
        2913  +
        crate::model::singleton_event::Builder::default()
        2914  +
        /* ServerBuilderGenerator.kt:295 */
        2915  +
    }
        2916  +
    /* ServerCodegenVisitor.kt:356 */
        2917  +
}
        2918  +
        2919  +
/* StructureGenerator.kt:197 */
        2920  +
#[allow(missing_docs)] // documentation missing in model
        2921  +
/* RustType.kt:534 */
        2922  +
#[derive(
        2923  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2924  +
)]
        2925  +
pub /* StructureGenerator.kt:201 */ struct PayloadStructure {
        2926  +
    /* StructureGenerator.kt:231 */
        2927  +
    #[allow(missing_docs)] // documentation missing in model
        2928  +
    pub structure_member: ::std::option::Option<::std::string::String>,
        2929  +
    /* StructureGenerator.kt:201 */
        2930  +
}
        2931  +
/* StructureGenerator.kt:135 */
        2932  +
impl PayloadStructure {
 1681   2933   
    /* StructureGenerator.kt:231 */
 1682   2934   
    #[allow(missing_docs)] // documentation missing in model
 1683   2935   
                           /* StructureGenerator.kt:166 */
 1684         -
    pub fn nested(
 1685         -
        &self,
 1686         -
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
        2936  +
    pub fn structure_member(&self) -> ::std::option::Option<&str> {
 1687   2937   
        /* StructureGenerator.kt:169 */
 1688         -
        self.nested.as_deref()
        2938  +
        self.structure_member.as_deref()
 1689   2939   
        /* StructureGenerator.kt:166 */
 1690   2940   
    }
 1691   2941   
    /* StructureGenerator.kt:135 */
 1692   2942   
}
 1693   2943   
/* ServerCodegenVisitor.kt:356 */
 1694         -
impl RecursiveShapesInputOutputNested1 {
 1695         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        2944  +
impl PayloadStructure {
        2945  +
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`PayloadStructure`](crate::model::PayloadStructure).
 1696   2946   
    /* ServerBuilderGenerator.kt:295 */
 1697         -
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
        2947  +
    pub fn builder() -> crate::model::payload_structure::Builder {
 1698   2948   
        /* ServerBuilderGenerator.kt:296 */
 1699         -
        crate::model::recursive_shapes_input_output_nested1::Builder::default()
        2949  +
        crate::model::payload_structure::Builder::default()
 1700   2950   
        /* ServerBuilderGenerator.kt:295 */
 1701   2951   
    }
 1702   2952   
    /* ServerCodegenVisitor.kt:356 */
 1703   2953   
}
 1704   2954   
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1705         -
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
 1706         -
    type Unconstrained = crate::model::recursive_shapes_input_output_nested1::Builder;
        2955  +
impl crate::constrained::Constrained for crate::model::PayloadStructure {
        2956  +
    type Unconstrained = crate::model::payload_structure::Builder;
 1707   2957   
}
 1708   2958   
 1709         -
/* StructureGenerator.kt:197 */
        2959  +
/* UnionGenerator.kt:67 */
 1710   2960   
#[allow(missing_docs)] // documentation missing in model
 1711   2961   
/* RustType.kt:534 */
 1712   2962   
#[derive(
 1713   2963   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1714   2964   
)]
 1715         -
pub /* StructureGenerator.kt:201 */ struct RecursiveShapesInputOutputNested2 {
 1716         -
    /* StructureGenerator.kt:231 */
        2965  +
pub /* UnionGenerator.kt:85 */ enum PayloadUnion {
        2966  +
    /* UnionGenerator.kt:90 */
 1717   2967   
    #[allow(missing_docs)] // documentation missing in model
 1718         -
    pub bar: ::std::option::Option<::std::string::String>,
 1719         -
    /* StructureGenerator.kt:231 */
        2968  +
    /* UnionGenerator.kt:190 */
        2969  +
    UnionMember(::std::string::String),
        2970  +
    /* UnionGenerator.kt:85 */
        2971  +
}
        2972  +
/* UnionGenerator.kt:111 */
        2973  +
impl PayloadUnion {
        2974  +
    /* RustType.kt:534 */
        2975  +
    #[allow(irrefutable_let_patterns)]
        2976  +
    /* UnionGenerator.kt:217 */
        2977  +
    /// Tries to convert the enum instance into [`UnionMember`](crate::model::PayloadUnion::UnionMember), extracting the inner [`String`](::std::string::String).
        2978  +
    /* UnionGenerator.kt:222 */
        2979  +
    /// Returns `Err(&Self)` if it can't be converted.
        2980  +
    /* UnionGenerator.kt:223 */
        2981  +
    pub fn as_union_member(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        2982  +
        /* UnionGenerator.kt:227 */
        2983  +
        if let PayloadUnion::UnionMember(val) = &self {
        2984  +
            ::std::result::Result::Ok(val)
        2985  +
        } else {
        2986  +
            ::std::result::Result::Err(self)
        2987  +
        }
        2988  +
        /* UnionGenerator.kt:223 */
        2989  +
    }
        2990  +
    /* UnionGenerator.kt:121 */
        2991  +
    /// Returns true if this is a [`UnionMember`](crate::model::PayloadUnion::UnionMember).
        2992  +
    /* UnionGenerator.kt:122 */
        2993  +
    pub fn is_union_member(&self) -> bool {
        2994  +
        /* UnionGenerator.kt:123 */
        2995  +
        self.as_union_member().is_ok()
        2996  +
        /* UnionGenerator.kt:122 */
        2997  +
    }
        2998  +
    /* UnionGenerator.kt:111 */
        2999  +
}
        3000  +
/// /* CodegenDelegator.kt:52 */See [`StringSet`](crate::model::StringSet).
        3001  +
pub mod string_set {
        3002  +
        3003  +
    /* CollectionConstraintViolationGenerator.kt:78 */
        3004  +
    #[allow(clippy::enum_variant_names)]
        3005  +
    #[derive(Debug, PartialEq)]
        3006  +
    pub enum ConstraintViolation {
        3007  +
        /// Constraint violation error when the list does not contain unique items
        3008  +
        UniqueItems {
        3009  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3010  +
            /// at least two elements.
        3011  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3012  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3013  +
            /// Nothing is guaranteed about the order of the indices.
        3014  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3015  +
            /// The original vector, that contains duplicate items.
        3016  +
            original: ::std::vec::Vec<::std::string::String>,
        3017  +
        },
        3018  +
    }
        3019  +
        3020  +
    impl ::std::fmt::Display for ConstraintViolation {
        3021  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3022  +
            let message = match self {
        3023  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3024  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3025  +
                            };
        3026  +
            write!(f, "{message}")
        3027  +
        }
        3028  +
    }
        3029  +
        3030  +
    impl ::std::error::Error for ConstraintViolation {}
        3031  +
    /* CollectionConstraintViolationGenerator.kt:104 */
        3032  +
    impl ConstraintViolation {
        3033  +
        pub(crate) fn as_validation_exception_field(
        3034  +
            self,
        3035  +
            path: ::std::string::String,
        3036  +
        ) -> crate::model::ValidationExceptionField {
        3037  +
            match self {
        3038  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3039  +
                                crate::model::ValidationExceptionField {
        3040  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3041  +
                                    path,
        3042  +
                                },
        3043  +
                    }
        3044  +
        }
        3045  +
    }
        3046  +
        3047  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        3048  +
}
        3049  +
pub mod foo_enum_list {
        3050  +
        3051  +
    /* CollectionConstraintViolationGenerator.kt:78 */
        3052  +
    #[allow(clippy::enum_variant_names)]
        3053  +
    #[derive(Debug, PartialEq)]
        3054  +
    pub enum ConstraintViolation {
        3055  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        3056  +
        /// The first component of the tuple is the index in the collection where the
        3057  +
        /// first constraint violation was found.
        3058  +
        #[doc(hidden)]
        3059  +
        Member(usize, crate::model::foo_enum::ConstraintViolation),
        3060  +
    }
        3061  +
        3062  +
    impl ::std::fmt::Display for ConstraintViolation {
        3063  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3064  +
            let message = match self {
        3065  +
                Self::Member(index, failing_member) => format!(
        3066  +
                    "Value at index {index} failed to satisfy constraint. {}",
        3067  +
                    failing_member
        3068  +
                ),
        3069  +
            };
        3070  +
            write!(f, "{message}")
        3071  +
        }
        3072  +
    }
        3073  +
        3074  +
    impl ::std::error::Error for ConstraintViolation {}
        3075  +
    /* CollectionConstraintViolationGenerator.kt:104 */
        3076  +
    impl ConstraintViolation {
        3077  +
        pub(crate) fn as_validation_exception_field(
        3078  +
            self,
        3079  +
            path: ::std::string::String,
        3080  +
        ) -> crate::model::ValidationExceptionField {
        3081  +
            match self {
        3082  +
                Self::Member(index, member_constraint_violation) => member_constraint_violation
        3083  +
                    .as_validation_exception_field(path + "/" + &index.to_string()),
        3084  +
            }
        3085  +
        }
        3086  +
    }
        3087  +
        3088  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        3089  +
}
        3090  +
/// /* CodegenDelegator.kt:52 */See [`IntegerSet`](crate::model::IntegerSet).
        3091  +
pub mod integer_set {
        3092  +
        3093  +
    /* CollectionConstraintViolationGenerator.kt:78 */
        3094  +
    #[allow(clippy::enum_variant_names)]
        3095  +
    #[derive(Debug, PartialEq)]
        3096  +
    pub enum ConstraintViolation {
        3097  +
        /// Constraint violation error when the list does not contain unique items
        3098  +
        UniqueItems {
        3099  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3100  +
            /// at least two elements.
        3101  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3102  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3103  +
            /// Nothing is guaranteed about the order of the indices.
        3104  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3105  +
            /// The original vector, that contains duplicate items.
        3106  +
            original: ::std::vec::Vec<i32>,
        3107  +
        },
        3108  +
    }
        3109  +
        3110  +
    impl ::std::fmt::Display for ConstraintViolation {
        3111  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3112  +
            let message = match self {
        3113  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3114  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3115  +
                            };
        3116  +
            write!(f, "{message}")
        3117  +
        }
        3118  +
    }
        3119  +
        3120  +
    impl ::std::error::Error for ConstraintViolation {}
        3121  +
    /* CollectionConstraintViolationGenerator.kt:104 */
        3122  +
    impl ConstraintViolation {
        3123  +
        pub(crate) fn as_validation_exception_field(
        3124  +
            self,
        3125  +
            path: ::std::string::String,
        3126  +
        ) -> crate::model::ValidationExceptionField {
        3127  +
            match self {
        3128  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3129  +
                                crate::model::ValidationExceptionField {
        3130  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3131  +
                                    path,
        3132  +
                                },
        3133  +
                    }
        3134  +
        }
        3135  +
    }
        3136  +
        3137  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        3138  +
}
        3139  +
/// /* ServerBuilderGenerator.kt:171 */See [`NestedPayload`](crate::model::NestedPayload).
        3140  +
pub mod nested_payload {
        3141  +
        3142  +
    /* ServerBuilderGenerator.kt:461 */
        3143  +
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        3144  +
        fn from(builder: Builder) -> Self {
        3145  +
            builder.build()
        3146  +
        }
        3147  +
    }
        3148  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`NestedPayload`](crate::model::NestedPayload).
        3149  +
    /* RustType.kt:534 */
        3150  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3151  +
    /* ServerBuilderGenerator.kt:211 */
        3152  +
    pub struct Builder {
        3153  +
        /* ServerBuilderGenerator.kt:308 */
        3154  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        3155  +
        /* ServerBuilderGenerator.kt:308 */
        3156  +
        pub(crate) name: ::std::option::Option<::std::string::String>,
        3157  +
        /* ServerBuilderGenerator.kt:211 */
        3158  +
    }
        3159  +
    /* ServerBuilderGenerator.kt:215 */
        3160  +
    impl Builder {
        3161  +
        /* ServerBuilderGenerator.kt:331 */
        3162  +
        #[allow(missing_docs)] // documentation missing in model
        3163  +
                               /* ServerBuilderGenerator.kt:343 */
        3164  +
        pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3165  +
            /* ServerBuilderGenerator.kt:344 */
        3166  +
            self.greeting =
        3167  +
                /* ServerBuilderGenerator.kt:376 */input
        3168  +
            /* ServerBuilderGenerator.kt:344 */;
        3169  +
            self
        3170  +
            /* ServerBuilderGenerator.kt:343 */
        3171  +
        }
        3172  +
        /* ServerBuilderGenerator.kt:426 */
 1720   3173   
        #[allow(missing_docs)] // documentation missing in model
 1721         -
    pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 1722         -
    /* StructureGenerator.kt:201 */
 1723         -
}
 1724         -
/* StructureGenerator.kt:135 */
 1725         -
impl RecursiveShapesInputOutputNested2 {
 1726         -
    /* StructureGenerator.kt:231 */
        3174  +
                               /* ServerBuilderGenerator.kt:428 */
        3175  +
        pub(crate) fn set_greeting(
        3176  +
            mut self,
        3177  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3178  +
        ) -> Self {
        3179  +
            /* ServerBuilderGenerator.kt:429 */
        3180  +
            self.greeting = input.map(|v| v.into());
        3181  +
            self
        3182  +
            /* ServerBuilderGenerator.kt:428 */
        3183  +
        }
        3184  +
        /* ServerBuilderGenerator.kt:331 */
 1727   3185   
        #[allow(missing_docs)] // documentation missing in model
 1728         -
                           /* StructureGenerator.kt:166 */
 1729         -
    pub fn bar(&self) -> ::std::option::Option<&str> {
 1730         -
        /* StructureGenerator.kt:169 */
 1731         -
        self.bar.as_deref()
 1732         -
        /* StructureGenerator.kt:166 */
        3186  +
                               /* ServerBuilderGenerator.kt:343 */
        3187  +
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3188  +
            /* ServerBuilderGenerator.kt:344 */
        3189  +
            self.name =
        3190  +
                /* ServerBuilderGenerator.kt:376 */input
        3191  +
            /* ServerBuilderGenerator.kt:344 */;
        3192  +
            self
        3193  +
            /* ServerBuilderGenerator.kt:343 */
 1733   3194   
        }
 1734         -
    /* StructureGenerator.kt:231 */
        3195  +
        /* ServerBuilderGenerator.kt:426 */
 1735   3196   
        #[allow(missing_docs)] // documentation missing in model
 1736         -
                           /* StructureGenerator.kt:166 */
 1737         -
    pub fn recursive_member(
 1738         -
        &self,
 1739         -
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
 1740         -
        /* StructureGenerator.kt:170 */
 1741         -
        self.recursive_member.as_ref()
 1742         -
        /* StructureGenerator.kt:166 */
        3197  +
                               /* ServerBuilderGenerator.kt:428 */
        3198  +
        pub(crate) fn set_name(
        3199  +
            mut self,
        3200  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3201  +
        ) -> Self {
        3202  +
            /* ServerBuilderGenerator.kt:429 */
        3203  +
            self.name = input.map(|v| v.into());
        3204  +
            self
        3205  +
            /* ServerBuilderGenerator.kt:428 */
 1743   3206   
        }
 1744         -
    /* StructureGenerator.kt:135 */
 1745         -
}
 1746         -
/* ServerCodegenVisitor.kt:356 */
 1747         -
impl RecursiveShapesInputOutputNested2 {
 1748         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 1749         -
    /* ServerBuilderGenerator.kt:295 */
 1750         -
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
 1751         -
        /* ServerBuilderGenerator.kt:296 */
 1752         -
        crate::model::recursive_shapes_input_output_nested2::Builder::default()
 1753         -
        /* ServerBuilderGenerator.kt:295 */
        3207  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
        3208  +
        /* ServerBuilderGenerator.kt:271 */
        3209  +
        pub fn build(self) -> crate::model::NestedPayload {
        3210  +
            self.build_enforcing_all_constraints()
 1754   3211   
        }
 1755         -
    /* ServerCodegenVisitor.kt:356 */
 1756         -
}
 1757         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
 1758         -
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
 1759         -
    type Unconstrained = crate::model::recursive_shapes_input_output_nested2::Builder;
        3212  +
        /* ServerBuilderGenerator.kt:283 */
        3213  +
        fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
        3214  +
            /* ServerBuilderGenerator.kt:542 */
        3215  +
            crate::model::NestedPayload {
        3216  +
                /* ServerBuilderGenerator.kt:546 */
        3217  +
                greeting: self.greeting,
        3218  +
                /* ServerBuilderGenerator.kt:546 */
        3219  +
                name: self.name,
        3220  +
                /* ServerBuilderGenerator.kt:542 */
        3221  +
            }
        3222  +
            /* ServerBuilderGenerator.kt:283 */
        3223  +
        }
        3224  +
        /* ServerBuilderGenerator.kt:215 */
        3225  +
    }
        3226  +
        3227  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1760   3228   
}
        3229  +
/// /* ServerBuilderGenerator.kt:171 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        3230  +
pub mod complex_nested_error_data {
 1761   3231   
 1762         -
/* ConstrainedCollectionGenerator.kt:93 */
 1763         -
#[allow(missing_docs)] // documentation missing in model
 1764         -
/// /* ConstrainedCollectionGenerator.kt:94 */
 1765         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 1766         -
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
 1767         -
///
 1768         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 1769         -
///
 1770         -
/* RustType.kt:534 */
 1771         -
#[derive(
 1772         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1773         -
)]
 1774         -
pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerEnumSet(
 1775         -
    pub(crate) ::std::vec::Vec<i32>,
 1776         -
);
 1777         -
/* ConstrainedCollectionGenerator.kt:104 */
 1778         -
impl IntegerEnumSet {
 1779         -
    /* ConstrainedCollectionGenerator.kt:106 */
 1780         -
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
 1781         -
    pub fn inner(&self) -> &::std::vec::Vec<i32> {
 1782         -
        &self.0
        3232  +
    /* ServerBuilderGenerator.kt:461 */
        3233  +
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
        3234  +
        fn from(builder: Builder) -> Self {
        3235  +
            builder.build()
 1783   3236   
        }
 1784         -
    /* ConstrainedCollectionGenerator.kt:116 */
 1785         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
 1786         -
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
 1787         -
        self.0
 1788   3237   
    }
 1789         -
 1790         -
    fn check_unique_items(
 1791         -
        items: ::std::vec::Vec<i32>,
 1792         -
    ) -> ::std::result::Result<
 1793         -
        ::std::vec::Vec<i32>,
 1794         -
        crate::model::integer_enum_set::ConstraintViolation,
 1795         -
    > {
 1796         -
        let mut seen = ::std::collections::HashMap::new();
 1797         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 1798         -
        for (idx, item) in items.iter().enumerate() {
 1799         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 1800         -
                duplicate_indices.push(prev_idx);
        3238  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        3239  +
    /* RustType.kt:534 */
        3240  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3241  +
    /* ServerBuilderGenerator.kt:211 */
        3242  +
    pub struct Builder {
        3243  +
        /* ServerBuilderGenerator.kt:308 */
        3244  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        3245  +
        /* ServerBuilderGenerator.kt:211 */
 1801   3246   
    }
        3247  +
    /* ServerBuilderGenerator.kt:215 */
        3248  +
    impl Builder {
        3249  +
        /* ServerBuilderGenerator.kt:331 */
        3250  +
        #[allow(missing_docs)] // documentation missing in model
        3251  +
                               /* ServerBuilderGenerator.kt:343 */
        3252  +
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3253  +
            /* ServerBuilderGenerator.kt:344 */
        3254  +
            self.foo =
        3255  +
                /* ServerBuilderGenerator.kt:376 */input
        3256  +
            /* ServerBuilderGenerator.kt:344 */;
        3257  +
            self
        3258  +
            /* ServerBuilderGenerator.kt:343 */
 1802   3259   
        }
 1803         -
 1804         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 1805         -
        for idx in &duplicate_indices {
 1806         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 1807         -
                last_duplicate_indices.push(prev_idx);
        3260  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        3261  +
        /* ServerBuilderGenerator.kt:271 */
        3262  +
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
        3263  +
            self.build_enforcing_all_constraints()
 1808   3264   
        }
        3265  +
        /* ServerBuilderGenerator.kt:283 */
        3266  +
        fn build_enforcing_all_constraints(self) -> crate::model::ComplexNestedErrorData {
        3267  +
            /* ServerBuilderGenerator.kt:542 */
        3268  +
            crate::model::ComplexNestedErrorData {
        3269  +
                /* ServerBuilderGenerator.kt:546 */
        3270  +
                foo: self.foo,
        3271  +
                /* ServerBuilderGenerator.kt:542 */
 1809   3272   
            }
 1810         -
        duplicate_indices.extend(last_duplicate_indices);
 1811         -
 1812         -
        if !duplicate_indices.is_empty() {
 1813         -
            debug_assert!(duplicate_indices.len() >= 2);
 1814         -
            Err(
 1815         -
                crate::model::integer_enum_set::ConstraintViolation::UniqueItems {
 1816         -
                    duplicate_indices,
 1817         -
                    original: items,
 1818         -
                },
 1819         -
            )
 1820         -
        } else {
 1821         -
            Ok(items)
        3273  +
            /* ServerBuilderGenerator.kt:283 */
 1822   3274   
        }
        3275  +
        /* ServerBuilderGenerator.kt:215 */
 1823   3276   
    }
 1824         -
    /* ConstrainedCollectionGenerator.kt:104 */
 1825         -
}
 1826         -
/* ConstrainedCollectionGenerator.kt:133 */
 1827         -
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
 1828         -
    type Error = crate::model::integer_enum_set::ConstraintViolation;
 1829   3277   
 1830         -
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
 1831         -
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
 1832         -
        let value = Self::check_unique_items(value)?;
        3278  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        3279  +
}
        3280  +
/// /* CodegenDelegator.kt:52 */See [`FooEnumSet`](crate::model::FooEnumSet).
        3281  +
pub mod foo_enum_set {
 1833   3282   
 1834         -
        Ok(Self(value))
        3283  +
    /* CollectionConstraintViolationGenerator.kt:78 */
        3284  +
    #[allow(clippy::enum_variant_names)]
        3285  +
    #[derive(Debug, PartialEq)]
        3286  +
    pub enum ConstraintViolation {
        3287  +
        /// Constraint violation error when the list does not contain unique items
        3288  +
        UniqueItems {
        3289  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3290  +
            /// at least two elements.
        3291  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3292  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3293  +
            /// Nothing is guaranteed about the order of the indices.
        3294  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3295  +
            /// The original vector, that contains duplicate items.
        3296  +
            original: ::std::vec::Vec<crate::model::FooEnum>,
        3297  +
        },
        3298  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        3299  +
        /// The first component of the tuple is the index in the collection where the
        3300  +
        /// first constraint violation was found.
        3301  +
        #[doc(hidden)]
        3302  +
        Member(usize, crate::model::foo_enum::ConstraintViolation),
 1835   3303   
    }
 1836         -
}
 1837   3304   
 1838         -
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
 1839         -
    fn from(value: IntegerEnumSet) -> Self {
 1840         -
        value.into_inner()
        3305  +
    impl ::std::fmt::Display for ConstraintViolation {
        3306  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3307  +
            let message = match self {
        3308  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3309  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3310  +
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
        3311  +
                           failing_member)
        3312  +
                            };
        3313  +
            write!(f, "{message}")
        3314  +
        }
 1841   3315   
    }
 1842         -
}
 1843         -
/* ConstrainedCollectionGenerator.kt:181 */
 1844         -
impl crate::constrained::Constrained for IntegerEnumSet {
 1845         -
    type Unconstrained =
 1846         -
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
 1847         -
}
 1848   3316   
 1849         -
/* ConstrainedCollectionGenerator.kt:93 */
 1850         -
#[allow(missing_docs)] // documentation missing in model
 1851         -
/// /* ConstrainedCollectionGenerator.kt:94 */
 1852         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 1853         -
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
 1854         -
///
 1855         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 1856         -
///
 1857         -
/* RustType.kt:534 */
 1858         -
#[derive(
 1859         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1860         -
)]
 1861         -
pub /* ConstrainedCollectionGenerator.kt:97 */ struct FooEnumSet(
 1862         -
    pub(crate) ::std::vec::Vec<crate::model::FooEnum>,
 1863         -
);
 1864         -
/* ConstrainedCollectionGenerator.kt:104 */
 1865         -
impl FooEnumSet {
 1866         -
    /* ConstrainedCollectionGenerator.kt:106 */
 1867         -
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
 1868         -
    pub fn inner(&self) -> &::std::vec::Vec<crate::model::FooEnum> {
 1869         -
        &self.0
        3317  +
    impl ::std::error::Error for ConstraintViolation {}
        3318  +
    /* CollectionConstraintViolationGenerator.kt:104 */
        3319  +
    impl ConstraintViolation {
        3320  +
        pub(crate) fn as_validation_exception_field(
        3321  +
            self,
        3322  +
            path: ::std::string::String,
        3323  +
        ) -> crate::model::ValidationExceptionField {
        3324  +
            match self {
        3325  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3326  +
                                crate::model::ValidationExceptionField {
        3327  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3328  +
                                    path,
        3329  +
                                },
        3330  +
    Self::Member(index, member_constraint_violation) =>
        3331  +
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
 1870   3332   
                    }
 1871         -
    /* ConstrainedCollectionGenerator.kt:116 */
 1872         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
 1873         -
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
 1874         -
        self.0
 1875   3333   
        }
 1876         -
 1877         -
    fn check_unique_items(
 1878         -
        items: ::std::vec::Vec<crate::model::FooEnum>,
 1879         -
    ) -> ::std::result::Result<
 1880         -
        ::std::vec::Vec<crate::model::FooEnum>,
 1881         -
        crate::model::foo_enum_set::ConstraintViolation,
 1882         -
    > {
 1883         -
        let mut seen = ::std::collections::HashMap::new();
 1884         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 1885         -
        for (idx, item) in items.iter().enumerate() {
 1886         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 1887         -
                duplicate_indices.push(prev_idx);
 1888   3334   
    }
        3335  +
        3336  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        3337  +
}
        3338  +
pub mod foo_enum_map {
        3339  +
        3340  +
    /* MapConstraintViolationGenerator.kt:82 */
        3341  +
    #[allow(clippy::enum_variant_names)]
        3342  +
    #[derive(Debug, PartialEq)]
        3343  +
    pub enum ConstraintViolation {
        3344  +
        #[doc(hidden)]
        3345  +
        Value(
        3346  +
            ::std::string::String,
        3347  +
            crate::model::foo_enum::ConstraintViolation,
        3348  +
        ),
 1889   3349   
    }
 1890   3350   
 1891         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 1892         -
        for idx in &duplicate_indices {
 1893         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 1894         -
                last_duplicate_indices.push(prev_idx);
        3351  +
    impl ::std::fmt::Display for ConstraintViolation {
        3352  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3353  +
            match self {
        3354  +
                Self::Value(_, value_constraint_violation) => {
        3355  +
                    write!(f, "{}", value_constraint_violation)
        3356  +
                }
        3357  +
            }
 1895   3358   
        }
 1896   3359   
    }
 1897         -
        duplicate_indices.extend(last_duplicate_indices);
 1898   3360   
 1899         -
        if !duplicate_indices.is_empty() {
 1900         -
            debug_assert!(duplicate_indices.len() >= 2);
 1901         -
            Err(
 1902         -
                crate::model::foo_enum_set::ConstraintViolation::UniqueItems {
 1903         -
                    duplicate_indices,
 1904         -
                    original: items,
 1905         -
                },
 1906         -
            )
 1907         -
        } else {
 1908         -
            Ok(items)
        3361  +
    impl ::std::error::Error for ConstraintViolation {}
        3362  +
    /* MapConstraintViolationGenerator.kt:111 */
        3363  +
    impl ConstraintViolation {
        3364  +
        pub(crate) fn as_validation_exception_field(
        3365  +
            self,
        3366  +
            path: ::std::string::String,
        3367  +
        ) -> crate::model::ValidationExceptionField {
        3368  +
            match self {
        3369  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        3370  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
 1909   3371   
            }
 1910   3372   
        }
 1911         -
    /* ConstrainedCollectionGenerator.kt:104 */
        3373  +
    }
        3374  +
        3375  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1912   3376   
}
 1913         -
/* ConstrainedCollectionGenerator.kt:133 */
 1914         -
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
 1915         -
    type Error = crate::model::foo_enum_set::ConstraintViolation;
        3377  +
/// /* CodegenDelegator.kt:52 */See [`IntegerEnumSet`](crate::model::IntegerEnumSet).
        3378  +
pub mod integer_enum_set {
 1916   3379   
 1917         -
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
 1918         -
    fn try_from(
 1919         -
        value: ::std::vec::Vec<crate::model::FooEnum>,
 1920         -
    ) -> ::std::result::Result<Self, Self::Error> {
 1921         -
        let value = Self::check_unique_items(value)?;
        3380  +
    /* CollectionConstraintViolationGenerator.kt:78 */
        3381  +
    #[allow(clippy::enum_variant_names)]
        3382  +
    #[derive(Debug, PartialEq)]
        3383  +
    pub enum ConstraintViolation {
        3384  +
        /// Constraint violation error when the list does not contain unique items
        3385  +
        UniqueItems {
        3386  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3387  +
            /// at least two elements.
        3388  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3389  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3390  +
            /// Nothing is guaranteed about the order of the indices.
        3391  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3392  +
            /// The original vector, that contains duplicate items.
        3393  +
            original: ::std::vec::Vec<i32>,
        3394  +
        },
        3395  +
    }
 1922   3396   
 1923         -
        Ok(Self(value))
        3397  +
    impl ::std::fmt::Display for ConstraintViolation {
        3398  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3399  +
            let message = match self {
        3400  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3401  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3402  +
                            };
        3403  +
            write!(f, "{message}")
        3404  +
        }
 1924   3405   
    }
 1925         -
}
 1926   3406   
 1927         -
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
 1928         -
    fn from(value: FooEnumSet) -> Self {
 1929         -
        value.into_inner()
        3407  +
    impl ::std::error::Error for ConstraintViolation {}
        3408  +
    /* CollectionConstraintViolationGenerator.kt:104 */
        3409  +
    impl ConstraintViolation {
        3410  +
        pub(crate) fn as_validation_exception_field(
        3411  +
            self,
        3412  +
            path: ::std::string::String,
        3413  +
        ) -> crate::model::ValidationExceptionField {
        3414  +
            match self {
        3415  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3416  +
                                crate::model::ValidationExceptionField {
        3417  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3418  +
                                    path,
        3419  +
                                },
 1930   3420   
                    }
        3421  +
        }
        3422  +
    }
        3423  +
        3424  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 1931   3425   
}
 1932         -
/* ConstrainedCollectionGenerator.kt:181 */
 1933         -
impl crate::constrained::Constrained for FooEnumSet {
 1934         -
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
 1935         -
}
        3426  +
/// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        3427  +
pub mod recursive_shapes_input_output_nested1 {
 1936   3428   
 1937         -
/* StructureGenerator.kt:197 */
 1938         -
#[allow(missing_docs)] // documentation missing in model
 1939         -
/* RustType.kt:534 */
 1940         -
#[derive(
 1941         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1942         -
)]
 1943         -
pub /* StructureGenerator.kt:201 */ struct ComplexNestedErrorData {
 1944         -
    /* StructureGenerator.kt:231 */
        3429  +
    /* ServerBuilderGenerator.kt:461 */
        3430  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
        3431  +
        fn from(builder: Builder) -> Self {
        3432  +
            builder.build()
        3433  +
        }
        3434  +
    }
        3435  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        3436  +
    /* RustType.kt:534 */
        3437  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3438  +
    /* ServerBuilderGenerator.kt:211 */
        3439  +
    pub struct Builder {
        3440  +
        /* ServerBuilderGenerator.kt:308 */
        3441  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        3442  +
        /* ServerBuilderGenerator.kt:308 */
        3443  +
        pub(crate) nested: ::std::option::Option<
        3444  +
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        3445  +
        >,
        3446  +
        /* ServerBuilderGenerator.kt:211 */
        3447  +
    }
        3448  +
    /* ServerBuilderGenerator.kt:215 */
        3449  +
    impl Builder {
        3450  +
        /* ServerBuilderGenerator.kt:331 */
 1945   3451   
        #[allow(missing_docs)] // documentation missing in model
 1946         -
    pub foo: ::std::option::Option<::std::string::String>,
 1947         -
    /* StructureGenerator.kt:201 */
 1948         -
}
 1949         -
/* StructureGenerator.kt:135 */
 1950         -
impl ComplexNestedErrorData {
 1951         -
    /* StructureGenerator.kt:231 */
        3452  +
                               /* ServerBuilderGenerator.kt:343 */
        3453  +
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3454  +
            /* ServerBuilderGenerator.kt:344 */
        3455  +
            self.foo =
        3456  +
                /* ServerBuilderGenerator.kt:376 */input
        3457  +
            /* ServerBuilderGenerator.kt:344 */;
        3458  +
            self
        3459  +
            /* ServerBuilderGenerator.kt:343 */
        3460  +
        }
        3461  +
        /* ServerBuilderGenerator.kt:426 */
 1952   3462   
        #[allow(missing_docs)] // documentation missing in model
 1953         -
                           /* StructureGenerator.kt:166 */
 1954         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
 1955         -
        /* StructureGenerator.kt:169 */
 1956         -
        self.foo.as_deref()
 1957         -
        /* StructureGenerator.kt:166 */
        3463  +
                               /* ServerBuilderGenerator.kt:428 */
        3464  +
        pub(crate) fn set_foo(
        3465  +
            mut self,
        3466  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3467  +
        ) -> Self {
        3468  +
            /* ServerBuilderGenerator.kt:429 */
        3469  +
            self.foo = input.map(|v| v.into());
        3470  +
            self
        3471  +
            /* ServerBuilderGenerator.kt:428 */
 1958   3472   
        }
 1959         -
    /* StructureGenerator.kt:135 */
 1960         -
}
 1961         -
/* ServerCodegenVisitor.kt:356 */
 1962         -
impl ComplexNestedErrorData {
 1963         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 1964         -
    /* ServerBuilderGenerator.kt:295 */
 1965         -
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
 1966         -
        /* ServerBuilderGenerator.kt:296 */
 1967         -
        crate::model::complex_nested_error_data::Builder::default()
 1968         -
        /* ServerBuilderGenerator.kt:295 */
        3473  +
        /* ServerBuilderGenerator.kt:331 */
        3474  +
        #[allow(missing_docs)] // documentation missing in model
        3475  +
                               /* ServerBuilderGenerator.kt:343 */
        3476  +
        pub fn nested(
        3477  +
            mut self,
        3478  +
            input: ::std::option::Option<
        3479  +
                ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        3480  +
            >,
        3481  +
        ) -> Self {
        3482  +
            /* ServerBuilderGenerator.kt:344 */
        3483  +
            self.nested =
        3484  +
                /* ServerBuilderGenerator.kt:376 */input
        3485  +
            /* ServerBuilderGenerator.kt:344 */;
        3486  +
            self
        3487  +
            /* ServerBuilderGenerator.kt:343 */
 1969   3488   
        }
 1970         -
    /* ServerCodegenVisitor.kt:356 */
 1971         -
}
 1972         -
 1973         -
/* UnionGenerator.kt:67 */
 1974         -
#[allow(missing_docs)] // documentation missing in model
 1975         -
/* RustType.kt:534 */
 1976         -
#[derive(
 1977         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1978         -
)]
 1979         -
pub /* UnionGenerator.kt:85 */ enum UnionPayload {
 1980         -
    /* UnionGenerator.kt:90 */
        3489  +
        /* ServerBuilderGenerator.kt:426 */
 1981   3490   
        #[allow(missing_docs)] // documentation missing in model
 1982         -
    /* UnionGenerator.kt:190 */
 1983         -
    Greeting(::std::string::String),
 1984         -
    /* UnionGenerator.kt:85 */
 1985         -
}
 1986         -
/* UnionGenerator.kt:111 */
 1987         -
impl UnionPayload {
 1988         -
    /* RustType.kt:534 */
 1989         -
    #[allow(irrefutable_let_patterns)]
 1990         -
    /* UnionGenerator.kt:217 */
 1991         -
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
 1992         -
    /* UnionGenerator.kt:222 */
 1993         -
    /// Returns `Err(&Self)` if it can't be converted.
 1994         -
    /* UnionGenerator.kt:223 */
 1995         -
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1996         -
        /* UnionGenerator.kt:227 */
 1997         -
        if let UnionPayload::Greeting(val) = &self {
 1998         -
            ::std::result::Result::Ok(val)
 1999         -
        } else {
 2000         -
            ::std::result::Result::Err(self)
        3491  +
                               /* ServerBuilderGenerator.kt:428 */
        3492  +
        pub(crate) fn set_nested(
        3493  +
            mut self,
        3494  +
            input: Option<
        3495  +
                impl ::std::convert::Into<
        3496  +
                    ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        3497  +
                >,
        3498  +
            >,
        3499  +
        ) -> Self {
        3500  +
            /* ServerBuilderGenerator.kt:429 */
        3501  +
            self.nested = input.map(|v| v.into());
        3502  +
            self
        3503  +
            /* ServerBuilderGenerator.kt:428 */
 2001   3504   
        }
 2002         -
        /* UnionGenerator.kt:223 */
        3505  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        3506  +
        /* ServerBuilderGenerator.kt:271 */
        3507  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        3508  +
            self.build_enforcing_all_constraints()
 2003   3509   
        }
 2004         -
    /* UnionGenerator.kt:121 */
 2005         -
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
 2006         -
    /* UnionGenerator.kt:122 */
 2007         -
    pub fn is_greeting(&self) -> bool {
 2008         -
        /* UnionGenerator.kt:123 */
 2009         -
        self.as_greeting().is_ok()
 2010         -
        /* UnionGenerator.kt:122 */
        3510  +
        /* ServerBuilderGenerator.kt:283 */
        3511  +
        fn build_enforcing_all_constraints(
        3512  +
            self,
        3513  +
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
        3514  +
            /* ServerBuilderGenerator.kt:542 */
        3515  +
            crate::model::RecursiveShapesInputOutputNested1 {
        3516  +
                /* ServerBuilderGenerator.kt:546 */
        3517  +
                foo: self.foo,
        3518  +
                /* ServerBuilderGenerator.kt:546 */
        3519  +
                nested: self.nested,
        3520  +
                /* ServerBuilderGenerator.kt:542 */
        3521  +
            }
        3522  +
            /* ServerBuilderGenerator.kt:283 */
        3523  +
        }
        3524  +
        /* ServerBuilderGenerator.kt:215 */
 2011   3525   
    }
 2012         -
    /* UnionGenerator.kt:111 */
 2013         -
}
 2014   3526   
 2015         -
/* EnumGenerator.kt:181 */
 2016         -
#[allow(missing_docs)] // documentation missing in model
 2017         -
/* RustType.kt:534 */
 2018         -
#[derive(
 2019         -
    ::std::clone::Clone,
 2020         -
    ::std::cmp::Eq,
 2021         -
    ::std::cmp::Ord,
 2022         -
    ::std::cmp::PartialEq,
 2023         -
    ::std::cmp::PartialOrd,
 2024         -
    ::std::fmt::Debug,
 2025         -
    ::std::hash::Hash,
 2026         -
)]
 2027         -
pub /* EnumGenerator.kt:298 */ enum StringEnum {
 2028         -
    /* EnumGenerator.kt:181 */
 2029         -
    #[allow(missing_docs)] // documentation missing in model
 2030         -
    /* EnumGenerator.kt:170 */
 2031         -
    V,
 2032         -
    /* EnumGenerator.kt:298 */
        3527  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2033   3528   
}
 2034         -
/// /* CodegenDelegator.kt:52 */See [`StringEnum`](crate::model::StringEnum).
 2035         -
pub mod string_enum {
        3529  +
pub mod dense_set_map {
        3530  +
        3531  +
    /* MapConstraintViolationGenerator.kt:82 */
        3532  +
    #[allow(clippy::enum_variant_names)]
 2036   3533   
    #[derive(Debug, PartialEq)]
 2037         -
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
        3534  +
    pub enum ConstraintViolation {
        3535  +
        #[doc(hidden)]
        3536  +
        Value(
        3537  +
            ::std::string::String,
        3538  +
            crate::model::string_set::ConstraintViolation,
        3539  +
        ),
        3540  +
    }
 2038   3541   
 2039   3542   
    impl ::std::fmt::Display for ConstraintViolation {
 2040   3543   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2041         -
            write!(
 2042         -
                f,
 2043         -
                r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
 2044         -
            )
        3544  +
            match self {
        3545  +
                Self::Value(_, value_constraint_violation) => {
        3546  +
                    write!(f, "{}", value_constraint_violation)
        3547  +
                }
        3548  +
            }
 2045   3549   
        }
 2046   3550   
    }
 2047   3551   
 2048   3552   
    impl ::std::error::Error for ConstraintViolation {}
        3553  +
    /* MapConstraintViolationGenerator.kt:111 */
 2049   3554   
    impl ConstraintViolation {
 2050   3555   
        pub(crate) fn as_validation_exception_field(
 2051   3556   
            self,
 2052   3557   
            path: ::std::string::String,
 2053   3558   
        ) -> crate::model::ValidationExceptionField {
 2054         -
            crate::model::ValidationExceptionField {
 2055         -
                message: format!(
 2056         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
 2057         -
                    &path
 2058         -
                ),
 2059         -
                path,
        3559  +
            match self {
        3560  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        3561  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
 2060   3562   
            }
 2061   3563   
        }
 2062   3564   
    }
 2063   3565   
 2064         -
    /* ServerEnumGenerator.kt:47 */
        3566  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2065   3567   
}
 2066         -
/* ServerEnumGenerator.kt:88 */
 2067         -
impl ::std::convert::TryFrom<&str> for StringEnum {
 2068         -
    type Error = crate::model::string_enum::ConstraintViolation;
 2069         -
    fn try_from(
 2070         -
        s: &str,
 2071         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
 2072         -
        match s {
 2073         -
            "enumvalue" => Ok(StringEnum::V),
 2074         -
            _ => Err(crate::model::string_enum::ConstraintViolation(s.to_owned())),
        3568  +
pub mod sparse_set_map {
        3569  +
        3570  +
    /* MapConstraintViolationGenerator.kt:82 */
        3571  +
    #[allow(clippy::enum_variant_names)]
        3572  +
    #[derive(Debug, PartialEq)]
        3573  +
    pub enum ConstraintViolation {
        3574  +
        #[doc(hidden)]
        3575  +
        Value(
        3576  +
            ::std::string::String,
        3577  +
            crate::model::string_set::ConstraintViolation,
        3578  +
        ),
 2075   3579   
    }
        3580  +
        3581  +
    impl ::std::fmt::Display for ConstraintViolation {
        3582  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3583  +
            match self {
        3584  +
                Self::Value(_, value_constraint_violation) => {
        3585  +
                    write!(f, "{}", value_constraint_violation)
 2076   3586   
                }
 2077         -
}
 2078         -
impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
 2079         -
    type Error = crate::model::string_enum::ConstraintViolation;
 2080         -
    fn try_from(
 2081         -
        s: ::std::string::String,
 2082         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
 2083         -
    {
 2084         -
        s.as_str().try_into()
 2085   3587   
            }
 2086         -
}
 2087         -
/* ServerEnumGenerator.kt:148 */
 2088         -
impl std::str::FromStr for StringEnum {
 2089         -
    type Err = crate::model::string_enum::ConstraintViolation;
 2090         -
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
 2091         -
        Self::try_from(s)
 2092   3588   
        }
 2093         -
}
 2094         -
/* EnumGenerator.kt:309 */
 2095         -
impl StringEnum {
 2096         -
    /// Returns the `&str` value of the enum member.
 2097         -
    pub fn as_str(&self) -> &str {
        3589  +
    }
        3590  +
        3591  +
    impl ::std::error::Error for ConstraintViolation {}
        3592  +
    /* MapConstraintViolationGenerator.kt:111 */
        3593  +
    impl ConstraintViolation {
        3594  +
        pub(crate) fn as_validation_exception_field(
        3595  +
            self,
        3596  +
            path: ::std::string::String,
        3597  +
        ) -> crate::model::ValidationExceptionField {
 2098   3598   
            match self {
 2099         -
            StringEnum::V => "enumvalue",
        3599  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        3600  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
 2100   3601   
            }
 2101   3602   
        }
 2102         -
    /// Returns all the `&str` representations of the enum members.
 2103         -
    pub const fn values() -> &'static [&'static str] {
 2104         -
        &["enumvalue"]
 2105   3603   
    }
        3604  +
        3605  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2106   3606   
}
 2107         -
/* EnumGenerator.kt:254 */
 2108         -
impl ::std::convert::AsRef<str> for StringEnum {
 2109         -
    fn as_ref(&self) -> &str {
 2110         -
        self.as_str()
        3607  +
pub mod my_union {
        3608  +
        3609  +
    /* RustType.kt:534 */
        3610  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        3611  +
    /* UnconstrainedUnionGenerator.kt:150 */
        3612  +
    #[allow(clippy::enum_variant_names)]
        3613  +
    pub enum ConstraintViolation {
        3614  +
        /* UnconstrainedUnionGenerator.kt:218 */
        3615  +
        EnumValue(crate::model::foo_enum::ConstraintViolation),
        3616  +
        /* UnconstrainedUnionGenerator.kt:150 */
        3617  +
    }
        3618  +
    /* UnconstrainedUnionGenerator.kt:158 */
        3619  +
    impl ::std::fmt::Display for ConstraintViolation {
        3620  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3621  +
            match self {
        3622  +
                Self::EnumValue(inner) => write!(f, "{inner}"),
        3623  +
            }
        3624  +
        }
 2111   3625   
    }
 2112         -
}
 2113         -
/* ConstrainedTraitForEnumGenerator.kt:36 */
 2114         -
impl crate::constrained::Constrained for StringEnum {
 2115         -
    type Unconstrained = ::std::string::String;
 2116         -
}
 2117   3626   
 2118         -
impl ::std::convert::From<::std::string::String>
 2119         -
    for crate::constrained::MaybeConstrained<crate::model::StringEnum>
 2120         -
{
 2121         -
    fn from(value: ::std::string::String) -> Self {
 2122         -
        Self::Unconstrained(value)
        3627  +
    impl ::std::error::Error for ConstraintViolation {}
        3628  +
    /* UnconstrainedUnionGenerator.kt:176 */
        3629  +
    impl ConstraintViolation {
        3630  +
        pub(crate) fn as_validation_exception_field(
        3631  +
            self,
        3632  +
            path: ::std::string::String,
        3633  +
        ) -> crate::model::ValidationExceptionField {
        3634  +
            match self {
        3635  +
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
        3636  +
            }
 2123   3637   
        }
        3638  +
    }
        3639  +
        3640  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2124   3641   
}
        3642  +
/// /* ServerBuilderGenerator.kt:171 */See [`TestConfig`](crate::model::TestConfig).
        3643  +
pub mod test_config {
 2125   3644   
 2126         -
/* StructureGenerator.kt:197 */
 2127         -
#[allow(missing_docs)] // documentation missing in model
 2128         -
/* RustType.kt:534 */
 2129         -
#[derive(
 2130         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2131         -
)]
 2132         -
pub /* StructureGenerator.kt:201 */ struct NestedPayload {
 2133         -
    /* StructureGenerator.kt:231 */
 2134         -
    #[allow(missing_docs)] // documentation missing in model
 2135         -
    pub greeting: ::std::option::Option<::std::string::String>,
 2136         -
    /* StructureGenerator.kt:231 */
        3645  +
    /* ServerBuilderGenerator.kt:461 */
        3646  +
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
        3647  +
        fn from(builder: Builder) -> Self {
        3648  +
            builder.build()
        3649  +
        }
        3650  +
    }
        3651  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TestConfig`](crate::model::TestConfig).
        3652  +
    /* RustType.kt:534 */
        3653  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3654  +
    /* ServerBuilderGenerator.kt:211 */
        3655  +
    pub struct Builder {
        3656  +
        /* ServerBuilderGenerator.kt:308 */
        3657  +
        pub(crate) timeout: ::std::option::Option<i32>,
        3658  +
        /* ServerBuilderGenerator.kt:211 */
        3659  +
    }
        3660  +
    /* ServerBuilderGenerator.kt:215 */
        3661  +
    impl Builder {
        3662  +
        /* ServerBuilderGenerator.kt:331 */
 2137   3663   
        #[allow(missing_docs)] // documentation missing in model
 2138         -
    pub name: ::std::option::Option<::std::string::String>,
 2139         -
    /* StructureGenerator.kt:201 */
 2140         -
}
 2141         -
/* StructureGenerator.kt:135 */
 2142         -
impl NestedPayload {
 2143         -
    /* StructureGenerator.kt:231 */
        3664  +
                               /* ServerBuilderGenerator.kt:343 */
        3665  +
        pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        3666  +
            /* ServerBuilderGenerator.kt:344 */
        3667  +
            self.timeout =
        3668  +
                /* ServerBuilderGenerator.kt:376 */input
        3669  +
            /* ServerBuilderGenerator.kt:344 */;
        3670  +
            self
        3671  +
            /* ServerBuilderGenerator.kt:343 */
        3672  +
        }
        3673  +
        /* ServerBuilderGenerator.kt:426 */
 2144   3674   
        #[allow(missing_docs)] // documentation missing in model
 2145         -
                           /* StructureGenerator.kt:166 */
 2146         -
    pub fn greeting(&self) -> ::std::option::Option<&str> {
 2147         -
        /* StructureGenerator.kt:169 */
 2148         -
        self.greeting.as_deref()
 2149         -
        /* StructureGenerator.kt:166 */
        3675  +
                               /* ServerBuilderGenerator.kt:428 */
        3676  +
        pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        3677  +
            /* ServerBuilderGenerator.kt:429 */
        3678  +
            self.timeout = input.map(|v| v.into());
        3679  +
            self
        3680  +
            /* ServerBuilderGenerator.kt:428 */
 2150   3681   
        }
 2151         -
    /* StructureGenerator.kt:231 */
 2152         -
    #[allow(missing_docs)] // documentation missing in model
 2153         -
                           /* StructureGenerator.kt:166 */
 2154         -
    pub fn name(&self) -> ::std::option::Option<&str> {
 2155         -
        /* StructureGenerator.kt:169 */
 2156         -
        self.name.as_deref()
 2157         -
        /* StructureGenerator.kt:166 */
        3682  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
        3683  +
        /* ServerBuilderGenerator.kt:271 */
        3684  +
        pub fn build(self) -> crate::model::TestConfig {
        3685  +
            self.build_enforcing_all_constraints()
 2158   3686   
        }
 2159         -
    /* StructureGenerator.kt:135 */
 2160         -
}
 2161         -
/* ServerCodegenVisitor.kt:356 */
 2162         -
impl NestedPayload {
 2163         -
    /// /* ServerBuilderGenerator.kt:294 */Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
 2164         -
    /* ServerBuilderGenerator.kt:295 */
 2165         -
    pub fn builder() -> crate::model::nested_payload::Builder {
 2166         -
        /* ServerBuilderGenerator.kt:296 */
 2167         -
        crate::model::nested_payload::Builder::default()
 2168         -
        /* ServerBuilderGenerator.kt:295 */
        3687  +
        /* ServerBuilderGenerator.kt:283 */
        3688  +
        fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
        3689  +
            /* ServerBuilderGenerator.kt:542 */
        3690  +
            crate::model::TestConfig {
        3691  +
                /* ServerBuilderGenerator.kt:546 */
        3692  +
                timeout: self.timeout,
        3693  +
                /* ServerBuilderGenerator.kt:542 */
 2169   3694   
            }
 2170         -
    /* ServerCodegenVisitor.kt:356 */
 2171         -
}
 2172         -
/* ServerStructureConstrainedTraitImpl.kt:21 */
 2173         -
impl crate::constrained::Constrained for crate::model::NestedPayload {
 2174         -
    type Unconstrained = crate::model::nested_payload::Builder;
        3695  +
            /* ServerBuilderGenerator.kt:283 */
        3696  +
        }
        3697  +
        /* ServerBuilderGenerator.kt:215 */
        3698  +
    }
        3699  +
        3700  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2175   3701   
}
        3702  +
/// /* ServerBuilderGenerator.kt:171 */See [`PayloadConfig`](crate::model::PayloadConfig).
        3703  +
pub mod payload_config {
 2176   3704   
 2177         -
/* ConstrainedCollectionGenerator.kt:93 */
 2178         -
#[allow(missing_docs)] // documentation missing in model
 2179         -
/// /* ConstrainedCollectionGenerator.kt:94 */
 2180         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 2181         -
/// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
 2182         -
///
 2183         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 2184         -
///
 2185         -
/* RustType.kt:534 */
 2186         -
#[derive(
 2187         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2188         -
)]
 2189         -
pub /* ConstrainedCollectionGenerator.kt:97 */ struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
 2190         -
/* ConstrainedCollectionGenerator.kt:104 */
 2191         -
impl IntegerSet {
 2192         -
    /* ConstrainedCollectionGenerator.kt:106 */
 2193         -
    /// Returns an immutable reference to the underlying [`::std::vec::Vec<i32>`].
 2194         -
    pub fn inner(&self) -> &::std::vec::Vec<i32> {
 2195         -
        &self.0
        3705  +
    /* ServerBuilderGenerator.kt:461 */
        3706  +
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
        3707  +
        fn from(builder: Builder) -> Self {
        3708  +
            builder.build()
 2196   3709   
        }
 2197         -
    /* ConstrainedCollectionGenerator.kt:116 */
 2198         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
 2199         -
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
 2200         -
        self.0
 2201   3710   
    }
 2202         -
 2203         -
    fn check_unique_items(
 2204         -
        items: ::std::vec::Vec<i32>,
 2205         -
    ) -> ::std::result::Result<::std::vec::Vec<i32>, crate::model::integer_set::ConstraintViolation>
 2206         -
    {
 2207         -
        let mut seen = ::std::collections::HashMap::new();
 2208         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 2209         -
        for (idx, item) in items.iter().enumerate() {
 2210         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 2211         -
                duplicate_indices.push(prev_idx);
        3711  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
        3712  +
    /* RustType.kt:534 */
        3713  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3714  +
    /* ServerBuilderGenerator.kt:211 */
        3715  +
    pub struct Builder {
        3716  +
        /* ServerBuilderGenerator.kt:308 */
        3717  +
        pub(crate) data: ::std::option::Option<i32>,
        3718  +
        /* ServerBuilderGenerator.kt:211 */
 2212   3719   
    }
        3720  +
    /* ServerBuilderGenerator.kt:215 */
        3721  +
    impl Builder {
        3722  +
        /* ServerBuilderGenerator.kt:331 */
        3723  +
        #[allow(missing_docs)] // documentation missing in model
        3724  +
                               /* ServerBuilderGenerator.kt:343 */
        3725  +
        pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
        3726  +
            /* ServerBuilderGenerator.kt:344 */
        3727  +
            self.data =
        3728  +
                /* ServerBuilderGenerator.kt:376 */input
        3729  +
            /* ServerBuilderGenerator.kt:344 */;
        3730  +
            self
        3731  +
            /* ServerBuilderGenerator.kt:343 */
 2213   3732   
        }
 2214         -
 2215         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 2216         -
        for idx in &duplicate_indices {
 2217         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 2218         -
                last_duplicate_indices.push(prev_idx);
        3733  +
        /* ServerBuilderGenerator.kt:426 */
        3734  +
        #[allow(missing_docs)] // documentation missing in model
        3735  +
                               /* ServerBuilderGenerator.kt:428 */
        3736  +
        pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        3737  +
            /* ServerBuilderGenerator.kt:429 */
        3738  +
            self.data = input.map(|v| v.into());
        3739  +
            self
        3740  +
            /* ServerBuilderGenerator.kt:428 */
 2219   3741   
        }
        3742  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
        3743  +
        /* ServerBuilderGenerator.kt:271 */
        3744  +
        pub fn build(self) -> crate::model::PayloadConfig {
        3745  +
            self.build_enforcing_all_constraints()
 2220   3746   
        }
 2221         -
        duplicate_indices.extend(last_duplicate_indices);
 2222         -
 2223         -
        if !duplicate_indices.is_empty() {
 2224         -
            debug_assert!(duplicate_indices.len() >= 2);
 2225         -
            Err(
 2226         -
                crate::model::integer_set::ConstraintViolation::UniqueItems {
 2227         -
                    duplicate_indices,
 2228         -
                    original: items,
 2229         -
                },
 2230         -
            )
 2231         -
        } else {
 2232         -
            Ok(items)
        3747  +
        /* ServerBuilderGenerator.kt:283 */
        3748  +
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
        3749  +
            /* ServerBuilderGenerator.kt:542 */
        3750  +
            crate::model::PayloadConfig {
        3751  +
                /* ServerBuilderGenerator.kt:546 */
        3752  +
                data: self.data,
        3753  +
                /* ServerBuilderGenerator.kt:542 */
 2233   3754   
            }
        3755  +
            /* ServerBuilderGenerator.kt:283 */
 2234   3756   
        }
 2235         -
    /* ConstrainedCollectionGenerator.kt:104 */
 2236         -
}
 2237         -
/* ConstrainedCollectionGenerator.kt:133 */
 2238         -
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
 2239         -
    type Error = crate::model::integer_set::ConstraintViolation;
 2240         -
 2241         -
    /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
 2242         -
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
 2243         -
        let value = Self::check_unique_items(value)?;
 2244         -
 2245         -
        Ok(Self(value))
        3757  +
        /* ServerBuilderGenerator.kt:215 */
 2246   3758   
    }
 2247         -
}
 2248   3759   
 2249         -
impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
 2250         -
    fn from(value: IntegerSet) -> Self {
 2251         -
        value.into_inner()
 2252         -
    }
 2253         -
}
 2254         -
/* ConstrainedCollectionGenerator.kt:181 */
 2255         -
impl crate::constrained::Constrained for IntegerSet {
 2256         -
    type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
        3760  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2257   3761   
}
 2258         -
 2259         -
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2260         -
pub mod validation_exception_field {
        3762  +
/// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
        3763  +
pub mod defaults {
 2261   3764   
 2262   3765   
    /* RustType.kt:534 */
 2263   3766   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2264   3767   
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
 2265   3768   
    /* RustType.kt:534 */
 2266   3769   
    #[non_exhaustive]
 2267   3770   
    /* ServerBuilderConstraintViolations.kt:75 */
 2268   3771   
    #[allow(clippy::enum_variant_names)]
 2269   3772   
    pub enum ConstraintViolation {
 2270         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
 2271         -
        /* ServerBuilderConstraintViolations.kt:144 */
 2272         -
        MissingPath,
 2273         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
 2274         -
        /* ServerBuilderConstraintViolations.kt:144 */
 2275         -
        MissingMessage,
        3773  +
        /// /* ServerBuilderConstraintViolations.kt:159 */Constraint violation occurred building member `default_enum` when building `Defaults`.
        3774  +
        /* RustType.kt:534 */
        3775  +
        #[doc(hidden)]
        3776  +
        /* ServerBuilderConstraintViolations.kt:165 */
        3777  +
        DefaultEnum(crate::model::test_enum::ConstraintViolation),
 2276   3778   
        /* ServerBuilderConstraintViolations.kt:75 */
 2277   3779   
    }
 2278   3780   
    /* ServerBuilderConstraintViolations.kt:116 */
 2279   3781   
    impl ::std::fmt::Display for ConstraintViolation {
 2280   3782   
        /* ServerBuilderConstraintViolations.kt:117 */
 2281   3783   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2282   3784   
            /* ServerBuilderConstraintViolations.kt:118 */
 2283   3785   
            match self {
 2284         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
 2285         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
        3786  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
 2286   3787   
            /* ServerBuilderConstraintViolations.kt:118 */}
 2287   3788   
            /* ServerBuilderConstraintViolations.kt:117 */
 2288   3789   
        }
 2289   3790   
        /* ServerBuilderConstraintViolations.kt:116 */
 2290   3791   
    }
 2291   3792   
    /* ServerBuilderConstraintViolations.kt:83 */
 2292   3793   
    impl ::std::error::Error for ConstraintViolation {}
        3794  +
    /* ServerBuilderConstraintViolations.kt:172 */
        3795  +
    impl ConstraintViolation {
        3796  +
        pub(crate) fn as_validation_exception_field(
        3797  +
            self,
        3798  +
            path: ::std::string::String,
        3799  +
        ) -> crate::model::ValidationExceptionField {
        3800  +
            match self {
        3801  +
                ConstraintViolation::DefaultEnum(inner) => {
        3802  +
                    inner.as_validation_exception_field(path + "/defaultEnum")
        3803  +
                }
        3804  +
            }
        3805  +
        }
        3806  +
    }
        3807  +
    /* ServerBuilderGenerator.kt:244 */
        3808  +
    impl ::std::convert::From<Builder>
        3809  +
        for crate::constrained::MaybeConstrained<crate::model::Defaults>
        3810  +
    {
        3811  +
        fn from(builder: Builder) -> Self {
        3812  +
            Self::Unconstrained(builder)
        3813  +
        }
        3814  +
    }
 2293   3815   
    /* ServerBuilderGenerator.kt:446 */
 2294         -
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
        3816  +
    impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
 2295   3817   
        type Error = ConstraintViolation;
 2296   3818   
 2297   3819   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 2298   3820   
            builder.build()
 2299   3821   
        }
 2300   3822   
    }
 2301         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        3823  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
 2302   3824   
    /* RustType.kt:534 */
 2303   3825   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2304   3826   
    /* ServerBuilderGenerator.kt:211 */
 2305   3827   
    pub struct Builder {
 2306   3828   
        /* ServerBuilderGenerator.kt:308 */
 2307         -
        pub(crate) path: ::std::option::Option<::std::string::String>,
        3829  +
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
        3830  +
        /* ServerBuilderGenerator.kt:308 */
        3831  +
        pub(crate) default_boolean: ::std::option::Option<bool>,
        3832  +
        /* ServerBuilderGenerator.kt:308 */
        3833  +
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
        3834  +
        /* ServerBuilderGenerator.kt:308 */
        3835  +
        pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
        3836  +
        /* ServerBuilderGenerator.kt:308 */
        3837  +
        pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
        3838  +
        /* ServerBuilderGenerator.kt:308 */
        3839  +
        pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
        3840  +
        /* ServerBuilderGenerator.kt:308 */
        3841  +
        pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
        3842  +
        /* ServerBuilderGenerator.kt:308 */
        3843  +
        pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
        3844  +
        /* ServerBuilderGenerator.kt:308 */
        3845  +
        pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
        3846  +
        /* ServerBuilderGenerator.kt:308 */
        3847  +
        pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        3848  +
        /* ServerBuilderGenerator.kt:308 */
        3849  +
        pub(crate) default_byte: ::std::option::Option<i8>,
        3850  +
        /* ServerBuilderGenerator.kt:308 */
        3851  +
        pub(crate) default_short: ::std::option::Option<i16>,
        3852  +
        /* ServerBuilderGenerator.kt:308 */
        3853  +
        pub(crate) default_integer: ::std::option::Option<i32>,
        3854  +
        /* ServerBuilderGenerator.kt:308 */
        3855  +
        pub(crate) default_long: ::std::option::Option<i64>,
        3856  +
        /* ServerBuilderGenerator.kt:308 */
        3857  +
        pub(crate) default_float: ::std::option::Option<f32>,
        3858  +
        /* ServerBuilderGenerator.kt:308 */
        3859  +
        pub(crate) default_double: ::std::option::Option<f64>,
        3860  +
        /* ServerBuilderGenerator.kt:308 */
        3861  +
        pub(crate) default_map: ::std::option::Option<
        3862  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        3863  +
        >,
        3864  +
        /* ServerBuilderGenerator.kt:308 */
        3865  +
        pub(crate) default_enum:
        3866  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
        3867  +
        /* ServerBuilderGenerator.kt:308 */
        3868  +
        pub(crate) default_int_enum: ::std::option::Option<i32>,
        3869  +
        /* ServerBuilderGenerator.kt:308 */
        3870  +
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
        3871  +
        /* ServerBuilderGenerator.kt:308 */
        3872  +
        pub(crate) false_boolean: ::std::option::Option<bool>,
        3873  +
        /* ServerBuilderGenerator.kt:308 */
        3874  +
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
        3875  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
        3876  +
        /* ServerBuilderGenerator.kt:308 */
        3877  +
        pub(crate) zero_short: ::std::option::Option<i16>,
        3878  +
        /* ServerBuilderGenerator.kt:308 */
        3879  +
        pub(crate) zero_integer: ::std::option::Option<i32>,
        3880  +
        /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
        3881  +
        /* ServerBuilderGenerator.kt:308 */
        3882  +
        pub(crate) zero_float: ::std::option::Option<f32>,
 2308   3883   
        /* ServerBuilderGenerator.kt:308 */
 2309         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
        3884  +
        pub(crate) zero_double: ::std::option::Option<f64>,
 2310   3885   
        /* ServerBuilderGenerator.kt:211 */
 2311   3886   
    }
 2312   3887   
    /* ServerBuilderGenerator.kt:215 */
 2313   3888   
    impl Builder {
 2314         -
        /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        3889  +
        /* ServerBuilderGenerator.kt:331 */
        3890  +
        #[allow(missing_docs)] // documentation missing in model
 2315   3891   
                               /* ServerBuilderGenerator.kt:343 */
 2316         -
        pub fn path(mut self, input: ::std::string::String) -> Self {
        3892  +
        pub fn default_string(mut self, input: ::std::string::String) -> Self {
 2317   3893   
            /* ServerBuilderGenerator.kt:344 */
 2318         -
            self.path =
        3894  +
            self.default_string =
 2319   3895   
                /* ServerBuilderGenerator.kt:345 */Some(
 2320   3896   
                    /* ServerBuilderGenerator.kt:376 */input
 2321   3897   
                /* ServerBuilderGenerator.kt:345 */)
 2322   3898   
            /* ServerBuilderGenerator.kt:344 */;
 2323   3899   
            self
 2324   3900   
            /* ServerBuilderGenerator.kt:343 */
 2325   3901   
        }
 2326         -
        /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
        3902  +
        /* ServerBuilderGenerator.kt:426 */
        3903  +
        #[allow(missing_docs)] // documentation missing in model
        3904  +
                               /* ServerBuilderGenerator.kt:428 */
        3905  +
        pub(crate) fn set_default_string(
        3906  +
            mut self,
        3907  +
            input: impl ::std::convert::Into<::std::string::String>,
        3908  +
        ) -> Self {
        3909  +
            /* ServerBuilderGenerator.kt:429 */
        3910  +
            self.default_string = Some(input.into());
        3911  +
            self
        3912  +
            /* ServerBuilderGenerator.kt:428 */
        3913  +
        }
        3914  +
        /* ServerBuilderGenerator.kt:331 */
        3915  +
        #[allow(missing_docs)] // documentation missing in model
 2327   3916   
                               /* ServerBuilderGenerator.kt:343 */
 2328         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
        3917  +
        pub fn default_boolean(mut self, input: bool) -> Self {
 2329   3918   
            /* ServerBuilderGenerator.kt:344 */
 2330         -
            self.message =
        3919  +
            self.default_boolean =
 2331   3920   
                /* ServerBuilderGenerator.kt:345 */Some(
 2332   3921   
                    /* ServerBuilderGenerator.kt:376 */input
 2333   3922   
                /* ServerBuilderGenerator.kt:345 */)
 2334   3923   
            /* ServerBuilderGenerator.kt:344 */;
 2335   3924   
            self
 2336   3925   
            /* ServerBuilderGenerator.kt:343 */
 2337   3926   
        }
 2338         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2339         -
        /// /* ServerBuilderGenerator.kt:260 */
 2340         -
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
 2341         -
        ///
 2342         -
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
 2343         -
        /* ServerBuilderGenerator.kt:271 */
 2344         -
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 2345         -
            self.build_enforcing_all_constraints()
 2346         -
        }
 2347         -
        /* ServerBuilderGenerator.kt:283 */
 2348         -
        fn build_enforcing_all_constraints(
 2349         -
            self,
 2350         -
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 2351         -
            /* ServerBuilderGenerator.kt:287 */
 2352         -
            Ok(
 2353         -
                /* ServerBuilderGenerator.kt:542 */
 2354         -
                crate::model::ValidationExceptionField {
 2355         -
                    /* ServerBuilderGenerator.kt:546 */
 2356         -
                    path: self
 2357         -
                        .path
 2358         -
                        /* ServerBuilderGenerator.kt:569 */
 2359         -
                        .ok_or(ConstraintViolation::MissingPath)?,
 2360         -
                    /* ServerBuilderGenerator.kt:546 */
 2361         -
                    message: self
 2362         -
                        .message
 2363         -
                        /* ServerBuilderGenerator.kt:569 */
 2364         -
                        .ok_or(ConstraintViolation::MissingMessage)?,
 2365         -
                    /* ServerBuilderGenerator.kt:542 */
 2366         -
                }, /* ServerBuilderGenerator.kt:287 */
 2367         -
            )
 2368         -
            /* ServerBuilderGenerator.kt:283 */
 2369         -
        }
 2370         -
        /* ServerBuilderGenerator.kt:215 */
 2371         -
    }
 2372         -
 2373         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2374         -
}
 2375         -
/// /* ServerBuilderGenerator.kt:171 */See [`Dialog`](crate::model::Dialog).
 2376         -
pub mod dialog {
 2377         -
 2378         -
    /* ServerBuilderGenerator.kt:461 */
 2379         -
    impl ::std::convert::From<Builder> for crate::model::Dialog {
 2380         -
        fn from(builder: Builder) -> Self {
 2381         -
            builder.build()
 2382         -
        }
 2383         -
    }
 2384         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Dialog`](crate::model::Dialog).
 2385         -
    /* RustType.kt:534 */
 2386         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2387         -
    /* ServerBuilderGenerator.kt:211 */
 2388         -
    pub struct Builder {
 2389         -
        /* ServerBuilderGenerator.kt:308 */
 2390         -
        pub(crate) language: ::std::option::Option<::std::string::String>,
 2391         -
        /* ServerBuilderGenerator.kt:308 */
 2392         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
 2393         -
        /* ServerBuilderGenerator.kt:308 */
 2394         -
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
 2395         -
        /* ServerBuilderGenerator.kt:211 */
        3927  +
        /* ServerBuilderGenerator.kt:426 */
        3928  +
        #[allow(missing_docs)] // documentation missing in model
        3929  +
                               /* ServerBuilderGenerator.kt:428 */
        3930  +
        pub(crate) fn set_default_boolean(
        3931  +
            mut self,
        3932  +
            input: impl ::std::convert::Into<bool>,
        3933  +
        ) -> Self {
        3934  +
            /* ServerBuilderGenerator.kt:429 */
        3935  +
            self.default_boolean = Some(input.into());
        3936  +
            self
        3937  +
            /* ServerBuilderGenerator.kt:428 */
 2396   3938   
        }
 2397         -
    /* ServerBuilderGenerator.kt:215 */
 2398         -
    impl Builder {
 2399   3939   
        /* ServerBuilderGenerator.kt:331 */
 2400   3940   
        #[allow(missing_docs)] // documentation missing in model
 2401   3941   
                               /* ServerBuilderGenerator.kt:343 */
 2402         -
        pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3942  +
        pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
 2403   3943   
            /* ServerBuilderGenerator.kt:344 */
 2404         -
            self.language =
        3944  +
            self.default_list =
        3945  +
                /* ServerBuilderGenerator.kt:345 */Some(
 2405   3946   
                    /* ServerBuilderGenerator.kt:376 */input
        3947  +
                /* ServerBuilderGenerator.kt:345 */)
 2406   3948   
            /* ServerBuilderGenerator.kt:344 */;
 2407   3949   
            self
 2408   3950   
            /* ServerBuilderGenerator.kt:343 */
 2409   3951   
        }
 2410   3952   
        /* ServerBuilderGenerator.kt:426 */
 2411   3953   
        #[allow(missing_docs)] // documentation missing in model
 2412   3954   
                               /* ServerBuilderGenerator.kt:428 */
 2413         -
        pub(crate) fn set_language(
        3955  +
        pub(crate) fn set_default_list(
 2414   3956   
            mut self,
 2415         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3957  +
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
 2416   3958   
        ) -> Self {
 2417   3959   
            /* ServerBuilderGenerator.kt:429 */
 2418         -
            self.language = input.map(|v| v.into());
        3960  +
            self.default_list = Some(input.into());
 2419   3961   
            self
 2420   3962   
            /* ServerBuilderGenerator.kt:428 */
 2421   3963   
        }
 2422   3964   
        /* ServerBuilderGenerator.kt:331 */
 2423   3965   
        #[allow(missing_docs)] // documentation missing in model
 2424   3966   
                               /* ServerBuilderGenerator.kt:343 */
 2425         -
        pub fn greeting(mut self, input: ::std::string::String) -> Self {
        3967  +
        pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
 2426   3968   
            /* ServerBuilderGenerator.kt:344 */
 2427         -
            self.greeting =
        3969  +
            self.default_document_map =
 2428   3970   
                /* ServerBuilderGenerator.kt:345 */Some(
 2429   3971   
                    /* ServerBuilderGenerator.kt:376 */input
 2430   3972   
                /* ServerBuilderGenerator.kt:345 */)
 2431   3973   
            /* ServerBuilderGenerator.kt:344 */;
 2432   3974   
            self
 2433   3975   
            /* ServerBuilderGenerator.kt:343 */
 2434   3976   
        }
 2435   3977   
        /* ServerBuilderGenerator.kt:426 */
 2436   3978   
        #[allow(missing_docs)] // documentation missing in model
 2437   3979   
                               /* ServerBuilderGenerator.kt:428 */
 2438         -
        pub(crate) fn set_greeting(
        3980  +
        pub(crate) fn set_default_document_map(
 2439   3981   
            mut self,
 2440         -
            input: impl ::std::convert::Into<::std::string::String>,
        3982  +
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
 2441   3983   
        ) -> Self {
 2442   3984   
            /* ServerBuilderGenerator.kt:429 */
 2443         -
            self.greeting = Some(input.into());
        3985  +
            self.default_document_map = Some(input.into());
 2444   3986   
            self
 2445   3987   
            /* ServerBuilderGenerator.kt:428 */
 2446   3988   
        }
 2447   3989   
        /* ServerBuilderGenerator.kt:331 */
 2448   3990   
        #[allow(missing_docs)] // documentation missing in model
 2449   3991   
                               /* ServerBuilderGenerator.kt:343 */
 2450         -
        pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
        3992  +
        pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
 2451   3993   
            /* ServerBuilderGenerator.kt:344 */
 2452         -
            self.farewell =
        3994  +
            self.default_document_string =
        3995  +
                /* ServerBuilderGenerator.kt:345 */Some(
 2453   3996   
                    /* ServerBuilderGenerator.kt:376 */input
        3997  +
                /* ServerBuilderGenerator.kt:345 */)
 2454   3998   
            /* ServerBuilderGenerator.kt:344 */;
 2455   3999   
            self
 2456   4000   
            /* ServerBuilderGenerator.kt:343 */
 2457   4001   
        }
 2458   4002   
        /* ServerBuilderGenerator.kt:426 */
 2459   4003   
        #[allow(missing_docs)] // documentation missing in model
 2460   4004   
                               /* ServerBuilderGenerator.kt:428 */
 2461         -
        pub(crate) fn set_farewell(
        4005  +
        pub(crate) fn set_default_document_string(
 2462   4006   
            mut self,
 2463         -
            input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
        4007  +
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
 2464   4008   
        ) -> Self {
 2465   4009   
            /* ServerBuilderGenerator.kt:429 */
 2466         -
            self.farewell = input.map(|v| v.into());
        4010  +
            self.default_document_string = Some(input.into());
 2467   4011   
            self
 2468   4012   
            /* ServerBuilderGenerator.kt:428 */
 2469   4013   
        }
 2470         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
 2471         -
        /* ServerBuilderGenerator.kt:271 */
 2472         -
        pub fn build(self) -> crate::model::Dialog {
 2473         -
            self.build_enforcing_all_constraints()
        4014  +
        /* ServerBuilderGenerator.kt:331 */
        4015  +
        #[allow(missing_docs)] // documentation missing in model
        4016  +
                               /* ServerBuilderGenerator.kt:343 */
        4017  +
        pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
        4018  +
            /* ServerBuilderGenerator.kt:344 */
        4019  +
            self.default_document_boolean =
        4020  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4021  +
                    /* ServerBuilderGenerator.kt:376 */input
        4022  +
                /* ServerBuilderGenerator.kt:345 */)
        4023  +
            /* ServerBuilderGenerator.kt:344 */;
        4024  +
            self
        4025  +
            /* ServerBuilderGenerator.kt:343 */
 2474   4026   
        }
 2475         -
        /* ServerBuilderGenerator.kt:283 */
 2476         -
        fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
 2477         -
            /* ServerBuilderGenerator.kt:542 */
 2478         -
            crate::model::Dialog {
 2479         -
                /* ServerBuilderGenerator.kt:546 */
 2480         -
                language: self.language,
 2481         -
                /* ServerBuilderGenerator.kt:546 */
 2482         -
                greeting: self
 2483         -
                    .greeting
 2484         -
                    /* ServerBuilderGeneratorCommon.kt:129 */
 2485         -
                    .unwrap_or_else(|| String::from("hi")),
 2486         -
                /* ServerBuilderGenerator.kt:546 */
 2487         -
                farewell: self.farewell,
 2488         -
                /* ServerBuilderGenerator.kt:542 */
        4027  +
        /* ServerBuilderGenerator.kt:426 */
        4028  +
        #[allow(missing_docs)] // documentation missing in model
        4029  +
                               /* ServerBuilderGenerator.kt:428 */
        4030  +
        pub(crate) fn set_default_document_boolean(
        4031  +
            mut self,
        4032  +
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
        4033  +
        ) -> Self {
        4034  +
            /* ServerBuilderGenerator.kt:429 */
        4035  +
            self.default_document_boolean = Some(input.into());
        4036  +
            self
        4037  +
            /* ServerBuilderGenerator.kt:428 */
 2489   4038   
        }
 2490         -
            /* ServerBuilderGenerator.kt:283 */
        4039  +
        /* ServerBuilderGenerator.kt:331 */
        4040  +
        #[allow(missing_docs)] // documentation missing in model
        4041  +
                               /* ServerBuilderGenerator.kt:343 */
        4042  +
        pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
        4043  +
            /* ServerBuilderGenerator.kt:344 */
        4044  +
            self.default_document_list =
        4045  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4046  +
                    /* ServerBuilderGenerator.kt:376 */input
        4047  +
                /* ServerBuilderGenerator.kt:345 */)
        4048  +
            /* ServerBuilderGenerator.kt:344 */;
        4049  +
            self
        4050  +
            /* ServerBuilderGenerator.kt:343 */
 2491   4051   
        }
 2492         -
        /* ServerBuilderGenerator.kt:215 */
        4052  +
        /* ServerBuilderGenerator.kt:426 */
        4053  +
        #[allow(missing_docs)] // documentation missing in model
        4054  +
                               /* ServerBuilderGenerator.kt:428 */
        4055  +
        pub(crate) fn set_default_document_list(
        4056  +
            mut self,
        4057  +
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
        4058  +
        ) -> Self {
        4059  +
            /* ServerBuilderGenerator.kt:429 */
        4060  +
            self.default_document_list = Some(input.into());
        4061  +
            self
        4062  +
            /* ServerBuilderGenerator.kt:428 */
 2493   4063   
        }
 2494         -
 2495         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2496         -
}
 2497         -
/// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
 2498         -
pub mod farewell {
 2499         -
 2500         -
    /* ServerBuilderGenerator.kt:461 */
 2501         -
    impl ::std::convert::From<Builder> for crate::model::Farewell {
 2502         -
        fn from(builder: Builder) -> Self {
 2503         -
            builder.build()
        4064  +
        /* ServerBuilderGenerator.kt:331 */
        4065  +
        #[allow(missing_docs)] // documentation missing in model
        4066  +
                               /* ServerBuilderGenerator.kt:343 */
        4067  +
        pub fn default_null_document(
        4068  +
            mut self,
        4069  +
            input: ::std::option::Option<::aws_smithy_types::Document>,
        4070  +
        ) -> Self {
        4071  +
            /* ServerBuilderGenerator.kt:344 */
        4072  +
            self.default_null_document =
        4073  +
                /* ServerBuilderGenerator.kt:376 */input
        4074  +
            /* ServerBuilderGenerator.kt:344 */;
        4075  +
            self
        4076  +
            /* ServerBuilderGenerator.kt:343 */
 2504   4077   
        }
        4078  +
        /* ServerBuilderGenerator.kt:426 */
        4079  +
        #[allow(missing_docs)] // documentation missing in model
        4080  +
                               /* ServerBuilderGenerator.kt:428 */
        4081  +
        pub(crate) fn set_default_null_document(
        4082  +
            mut self,
        4083  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
        4084  +
        ) -> Self {
        4085  +
            /* ServerBuilderGenerator.kt:429 */
        4086  +
            self.default_null_document = input.map(|v| v.into());
        4087  +
            self
        4088  +
            /* ServerBuilderGenerator.kt:428 */
 2505   4089   
        }
 2506         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
 2507         -
    /* RustType.kt:534 */
 2508         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2509         -
    /* ServerBuilderGenerator.kt:211 */
 2510         -
    pub struct Builder {
 2511         -
        /* ServerBuilderGenerator.kt:308 */
 2512         -
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
 2513         -
        /* ServerBuilderGenerator.kt:211 */
        4090  +
        /* ServerBuilderGenerator.kt:331 */
        4091  +
        #[allow(missing_docs)] // documentation missing in model
        4092  +
                               /* ServerBuilderGenerator.kt:343 */
        4093  +
        pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        4094  +
            /* ServerBuilderGenerator.kt:344 */
        4095  +
            self.default_timestamp =
        4096  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4097  +
                    /* ServerBuilderGenerator.kt:376 */input
        4098  +
                /* ServerBuilderGenerator.kt:345 */)
        4099  +
            /* ServerBuilderGenerator.kt:344 */;
        4100  +
            self
        4101  +
            /* ServerBuilderGenerator.kt:343 */
        4102  +
        }
        4103  +
        /* ServerBuilderGenerator.kt:426 */
        4104  +
        #[allow(missing_docs)] // documentation missing in model
        4105  +
                               /* ServerBuilderGenerator.kt:428 */
        4106  +
        pub(crate) fn set_default_timestamp(
        4107  +
            mut self,
        4108  +
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
        4109  +
        ) -> Self {
        4110  +
            /* ServerBuilderGenerator.kt:429 */
        4111  +
            self.default_timestamp = Some(input.into());
        4112  +
            self
        4113  +
            /* ServerBuilderGenerator.kt:428 */
 2514   4114   
        }
 2515         -
    /* ServerBuilderGenerator.kt:215 */
 2516         -
    impl Builder {
 2517   4115   
        /* ServerBuilderGenerator.kt:331 */
 2518   4116   
        #[allow(missing_docs)] // documentation missing in model
 2519   4117   
                               /* ServerBuilderGenerator.kt:343 */
 2520         -
        pub fn phrase(mut self, input: ::std::string::String) -> Self {
        4118  +
        pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
 2521   4119   
            /* ServerBuilderGenerator.kt:344 */
 2522         -
            self.phrase =
        4120  +
            self.default_blob =
 2523   4121   
                /* ServerBuilderGenerator.kt:345 */Some(
 2524   4122   
                    /* ServerBuilderGenerator.kt:376 */input
 2525   4123   
                /* ServerBuilderGenerator.kt:345 */)
 2526   4124   
            /* ServerBuilderGenerator.kt:344 */;
 2527   4125   
            self
 2528   4126   
            /* ServerBuilderGenerator.kt:343 */
 2529   4127   
        }
 2530   4128   
        /* ServerBuilderGenerator.kt:426 */
 2531   4129   
        #[allow(missing_docs)] // documentation missing in model
 2532   4130   
                               /* ServerBuilderGenerator.kt:428 */
 2533         -
        pub(crate) fn set_phrase(
        4131  +
        pub(crate) fn set_default_blob(
 2534   4132   
            mut self,
 2535         -
            input: impl ::std::convert::Into<::std::string::String>,
        4133  +
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
 2536   4134   
        ) -> Self {
 2537   4135   
            /* ServerBuilderGenerator.kt:429 */
 2538         -
            self.phrase = Some(input.into());
        4136  +
            self.default_blob = Some(input.into());
 2539   4137   
            self
 2540   4138   
            /* ServerBuilderGenerator.kt:428 */
 2541   4139   
        }
 2542         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
 2543         -
        /* ServerBuilderGenerator.kt:271 */
 2544         -
        pub fn build(self) -> crate::model::Farewell {
 2545         -
            self.build_enforcing_all_constraints()
 2546         -
        }
 2547         -
        /* ServerBuilderGenerator.kt:283 */
 2548         -
        fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
 2549         -
            /* ServerBuilderGenerator.kt:542 */
 2550         -
            crate::model::Farewell {
 2551         -
                /* ServerBuilderGenerator.kt:546 */
 2552         -
                phrase: self
 2553         -
                    .phrase
 2554         -
                    /* ServerBuilderGeneratorCommon.kt:129 */
 2555         -
                    .unwrap_or_else(|| String::from("bye")),
 2556         -
                /* ServerBuilderGenerator.kt:542 */
 2557         -
            }
 2558         -
            /* ServerBuilderGenerator.kt:283 */
 2559         -
        }
 2560         -
        /* ServerBuilderGenerator.kt:215 */
 2561         -
    }
 2562         -
 2563         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2564         -
}
 2565         -
/// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
 2566         -
pub mod top_level {
 2567         -
 2568         -
    /* RustType.kt:534 */
 2569         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2570         -
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
 2571         -
    /* RustType.kt:534 */
 2572         -
    #[non_exhaustive]
 2573         -
    /* ServerBuilderConstraintViolations.kt:75 */
 2574         -
    #[allow(clippy::enum_variant_names)]
 2575         -
    pub enum ConstraintViolation {
 2576         -
        /// /* ServerBuilderConstraintViolations.kt:137 */`dialog` was not provided but it is required when building `TopLevel`.
 2577         -
        /* ServerBuilderConstraintViolations.kt:144 */
 2578         -
        MissingDialog,
 2579         -
        /* ServerBuilderConstraintViolations.kt:75 */
 2580         -
    }
 2581         -
    /* ServerBuilderConstraintViolations.kt:116 */
 2582         -
    impl ::std::fmt::Display for ConstraintViolation {
 2583         -
        /* ServerBuilderConstraintViolations.kt:117 */
 2584         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2585         -
            /* ServerBuilderConstraintViolations.kt:118 */
 2586         -
            match self {
 2587         -
                /* ServerBuilderConstraintViolations.kt:126 */
 2588         -
                ConstraintViolation::MissingDialog => write!(
 2589         -
                    f,
 2590         -
                    "`dialog` was not provided but it is required when building `TopLevel`"
 2591         -
                ),
 2592         -
                /* ServerBuilderConstraintViolations.kt:118 */
 2593         -
            }
 2594         -
            /* ServerBuilderConstraintViolations.kt:117 */
 2595         -
        }
 2596         -
        /* ServerBuilderConstraintViolations.kt:116 */
 2597         -
    }
 2598         -
    /* ServerBuilderConstraintViolations.kt:83 */
 2599         -
    impl ::std::error::Error for ConstraintViolation {}
 2600         -
    /* ServerBuilderConstraintViolations.kt:172 */
 2601         -
    impl ConstraintViolation {
 2602         -
        pub(crate) fn as_validation_exception_field(
 2603         -
            self,
 2604         -
            path: ::std::string::String,
 2605         -
        ) -> crate::model::ValidationExceptionField {
 2606         -
            match self {
 2607         -
            ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
 2608         -
                                                message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
 2609         -
                                                path: path + "/dialog",
 2610         -
                                            },
 2611         -
        }
 2612         -
        }
 2613         -
    }
 2614         -
    /* ServerBuilderGenerator.kt:244 */
 2615         -
    impl ::std::convert::From<Builder>
 2616         -
        for crate::constrained::MaybeConstrained<crate::model::TopLevel>
 2617         -
    {
 2618         -
        fn from(builder: Builder) -> Self {
 2619         -
            Self::Unconstrained(builder)
 2620         -
        }
 2621         -
    }
 2622         -
    /* ServerBuilderGenerator.kt:446 */
 2623         -
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
 2624         -
        type Error = ConstraintViolation;
 2625         -
 2626         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 2627         -
            builder.build()
 2628         -
        }
 2629         -
    }
 2630         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
 2631         -
    /* RustType.kt:534 */
 2632         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2633         -
    /* ServerBuilderGenerator.kt:211 */
 2634         -
    pub struct Builder {
 2635         -
        /* ServerBuilderGenerator.kt:308 */
 2636         -
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
 2637         -
        /* ServerBuilderGenerator.kt:308 */
 2638         -
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
 2639         -
        /* ServerBuilderGenerator.kt:308 */
 2640         -
        pub(crate) dialog_map: ::std::option::Option<
 2641         -
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 2642         -
        >,
 2643         -
        /* ServerBuilderGenerator.kt:211 */
 2644         -
    }
 2645         -
    /* ServerBuilderGenerator.kt:215 */
 2646         -
    impl Builder {
 2647   4140   
        /* ServerBuilderGenerator.kt:331 */
 2648   4141   
        #[allow(missing_docs)] // documentation missing in model
 2649   4142   
                               /* ServerBuilderGenerator.kt:343 */
 2650         -
        pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
        4143  +
        pub fn default_byte(mut self, input: i8) -> Self {
 2651   4144   
            /* ServerBuilderGenerator.kt:344 */
 2652         -
            self.dialog =
        4145  +
            self.default_byte =
 2653   4146   
                /* ServerBuilderGenerator.kt:345 */Some(
 2654   4147   
                    /* ServerBuilderGenerator.kt:376 */input
 2655   4148   
                /* ServerBuilderGenerator.kt:345 */)
 2656   4149   
            /* ServerBuilderGenerator.kt:344 */;
 2657   4150   
            self
 2658   4151   
            /* ServerBuilderGenerator.kt:343 */
 2659   4152   
        }
 2660   4153   
        /* ServerBuilderGenerator.kt:426 */
 2661   4154   
        #[allow(missing_docs)] // documentation missing in model
 2662   4155   
                               /* ServerBuilderGenerator.kt:428 */
 2663         -
        pub(crate) fn set_dialog(
 2664         -
            mut self,
 2665         -
            input: impl ::std::convert::Into<crate::model::Dialog>,
 2666         -
        ) -> Self {
        4156  +
        pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
 2667   4157   
            /* ServerBuilderGenerator.kt:429 */
 2668         -
            self.dialog = Some(input.into());
        4158  +
            self.default_byte = Some(input.into());
 2669   4159   
            self
 2670   4160   
            /* ServerBuilderGenerator.kt:428 */
 2671   4161   
        }
 2672   4162   
        /* ServerBuilderGenerator.kt:331 */
 2673   4163   
        #[allow(missing_docs)] // documentation missing in model
 2674   4164   
                               /* ServerBuilderGenerator.kt:343 */
 2675         -
        pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
        4165  +
        pub fn default_short(mut self, input: i16) -> Self {
 2676   4166   
            /* ServerBuilderGenerator.kt:344 */
 2677         -
            self.dialog_list =
        4167  +
            self.default_short =
 2678   4168   
                /* ServerBuilderGenerator.kt:345 */Some(
 2679   4169   
                    /* ServerBuilderGenerator.kt:376 */input
 2680   4170   
                /* ServerBuilderGenerator.kt:345 */)
 2681   4171   
            /* ServerBuilderGenerator.kt:344 */;
 2682   4172   
            self
 2683   4173   
            /* ServerBuilderGenerator.kt:343 */
 2684   4174   
        }
 2685   4175   
        /* ServerBuilderGenerator.kt:426 */
 2686   4176   
        #[allow(missing_docs)] // documentation missing in model
 2687   4177   
                               /* ServerBuilderGenerator.kt:428 */
 2688         -
        pub(crate) fn set_dialog_list(
 2689         -
            mut self,
 2690         -
            input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
 2691         -
        ) -> Self {
        4178  +
        pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
 2692   4179   
            /* ServerBuilderGenerator.kt:429 */
 2693         -
            self.dialog_list = Some(input.into());
        4180  +
            self.default_short = Some(input.into());
 2694   4181   
            self
 2695   4182   
            /* ServerBuilderGenerator.kt:428 */
 2696   4183   
        }
 2697   4184   
        /* ServerBuilderGenerator.kt:331 */
 2698   4185   
        #[allow(missing_docs)] // documentation missing in model
 2699   4186   
                               /* ServerBuilderGenerator.kt:343 */
 2700         -
        pub fn dialog_map(
 2701         -
            mut self,
 2702         -
            input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 2703         -
        ) -> Self {
        4187  +
        pub fn default_integer(mut self, input: i32) -> Self {
 2704   4188   
            /* ServerBuilderGenerator.kt:344 */
 2705         -
            self.dialog_map =
        4189  +
            self.default_integer =
 2706   4190   
                /* ServerBuilderGenerator.kt:345 */Some(
 2707   4191   
                    /* ServerBuilderGenerator.kt:376 */input
 2708   4192   
                /* ServerBuilderGenerator.kt:345 */)
 2709   4193   
            /* ServerBuilderGenerator.kt:344 */;
 2710   4194   
            self
 2711   4195   
            /* ServerBuilderGenerator.kt:343 */
 2712   4196   
        }
 2713   4197   
        /* ServerBuilderGenerator.kt:426 */
 2714   4198   
        #[allow(missing_docs)] // documentation missing in model
 2715   4199   
                               /* ServerBuilderGenerator.kt:428 */
 2716         -
        pub(crate) fn set_dialog_map(
 2717         -
            mut self,
 2718         -
            input: impl ::std::convert::Into<
 2719         -
                ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 2720         -
            >,
 2721         -
        ) -> Self {
        4200  +
        pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 2722   4201   
            /* ServerBuilderGenerator.kt:429 */
 2723         -
            self.dialog_map = Some(input.into());
        4202  +
            self.default_integer = Some(input.into());
 2724   4203   
            self
 2725   4204   
            /* ServerBuilderGenerator.kt:428 */
 2726   4205   
        }
 2727         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
 2728         -
        /// /* ServerBuilderGenerator.kt:260 */
 2729         -
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
 2730         -
        ///
 2731         -
        /* ServerBuilderGenerator.kt:271 */
 2732         -
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
 2733         -
            self.build_enforcing_all_constraints()
 2734         -
        }
 2735         -
        /* ServerBuilderGenerator.kt:283 */
 2736         -
        fn build_enforcing_all_constraints(
 2737         -
            self,
 2738         -
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
 2739         -
            /* ServerBuilderGenerator.kt:287 */
 2740         -
            Ok(
 2741         -
                /* ServerBuilderGenerator.kt:542 */
 2742         -
                crate::model::TopLevel {
 2743         -
                    /* ServerBuilderGenerator.kt:546 */
 2744         -
                    dialog: self
 2745         -
                        .dialog
 2746         -
                        /* ServerBuilderGenerator.kt:569 */
 2747         -
                        .ok_or(ConstraintViolation::MissingDialog)?,
 2748         -
                    /* ServerBuilderGenerator.kt:546 */
 2749         -
                    dialog_list: self
 2750         -
                        .dialog_list
 2751         -
                        /* ServerBuilderGeneratorCommon.kt:95 */
 2752         -
                        .unwrap_or_default(),
 2753         -
                    /* ServerBuilderGenerator.kt:546 */
 2754         -
                    dialog_map: self
 2755         -
                        .dialog_map
 2756         -
                        /* ServerBuilderGeneratorCommon.kt:95 */
 2757         -
                        .unwrap_or_default(),
 2758         -
                    /* ServerBuilderGenerator.kt:542 */
 2759         -
                }, /* ServerBuilderGenerator.kt:287 */
 2760         -
            )
 2761         -
            /* ServerBuilderGenerator.kt:283 */
 2762         -
        }
 2763         -
        /* ServerBuilderGenerator.kt:215 */
        4206  +
        /* ServerBuilderGenerator.kt:331 */
        4207  +
        #[allow(missing_docs)] // documentation missing in model
        4208  +
                               /* ServerBuilderGenerator.kt:343 */
        4209  +
        pub fn default_long(mut self, input: i64) -> Self {
        4210  +
            /* ServerBuilderGenerator.kt:344 */
        4211  +
            self.default_long =
        4212  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4213  +
                    /* ServerBuilderGenerator.kt:376 */input
        4214  +
                /* ServerBuilderGenerator.kt:345 */)
        4215  +
            /* ServerBuilderGenerator.kt:344 */;
        4216  +
            self
        4217  +
            /* ServerBuilderGenerator.kt:343 */
 2764   4218   
        }
 2765         -
 2766         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2767         -
}
 2768         -
/// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 2769         -
pub mod client_optional_defaults {
 2770         -
 2771         -
    /* ServerBuilderGenerator.kt:461 */
 2772         -
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 2773         -
        fn from(builder: Builder) -> Self {
 2774         -
            builder.build()
        4219  +
        /* ServerBuilderGenerator.kt:426 */
        4220  +
        #[allow(missing_docs)] // documentation missing in model
        4221  +
                               /* ServerBuilderGenerator.kt:428 */
        4222  +
        pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        4223  +
            /* ServerBuilderGenerator.kt:429 */
        4224  +
            self.default_long = Some(input.into());
        4225  +
            self
        4226  +
            /* ServerBuilderGenerator.kt:428 */
 2775   4227   
        }
        4228  +
        /* ServerBuilderGenerator.kt:331 */
        4229  +
        #[allow(missing_docs)] // documentation missing in model
        4230  +
                               /* ServerBuilderGenerator.kt:343 */
        4231  +
        pub fn default_float(mut self, input: f32) -> Self {
        4232  +
            /* ServerBuilderGenerator.kt:344 */
        4233  +
            self.default_float =
        4234  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4235  +
                    /* ServerBuilderGenerator.kt:376 */input
        4236  +
                /* ServerBuilderGenerator.kt:345 */)
        4237  +
            /* ServerBuilderGenerator.kt:344 */;
        4238  +
            self
        4239  +
            /* ServerBuilderGenerator.kt:343 */
 2776   4240   
        }
 2777         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 2778         -
    /* RustType.kt:534 */
 2779         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2780         -
    /* ServerBuilderGenerator.kt:211 */
 2781         -
    pub struct Builder {
 2782         -
        /* ServerBuilderGenerator.kt:308 */
 2783         -
        pub(crate) member: ::std::option::Option<i32>,
 2784         -
        /* ServerBuilderGenerator.kt:211 */
        4241  +
        /* ServerBuilderGenerator.kt:426 */
        4242  +
        #[allow(missing_docs)] // documentation missing in model
        4243  +
                               /* ServerBuilderGenerator.kt:428 */
        4244  +
        pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        4245  +
            /* ServerBuilderGenerator.kt:429 */
        4246  +
            self.default_float = Some(input.into());
        4247  +
            self
        4248  +
            /* ServerBuilderGenerator.kt:428 */
 2785   4249   
        }
 2786         -
    /* ServerBuilderGenerator.kt:215 */
 2787         -
    impl Builder {
 2788   4250   
        /* ServerBuilderGenerator.kt:331 */
 2789   4251   
        #[allow(missing_docs)] // documentation missing in model
 2790   4252   
                               /* ServerBuilderGenerator.kt:343 */
 2791         -
        pub fn member(mut self, input: i32) -> Self {
        4253  +
        pub fn default_double(mut self, input: f64) -> Self {
 2792   4254   
            /* ServerBuilderGenerator.kt:344 */
 2793         -
            self.member =
        4255  +
            self.default_double =
 2794   4256   
                /* ServerBuilderGenerator.kt:345 */Some(
 2795   4257   
                    /* ServerBuilderGenerator.kt:376 */input
 2796   4258   
                /* ServerBuilderGenerator.kt:345 */)
 2797   4259   
            /* ServerBuilderGenerator.kt:344 */;
 2798   4260   
            self
 2799   4261   
            /* ServerBuilderGenerator.kt:343 */
 2800   4262   
        }
 2801   4263   
        /* ServerBuilderGenerator.kt:426 */
 2802   4264   
        #[allow(missing_docs)] // documentation missing in model
 2803   4265   
                               /* ServerBuilderGenerator.kt:428 */
 2804         -
        pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        4266  +
        pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 2805   4267   
            /* ServerBuilderGenerator.kt:429 */
 2806         -
            self.member = Some(input.into());
        4268  +
            self.default_double = Some(input.into());
 2807   4269   
            self
 2808   4270   
            /* ServerBuilderGenerator.kt:428 */
 2809   4271   
        }
 2810         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 2811         -
        /* ServerBuilderGenerator.kt:271 */
 2812         -
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
 2813         -
            self.build_enforcing_all_constraints()
 2814         -
        }
 2815         -
        /* ServerBuilderGenerator.kt:283 */
 2816         -
        fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
 2817         -
            /* ServerBuilderGenerator.kt:542 */
 2818         -
            crate::model::ClientOptionalDefaults {
 2819         -
                /* ServerBuilderGenerator.kt:546 */
 2820         -
                member: self
 2821         -
                    .member
 2822         -
                    /* ServerBuilderGeneratorCommon.kt:125 */
 2823         -
                    .unwrap_or(0i32),
 2824         -
                /* ServerBuilderGenerator.kt:542 */
 2825         -
            }
 2826         -
            /* ServerBuilderGenerator.kt:283 */
 2827         -
        }
 2828         -
        /* ServerBuilderGenerator.kt:215 */
 2829         -
    }
 2830         -
 2831         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 2832         -
}
 2833         -
/// /* ServerBuilderGenerator.kt:171 */See [`Defaults`](crate::model::Defaults).
 2834         -
pub mod defaults {
 2835         -
 2836         -
    /* RustType.kt:534 */
 2837         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2838         -
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
 2839         -
    /* RustType.kt:534 */
 2840         -
    #[non_exhaustive]
 2841         -
    /* ServerBuilderConstraintViolations.kt:75 */
 2842         -
    #[allow(clippy::enum_variant_names)]
 2843         -
    pub enum ConstraintViolation {
 2844         -
        /// /* ServerBuilderConstraintViolations.kt:159 */Constraint violation occurred building member `default_enum` when building `Defaults`.
 2845         -
        /* RustType.kt:534 */
 2846         -
        #[doc(hidden)]
 2847         -
        /* ServerBuilderConstraintViolations.kt:165 */
 2848         -
        DefaultEnum(crate::model::test_enum::ConstraintViolation),
 2849         -
        /* ServerBuilderConstraintViolations.kt:75 */
 2850         -
    }
 2851         -
    /* ServerBuilderConstraintViolations.kt:116 */
 2852         -
    impl ::std::fmt::Display for ConstraintViolation {
 2853         -
        /* ServerBuilderConstraintViolations.kt:117 */
 2854         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2855         -
            /* ServerBuilderConstraintViolations.kt:118 */
 2856         -
            match self {
 2857         -
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
 2858         -
            /* ServerBuilderConstraintViolations.kt:118 */}
 2859         -
            /* ServerBuilderConstraintViolations.kt:117 */
 2860         -
        }
 2861         -
        /* ServerBuilderConstraintViolations.kt:116 */
 2862         -
    }
 2863         -
    /* ServerBuilderConstraintViolations.kt:83 */
 2864         -
    impl ::std::error::Error for ConstraintViolation {}
 2865         -
    /* ServerBuilderConstraintViolations.kt:172 */
 2866         -
    impl ConstraintViolation {
 2867         -
        pub(crate) fn as_validation_exception_field(
 2868         -
            self,
 2869         -
            path: ::std::string::String,
 2870         -
        ) -> crate::model::ValidationExceptionField {
 2871         -
            match self {
 2872         -
                ConstraintViolation::DefaultEnum(inner) => {
 2873         -
                    inner.as_validation_exception_field(path + "/defaultEnum")
 2874         -
                }
 2875         -
            }
 2876         -
        }
 2877         -
    }
 2878         -
    /* ServerBuilderGenerator.kt:244 */
 2879         -
    impl ::std::convert::From<Builder>
 2880         -
        for crate::constrained::MaybeConstrained<crate::model::Defaults>
 2881         -
    {
 2882         -
        fn from(builder: Builder) -> Self {
 2883         -
            Self::Unconstrained(builder)
 2884         -
        }
 2885         -
    }
 2886         -
    /* ServerBuilderGenerator.kt:446 */
 2887         -
    impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
 2888         -
        type Error = ConstraintViolation;
 2889         -
 2890         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 2891         -
            builder.build()
 2892         -
        }
        4272  +
        /* ServerBuilderGenerator.kt:331 */
        4273  +
        #[allow(missing_docs)] // documentation missing in model
        4274  +
                               /* ServerBuilderGenerator.kt:343 */
        4275  +
        pub fn default_map(
        4276  +
            mut self,
        4277  +
            input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        4278  +
        ) -> Self {
        4279  +
            /* ServerBuilderGenerator.kt:344 */
        4280  +
            self.default_map =
        4281  +
                /* ServerBuilderGenerator.kt:345 */Some(
        4282  +
                    /* ServerBuilderGenerator.kt:376 */input
        4283  +
                /* ServerBuilderGenerator.kt:345 */)
        4284  +
            /* ServerBuilderGenerator.kt:344 */;
        4285  +
            self
        4286  +
            /* ServerBuilderGenerator.kt:343 */
 2893   4287   
        }
 2894         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Defaults`](crate::model::Defaults).
 2895         -
    /* RustType.kt:534 */
 2896         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2897         -
    /* ServerBuilderGenerator.kt:211 */
 2898         -
    pub struct Builder {
 2899         -
        /* ServerBuilderGenerator.kt:308 */
 2900         -
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
 2901         -
        /* ServerBuilderGenerator.kt:308 */
 2902         -
        pub(crate) default_boolean: ::std::option::Option<bool>,
 2903         -
        /* ServerBuilderGenerator.kt:308 */
 2904         -
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
 2905         -
        /* ServerBuilderGenerator.kt:308 */
 2906         -
        pub(crate) default_document_map: ::std::option::Option<::aws_smithy_types::Document>,
 2907         -
        /* ServerBuilderGenerator.kt:308 */
 2908         -
        pub(crate) default_document_string: ::std::option::Option<::aws_smithy_types::Document>,
 2909         -
        /* ServerBuilderGenerator.kt:308 */
 2910         -
        pub(crate) default_document_boolean: ::std::option::Option<::aws_smithy_types::Document>,
 2911         -
        /* ServerBuilderGenerator.kt:308 */
 2912         -
        pub(crate) default_document_list: ::std::option::Option<::aws_smithy_types::Document>,
 2913         -
        /* ServerBuilderGenerator.kt:308 */
 2914         -
        pub(crate) default_null_document: ::std::option::Option<::aws_smithy_types::Document>,
 2915         -
        /* ServerBuilderGenerator.kt:308 */
 2916         -
        pub(crate) default_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
 2917         -
        /* ServerBuilderGenerator.kt:308 */
 2918         -
        pub(crate) default_blob: ::std::option::Option<::aws_smithy_types::Blob>,
 2919         -
        /* ServerBuilderGenerator.kt:308 */
 2920         -
        pub(crate) default_byte: ::std::option::Option<i8>,
 2921         -
        /* ServerBuilderGenerator.kt:308 */
 2922         -
        pub(crate) default_short: ::std::option::Option<i16>,
 2923         -
        /* ServerBuilderGenerator.kt:308 */
 2924         -
        pub(crate) default_integer: ::std::option::Option<i32>,
 2925         -
        /* ServerBuilderGenerator.kt:308 */
 2926         -
        pub(crate) default_long: ::std::option::Option<i64>,
 2927         -
        /* ServerBuilderGenerator.kt:308 */
 2928         -
        pub(crate) default_float: ::std::option::Option<f32>,
 2929         -
        /* ServerBuilderGenerator.kt:308 */
 2930         -
        pub(crate) default_double: ::std::option::Option<f64>,
 2931         -
        /* ServerBuilderGenerator.kt:308 */
 2932         -
        pub(crate) default_map: ::std::option::Option<
        4288  +
        /* ServerBuilderGenerator.kt:426 */
        4289  +
        #[allow(missing_docs)] // documentation missing in model
        4290  +
                               /* ServerBuilderGenerator.kt:428 */
        4291  +
        pub(crate) fn set_default_map(
        4292  +
            mut self,
        4293  +
            input: impl ::std::convert::Into<
 2933   4294   
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 2934   4295   
            >,
 2935         -
        /* ServerBuilderGenerator.kt:308 */
 2936         -
        pub(crate) default_enum:
 2937         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
 2938         -
        /* ServerBuilderGenerator.kt:308 */
 2939         -
        pub(crate) default_int_enum: ::std::option::Option<i32>,
 2940         -
        /* ServerBuilderGenerator.kt:308 */
 2941         -
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
 2942         -
        /* ServerBuilderGenerator.kt:308 */
 2943         -
        pub(crate) false_boolean: ::std::option::Option<bool>,
 2944         -
        /* ServerBuilderGenerator.kt:308 */
 2945         -
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_types::Blob>,
 2946         -
        /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_byte: ::std::option::Option<i8>,
 2947         -
        /* ServerBuilderGenerator.kt:308 */
 2948         -
        pub(crate) zero_short: ::std::option::Option<i16>,
 2949         -
        /* ServerBuilderGenerator.kt:308 */
 2950         -
        pub(crate) zero_integer: ::std::option::Option<i32>,
 2951         -
        /* ServerBuilderGenerator.kt:308 */ pub(crate) zero_long: ::std::option::Option<i64>,
 2952         -
        /* ServerBuilderGenerator.kt:308 */
 2953         -
        pub(crate) zero_float: ::std::option::Option<f32>,
 2954         -
        /* ServerBuilderGenerator.kt:308 */
 2955         -
        pub(crate) zero_double: ::std::option::Option<f64>,
 2956         -
        /* ServerBuilderGenerator.kt:211 */
        4296  +
        ) -> Self {
        4297  +
            /* ServerBuilderGenerator.kt:429 */
        4298  +
            self.default_map = Some(input.into());
        4299  +
            self
        4300  +
            /* ServerBuilderGenerator.kt:428 */
 2957   4301   
        }
 2958         -
    /* ServerBuilderGenerator.kt:215 */
 2959         -
    impl Builder {
 2960   4302   
        /* ServerBuilderGenerator.kt:331 */
 2961   4303   
        #[allow(missing_docs)] // documentation missing in model
 2962   4304   
                               /* ServerBuilderGenerator.kt:343 */
 2963         -
        pub fn default_string(mut self, input: ::std::string::String) -> Self {
        4305  +
        pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
 2964   4306   
            /* ServerBuilderGenerator.kt:344 */
 2965         -
            self.default_string =
        4307  +
            self.default_enum =
 2966   4308   
                /* ServerBuilderGenerator.kt:345 */Some(
 2967         -
                    /* ServerBuilderGenerator.kt:376 */input
        4309  +
                    /* ServerBuilderGenerator.kt:372 */crate::constrained::MaybeConstrained::Constrained(input)
 2968   4310   
                /* ServerBuilderGenerator.kt:345 */)
 2969   4311   
            /* ServerBuilderGenerator.kt:344 */;
 2970   4312   
            self
 2971   4313   
            /* ServerBuilderGenerator.kt:343 */
 2972   4314   
        }
 2973   4315   
        /* ServerBuilderGenerator.kt:426 */
 2974   4316   
        #[allow(missing_docs)] // documentation missing in model
 2975   4317   
                               /* ServerBuilderGenerator.kt:428 */
 2976         -
        pub(crate) fn set_default_string(
        4318  +
        pub(crate) fn set_default_enum(
 2977   4319   
            mut self,
 2978         -
            input: impl ::std::convert::Into<::std::string::String>,
        4320  +
            input: impl ::std::convert::Into<
        4321  +
                crate::constrained::MaybeConstrained<crate::model::TestEnum>,
        4322  +
            >,
 2979   4323   
        ) -> Self {
 2980   4324   
            /* ServerBuilderGenerator.kt:429 */
 2981         -
            self.default_string = Some(input.into());
        4325  +
            self.default_enum = Some(input.into());
 2982   4326   
            self
 2983   4327   
            /* ServerBuilderGenerator.kt:428 */
 2984   4328   
        }
 2985   4329   
        /* ServerBuilderGenerator.kt:331 */
 2986   4330   
        #[allow(missing_docs)] // documentation missing in model
 2987   4331   
                               /* ServerBuilderGenerator.kt:343 */
 2988         -
        pub fn default_boolean(mut self, input: bool) -> Self {
        4332  +
        pub fn default_int_enum(mut self, input: i32) -> Self {
 2989   4333   
            /* ServerBuilderGenerator.kt:344 */
 2990         -
            self.default_boolean =
        4334  +
            self.default_int_enum =
 2991   4335   
                /* ServerBuilderGenerator.kt:345 */Some(
 2992   4336   
                    /* ServerBuilderGenerator.kt:376 */input
 2993   4337   
                /* ServerBuilderGenerator.kt:345 */)
 2994   4338   
            /* ServerBuilderGenerator.kt:344 */;
 2995   4339   
            self
 2996   4340   
            /* ServerBuilderGenerator.kt:343 */
 2997   4341   
        }
 2998   4342   
        /* ServerBuilderGenerator.kt:426 */
 2999   4343   
        #[allow(missing_docs)] // documentation missing in model
 3000   4344   
                               /* ServerBuilderGenerator.kt:428 */
 3001         -
        pub(crate) fn set_default_boolean(
        4345  +
        pub(crate) fn set_default_int_enum(
 3002   4346   
            mut self,
 3003         -
            input: impl ::std::convert::Into<bool>,
        4347  +
            input: impl ::std::convert::Into<i32>,
 3004   4348   
        ) -> Self {
 3005   4349   
            /* ServerBuilderGenerator.kt:429 */
 3006         -
            self.default_boolean = Some(input.into());
        4350  +
            self.default_int_enum = Some(input.into());
 3007   4351   
            self
 3008   4352   
            /* ServerBuilderGenerator.kt:428 */
 3009   4353   
        }
 3010   4354   
        /* ServerBuilderGenerator.kt:331 */
 3011   4355   
        #[allow(missing_docs)] // documentation missing in model
 3012   4356   
                               /* ServerBuilderGenerator.kt:343 */
 3013         -
        pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
        4357  +
        pub fn empty_string(mut self, input: ::std::string::String) -> Self {
 3014   4358   
            /* ServerBuilderGenerator.kt:344 */
 3015         -
            self.default_list =
        4359  +
            self.empty_string =
 3016   4360   
                /* ServerBuilderGenerator.kt:345 */Some(
 3017   4361   
                    /* ServerBuilderGenerator.kt:376 */input
 3018   4362   
                /* ServerBuilderGenerator.kt:345 */)
 3019   4363   
            /* ServerBuilderGenerator.kt:344 */;
 3020   4364   
            self
 3021   4365   
            /* ServerBuilderGenerator.kt:343 */
 3022   4366   
        }
 3023   4367   
        /* ServerBuilderGenerator.kt:426 */
 3024   4368   
        #[allow(missing_docs)] // documentation missing in model
 3025   4369   
                               /* ServerBuilderGenerator.kt:428 */
 3026         -
        pub(crate) fn set_default_list(
        4370  +
        pub(crate) fn set_empty_string(
 3027   4371   
            mut self,
 3028         -
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
        4372  +
            input: impl ::std::convert::Into<::std::string::String>,
 3029   4373   
        ) -> Self {
 3030   4374   
            /* ServerBuilderGenerator.kt:429 */
 3031         -
            self.default_list = Some(input.into());
        4375  +
            self.empty_string = Some(input.into());
 3032   4376   
            self
 3033   4377   
            /* ServerBuilderGenerator.kt:428 */
 3034   4378   
        }
 3035   4379   
        /* ServerBuilderGenerator.kt:331 */
 3036   4380   
        #[allow(missing_docs)] // documentation missing in model
 3037   4381   
                               /* ServerBuilderGenerator.kt:343 */
 3038         -
        pub fn default_document_map(mut self, input: ::aws_smithy_types::Document) -> Self {
        4382  +
        pub fn false_boolean(mut self, input: bool) -> Self {
 3039   4383   
            /* ServerBuilderGenerator.kt:344 */
 3040         -
            self.default_document_map =
        4384  +
            self.false_boolean =
 3041   4385   
                /* ServerBuilderGenerator.kt:345 */Some(
 3042   4386   
                    /* ServerBuilderGenerator.kt:376 */input
 3043   4387   
                /* ServerBuilderGenerator.kt:345 */)
 3044   4388   
            /* ServerBuilderGenerator.kt:344 */;
 3045   4389   
            self
 3046   4390   
            /* ServerBuilderGenerator.kt:343 */
 3047   4391   
        }
 3048   4392   
        /* ServerBuilderGenerator.kt:426 */
 3049   4393   
        #[allow(missing_docs)] // documentation missing in model
 3050   4394   
                               /* ServerBuilderGenerator.kt:428 */
 3051         -
        pub(crate) fn set_default_document_map(
 3052         -
            mut self,
 3053         -
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
 3054         -
        ) -> Self {
        4395  +
        pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
 3055   4396   
            /* ServerBuilderGenerator.kt:429 */
 3056         -
            self.default_document_map = Some(input.into());
        4397  +
            self.false_boolean = Some(input.into());
 3057   4398   
            self
 3058   4399   
            /* ServerBuilderGenerator.kt:428 */
 3059   4400   
        }
 3060   4401   
        /* ServerBuilderGenerator.kt:331 */
 3061   4402   
        #[allow(missing_docs)] // documentation missing in model
 3062   4403   
                               /* ServerBuilderGenerator.kt:343 */
 3063         -
        pub fn default_document_string(mut self, input: ::aws_smithy_types::Document) -> Self {
        4404  +
        pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
 3064   4405   
            /* ServerBuilderGenerator.kt:344 */
 3065         -
            self.default_document_string =
        4406  +
            self.empty_blob =
 3066   4407   
                /* ServerBuilderGenerator.kt:345 */Some(
 3067   4408   
                    /* ServerBuilderGenerator.kt:376 */input
 3068   4409   
                /* ServerBuilderGenerator.kt:345 */)
 3069   4410   
            /* ServerBuilderGenerator.kt:344 */;
 3070   4411   
            self
 3071   4412   
            /* ServerBuilderGenerator.kt:343 */
 3072   4413   
        }
 3073   4414   
        /* ServerBuilderGenerator.kt:426 */
 3074   4415   
        #[allow(missing_docs)] // documentation missing in model
 3075   4416   
                               /* ServerBuilderGenerator.kt:428 */
 3076         -
        pub(crate) fn set_default_document_string(
        4417  +
        pub(crate) fn set_empty_blob(
 3077   4418   
            mut self,
 3078         -
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
        4419  +
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
 3079   4420   
        ) -> Self {
 3080   4421   
            /* ServerBuilderGenerator.kt:429 */
 3081         -
            self.default_document_string = Some(input.into());
        4422  +
            self.empty_blob = Some(input.into());
 3082   4423   
            self
 3083   4424   
            /* ServerBuilderGenerator.kt:428 */
 3084   4425   
        }
 3085   4426   
        /* ServerBuilderGenerator.kt:331 */
 3086   4427   
        #[allow(missing_docs)] // documentation missing in model
 3087   4428   
                               /* ServerBuilderGenerator.kt:343 */
 3088         -
        pub fn default_document_boolean(mut self, input: ::aws_smithy_types::Document) -> Self {
        4429  +
        pub fn zero_byte(mut self, input: i8) -> Self {
 3089   4430   
            /* ServerBuilderGenerator.kt:344 */
 3090         -
            self.default_document_boolean =
        4431  +
            self.zero_byte =
 3091   4432   
                /* ServerBuilderGenerator.kt:345 */Some(
 3092   4433   
                    /* ServerBuilderGenerator.kt:376 */input
 3093   4434   
                /* ServerBuilderGenerator.kt:345 */)
 3094   4435   
            /* ServerBuilderGenerator.kt:344 */;
 3095   4436   
            self
 3096   4437   
            /* ServerBuilderGenerator.kt:343 */
 3097   4438   
        }
 3098   4439   
        /* ServerBuilderGenerator.kt:426 */
 3099   4440   
        #[allow(missing_docs)] // documentation missing in model
 3100   4441   
                               /* ServerBuilderGenerator.kt:428 */
 3101         -
        pub(crate) fn set_default_document_boolean(
 3102         -
            mut self,
 3103         -
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
 3104         -
        ) -> Self {
        4442  +
        pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
 3105   4443   
            /* ServerBuilderGenerator.kt:429 */
 3106         -
            self.default_document_boolean = Some(input.into());
        4444  +
            self.zero_byte = Some(input.into());
 3107   4445   
            self
 3108   4446   
            /* ServerBuilderGenerator.kt:428 */
 3109   4447   
        }
 3110   4448   
        /* ServerBuilderGenerator.kt:331 */
 3111   4449   
        #[allow(missing_docs)] // documentation missing in model
 3112   4450   
                               /* ServerBuilderGenerator.kt:343 */
 3113         -
        pub fn default_document_list(mut self, input: ::aws_smithy_types::Document) -> Self {
        4451  +
        pub fn zero_short(mut self, input: i16) -> Self {
 3114   4452   
            /* ServerBuilderGenerator.kt:344 */
 3115         -
            self.default_document_list =
        4453  +
            self.zero_short =
 3116   4454   
                /* ServerBuilderGenerator.kt:345 */Some(
 3117   4455   
                    /* ServerBuilderGenerator.kt:376 */input
 3118   4456   
                /* ServerBuilderGenerator.kt:345 */)
 3119   4457   
            /* ServerBuilderGenerator.kt:344 */;
 3120   4458   
            self
 3121   4459   
            /* ServerBuilderGenerator.kt:343 */
 3122   4460   
        }
 3123   4461   
        /* ServerBuilderGenerator.kt:426 */
 3124   4462   
        #[allow(missing_docs)] // documentation missing in model
 3125   4463   
                               /* ServerBuilderGenerator.kt:428 */
 3126         -
        pub(crate) fn set_default_document_list(
 3127         -
            mut self,
 3128         -
            input: impl ::std::convert::Into<::aws_smithy_types::Document>,
 3129         -
        ) -> Self {
        4464  +
        pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
 3130   4465   
            /* ServerBuilderGenerator.kt:429 */
 3131         -
            self.default_document_list = Some(input.into());
        4466  +
            self.zero_short = Some(input.into());
 3132   4467   
            self
 3133   4468   
            /* ServerBuilderGenerator.kt:428 */
 3134   4469   
        }
 3135   4470   
        /* ServerBuilderGenerator.kt:331 */
 3136   4471   
        #[allow(missing_docs)] // documentation missing in model
 3137   4472   
                               /* ServerBuilderGenerator.kt:343 */
 3138         -
        pub fn default_null_document(
 3139         -
            mut self,
 3140         -
            input: ::std::option::Option<::aws_smithy_types::Document>,
 3141         -
        ) -> Self {
        4473  +
        pub fn zero_integer(mut self, input: i32) -> Self {
 3142   4474   
            /* ServerBuilderGenerator.kt:344 */
 3143         -
            self.default_null_document =
        4475  +
            self.zero_integer =
        4476  +
                /* ServerBuilderGenerator.kt:345 */Some(
 3144   4477   
                    /* ServerBuilderGenerator.kt:376 */input
        4478  +
                /* ServerBuilderGenerator.kt:345 */)
 3145   4479   
            /* ServerBuilderGenerator.kt:344 */;
 3146   4480   
            self
 3147   4481   
            /* ServerBuilderGenerator.kt:343 */
 3148   4482   
        }
 3149   4483   
        /* ServerBuilderGenerator.kt:426 */
 3150   4484   
        #[allow(missing_docs)] // documentation missing in model
 3151   4485   
                               /* ServerBuilderGenerator.kt:428 */
 3152         -
        pub(crate) fn set_default_null_document(
 3153         -
            mut self,
 3154         -
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Document>>,
 3155         -
        ) -> Self {
        4486  +
        pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3156   4487   
            /* ServerBuilderGenerator.kt:429 */
 3157         -
            self.default_null_document = input.map(|v| v.into());
        4488  +
            self.zero_integer = Some(input.into());
 3158   4489   
            self
 3159   4490   
            /* ServerBuilderGenerator.kt:428 */
 3160   4491   
        }
 3161   4492   
        /* ServerBuilderGenerator.kt:331 */
 3162   4493   
        #[allow(missing_docs)] // documentation missing in model
 3163   4494   
                               /* ServerBuilderGenerator.kt:343 */
 3164         -
        pub fn default_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        4495  +
        pub fn zero_long(mut self, input: i64) -> Self {
 3165   4496   
            /* ServerBuilderGenerator.kt:344 */
 3166         -
            self.default_timestamp =
        4497  +
            self.zero_long =
 3167   4498   
                /* ServerBuilderGenerator.kt:345 */Some(
 3168   4499   
                    /* ServerBuilderGenerator.kt:376 */input
 3169   4500   
                /* ServerBuilderGenerator.kt:345 */)
 3170   4501   
            /* ServerBuilderGenerator.kt:344 */;
 3171   4502   
            self
 3172   4503   
            /* ServerBuilderGenerator.kt:343 */
 3173   4504   
        }
 3174   4505   
        /* ServerBuilderGenerator.kt:426 */
 3175   4506   
        #[allow(missing_docs)] // documentation missing in model
 3176   4507   
                               /* ServerBuilderGenerator.kt:428 */
 3177         -
        pub(crate) fn set_default_timestamp(
 3178         -
            mut self,
 3179         -
            input: impl ::std::convert::Into<::aws_smithy_types::DateTime>,
 3180         -
        ) -> Self {
        4508  +
        pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
 3181   4509   
            /* ServerBuilderGenerator.kt:429 */
 3182         -
            self.default_timestamp = Some(input.into());
        4510  +
            self.zero_long = Some(input.into());
 3183   4511   
            self
 3184   4512   
            /* ServerBuilderGenerator.kt:428 */
 3185   4513   
        }
 3186   4514   
        /* ServerBuilderGenerator.kt:331 */
 3187   4515   
        #[allow(missing_docs)] // documentation missing in model
 3188   4516   
                               /* ServerBuilderGenerator.kt:343 */
 3189         -
        pub fn default_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        4517  +
        pub fn zero_float(mut self, input: f32) -> Self {
 3190   4518   
            /* ServerBuilderGenerator.kt:344 */
 3191         -
            self.default_blob =
        4519  +
            self.zero_float =
 3192   4520   
                /* ServerBuilderGenerator.kt:345 */Some(
 3193   4521   
                    /* ServerBuilderGenerator.kt:376 */input
 3194   4522   
                /* ServerBuilderGenerator.kt:345 */)
 3195   4523   
            /* ServerBuilderGenerator.kt:344 */;
 3196   4524   
            self
 3197   4525   
            /* ServerBuilderGenerator.kt:343 */
 3198   4526   
        }
 3199   4527   
        /* ServerBuilderGenerator.kt:426 */
 3200   4528   
        #[allow(missing_docs)] // documentation missing in model
 3201   4529   
                               /* ServerBuilderGenerator.kt:428 */
 3202         -
        pub(crate) fn set_default_blob(
 3203         -
            mut self,
 3204         -
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
 3205         -
        ) -> Self {
        4530  +
        pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
 3206   4531   
            /* ServerBuilderGenerator.kt:429 */
 3207         -
            self.default_blob = Some(input.into());
        4532  +
            self.zero_float = Some(input.into());
 3208   4533   
            self
 3209   4534   
            /* ServerBuilderGenerator.kt:428 */
 3210   4535   
        }
 3211   4536   
        /* ServerBuilderGenerator.kt:331 */
 3212   4537   
        #[allow(missing_docs)] // documentation missing in model
 3213   4538   
                               /* ServerBuilderGenerator.kt:343 */
 3214         -
        pub fn default_byte(mut self, input: i8) -> Self {
        4539  +
        pub fn zero_double(mut self, input: f64) -> Self {
 3215   4540   
            /* ServerBuilderGenerator.kt:344 */
 3216         -
            self.default_byte =
        4541  +
            self.zero_double =
 3217   4542   
                /* ServerBuilderGenerator.kt:345 */Some(
 3218   4543   
                    /* ServerBuilderGenerator.kt:376 */input
 3219   4544   
                /* ServerBuilderGenerator.kt:345 */)
 3220   4545   
            /* ServerBuilderGenerator.kt:344 */;
 3221   4546   
            self
 3222   4547   
            /* ServerBuilderGenerator.kt:343 */
 3223   4548   
        }
 3224   4549   
        /* ServerBuilderGenerator.kt:426 */
 3225   4550   
        #[allow(missing_docs)] // documentation missing in model
 3226   4551   
                               /* ServerBuilderGenerator.kt:428 */
 3227         -
        pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        4552  +
        pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 3228   4553   
            /* ServerBuilderGenerator.kt:429 */
 3229         -
            self.default_byte = Some(input.into());
        4554  +
            self.zero_double = Some(input.into());
 3230   4555   
            self
 3231   4556   
            /* ServerBuilderGenerator.kt:428 */
 3232   4557   
        }
        4558  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
        4559  +
        /// /* ServerBuilderGenerator.kt:260 */
        4560  +
        /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
        4561  +
        ///
        4562  +
        /* ServerBuilderGenerator.kt:271 */
        4563  +
        pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
        4564  +
            self.build_enforcing_all_constraints()
        4565  +
        }
        4566  +
        /* ServerBuilderGenerator.kt:283 */
        4567  +
        fn build_enforcing_all_constraints(
        4568  +
            self,
        4569  +
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
        4570  +
            /* ServerBuilderGenerator.kt:287 */
        4571  +
            Ok(
        4572  +
                /* ServerBuilderGenerator.kt:542 */
        4573  +
                crate::model::Defaults {
        4574  +
                    /* ServerBuilderGenerator.kt:546 */
        4575  +
                    default_string: self
        4576  +
                        .default_string
        4577  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4578  +
                        .unwrap_or_else(|| String::from("hi")),
        4579  +
                    /* ServerBuilderGenerator.kt:546 */
        4580  +
                    default_boolean: self
        4581  +
                        .default_boolean
        4582  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4583  +
                        .unwrap_or(true),
        4584  +
                    /* ServerBuilderGenerator.kt:546 */
        4585  +
                    default_list: self
        4586  +
                        .default_list
        4587  +
                        /* ServerBuilderGeneratorCommon.kt:95 */
        4588  +
                        .unwrap_or_default(),
        4589  +
                    /* ServerBuilderGenerator.kt:546 */
        4590  +
                    default_document_map: self
        4591  +
                        .default_document_map
        4592  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4593  +
                        .unwrap_or_else(|| {
        4594  +
                            ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
        4595  +
                        }),
        4596  +
                    /* ServerBuilderGenerator.kt:546 */
        4597  +
                    default_document_string: self
        4598  +
                        .default_document_string
        4599  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4600  +
                        .unwrap_or_else(|| {
        4601  +
                            ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
        4602  +
                        }),
        4603  +
                    /* ServerBuilderGenerator.kt:546 */
        4604  +
                    default_document_boolean: self
        4605  +
                        .default_document_boolean
        4606  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4607  +
                        .unwrap_or(::aws_smithy_types::Document::Bool(true)),
        4608  +
                    /* ServerBuilderGenerator.kt:546 */
        4609  +
                    default_document_list: self
        4610  +
                        .default_document_list
        4611  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4612  +
                        .unwrap_or_else(|| {
        4613  +
                            ::aws_smithy_types::Document::Array(::std::vec::Vec::new())
        4614  +
                        }),
        4615  +
                    /* ServerBuilderGenerator.kt:546 */
        4616  +
                    default_null_document: self.default_null_document,
        4617  +
                    /* ServerBuilderGenerator.kt:546 */
        4618  +
                    default_timestamp: self
        4619  +
                        .default_timestamp
        4620  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4621  +
                        .unwrap_or_else(|| {
        4622  +
                            ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)
        4623  +
                        }),
        4624  +
                    /* ServerBuilderGenerator.kt:546 */
        4625  +
                    default_blob: self
        4626  +
                        .default_blob
        4627  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4628  +
                        .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj")),
        4629  +
                    /* ServerBuilderGenerator.kt:546 */
        4630  +
                    default_byte: self
        4631  +
                        .default_byte
        4632  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4633  +
                        .unwrap_or(1i8),
        4634  +
                    /* ServerBuilderGenerator.kt:546 */
        4635  +
                    default_short: self
        4636  +
                        .default_short
        4637  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4638  +
                        .unwrap_or(1i16),
        4639  +
                    /* ServerBuilderGenerator.kt:546 */
        4640  +
                    default_integer: self
        4641  +
                        .default_integer
        4642  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4643  +
                        .unwrap_or(10i32),
        4644  +
                    /* ServerBuilderGenerator.kt:546 */
        4645  +
                    default_long: self
        4646  +
                        .default_long
        4647  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4648  +
                        .unwrap_or(100i64),
        4649  +
                    /* ServerBuilderGenerator.kt:546 */
        4650  +
                    default_float: self
        4651  +
                        .default_float
        4652  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4653  +
                        .unwrap_or(1.0f32),
        4654  +
                    /* ServerBuilderGenerator.kt:546 */
        4655  +
                    default_double: self
        4656  +
                        .default_double
        4657  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4658  +
                        .unwrap_or(1.0f64),
        4659  +
                    /* ServerBuilderGenerator.kt:546 */
        4660  +
                    default_map: self
        4661  +
                        .default_map
        4662  +
                        /* ServerBuilderGeneratorCommon.kt:95 */
        4663  +
                        .unwrap_or_default(),
        4664  +
                    /* ServerBuilderGenerator.kt:546 */
        4665  +
                    default_enum: self
        4666  +
                        .default_enum
        4667  +
                        /* ServerBuilderGenerator.kt:602 */
        4668  +
                        .map(|v| match v {
        4669  +
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        4670  +
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        4671  +
                        })
        4672  +
                        /* ServerBuilderGenerator.kt:614 */
        4673  +
                        .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
        4674  +
                        .transpose()?
        4675  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4676  +
                        .unwrap_or(
        4677  +
                            "FOO"
        4678  +
                                .parse::<crate::model::TestEnum>()
        4679  +
                                .expect("static value validated to member"),
        4680  +
                        ),
        4681  +
                    /* ServerBuilderGenerator.kt:546 */
        4682  +
                    default_int_enum: self
        4683  +
                        .default_int_enum
        4684  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4685  +
                        .unwrap_or(1i32),
        4686  +
                    /* ServerBuilderGenerator.kt:546 */
        4687  +
                    empty_string: self
        4688  +
                        .empty_string
        4689  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4690  +
                        .unwrap_or_else(|| String::from("")),
        4691  +
                    /* ServerBuilderGenerator.kt:546 */
        4692  +
                    false_boolean: self
        4693  +
                        .false_boolean
        4694  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4695  +
                        .unwrap_or(false),
        4696  +
                    /* ServerBuilderGenerator.kt:546 */
        4697  +
                    empty_blob: self
        4698  +
                        .empty_blob
        4699  +
                        /* ServerBuilderGeneratorCommon.kt:129 */
        4700  +
                        .unwrap_or_else(|| ::aws_smithy_types::Blob::new("")),
        4701  +
                    /* ServerBuilderGenerator.kt:546 */
        4702  +
                    zero_byte: self
        4703  +
                        .zero_byte
        4704  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4705  +
                        .unwrap_or(0i8),
        4706  +
                    /* ServerBuilderGenerator.kt:546 */
        4707  +
                    zero_short: self
        4708  +
                        .zero_short
        4709  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4710  +
                        .unwrap_or(0i16),
        4711  +
                    /* ServerBuilderGenerator.kt:546 */
        4712  +
                    zero_integer: self
        4713  +
                        .zero_integer
        4714  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4715  +
                        .unwrap_or(0i32),
        4716  +
                    /* ServerBuilderGenerator.kt:546 */
        4717  +
                    zero_long: self
        4718  +
                        .zero_long
        4719  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4720  +
                        .unwrap_or(0i64),
        4721  +
                    /* ServerBuilderGenerator.kt:546 */
        4722  +
                    zero_float: self
        4723  +
                        .zero_float
        4724  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4725  +
                        .unwrap_or(0.0f32),
        4726  +
                    /* ServerBuilderGenerator.kt:546 */
        4727  +
                    zero_double: self
        4728  +
                        .zero_double
        4729  +
                        /* ServerBuilderGeneratorCommon.kt:125 */
        4730  +
                        .unwrap_or(0.0f64),
        4731  +
                    /* ServerBuilderGenerator.kt:542 */
        4732  +
                }, /* ServerBuilderGenerator.kt:287 */
        4733  +
            )
        4734  +
            /* ServerBuilderGenerator.kt:283 */
        4735  +
        }
        4736  +
        /* ServerBuilderGenerator.kt:215 */
        4737  +
    }
        4738  +
        4739  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        4740  +
}
        4741  +
/// /* ServerBuilderGenerator.kt:171 */See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        4742  +
pub mod client_optional_defaults {
        4743  +
        4744  +
    /* ServerBuilderGenerator.kt:461 */
        4745  +
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
        4746  +
        fn from(builder: Builder) -> Self {
        4747  +
            builder.build()
        4748  +
        }
        4749  +
    }
        4750  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        4751  +
    /* RustType.kt:534 */
        4752  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        4753  +
    /* ServerBuilderGenerator.kt:211 */
        4754  +
    pub struct Builder {
        4755  +
        /* ServerBuilderGenerator.kt:308 */
        4756  +
        pub(crate) member: ::std::option::Option<i32>,
        4757  +
        /* ServerBuilderGenerator.kt:211 */
        4758  +
    }
        4759  +
    /* ServerBuilderGenerator.kt:215 */
        4760  +
    impl Builder {
 3233   4761   
        /* ServerBuilderGenerator.kt:331 */
 3234   4762   
        #[allow(missing_docs)] // documentation missing in model
 3235   4763   
                               /* ServerBuilderGenerator.kt:343 */
 3236         -
        pub fn default_short(mut self, input: i16) -> Self {
        4764  +
        pub fn member(mut self, input: i32) -> Self {
 3237   4765   
            /* ServerBuilderGenerator.kt:344 */
 3238         -
            self.default_short =
        4766  +
            self.member =
 3239   4767   
                /* ServerBuilderGenerator.kt:345 */Some(
 3240   4768   
                    /* ServerBuilderGenerator.kt:376 */input
 3241   4769   
                /* ServerBuilderGenerator.kt:345 */)
 3242   4770   
            /* ServerBuilderGenerator.kt:344 */;
 3243   4771   
            self
 3244   4772   
            /* ServerBuilderGenerator.kt:343 */
 3245   4773   
        }
 3246   4774   
        /* ServerBuilderGenerator.kt:426 */
 3247   4775   
        #[allow(missing_docs)] // documentation missing in model
 3248   4776   
                               /* ServerBuilderGenerator.kt:428 */
 3249         -
        pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        4777  +
        pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3250   4778   
            /* ServerBuilderGenerator.kt:429 */
 3251         -
            self.default_short = Some(input.into());
        4779  +
            self.member = Some(input.into());
 3252   4780   
            self
 3253   4781   
            /* ServerBuilderGenerator.kt:428 */
 3254   4782   
        }
 3255         -
        /* ServerBuilderGenerator.kt:331 */
 3256         -
        #[allow(missing_docs)] // documentation missing in model
 3257         -
                               /* ServerBuilderGenerator.kt:343 */
 3258         -
        pub fn default_integer(mut self, input: i32) -> Self {
 3259         -
            /* ServerBuilderGenerator.kt:344 */
 3260         -
            self.default_integer =
 3261         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3262         -
                    /* ServerBuilderGenerator.kt:376 */input
 3263         -
                /* ServerBuilderGenerator.kt:345 */)
 3264         -
            /* ServerBuilderGenerator.kt:344 */;
 3265         -
            self
 3266         -
            /* ServerBuilderGenerator.kt:343 */
        4783  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        4784  +
        /* ServerBuilderGenerator.kt:271 */
        4785  +
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
        4786  +
            self.build_enforcing_all_constraints()
 3267   4787   
        }
 3268         -
        /* ServerBuilderGenerator.kt:426 */
 3269         -
        #[allow(missing_docs)] // documentation missing in model
 3270         -
                               /* ServerBuilderGenerator.kt:428 */
 3271         -
        pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3272         -
            /* ServerBuilderGenerator.kt:429 */
 3273         -
            self.default_integer = Some(input.into());
 3274         -
            self
 3275         -
            /* ServerBuilderGenerator.kt:428 */
        4788  +
        /* ServerBuilderGenerator.kt:283 */
        4789  +
        fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
        4790  +
            /* ServerBuilderGenerator.kt:542 */
        4791  +
            crate::model::ClientOptionalDefaults {
        4792  +
                /* ServerBuilderGenerator.kt:546 */
        4793  +
                member: self
        4794  +
                    .member
        4795  +
                    /* ServerBuilderGeneratorCommon.kt:125 */
        4796  +
                    .unwrap_or(0i32),
        4797  +
                /* ServerBuilderGenerator.kt:542 */
 3276   4798   
            }
 3277         -
        /* ServerBuilderGenerator.kt:331 */
 3278         -
        #[allow(missing_docs)] // documentation missing in model
 3279         -
                               /* ServerBuilderGenerator.kt:343 */
 3280         -
        pub fn default_long(mut self, input: i64) -> Self {
 3281         -
            /* ServerBuilderGenerator.kt:344 */
 3282         -
            self.default_long =
 3283         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3284         -
                    /* ServerBuilderGenerator.kt:376 */input
 3285         -
                /* ServerBuilderGenerator.kt:345 */)
 3286         -
            /* ServerBuilderGenerator.kt:344 */;
 3287         -
            self
 3288         -
            /* ServerBuilderGenerator.kt:343 */
        4799  +
            /* ServerBuilderGenerator.kt:283 */
 3289   4800   
        }
 3290         -
        /* ServerBuilderGenerator.kt:426 */
 3291         -
        #[allow(missing_docs)] // documentation missing in model
 3292         -
                               /* ServerBuilderGenerator.kt:428 */
 3293         -
        pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
 3294         -
            /* ServerBuilderGenerator.kt:429 */
 3295         -
            self.default_long = Some(input.into());
 3296         -
            self
 3297         -
            /* ServerBuilderGenerator.kt:428 */
        4801  +
        /* ServerBuilderGenerator.kt:215 */
 3298   4802   
    }
 3299         -
        /* ServerBuilderGenerator.kt:331 */
 3300         -
        #[allow(missing_docs)] // documentation missing in model
 3301         -
                               /* ServerBuilderGenerator.kt:343 */
 3302         -
        pub fn default_float(mut self, input: f32) -> Self {
 3303         -
            /* ServerBuilderGenerator.kt:344 */
 3304         -
            self.default_float =
 3305         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3306         -
                    /* ServerBuilderGenerator.kt:376 */input
 3307         -
                /* ServerBuilderGenerator.kt:345 */)
 3308         -
            /* ServerBuilderGenerator.kt:344 */;
 3309         -
            self
 3310         -
            /* ServerBuilderGenerator.kt:343 */
        4803  +
        4804  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        4805  +
}
        4806  +
/// /* ServerBuilderGenerator.kt:171 */See [`TopLevel`](crate::model::TopLevel).
        4807  +
pub mod top_level {
        4808  +
        4809  +
    /* RustType.kt:534 */
        4810  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        4811  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        4812  +
    /* RustType.kt:534 */
        4813  +
    #[non_exhaustive]
        4814  +
    /* ServerBuilderConstraintViolations.kt:75 */
        4815  +
    #[allow(clippy::enum_variant_names)]
        4816  +
    pub enum ConstraintViolation {
        4817  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`dialog` was not provided but it is required when building `TopLevel`.
        4818  +
        /* ServerBuilderConstraintViolations.kt:144 */
        4819  +
        MissingDialog,
        4820  +
        /* ServerBuilderConstraintViolations.kt:75 */
 3311   4821   
    }
 3312         -
        /* ServerBuilderGenerator.kt:426 */
 3313         -
        #[allow(missing_docs)] // documentation missing in model
 3314         -
                               /* ServerBuilderGenerator.kt:428 */
 3315         -
        pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
 3316         -
            /* ServerBuilderGenerator.kt:429 */
 3317         -
            self.default_float = Some(input.into());
 3318         -
            self
 3319         -
            /* ServerBuilderGenerator.kt:428 */
        4822  +
    /* ServerBuilderConstraintViolations.kt:116 */
        4823  +
    impl ::std::fmt::Display for ConstraintViolation {
        4824  +
        /* ServerBuilderConstraintViolations.kt:117 */
        4825  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        4826  +
            /* ServerBuilderConstraintViolations.kt:118 */
        4827  +
            match self {
        4828  +
                /* ServerBuilderConstraintViolations.kt:126 */
        4829  +
                ConstraintViolation::MissingDialog => write!(
        4830  +
                    f,
        4831  +
                    "`dialog` was not provided but it is required when building `TopLevel`"
        4832  +
                ),
        4833  +
                /* ServerBuilderConstraintViolations.kt:118 */
 3320   4834   
            }
 3321         -
        /* ServerBuilderGenerator.kt:331 */
 3322         -
        #[allow(missing_docs)] // documentation missing in model
 3323         -
                               /* ServerBuilderGenerator.kt:343 */
 3324         -
        pub fn default_double(mut self, input: f64) -> Self {
 3325         -
            /* ServerBuilderGenerator.kt:344 */
 3326         -
            self.default_double =
 3327         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3328         -
                    /* ServerBuilderGenerator.kt:376 */input
 3329         -
                /* ServerBuilderGenerator.kt:345 */)
 3330         -
            /* ServerBuilderGenerator.kt:344 */;
 3331         -
            self
 3332         -
            /* ServerBuilderGenerator.kt:343 */
        4835  +
            /* ServerBuilderConstraintViolations.kt:117 */
 3333   4836   
        }
 3334         -
        /* ServerBuilderGenerator.kt:426 */
 3335         -
        #[allow(missing_docs)] // documentation missing in model
 3336         -
                               /* ServerBuilderGenerator.kt:428 */
 3337         -
        pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 3338         -
            /* ServerBuilderGenerator.kt:429 */
 3339         -
            self.default_double = Some(input.into());
 3340         -
            self
 3341         -
            /* ServerBuilderGenerator.kt:428 */
        4837  +
        /* ServerBuilderConstraintViolations.kt:116 */
 3342   4838   
    }
 3343         -
        /* ServerBuilderGenerator.kt:331 */
 3344         -
        #[allow(missing_docs)] // documentation missing in model
 3345         -
                               /* ServerBuilderGenerator.kt:343 */
 3346         -
        pub fn default_map(
 3347         -
            mut self,
 3348         -
            input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3349         -
        ) -> Self {
 3350         -
            /* ServerBuilderGenerator.kt:344 */
 3351         -
            self.default_map =
 3352         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3353         -
                    /* ServerBuilderGenerator.kt:376 */input
 3354         -
                /* ServerBuilderGenerator.kt:345 */)
 3355         -
            /* ServerBuilderGenerator.kt:344 */;
 3356         -
            self
 3357         -
            /* ServerBuilderGenerator.kt:343 */
        4839  +
    /* ServerBuilderConstraintViolations.kt:83 */
        4840  +
    impl ::std::error::Error for ConstraintViolation {}
        4841  +
    /* ServerBuilderConstraintViolations.kt:172 */
        4842  +
    impl ConstraintViolation {
        4843  +
        pub(crate) fn as_validation_exception_field(
        4844  +
            self,
        4845  +
            path: ::std::string::String,
        4846  +
        ) -> crate::model::ValidationExceptionField {
        4847  +
            match self {
        4848  +
            ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
        4849  +
                                                message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
        4850  +
                                                path: path + "/dialog",
        4851  +
                                            },
 3358   4852   
        }
 3359         -
        /* ServerBuilderGenerator.kt:426 */
 3360         -
        #[allow(missing_docs)] // documentation missing in model
 3361         -
                               /* ServerBuilderGenerator.kt:428 */
 3362         -
        pub(crate) fn set_default_map(
 3363         -
            mut self,
 3364         -
            input: impl ::std::convert::Into<
 3365         -
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3366         -
            >,
 3367         -
        ) -> Self {
 3368         -
            /* ServerBuilderGenerator.kt:429 */
 3369         -
            self.default_map = Some(input.into());
 3370         -
            self
 3371         -
            /* ServerBuilderGenerator.kt:428 */
 3372   4853   
        }
 3373         -
        /* ServerBuilderGenerator.kt:331 */
 3374         -
        #[allow(missing_docs)] // documentation missing in model
 3375         -
                               /* ServerBuilderGenerator.kt:343 */
 3376         -
        pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
 3377         -
            /* ServerBuilderGenerator.kt:344 */
 3378         -
            self.default_enum =
 3379         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3380         -
                    /* ServerBuilderGenerator.kt:372 */crate::constrained::MaybeConstrained::Constrained(input)
 3381         -
                /* ServerBuilderGenerator.kt:345 */)
 3382         -
            /* ServerBuilderGenerator.kt:344 */;
 3383         -
            self
 3384         -
            /* ServerBuilderGenerator.kt:343 */
 3385   4854   
    }
 3386         -
        /* ServerBuilderGenerator.kt:426 */
 3387         -
        #[allow(missing_docs)] // documentation missing in model
 3388         -
                               /* ServerBuilderGenerator.kt:428 */
 3389         -
        pub(crate) fn set_default_enum(
 3390         -
            mut self,
 3391         -
            input: impl ::std::convert::Into<
 3392         -
                crate::constrained::MaybeConstrained<crate::model::TestEnum>,
 3393         -
            >,
 3394         -
        ) -> Self {
 3395         -
            /* ServerBuilderGenerator.kt:429 */
 3396         -
            self.default_enum = Some(input.into());
 3397         -
            self
 3398         -
            /* ServerBuilderGenerator.kt:428 */
        4855  +
    /* ServerBuilderGenerator.kt:244 */
        4856  +
    impl ::std::convert::From<Builder>
        4857  +
        for crate::constrained::MaybeConstrained<crate::model::TopLevel>
        4858  +
    {
        4859  +
        fn from(builder: Builder) -> Self {
        4860  +
            Self::Unconstrained(builder)
 3399   4861   
        }
 3400         -
        /* ServerBuilderGenerator.kt:331 */
 3401         -
        #[allow(missing_docs)] // documentation missing in model
 3402         -
                               /* ServerBuilderGenerator.kt:343 */
 3403         -
        pub fn default_int_enum(mut self, input: i32) -> Self {
 3404         -
            /* ServerBuilderGenerator.kt:344 */
 3405         -
            self.default_int_enum =
 3406         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3407         -
                    /* ServerBuilderGenerator.kt:376 */input
 3408         -
                /* ServerBuilderGenerator.kt:345 */)
 3409         -
            /* ServerBuilderGenerator.kt:344 */;
 3410         -
            self
 3411         -
            /* ServerBuilderGenerator.kt:343 */
 3412   4862   
    }
 3413         -
        /* ServerBuilderGenerator.kt:426 */
 3414         -
        #[allow(missing_docs)] // documentation missing in model
 3415         -
                               /* ServerBuilderGenerator.kt:428 */
 3416         -
        pub(crate) fn set_default_int_enum(
 3417         -
            mut self,
 3418         -
            input: impl ::std::convert::Into<i32>,
 3419         -
        ) -> Self {
 3420         -
            /* ServerBuilderGenerator.kt:429 */
 3421         -
            self.default_int_enum = Some(input.into());
 3422         -
            self
 3423         -
            /* ServerBuilderGenerator.kt:428 */
        4863  +
    /* ServerBuilderGenerator.kt:446 */
        4864  +
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
        4865  +
        type Error = ConstraintViolation;
        4866  +
        4867  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        4868  +
            builder.build()
        4869  +
        }
 3424   4870   
    }
        4871  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TopLevel`](crate::model::TopLevel).
        4872  +
    /* RustType.kt:534 */
        4873  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        4874  +
    /* ServerBuilderGenerator.kt:211 */
        4875  +
    pub struct Builder {
        4876  +
        /* ServerBuilderGenerator.kt:308 */
        4877  +
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
        4878  +
        /* ServerBuilderGenerator.kt:308 */
        4879  +
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
        4880  +
        /* ServerBuilderGenerator.kt:308 */
        4881  +
        pub(crate) dialog_map: ::std::option::Option<
        4882  +
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4883  +
        >,
        4884  +
        /* ServerBuilderGenerator.kt:211 */
        4885  +
    }
        4886  +
    /* ServerBuilderGenerator.kt:215 */
        4887  +
    impl Builder {
 3425   4888   
        /* ServerBuilderGenerator.kt:331 */
 3426   4889   
        #[allow(missing_docs)] // documentation missing in model
 3427   4890   
                               /* ServerBuilderGenerator.kt:343 */
 3428         -
        pub fn empty_string(mut self, input: ::std::string::String) -> Self {
        4891  +
        pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
 3429   4892   
            /* ServerBuilderGenerator.kt:344 */
 3430         -
            self.empty_string =
        4893  +
            self.dialog =
 3431   4894   
                /* ServerBuilderGenerator.kt:345 */Some(
 3432   4895   
                    /* ServerBuilderGenerator.kt:376 */input
 3433   4896   
                /* ServerBuilderGenerator.kt:345 */)
 3434   4897   
            /* ServerBuilderGenerator.kt:344 */;
 3435   4898   
            self
 3436   4899   
            /* ServerBuilderGenerator.kt:343 */
 3437   4900   
        }
 3438   4901   
        /* ServerBuilderGenerator.kt:426 */
 3439   4902   
        #[allow(missing_docs)] // documentation missing in model
 3440   4903   
                               /* ServerBuilderGenerator.kt:428 */
 3441         -
        pub(crate) fn set_empty_string(
        4904  +
        pub(crate) fn set_dialog(
 3442   4905   
            mut self,
 3443         -
            input: impl ::std::convert::Into<::std::string::String>,
        4906  +
            input: impl ::std::convert::Into<crate::model::Dialog>,
 3444   4907   
        ) -> Self {
 3445   4908   
            /* ServerBuilderGenerator.kt:429 */
 3446         -
            self.empty_string = Some(input.into());
        4909  +
            self.dialog = Some(input.into());
 3447   4910   
            self
 3448   4911   
            /* ServerBuilderGenerator.kt:428 */
 3449   4912   
        }
 3450   4913   
        /* ServerBuilderGenerator.kt:331 */
 3451   4914   
        #[allow(missing_docs)] // documentation missing in model
 3452   4915   
                               /* ServerBuilderGenerator.kt:343 */
 3453         -
        pub fn false_boolean(mut self, input: bool) -> Self {
        4916  +
        pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
 3454   4917   
            /* ServerBuilderGenerator.kt:344 */
 3455         -
            self.false_boolean =
        4918  +
            self.dialog_list =
 3456   4919   
                /* ServerBuilderGenerator.kt:345 */Some(
 3457   4920   
                    /* ServerBuilderGenerator.kt:376 */input
 3458   4921   
                /* ServerBuilderGenerator.kt:345 */)
 3459   4922   
            /* ServerBuilderGenerator.kt:344 */;
 3460   4923   
            self
 3461   4924   
            /* ServerBuilderGenerator.kt:343 */
 3462   4925   
        }
 3463   4926   
        /* ServerBuilderGenerator.kt:426 */
 3464   4927   
        #[allow(missing_docs)] // documentation missing in model
 3465   4928   
                               /* ServerBuilderGenerator.kt:428 */
 3466         -
        pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
        4929  +
        pub(crate) fn set_dialog_list(
        4930  +
            mut self,
        4931  +
            input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
        4932  +
        ) -> Self {
 3467   4933   
            /* ServerBuilderGenerator.kt:429 */
 3468         -
            self.false_boolean = Some(input.into());
        4934  +
            self.dialog_list = Some(input.into());
 3469   4935   
            self
 3470   4936   
            /* ServerBuilderGenerator.kt:428 */
 3471   4937   
        }
 3472   4938   
        /* ServerBuilderGenerator.kt:331 */
 3473   4939   
        #[allow(missing_docs)] // documentation missing in model
 3474   4940   
                               /* ServerBuilderGenerator.kt:343 */
 3475         -
        pub fn empty_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        4941  +
        pub fn dialog_map(
        4942  +
            mut self,
        4943  +
            input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4944  +
        ) -> Self {
 3476   4945   
            /* ServerBuilderGenerator.kt:344 */
 3477         -
            self.empty_blob =
        4946  +
            self.dialog_map =
 3478   4947   
                /* ServerBuilderGenerator.kt:345 */Some(
 3479   4948   
                    /* ServerBuilderGenerator.kt:376 */input
 3480   4949   
                /* ServerBuilderGenerator.kt:345 */)
 3481   4950   
            /* ServerBuilderGenerator.kt:344 */;
 3482   4951   
            self
 3483   4952   
            /* ServerBuilderGenerator.kt:343 */
 3484   4953   
        }
 3485   4954   
        /* ServerBuilderGenerator.kt:426 */
 3486   4955   
        #[allow(missing_docs)] // documentation missing in model
 3487   4956   
                               /* ServerBuilderGenerator.kt:428 */
 3488         -
        pub(crate) fn set_empty_blob(
        4957  +
        pub(crate) fn set_dialog_map(
 3489   4958   
            mut self,
 3490         -
            input: impl ::std::convert::Into<::aws_smithy_types::Blob>,
        4959  +
            input: impl ::std::convert::Into<
        4960  +
                ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4961  +
            >,
 3491   4962   
        ) -> Self {
 3492   4963   
            /* ServerBuilderGenerator.kt:429 */
 3493         -
            self.empty_blob = Some(input.into());
        4964  +
            self.dialog_map = Some(input.into());
 3494   4965   
            self
 3495   4966   
            /* ServerBuilderGenerator.kt:428 */
 3496   4967   
        }
 3497         -
        /* ServerBuilderGenerator.kt:331 */
 3498         -
        #[allow(missing_docs)] // documentation missing in model
 3499         -
                               /* ServerBuilderGenerator.kt:343 */
 3500         -
        pub fn zero_byte(mut self, input: i8) -> Self {
 3501         -
            /* ServerBuilderGenerator.kt:344 */
 3502         -
            self.zero_byte =
 3503         -
                /* ServerBuilderGenerator.kt:345 */Some(
 3504         -
                    /* ServerBuilderGenerator.kt:376 */input
 3505         -
                /* ServerBuilderGenerator.kt:345 */)
 3506         -
            /* ServerBuilderGenerator.kt:344 */;
 3507         -
            self
 3508         -
            /* ServerBuilderGenerator.kt:343 */
        4968  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
        4969  +
        /// /* ServerBuilderGenerator.kt:260 */
        4970  +
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
        4971  +
        ///
        4972  +
        /* ServerBuilderGenerator.kt:271 */
        4973  +
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
        4974  +
            self.build_enforcing_all_constraints()
 3509   4975   
        }
 3510         -
        /* ServerBuilderGenerator.kt:426 */
 3511         -
        #[allow(missing_docs)] // documentation missing in model
 3512         -
                               /* ServerBuilderGenerator.kt:428 */
 3513         -
        pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
 3514         -
            /* ServerBuilderGenerator.kt:429 */
 3515         -
            self.zero_byte = Some(input.into());
 3516         -
            self
 3517         -
            /* ServerBuilderGenerator.kt:428 */
        4976  +
        /* ServerBuilderGenerator.kt:283 */
        4977  +
        fn build_enforcing_all_constraints(
        4978  +
            self,
        4979  +
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
        4980  +
            /* ServerBuilderGenerator.kt:287 */
        4981  +
            Ok(
        4982  +
                /* ServerBuilderGenerator.kt:542 */
        4983  +
                crate::model::TopLevel {
        4984  +
                    /* ServerBuilderGenerator.kt:546 */
        4985  +
                    dialog: self
        4986  +
                        .dialog
        4987  +
                        /* ServerBuilderGenerator.kt:569 */
        4988  +
                        .ok_or(ConstraintViolation::MissingDialog)?,
        4989  +
                    /* ServerBuilderGenerator.kt:546 */
        4990  +
                    dialog_list: self
        4991  +
                        .dialog_list
        4992  +
                        /* ServerBuilderGeneratorCommon.kt:95 */
        4993  +
                        .unwrap_or_default(),
        4994  +
                    /* ServerBuilderGenerator.kt:546 */
        4995  +
                    dialog_map: self
        4996  +
                        .dialog_map
        4997  +
                        /* ServerBuilderGeneratorCommon.kt:95 */
        4998  +
                        .unwrap_or_default(),
        4999  +
                    /* ServerBuilderGenerator.kt:542 */
        5000  +
                }, /* ServerBuilderGenerator.kt:287 */
        5001  +
            )
        5002  +
            /* ServerBuilderGenerator.kt:283 */
        5003  +
        }
        5004  +
        /* ServerBuilderGenerator.kt:215 */
        5005  +
    }
        5006  +
        5007  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        5008  +
}
        5009  +
/// /* ServerBuilderGenerator.kt:171 */See [`Dialog`](crate::model::Dialog).
        5010  +
pub mod dialog {
        5011  +
        5012  +
    /* ServerBuilderGenerator.kt:461 */
        5013  +
    impl ::std::convert::From<Builder> for crate::model::Dialog {
        5014  +
        fn from(builder: Builder) -> Self {
        5015  +
            builder.build()
        5016  +
        }
        5017  +
    }
        5018  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Dialog`](crate::model::Dialog).
        5019  +
    /* RustType.kt:534 */
        5020  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5021  +
    /* ServerBuilderGenerator.kt:211 */
        5022  +
    pub struct Builder {
        5023  +
        /* ServerBuilderGenerator.kt:308 */
        5024  +
        pub(crate) language: ::std::option::Option<::std::string::String>,
        5025  +
        /* ServerBuilderGenerator.kt:308 */
        5026  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        5027  +
        /* ServerBuilderGenerator.kt:308 */
        5028  +
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
        5029  +
        /* ServerBuilderGenerator.kt:211 */
 3518   5030   
    }
        5031  +
    /* ServerBuilderGenerator.kt:215 */
        5032  +
    impl Builder {
 3519   5033   
        /* ServerBuilderGenerator.kt:331 */
 3520   5034   
        #[allow(missing_docs)] // documentation missing in model
 3521   5035   
                               /* ServerBuilderGenerator.kt:343 */
 3522         -
        pub fn zero_short(mut self, input: i16) -> Self {
        5036  +
        pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 3523   5037   
            /* ServerBuilderGenerator.kt:344 */
 3524         -
            self.zero_short =
 3525         -
                /* ServerBuilderGenerator.kt:345 */Some(
        5038  +
            self.language =
 3526   5039   
                /* ServerBuilderGenerator.kt:376 */input
 3527         -
                /* ServerBuilderGenerator.kt:345 */)
 3528   5040   
            /* ServerBuilderGenerator.kt:344 */;
 3529   5041   
            self
 3530   5042   
            /* ServerBuilderGenerator.kt:343 */
 3531   5043   
        }
 3532   5044   
        /* ServerBuilderGenerator.kt:426 */
 3533   5045   
        #[allow(missing_docs)] // documentation missing in model
 3534   5046   
                               /* ServerBuilderGenerator.kt:428 */
 3535         -
        pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        5047  +
        pub(crate) fn set_language(
        5048  +
            mut self,
        5049  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5050  +
        ) -> Self {
 3536   5051   
            /* ServerBuilderGenerator.kt:429 */
 3537         -
            self.zero_short = Some(input.into());
        5052  +
            self.language = input.map(|v| v.into());
 3538   5053   
            self
 3539   5054   
            /* ServerBuilderGenerator.kt:428 */
 3540   5055   
        }
 3541   5056   
        /* ServerBuilderGenerator.kt:331 */
 3542   5057   
        #[allow(missing_docs)] // documentation missing in model
 3543   5058   
                               /* ServerBuilderGenerator.kt:343 */
 3544         -
        pub fn zero_integer(mut self, input: i32) -> Self {
        5059  +
        pub fn greeting(mut self, input: ::std::string::String) -> Self {
 3545   5060   
            /* ServerBuilderGenerator.kt:344 */
 3546         -
            self.zero_integer =
        5061  +
            self.greeting =
 3547   5062   
                /* ServerBuilderGenerator.kt:345 */Some(
 3548   5063   
                    /* ServerBuilderGenerator.kt:376 */input
 3549   5064   
                /* ServerBuilderGenerator.kt:345 */)
 3550   5065   
            /* ServerBuilderGenerator.kt:344 */;
 3551   5066   
            self
 3552   5067   
            /* ServerBuilderGenerator.kt:343 */
 3553   5068   
        }
 3554   5069   
        /* ServerBuilderGenerator.kt:426 */
 3555   5070   
        #[allow(missing_docs)] // documentation missing in model
 3556   5071   
                               /* ServerBuilderGenerator.kt:428 */
 3557         -
        pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        5072  +
        pub(crate) fn set_greeting(
        5073  +
            mut self,
        5074  +
            input: impl ::std::convert::Into<::std::string::String>,
        5075  +
        ) -> Self {
 3558   5076   
            /* ServerBuilderGenerator.kt:429 */
 3559         -
            self.zero_integer = Some(input.into());
        5077  +
            self.greeting = Some(input.into());
 3560   5078   
            self
 3561   5079   
            /* ServerBuilderGenerator.kt:428 */
 3562   5080   
        }
 3563   5081   
        /* ServerBuilderGenerator.kt:331 */
 3564   5082   
        #[allow(missing_docs)] // documentation missing in model
 3565   5083   
                               /* ServerBuilderGenerator.kt:343 */
 3566         -
        pub fn zero_long(mut self, input: i64) -> Self {
        5084  +
        pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
 3567   5085   
            /* ServerBuilderGenerator.kt:344 */
 3568         -
            self.zero_long =
 3569         -
                /* ServerBuilderGenerator.kt:345 */Some(
        5086  +
            self.farewell =
 3570   5087   
                /* ServerBuilderGenerator.kt:376 */input
 3571         -
                /* ServerBuilderGenerator.kt:345 */)
 3572   5088   
            /* ServerBuilderGenerator.kt:344 */;
 3573   5089   
            self
 3574   5090   
            /* ServerBuilderGenerator.kt:343 */
 3575   5091   
        }
 3576   5092   
        /* ServerBuilderGenerator.kt:426 */
 3577   5093   
        #[allow(missing_docs)] // documentation missing in model
 3578   5094   
                               /* ServerBuilderGenerator.kt:428 */
 3579         -
        pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        5095  +
        pub(crate) fn set_farewell(
        5096  +
            mut self,
        5097  +
            input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
        5098  +
        ) -> Self {
 3580   5099   
            /* ServerBuilderGenerator.kt:429 */
 3581         -
            self.zero_long = Some(input.into());
        5100  +
            self.farewell = input.map(|v| v.into());
 3582   5101   
            self
 3583   5102   
            /* ServerBuilderGenerator.kt:428 */
 3584   5103   
        }
 3585         -
        /* ServerBuilderGenerator.kt:331 */
 3586         -
        #[allow(missing_docs)] // documentation missing in model
        5104  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
        5105  +
        /* ServerBuilderGenerator.kt:271 */
        5106  +
        pub fn build(self) -> crate::model::Dialog {
        5107  +
            self.build_enforcing_all_constraints()
        5108  +
        }
        5109  +
        /* ServerBuilderGenerator.kt:283 */
        5110  +
        fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
        5111  +
            /* ServerBuilderGenerator.kt:542 */
        5112  +
            crate::model::Dialog {
        5113  +
                /* ServerBuilderGenerator.kt:546 */
        5114  +
                language: self.language,
        5115  +
                /* ServerBuilderGenerator.kt:546 */
        5116  +
                greeting: self
        5117  +
                    .greeting
        5118  +
                    /* ServerBuilderGeneratorCommon.kt:129 */
        5119  +
                    .unwrap_or_else(|| String::from("hi")),
        5120  +
                /* ServerBuilderGenerator.kt:546 */
        5121  +
                farewell: self.farewell,
        5122  +
                /* ServerBuilderGenerator.kt:542 */
        5123  +
            }
        5124  +
            /* ServerBuilderGenerator.kt:283 */
        5125  +
        }
        5126  +
        /* ServerBuilderGenerator.kt:215 */
        5127  +
    }
        5128  +
        5129  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        5130  +
}
        5131  +
/// /* ServerBuilderGenerator.kt:171 */See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        5132  +
pub mod validation_exception_field {
        5133  +
        5134  +
    /* RustType.kt:534 */
        5135  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        5136  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
        5137  +
    /* RustType.kt:534 */
        5138  +
    #[non_exhaustive]
        5139  +
    /* ServerBuilderConstraintViolations.kt:75 */
        5140  +
    #[allow(clippy::enum_variant_names)]
        5141  +
    pub enum ConstraintViolation {
        5142  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`path` was not provided but it is required when building `ValidationExceptionField`.
        5143  +
        /* ServerBuilderConstraintViolations.kt:144 */
        5144  +
        MissingPath,
        5145  +
        /// /* ServerBuilderConstraintViolations.kt:137 */`message` was not provided but it is required when building `ValidationExceptionField`.
        5146  +
        /* ServerBuilderConstraintViolations.kt:144 */
        5147  +
        MissingMessage,
        5148  +
        /* ServerBuilderConstraintViolations.kt:75 */
        5149  +
    }
        5150  +
    /* ServerBuilderConstraintViolations.kt:116 */
        5151  +
    impl ::std::fmt::Display for ConstraintViolation {
        5152  +
        /* ServerBuilderConstraintViolations.kt:117 */
        5153  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5154  +
            /* ServerBuilderConstraintViolations.kt:118 */
        5155  +
            match self {
        5156  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
        5157  +
                /* ServerBuilderConstraintViolations.kt:126 */ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
        5158  +
            /* ServerBuilderConstraintViolations.kt:118 */}
        5159  +
            /* ServerBuilderConstraintViolations.kt:117 */
        5160  +
        }
        5161  +
        /* ServerBuilderConstraintViolations.kt:116 */
        5162  +
    }
        5163  +
    /* ServerBuilderConstraintViolations.kt:83 */
        5164  +
    impl ::std::error::Error for ConstraintViolation {}
        5165  +
    /* ServerBuilderGenerator.kt:446 */
        5166  +
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
        5167  +
        type Error = ConstraintViolation;
        5168  +
        5169  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        5170  +
            builder.build()
        5171  +
        }
        5172  +
    }
        5173  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        5174  +
    /* RustType.kt:534 */
        5175  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5176  +
    /* ServerBuilderGenerator.kt:211 */
        5177  +
    pub struct Builder {
        5178  +
        /* ServerBuilderGenerator.kt:308 */
        5179  +
        pub(crate) path: ::std::option::Option<::std::string::String>,
        5180  +
        /* ServerBuilderGenerator.kt:308 */
        5181  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
        5182  +
        /* ServerBuilderGenerator.kt:211 */
        5183  +
    }
        5184  +
    /* ServerBuilderGenerator.kt:215 */
        5185  +
    impl Builder {
        5186  +
        /// /* ServerBuilderGenerator.kt:331 */A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
 3587   5187   
        /* ServerBuilderGenerator.kt:343 */
 3588         -
        pub fn zero_float(mut self, input: f32) -> Self {
        5188  +
        pub fn path(mut self, input: ::std::string::String) -> Self {
 3589   5189   
            /* ServerBuilderGenerator.kt:344 */
 3590         -
            self.zero_float =
        5190  +
            self.path =
 3591   5191   
                /* ServerBuilderGenerator.kt:345 */Some(
 3592   5192   
                    /* ServerBuilderGenerator.kt:376 */input
 3593   5193   
                /* ServerBuilderGenerator.kt:345 */)
 3594         -
            /* ServerBuilderGenerator.kt:344 */;
 3595         -
            self
 3596         -
            /* ServerBuilderGenerator.kt:343 */
 3597         -
        }
 3598         -
        /* ServerBuilderGenerator.kt:426 */
 3599         -
        #[allow(missing_docs)] // documentation missing in model
 3600         -
                               /* ServerBuilderGenerator.kt:428 */
 3601         -
        pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
 3602         -
            /* ServerBuilderGenerator.kt:429 */
 3603         -
            self.zero_float = Some(input.into());
        5194  +
            /* ServerBuilderGenerator.kt:344 */;
 3604   5195   
            self
 3605         -
            /* ServerBuilderGenerator.kt:428 */
        5196  +
            /* ServerBuilderGenerator.kt:343 */
 3606   5197   
        }
 3607         -
        /* ServerBuilderGenerator.kt:331 */
 3608         -
        #[allow(missing_docs)] // documentation missing in model
        5198  +
        /// /* ServerBuilderGenerator.kt:331 */A detailed description of the validation failure.
 3609   5199   
        /* ServerBuilderGenerator.kt:343 */
 3610         -
        pub fn zero_double(mut self, input: f64) -> Self {
        5200  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
 3611   5201   
            /* ServerBuilderGenerator.kt:344 */
 3612         -
            self.zero_double =
        5202  +
            self.message =
 3613   5203   
                /* ServerBuilderGenerator.kt:345 */Some(
 3614   5204   
                    /* ServerBuilderGenerator.kt:376 */input
 3615   5205   
                /* ServerBuilderGenerator.kt:345 */)
 3616   5206   
            /* ServerBuilderGenerator.kt:344 */;
 3617   5207   
            self
 3618   5208   
            /* ServerBuilderGenerator.kt:343 */
 3619   5209   
        }
 3620         -
        /* ServerBuilderGenerator.kt:426 */
 3621         -
        #[allow(missing_docs)] // documentation missing in model
 3622         -
                               /* ServerBuilderGenerator.kt:428 */
 3623         -
        pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 3624         -
            /* ServerBuilderGenerator.kt:429 */
 3625         -
            self.zero_double = Some(input.into());
 3626         -
            self
 3627         -
            /* ServerBuilderGenerator.kt:428 */
 3628         -
        }
 3629         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
        5210  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 3630   5211   
        /// /* ServerBuilderGenerator.kt:260 */
 3631         -
        /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
        5212  +
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if a [`ConstraintViolation`] occurs.
 3632   5213   
        ///
        5214  +
        /// /* ServerBuilderGenerator.kt:268 */If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
 3633   5215   
        /* ServerBuilderGenerator.kt:271 */
 3634         -
        pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
        5216  +
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 3635   5217   
            self.build_enforcing_all_constraints()
 3636   5218   
        }
 3637   5219   
        /* ServerBuilderGenerator.kt:283 */
 3638   5220   
        fn build_enforcing_all_constraints(
 3639   5221   
            self,
 3640         -
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
        5222  +
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 3641   5223   
            /* ServerBuilderGenerator.kt:287 */
 3642   5224   
            Ok(
 3643   5225   
                /* ServerBuilderGenerator.kt:542 */
 3644         -
                crate::model::Defaults {
 3645         -
                    /* ServerBuilderGenerator.kt:546 */
 3646         -
                    default_string: self
 3647         -
                        .default_string
 3648         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3649         -
                        .unwrap_or_else(|| String::from("hi")),
 3650         -
                    /* ServerBuilderGenerator.kt:546 */
 3651         -
                    default_boolean: self
 3652         -
                        .default_boolean
 3653         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3654         -
                        .unwrap_or(true),
 3655         -
                    /* ServerBuilderGenerator.kt:546 */
 3656         -
                    default_list: self
 3657         -
                        .default_list
 3658         -
                        /* ServerBuilderGeneratorCommon.kt:95 */
 3659         -
                        .unwrap_or_default(),
 3660         -
                    /* ServerBuilderGenerator.kt:546 */
 3661         -
                    default_document_map: self
 3662         -
                        .default_document_map
 3663         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3664         -
                        .unwrap_or_else(|| {
 3665         -
                            ::aws_smithy_types::Document::Object(::std::collections::HashMap::new())
 3666         -
                        }),
 3667         -
                    /* ServerBuilderGenerator.kt:546 */
 3668         -
                    default_document_string: self
 3669         -
                        .default_document_string
 3670         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3671         -
                        .unwrap_or_else(|| {
 3672         -
                            ::aws_smithy_types::Document::String(::std::string::String::from("hi"))
 3673         -
                        }),
 3674         -
                    /* ServerBuilderGenerator.kt:546 */
 3675         -
                    default_document_boolean: self
 3676         -
                        .default_document_boolean
 3677         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3678         -
                        .unwrap_or(::aws_smithy_types::Document::Bool(true)),
 3679         -
                    /* ServerBuilderGenerator.kt:546 */
 3680         -
                    default_document_list: self
 3681         -
                        .default_document_list
 3682         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3683         -
                        .unwrap_or_else(|| {
 3684         -
                            ::aws_smithy_types::Document::Array(::std::vec::Vec::new())
 3685         -
                        }),
 3686         -
                    /* ServerBuilderGenerator.kt:546 */
 3687         -
                    default_null_document: self.default_null_document,
 3688         -
                    /* ServerBuilderGenerator.kt:546 */
 3689         -
                    default_timestamp: self
 3690         -
                        .default_timestamp
 3691         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3692         -
                        .unwrap_or_else(|| {
 3693         -
                            ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64)
 3694         -
                        }),
 3695         -
                    /* ServerBuilderGenerator.kt:546 */
 3696         -
                    default_blob: self
 3697         -
                        .default_blob
 3698         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3699         -
                        .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj")),
 3700         -
                    /* ServerBuilderGenerator.kt:546 */
 3701         -
                    default_byte: self
 3702         -
                        .default_byte
 3703         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3704         -
                        .unwrap_or(1i8),
 3705         -
                    /* ServerBuilderGenerator.kt:546 */
 3706         -
                    default_short: self
 3707         -
                        .default_short
 3708         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3709         -
                        .unwrap_or(1i16),
 3710         -
                    /* ServerBuilderGenerator.kt:546 */
 3711         -
                    default_integer: self
 3712         -
                        .default_integer
 3713         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3714         -
                        .unwrap_or(10i32),
 3715         -
                    /* ServerBuilderGenerator.kt:546 */
 3716         -
                    default_long: self
 3717         -
                        .default_long
 3718         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3719         -
                        .unwrap_or(100i64),
 3720         -
                    /* ServerBuilderGenerator.kt:546 */
 3721         -
                    default_float: self
 3722         -
                        .default_float
 3723         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3724         -
                        .unwrap_or(1.0f32),
 3725         -
                    /* ServerBuilderGenerator.kt:546 */
 3726         -
                    default_double: self
 3727         -
                        .default_double
 3728         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3729         -
                        .unwrap_or(1.0f64),
 3730         -
                    /* ServerBuilderGenerator.kt:546 */
 3731         -
                    default_map: self
 3732         -
                        .default_map
 3733         -
                        /* ServerBuilderGeneratorCommon.kt:95 */
 3734         -
                        .unwrap_or_default(),
 3735         -
                    /* ServerBuilderGenerator.kt:546 */
 3736         -
                    default_enum: self
 3737         -
                        .default_enum
 3738         -
                        /* ServerBuilderGenerator.kt:602 */
 3739         -
                        .map(|v| match v {
 3740         -
                            crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
 3741         -
                            crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
 3742         -
                        })
 3743         -
                        /* ServerBuilderGenerator.kt:614 */
 3744         -
                        .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
 3745         -
                        .transpose()?
 3746         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3747         -
                        .unwrap_or(
 3748         -
                            "FOO"
 3749         -
                                .parse::<crate::model::TestEnum>()
 3750         -
                                .expect("static value validated to member"),
 3751         -
                        ),
 3752         -
                    /* ServerBuilderGenerator.kt:546 */
 3753         -
                    default_int_enum: self
 3754         -
                        .default_int_enum
 3755         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3756         -
                        .unwrap_or(1i32),
 3757         -
                    /* ServerBuilderGenerator.kt:546 */
 3758         -
                    empty_string: self
 3759         -
                        .empty_string
 3760         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3761         -
                        .unwrap_or_else(|| String::from("")),
 3762         -
                    /* ServerBuilderGenerator.kt:546 */
 3763         -
                    false_boolean: self
 3764         -
                        .false_boolean
 3765         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3766         -
                        .unwrap_or(false),
 3767         -
                    /* ServerBuilderGenerator.kt:546 */
 3768         -
                    empty_blob: self
 3769         -
                        .empty_blob
 3770         -
                        /* ServerBuilderGeneratorCommon.kt:129 */
 3771         -
                        .unwrap_or_else(|| ::aws_smithy_types::Blob::new("")),
 3772         -
                    /* ServerBuilderGenerator.kt:546 */
 3773         -
                    zero_byte: self
 3774         -
                        .zero_byte
 3775         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3776         -
                        .unwrap_or(0i8),
 3777         -
                    /* ServerBuilderGenerator.kt:546 */
 3778         -
                    zero_short: self
 3779         -
                        .zero_short
 3780         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3781         -
                        .unwrap_or(0i16),
 3782         -
                    /* ServerBuilderGenerator.kt:546 */
 3783         -
                    zero_integer: self
 3784         -
                        .zero_integer
 3785         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3786         -
                        .unwrap_or(0i32),
 3787         -
                    /* ServerBuilderGenerator.kt:546 */
 3788         -
                    zero_long: self
 3789         -
                        .zero_long
 3790         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3791         -
                        .unwrap_or(0i64),
        5226  +
                crate::model::ValidationExceptionField {
 3792   5227   
                    /* ServerBuilderGenerator.kt:546 */
 3793         -
                    zero_float: self
 3794         -
                        .zero_float
 3795         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3796         -
                        .unwrap_or(0.0f32),
        5228  +
                    path: self
        5229  +
                        .path
        5230  +
                        /* ServerBuilderGenerator.kt:569 */
        5231  +
                        .ok_or(ConstraintViolation::MissingPath)?,
 3797   5232   
                    /* ServerBuilderGenerator.kt:546 */
 3798         -
                    zero_double: self
 3799         -
                        .zero_double
 3800         -
                        /* ServerBuilderGeneratorCommon.kt:125 */
 3801         -
                        .unwrap_or(0.0f64),
        5233  +
                    message: self
        5234  +
                        .message
        5235  +
                        /* ServerBuilderGenerator.kt:569 */
        5236  +
                        .ok_or(ConstraintViolation::MissingMessage)?,
 3802   5237   
                    /* ServerBuilderGenerator.kt:542 */
 3803   5238   
                }, /* ServerBuilderGenerator.kt:287 */
 3804   5239   
            )
 3805   5240   
            /* ServerBuilderGenerator.kt:283 */
 3806   5241   
        }
 3807   5242   
        /* ServerBuilderGenerator.kt:215 */
 3808   5243   
    }
 3809   5244   
 3810   5245   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 3811   5246   
}
 3812         -
/// /* ServerBuilderGenerator.kt:171 */See [`PayloadConfig`](crate::model::PayloadConfig).
 3813         -
pub mod payload_config {
        5247  +
/// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5248  +
pub mod recursive_shapes_input_output_nested2 {
 3814   5249   
 3815   5250   
    /* ServerBuilderGenerator.kt:461 */
 3816         -
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
        5251  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
 3817   5252   
        fn from(builder: Builder) -> Self {
 3818   5253   
            builder.build()
 3819   5254   
        }
 3820   5255   
    }
 3821         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadConfig`](crate::model::PayloadConfig).
        5256  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 3822   5257   
    /* RustType.kt:534 */
 3823   5258   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3824   5259   
    /* ServerBuilderGenerator.kt:211 */
 3825   5260   
    pub struct Builder {
 3826   5261   
        /* ServerBuilderGenerator.kt:308 */
 3827         -
        pub(crate) data: ::std::option::Option<i32>,
        5262  +
        pub(crate) bar: ::std::option::Option<::std::string::String>,
        5263  +
        /* ServerBuilderGenerator.kt:308 */
        5264  +
        pub(crate) recursive_member:
        5265  +
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 3828   5266   
        /* ServerBuilderGenerator.kt:211 */
 3829   5267   
    }
 3830   5268   
    /* ServerBuilderGenerator.kt:215 */
 3831   5269   
    impl Builder {
 3832   5270   
        /* ServerBuilderGenerator.kt:331 */
 3833   5271   
        #[allow(missing_docs)] // documentation missing in model
 3834   5272   
                               /* ServerBuilderGenerator.kt:343 */
 3835         -
        pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
        5273  +
        pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 3836   5274   
            /* ServerBuilderGenerator.kt:344 */
 3837         -
            self.data =
        5275  +
            self.bar =
 3838   5276   
                /* ServerBuilderGenerator.kt:376 */input
 3839   5277   
            /* ServerBuilderGenerator.kt:344 */;
 3840   5278   
            self
 3841   5279   
            /* ServerBuilderGenerator.kt:343 */
 3842   5280   
        }
 3843   5281   
        /* ServerBuilderGenerator.kt:426 */
 3844   5282   
        #[allow(missing_docs)] // documentation missing in model
 3845   5283   
                               /* ServerBuilderGenerator.kt:428 */
 3846         -
        pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        5284  +
        pub(crate) fn set_bar(
        5285  +
            mut self,
        5286  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5287  +
        ) -> Self {
 3847   5288   
            /* ServerBuilderGenerator.kt:429 */
 3848         -
            self.data = input.map(|v| v.into());
        5289  +
            self.bar = input.map(|v| v.into());
 3849   5290   
            self
 3850   5291   
            /* ServerBuilderGenerator.kt:428 */
 3851   5292   
        }
 3852         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
        5293  +
        /* ServerBuilderGenerator.kt:331 */
        5294  +
        #[allow(missing_docs)] // documentation missing in model
        5295  +
                               /* ServerBuilderGenerator.kt:343 */
        5296  +
        pub fn recursive_member(
        5297  +
            mut self,
        5298  +
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        5299  +
        ) -> Self {
        5300  +
            /* ServerBuilderGenerator.kt:344 */
        5301  +
            self.recursive_member =
        5302  +
                /* ServerBuilderGenerator.kt:376 */input
        5303  +
            /* ServerBuilderGenerator.kt:344 */;
        5304  +
            self
        5305  +
            /* ServerBuilderGenerator.kt:343 */
        5306  +
        }
        5307  +
        /* ServerBuilderGenerator.kt:426 */
        5308  +
        #[allow(missing_docs)] // documentation missing in model
        5309  +
                               /* ServerBuilderGenerator.kt:428 */
        5310  +
        pub(crate) fn set_recursive_member(
        5311  +
            mut self,
        5312  +
            input: Option<
        5313  +
                impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
        5314  +
            >,
        5315  +
        ) -> Self {
        5316  +
            /* ServerBuilderGenerator.kt:429 */
        5317  +
            self.recursive_member = input.map(|v| v.into());
        5318  +
            self
        5319  +
            /* ServerBuilderGenerator.kt:428 */
        5320  +
        }
        5321  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 3853   5322   
        /* ServerBuilderGenerator.kt:271 */
 3854         -
        pub fn build(self) -> crate::model::PayloadConfig {
        5323  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
 3855   5324   
            self.build_enforcing_all_constraints()
 3856   5325   
        }
 3857   5326   
        /* ServerBuilderGenerator.kt:283 */
 3858         -
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
        5327  +
        fn build_enforcing_all_constraints(
        5328  +
            self,
        5329  +
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
 3859   5330   
            /* ServerBuilderGenerator.kt:542 */
 3860         -
            crate::model::PayloadConfig {
        5331  +
            crate::model::RecursiveShapesInputOutputNested2 {
        5332  +
                /* ServerBuilderGenerator.kt:546 */
        5333  +
                bar: self.bar,
 3861   5334   
                /* ServerBuilderGenerator.kt:546 */
 3862         -
                data: self.data,
        5335  +
                recursive_member: self.recursive_member,
 3863   5336   
                /* ServerBuilderGenerator.kt:542 */
 3864   5337   
            }
 3865   5338   
            /* ServerBuilderGenerator.kt:283 */
 3866   5339   
        }
 3867   5340   
        /* ServerBuilderGenerator.kt:215 */
 3868   5341   
    }
 3869   5342   
 3870   5343   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 3871   5344   
}
 3872         -
/// /* ServerBuilderGenerator.kt:171 */See [`TestConfig`](crate::model::TestConfig).
 3873         -
pub mod test_config {
        5345  +
/// /* ServerBuilderGenerator.kt:171 */See [`StructureListMember`](crate::model::StructureListMember).
        5346  +
pub mod structure_list_member {
 3874   5347   
 3875   5348   
    /* ServerBuilderGenerator.kt:461 */
 3876         -
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
        5349  +
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
 3877   5350   
        fn from(builder: Builder) -> Self {
 3878   5351   
            builder.build()
 3879   5352   
        }
 3880   5353   
    }
 3881         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`TestConfig`](crate::model::TestConfig).
        5354  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructureListMember`](crate::model::StructureListMember).
 3882   5355   
    /* RustType.kt:534 */
 3883   5356   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3884   5357   
    /* ServerBuilderGenerator.kt:211 */
 3885   5358   
    pub struct Builder {
 3886   5359   
        /* ServerBuilderGenerator.kt:308 */
 3887         -
        pub(crate) timeout: ::std::option::Option<i32>,
        5360  +
        pub(crate) a: ::std::option::Option<::std::string::String>,
        5361  +
        /* ServerBuilderGenerator.kt:308 */
        5362  +
        pub(crate) b: ::std::option::Option<::std::string::String>,
 3888   5363   
        /* ServerBuilderGenerator.kt:211 */
 3889   5364   
    }
 3890   5365   
    /* ServerBuilderGenerator.kt:215 */
 3891   5366   
    impl Builder {
 3892   5367   
        /* ServerBuilderGenerator.kt:331 */
 3893   5368   
        #[allow(missing_docs)] // documentation missing in model
 3894   5369   
                               /* ServerBuilderGenerator.kt:343 */
 3895         -
        pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        5370  +
        pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 3896   5371   
            /* ServerBuilderGenerator.kt:344 */
 3897         -
            self.timeout =
        5372  +
            self.a =
 3898   5373   
                /* ServerBuilderGenerator.kt:376 */input
 3899   5374   
            /* ServerBuilderGenerator.kt:344 */;
 3900   5375   
            self
 3901   5376   
            /* ServerBuilderGenerator.kt:343 */
 3902   5377   
        }
 3903   5378   
        /* ServerBuilderGenerator.kt:426 */
 3904   5379   
        #[allow(missing_docs)] // documentation missing in model
 3905   5380   
                               /* ServerBuilderGenerator.kt:428 */
 3906         -
        pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        5381  +
        pub(crate) fn set_a(
        5382  +
            mut self,
        5383  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5384  +
        ) -> Self {
 3907   5385   
            /* ServerBuilderGenerator.kt:429 */
 3908         -
            self.timeout = input.map(|v| v.into());
        5386  +
            self.a = input.map(|v| v.into());
 3909   5387   
            self
 3910   5388   
            /* ServerBuilderGenerator.kt:428 */
 3911   5389   
        }
 3912         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
        5390  +
        /* ServerBuilderGenerator.kt:331 */
        5391  +
        #[allow(missing_docs)] // documentation missing in model
        5392  +
                               /* ServerBuilderGenerator.kt:343 */
        5393  +
        pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5394  +
            /* ServerBuilderGenerator.kt:344 */
        5395  +
            self.b =
        5396  +
                /* ServerBuilderGenerator.kt:376 */input
        5397  +
            /* ServerBuilderGenerator.kt:344 */;
        5398  +
            self
        5399  +
            /* ServerBuilderGenerator.kt:343 */
        5400  +
        }
        5401  +
        /* ServerBuilderGenerator.kt:426 */
        5402  +
        #[allow(missing_docs)] // documentation missing in model
        5403  +
                               /* ServerBuilderGenerator.kt:428 */
        5404  +
        pub(crate) fn set_b(
        5405  +
            mut self,
        5406  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5407  +
        ) -> Self {
        5408  +
            /* ServerBuilderGenerator.kt:429 */
        5409  +
            self.b = input.map(|v| v.into());
        5410  +
            self
        5411  +
            /* ServerBuilderGenerator.kt:428 */
        5412  +
        }
        5413  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
 3913   5414   
        /* ServerBuilderGenerator.kt:271 */
 3914         -
        pub fn build(self) -> crate::model::TestConfig {
        5415  +
        pub fn build(self) -> crate::model::StructureListMember {
 3915   5416   
            self.build_enforcing_all_constraints()
 3916   5417   
        }
 3917   5418   
        /* ServerBuilderGenerator.kt:283 */
 3918         -
        fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
        5419  +
        fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
 3919   5420   
            /* ServerBuilderGenerator.kt:542 */
 3920         -
            crate::model::TestConfig {
        5421  +
            crate::model::StructureListMember {
 3921   5422   
                /* ServerBuilderGenerator.kt:546 */
 3922         -
                timeout: self.timeout,
        5423  +
                a: self.a,
        5424  +
                /* ServerBuilderGenerator.kt:546 */
        5425  +
                b: self.b,
 3923   5426   
                /* ServerBuilderGenerator.kt:542 */
 3924   5427   
            }
 3925   5428   
            /* ServerBuilderGenerator.kt:283 */
 3926   5429   
        }
 3927   5430   
        /* ServerBuilderGenerator.kt:215 */
 3928   5431   
    }
 3929   5432   
 3930   5433   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 3931   5434   
}
 3932         -
/// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
 3933         -
pub mod unit {
 3934         -
 3935         -
    /* ServerBuilderGenerator.kt:461 */
 3936         -
    impl ::std::convert::From<Builder> for crate::model::Unit {
 3937         -
        fn from(builder: Builder) -> Self {
 3938         -
            builder.build()
 3939         -
        }
 3940         -
    }
 3941         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
 3942         -
    /* RustType.kt:534 */
 3943         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3944         -
    /* ServerBuilderGenerator.kt:211 */
 3945         -
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
 3946         -
    /* ServerBuilderGenerator.kt:215 */
 3947         -
    impl Builder {
 3948         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
 3949         -
        /* ServerBuilderGenerator.kt:271 */
 3950         -
        pub fn build(self) -> crate::model::Unit {
 3951         -
            self.build_enforcing_all_constraints()
 3952         -
        }
 3953         -
        /* ServerBuilderGenerator.kt:283 */
 3954         -
        fn build_enforcing_all_constraints(self) -> crate::model::Unit {
 3955         -
            /* ServerBuilderGenerator.kt:542 */
 3956         -
            crate::model::Unit {
 3957         -
            /* ServerBuilderGenerator.kt:542 */}
 3958         -
            /* ServerBuilderGenerator.kt:283 */
 3959         -
        }
 3960         -
        /* ServerBuilderGenerator.kt:215 */
 3961         -
    }
 3962         -
 3963         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 3964         -
}
 3965         -
pub mod my_union {
 3966         -
 3967         -
    /* RustType.kt:534 */
 3968         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 3969         -
    /* UnconstrainedUnionGenerator.kt:150 */
 3970         -
    #[allow(clippy::enum_variant_names)]
 3971         -
    pub enum ConstraintViolation {
 3972         -
        /* UnconstrainedUnionGenerator.kt:218 */
 3973         -
        EnumValue(crate::model::foo_enum::ConstraintViolation),
 3974         -
        /* UnconstrainedUnionGenerator.kt:150 */
 3975         -
    }
 3976         -
    /* UnconstrainedUnionGenerator.kt:158 */
 3977         -
    impl ::std::fmt::Display for ConstraintViolation {
 3978         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 3979         -
            match self {
 3980         -
                Self::EnumValue(inner) => write!(f, "{inner}"),
 3981         -
            }
 3982         -
        }
 3983         -
    }
 3984         -
 3985         -
    impl ::std::error::Error for ConstraintViolation {}
 3986         -
    /* UnconstrainedUnionGenerator.kt:176 */
 3987         -
    impl ConstraintViolation {
 3988         -
        pub(crate) fn as_validation_exception_field(
 3989         -
            self,
 3990         -
            path: ::std::string::String,
 3991         -
        ) -> crate::model::ValidationExceptionField {
 3992         -
            match self {
 3993         -
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
 3994         -
            }
 3995         -
        }
 3996         -
    }
 3997         -
 3998         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 3999         -
}
 4000         -
/// /* ServerBuilderGenerator.kt:171 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
 4001         -
pub mod renamed_greeting {
        5435  +
/// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
        5436  +
pub mod greeting_struct {
 4002   5437   
 4003   5438   
    /* ServerBuilderGenerator.kt:461 */
 4004         -
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
        5439  +
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 4005   5440   
        fn from(builder: Builder) -> Self {
 4006   5441   
            builder.build()
 4007   5442   
        }
 4008   5443   
    }
 4009         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
        5444  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 4010   5445   
    /* RustType.kt:534 */
 4011   5446   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4012   5447   
    /* ServerBuilderGenerator.kt:211 */
 4013   5448   
    pub struct Builder {
 4014   5449   
        /* ServerBuilderGenerator.kt:308 */
 4015         -
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
        5450  +
        pub(crate) hi: ::std::option::Option<::std::string::String>,
 4016   5451   
        /* ServerBuilderGenerator.kt:211 */
 4017   5452   
    }
 4018   5453   
    /* ServerBuilderGenerator.kt:215 */
 4019   5454   
    impl Builder {
 4020   5455   
        /* ServerBuilderGenerator.kt:331 */
 4021   5456   
        #[allow(missing_docs)] // documentation missing in model
 4022   5457   
                               /* ServerBuilderGenerator.kt:343 */
 4023         -
        pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5458  +
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4024   5459   
            /* ServerBuilderGenerator.kt:344 */
 4025         -
            self.salutation =
        5460  +
            self.hi =
 4026   5461   
                /* ServerBuilderGenerator.kt:376 */input
 4027   5462   
            /* ServerBuilderGenerator.kt:344 */;
 4028   5463   
            self
 4029   5464   
            /* ServerBuilderGenerator.kt:343 */
 4030   5465   
        }
 4031   5466   
        /* ServerBuilderGenerator.kt:426 */
 4032   5467   
        #[allow(missing_docs)] // documentation missing in model
 4033   5468   
                               /* ServerBuilderGenerator.kt:428 */
 4034         -
        pub(crate) fn set_salutation(
        5469  +
        pub(crate) fn set_hi(
 4035   5470   
            mut self,
 4036   5471   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4037   5472   
        ) -> Self {
 4038   5473   
            /* ServerBuilderGenerator.kt:429 */
 4039         -
            self.salutation = input.map(|v| v.into());
        5474  +
            self.hi = input.map(|v| v.into());
 4040   5475   
            self
 4041   5476   
            /* ServerBuilderGenerator.kt:428 */
 4042   5477   
        }
 4043         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
        5478  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
 4044   5479   
        /* ServerBuilderGenerator.kt:271 */
 4045         -
        pub fn build(self) -> crate::model::RenamedGreeting {
        5480  +
        pub fn build(self) -> crate::model::GreetingStruct {
 4046   5481   
            self.build_enforcing_all_constraints()
 4047   5482   
        }
 4048   5483   
        /* ServerBuilderGenerator.kt:283 */
 4049         -
        fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
        5484  +
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
 4050   5485   
            /* ServerBuilderGenerator.kt:542 */
 4051         -
            crate::model::RenamedGreeting {
        5486  +
            crate::model::GreetingStruct {
 4052   5487   
                /* ServerBuilderGenerator.kt:546 */
 4053         -
                salutation: self.salutation,
        5488  +
                hi: self.hi,
 4054   5489   
                /* ServerBuilderGenerator.kt:542 */
 4055   5490   
            }
 4056   5491   
            /* ServerBuilderGenerator.kt:283 */
 4057   5492   
        }
 4058   5493   
        /* ServerBuilderGenerator.kt:215 */
 4059   5494   
    }
 4060   5495   
 4061   5496   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4062   5497   
}
 4063         -
/// /* ServerBuilderGenerator.kt:171 */See [`GreetingStruct`](crate::model::GreetingStruct).
 4064         -
pub mod greeting_struct {
        5498  +
/// /* ServerBuilderGenerator.kt:171 */See [`RenamedGreeting`](crate::model::RenamedGreeting).
        5499  +
pub mod renamed_greeting {
 4065   5500   
 4066   5501   
    /* ServerBuilderGenerator.kt:461 */
 4067         -
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
        5502  +
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
 4068   5503   
        fn from(builder: Builder) -> Self {
 4069   5504   
            builder.build()
 4070   5505   
        }
 4071   5506   
    }
 4072         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`GreetingStruct`](crate::model::GreetingStruct).
        5507  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
 4073   5508   
    /* RustType.kt:534 */
 4074   5509   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4075   5510   
    /* ServerBuilderGenerator.kt:211 */
 4076   5511   
    pub struct Builder {
 4077   5512   
        /* ServerBuilderGenerator.kt:308 */
 4078         -
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        5513  +
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
 4079   5514   
        /* ServerBuilderGenerator.kt:211 */
 4080   5515   
    }
 4081   5516   
    /* ServerBuilderGenerator.kt:215 */
 4082   5517   
    impl Builder {
 4083   5518   
        /* ServerBuilderGenerator.kt:331 */
 4084   5519   
        #[allow(missing_docs)] // documentation missing in model
 4085   5520   
                               /* ServerBuilderGenerator.kt:343 */
 4086         -
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5521  +
        pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4087   5522   
            /* ServerBuilderGenerator.kt:344 */
 4088         -
            self.hi =
        5523  +
            self.salutation =
 4089   5524   
                /* ServerBuilderGenerator.kt:376 */input
 4090   5525   
            /* ServerBuilderGenerator.kt:344 */;
 4091   5526   
            self
 4092   5527   
            /* ServerBuilderGenerator.kt:343 */
 4093   5528   
        }
 4094   5529   
        /* ServerBuilderGenerator.kt:426 */
 4095   5530   
        #[allow(missing_docs)] // documentation missing in model
 4096   5531   
                               /* ServerBuilderGenerator.kt:428 */
 4097         -
        pub(crate) fn set_hi(
        5532  +
        pub(crate) fn set_salutation(
 4098   5533   
            mut self,
 4099   5534   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4100   5535   
        ) -> Self {
 4101   5536   
            /* ServerBuilderGenerator.kt:429 */
 4102         -
            self.hi = input.map(|v| v.into());
        5537  +
            self.salutation = input.map(|v| v.into());
 4103   5538   
            self
 4104   5539   
            /* ServerBuilderGenerator.kt:428 */
 4105   5540   
        }
 4106         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
        5541  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
 4107   5542   
        /* ServerBuilderGenerator.kt:271 */
 4108         -
        pub fn build(self) -> crate::model::GreetingStruct {
        5543  +
        pub fn build(self) -> crate::model::RenamedGreeting {
 4109   5544   
            self.build_enforcing_all_constraints()
 4110   5545   
        }
 4111   5546   
        /* ServerBuilderGenerator.kt:283 */
 4112         -
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
        5547  +
        fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
 4113   5548   
            /* ServerBuilderGenerator.kt:542 */
 4114         -
            crate::model::GreetingStruct {
        5549  +
            crate::model::RenamedGreeting {
 4115   5550   
                /* ServerBuilderGenerator.kt:546 */
 4116         -
                hi: self.hi,
        5551  +
                salutation: self.salutation,
 4117   5552   
                /* ServerBuilderGenerator.kt:542 */
 4118   5553   
            }
 4119   5554   
            /* ServerBuilderGenerator.kt:283 */
 4120   5555   
        }
 4121   5556   
        /* ServerBuilderGenerator.kt:215 */
 4122   5557   
    }
 4123   5558   
 4124   5559   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4125   5560   
}
 4126         -
pub mod sparse_set_map {
 4127         -
 4128         -
    /* MapConstraintViolationGenerator.kt:82 */
 4129         -
    #[allow(clippy::enum_variant_names)]
 4130         -
    #[derive(Debug, PartialEq)]
 4131         -
    pub enum ConstraintViolation {
 4132         -
        #[doc(hidden)]
 4133         -
        Value(
 4134         -
            ::std::string::String,
 4135         -
            crate::model::string_set::ConstraintViolation,
 4136         -
        ),
 4137         -
    }
 4138         -
 4139         -
    impl ::std::fmt::Display for ConstraintViolation {
 4140         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4141         -
            match self {
 4142         -
                Self::Value(_, value_constraint_violation) => {
 4143         -
                    write!(f, "{}", value_constraint_violation)
 4144         -
                }
 4145         -
            }
 4146         -
        }
 4147         -
    }
 4148         -
 4149         -
    impl ::std::error::Error for ConstraintViolation {}
 4150         -
    /* MapConstraintViolationGenerator.kt:111 */
 4151         -
    impl ConstraintViolation {
 4152         -
        pub(crate) fn as_validation_exception_field(
 4153         -
            self,
 4154         -
            path: ::std::string::String,
 4155         -
        ) -> crate::model::ValidationExceptionField {
 4156         -
            match self {
 4157         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4158         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
 4159         -
            }
 4160         -
        }
 4161         -
    }
 4162         -
 4163         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4164         -
}
 4165         -
/// /* CodegenDelegator.kt:52 */See [`StringSet`](crate::model::StringSet).
 4166         -
pub mod string_set {
 4167         -
 4168         -
    /* CollectionConstraintViolationGenerator.kt:78 */
 4169         -
    #[allow(clippy::enum_variant_names)]
 4170         -
    #[derive(Debug, PartialEq)]
 4171         -
    pub enum ConstraintViolation {
 4172         -
        /// Constraint violation error when the list does not contain unique items
 4173         -
        UniqueItems {
 4174         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4175         -
            /// at least two elements.
 4176         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4177         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4178         -
            /// Nothing is guaranteed about the order of the indices.
 4179         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4180         -
            /// The original vector, that contains duplicate items.
 4181         -
            original: ::std::vec::Vec<::std::string::String>,
 4182         -
        },
 4183         -
    }
        5561  +
/// /* ServerBuilderGenerator.kt:171 */See [`Unit`](crate::model::Unit).
        5562  +
pub mod unit {
 4184   5563   
 4185         -
    impl ::std::fmt::Display for ConstraintViolation {
 4186         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4187         -
            let message = match self {
 4188         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4189         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4190         -
                            };
 4191         -
            write!(f, "{message}")
        5564  +
    /* ServerBuilderGenerator.kt:461 */
        5565  +
    impl ::std::convert::From<Builder> for crate::model::Unit {
        5566  +
        fn from(builder: Builder) -> Self {
        5567  +
            builder.build()
 4192   5568   
        }
 4193   5569   
    }
 4194         -
 4195         -
    impl ::std::error::Error for ConstraintViolation {}
 4196         -
    /* CollectionConstraintViolationGenerator.kt:104 */
 4197         -
    impl ConstraintViolation {
 4198         -
        pub(crate) fn as_validation_exception_field(
 4199         -
            self,
 4200         -
            path: ::std::string::String,
 4201         -
        ) -> crate::model::ValidationExceptionField {
 4202         -
            match self {
 4203         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4204         -
                                crate::model::ValidationExceptionField {
 4205         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4206         -
                                    path,
 4207         -
                                },
        5570  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Unit`](crate::model::Unit).
        5571  +
    /* RustType.kt:534 */
        5572  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5573  +
    /* ServerBuilderGenerator.kt:211 */
        5574  +
    pub struct Builder {/* ServerBuilderGenerator.kt:211 */}
        5575  +
    /* ServerBuilderGenerator.kt:215 */
        5576  +
    impl Builder {
        5577  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Unit`](crate::model::Unit).
        5578  +
        /* ServerBuilderGenerator.kt:271 */
        5579  +
        pub fn build(self) -> crate::model::Unit {
        5580  +
            self.build_enforcing_all_constraints()
 4208   5581   
        }
        5582  +
        /* ServerBuilderGenerator.kt:283 */
        5583  +
        fn build_enforcing_all_constraints(self) -> crate::model::Unit {
        5584  +
            /* ServerBuilderGenerator.kt:542 */
        5585  +
            crate::model::Unit {
        5586  +
            /* ServerBuilderGenerator.kt:542 */}
        5587  +
            /* ServerBuilderGenerator.kt:283 */
 4209   5588   
        }
        5589  +
        /* ServerBuilderGenerator.kt:215 */
 4210   5590   
    }
 4211   5591   
 4212   5592   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4213   5593   
}
 4214         -
pub mod dense_set_map {
        5594  +
/// /* ServerBuilderGenerator.kt:171 */See [`Farewell`](crate::model::Farewell).
        5595  +
pub mod farewell {
 4215   5596   
 4216         -
    /* MapConstraintViolationGenerator.kt:82 */
 4217         -
    #[allow(clippy::enum_variant_names)]
 4218         -
    #[derive(Debug, PartialEq)]
 4219         -
    pub enum ConstraintViolation {
 4220         -
        #[doc(hidden)]
 4221         -
        Value(
 4222         -
            ::std::string::String,
 4223         -
            crate::model::string_set::ConstraintViolation,
 4224         -
        ),
        5597  +
    /* ServerBuilderGenerator.kt:461 */
        5598  +
    impl ::std::convert::From<Builder> for crate::model::Farewell {
        5599  +
        fn from(builder: Builder) -> Self {
        5600  +
            builder.build()
 4225   5601   
        }
 4226         -
 4227         -
    impl ::std::fmt::Display for ConstraintViolation {
 4228         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4229         -
            match self {
 4230         -
                Self::Value(_, value_constraint_violation) => {
 4231         -
                    write!(f, "{}", value_constraint_violation)
 4232   5602   
    }
        5603  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`Farewell`](crate::model::Farewell).
        5604  +
    /* RustType.kt:534 */
        5605  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5606  +
    /* ServerBuilderGenerator.kt:211 */
        5607  +
    pub struct Builder {
        5608  +
        /* ServerBuilderGenerator.kt:308 */
        5609  +
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
        5610  +
        /* ServerBuilderGenerator.kt:211 */
        5611  +
    }
        5612  +
    /* ServerBuilderGenerator.kt:215 */
        5613  +
    impl Builder {
        5614  +
        /* ServerBuilderGenerator.kt:331 */
        5615  +
        #[allow(missing_docs)] // documentation missing in model
        5616  +
                               /* ServerBuilderGenerator.kt:343 */
        5617  +
        pub fn phrase(mut self, input: ::std::string::String) -> Self {
        5618  +
            /* ServerBuilderGenerator.kt:344 */
        5619  +
            self.phrase =
        5620  +
                /* ServerBuilderGenerator.kt:345 */Some(
        5621  +
                    /* ServerBuilderGenerator.kt:376 */input
        5622  +
                /* ServerBuilderGenerator.kt:345 */)
        5623  +
            /* ServerBuilderGenerator.kt:344 */;
        5624  +
            self
        5625  +
            /* ServerBuilderGenerator.kt:343 */
 4233   5626   
        }
        5627  +
        /* ServerBuilderGenerator.kt:426 */
        5628  +
        #[allow(missing_docs)] // documentation missing in model
        5629  +
                               /* ServerBuilderGenerator.kt:428 */
        5630  +
        pub(crate) fn set_phrase(
        5631  +
            mut self,
        5632  +
            input: impl ::std::convert::Into<::std::string::String>,
        5633  +
        ) -> Self {
        5634  +
            /* ServerBuilderGenerator.kt:429 */
        5635  +
            self.phrase = Some(input.into());
        5636  +
            self
        5637  +
            /* ServerBuilderGenerator.kt:428 */
 4234   5638   
        }
        5639  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
        5640  +
        /* ServerBuilderGenerator.kt:271 */
        5641  +
        pub fn build(self) -> crate::model::Farewell {
        5642  +
            self.build_enforcing_all_constraints()
 4235   5643   
        }
 4236         -
 4237         -
    impl ::std::error::Error for ConstraintViolation {}
 4238         -
    /* MapConstraintViolationGenerator.kt:111 */
 4239         -
    impl ConstraintViolation {
 4240         -
        pub(crate) fn as_validation_exception_field(
 4241         -
            self,
 4242         -
            path: ::std::string::String,
 4243         -
        ) -> crate::model::ValidationExceptionField {
 4244         -
            match self {
 4245         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4246         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
        5644  +
        /* ServerBuilderGenerator.kt:283 */
        5645  +
        fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
        5646  +
            /* ServerBuilderGenerator.kt:542 */
        5647  +
            crate::model::Farewell {
        5648  +
                /* ServerBuilderGenerator.kt:546 */
        5649  +
                phrase: self
        5650  +
                    .phrase
        5651  +
                    /* ServerBuilderGeneratorCommon.kt:129 */
        5652  +
                    .unwrap_or_else(|| String::from("bye")),
        5653  +
                /* ServerBuilderGenerator.kt:542 */
 4247   5654   
            }
        5655  +
            /* ServerBuilderGenerator.kt:283 */
 4248   5656   
        }
        5657  +
        /* ServerBuilderGenerator.kt:215 */
 4249   5658   
    }
 4250   5659   
 4251   5660   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4252   5661   
}
 4253         -
/// /* ServerBuilderGenerator.kt:171 */See [`StructureListMember`](crate::model::StructureListMember).
 4254         -
pub mod structure_list_member {
        5662  +
/// /* ServerBuilderGenerator.kt:171 */See [`HeadersEvent`](crate::model::HeadersEvent).
        5663  +
pub mod headers_event {
 4255   5664   
 4256   5665   
    /* ServerBuilderGenerator.kt:461 */
 4257         -
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
        5666  +
    impl ::std::convert::From<Builder> for crate::model::HeadersEvent {
 4258   5667   
        fn from(builder: Builder) -> Self {
 4259   5668   
            builder.build()
 4260   5669   
        }
 4261   5670   
    }
 4262         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructureListMember`](crate::model::StructureListMember).
        5671  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`HeadersEvent`](crate::model::HeadersEvent).
 4263   5672   
    /* RustType.kt:534 */
 4264   5673   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4265   5674   
    /* ServerBuilderGenerator.kt:211 */
 4266   5675   
    pub struct Builder {
 4267   5676   
        /* ServerBuilderGenerator.kt:308 */
 4268         -
        pub(crate) a: ::std::option::Option<::std::string::String>,
        5677  +
        pub(crate) boolean_header: ::std::option::Option<bool>,
 4269   5678   
        /* ServerBuilderGenerator.kt:308 */
 4270         -
        pub(crate) b: ::std::option::Option<::std::string::String>,
        5679  +
        pub(crate) byte_header: ::std::option::Option<i8>,
        5680  +
        /* ServerBuilderGenerator.kt:308 */
        5681  +
        pub(crate) short_header: ::std::option::Option<i16>,
        5682  +
        /* ServerBuilderGenerator.kt:308 */
        5683  +
        pub(crate) int_header: ::std::option::Option<i32>,
        5684  +
        /* ServerBuilderGenerator.kt:308 */
        5685  +
        pub(crate) long_header: ::std::option::Option<i64>,
        5686  +
        /* ServerBuilderGenerator.kt:308 */
        5687  +
        pub(crate) blob_header: ::std::option::Option<::aws_smithy_types::Blob>,
        5688  +
        /* ServerBuilderGenerator.kt:308 */
        5689  +
        pub(crate) string_header: ::std::option::Option<::std::string::String>,
        5690  +
        /* ServerBuilderGenerator.kt:308 */
        5691  +
        pub(crate) timestamp_header: ::std::option::Option<::aws_smithy_types::DateTime>,
 4271   5692   
        /* ServerBuilderGenerator.kt:211 */
 4272   5693   
    }
 4273   5694   
    /* ServerBuilderGenerator.kt:215 */
 4274   5695   
    impl Builder {
 4275   5696   
        /* ServerBuilderGenerator.kt:331 */
 4276   5697   
        #[allow(missing_docs)] // documentation missing in model
 4277   5698   
                               /* ServerBuilderGenerator.kt:343 */
 4278         -
        pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5699  +
        pub fn boolean_header(mut self, input: ::std::option::Option<bool>) -> Self {
 4279   5700   
            /* ServerBuilderGenerator.kt:344 */
 4280         -
            self.a =
        5701  +
            self.boolean_header =
 4281   5702   
                /* ServerBuilderGenerator.kt:376 */input
 4282   5703   
            /* ServerBuilderGenerator.kt:344 */;
 4283   5704   
            self
 4284   5705   
            /* ServerBuilderGenerator.kt:343 */
 4285   5706   
        }
 4286   5707   
        /* ServerBuilderGenerator.kt:426 */
 4287   5708   
        #[allow(missing_docs)] // documentation missing in model
 4288   5709   
                               /* ServerBuilderGenerator.kt:428 */
 4289         -
        pub(crate) fn set_a(
        5710  +
        pub(crate) fn set_boolean_header(
 4290   5711   
            mut self,
 4291         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5712  +
            input: Option<impl ::std::convert::Into<bool>>,
 4292   5713   
        ) -> Self {
 4293   5714   
            /* ServerBuilderGenerator.kt:429 */
 4294         -
            self.a = input.map(|v| v.into());
        5715  +
            self.boolean_header = input.map(|v| v.into());
 4295   5716   
            self
 4296   5717   
            /* ServerBuilderGenerator.kt:428 */
 4297   5718   
        }
 4298   5719   
        /* ServerBuilderGenerator.kt:331 */
 4299   5720   
        #[allow(missing_docs)] // documentation missing in model
 4300   5721   
                               /* ServerBuilderGenerator.kt:343 */
 4301         -
        pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5722  +
        pub fn byte_header(mut self, input: ::std::option::Option<i8>) -> Self {
 4302   5723   
            /* ServerBuilderGenerator.kt:344 */
 4303         -
            self.b =
        5724  +
            self.byte_header =
 4304   5725   
                /* ServerBuilderGenerator.kt:376 */input
 4305   5726   
            /* ServerBuilderGenerator.kt:344 */;
 4306   5727   
            self
 4307   5728   
            /* ServerBuilderGenerator.kt:343 */
 4308   5729   
        }
 4309   5730   
        /* ServerBuilderGenerator.kt:426 */
 4310   5731   
        #[allow(missing_docs)] // documentation missing in model
 4311   5732   
                               /* ServerBuilderGenerator.kt:428 */
 4312         -
        pub(crate) fn set_b(
        5733  +
        pub(crate) fn set_byte_header(
 4313   5734   
            mut self,
 4314         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5735  +
            input: Option<impl ::std::convert::Into<i8>>,
 4315   5736   
        ) -> Self {
 4316   5737   
            /* ServerBuilderGenerator.kt:429 */
 4317         -
            self.b = input.map(|v| v.into());
        5738  +
            self.byte_header = input.map(|v| v.into());
 4318   5739   
            self
 4319   5740   
            /* ServerBuilderGenerator.kt:428 */
 4320   5741   
        }
 4321         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
 4322         -
        /* ServerBuilderGenerator.kt:271 */
 4323         -
        pub fn build(self) -> crate::model::StructureListMember {
 4324         -
            self.build_enforcing_all_constraints()
 4325         -
        }
 4326         -
        /* ServerBuilderGenerator.kt:283 */
 4327         -
        fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
 4328         -
            /* ServerBuilderGenerator.kt:542 */
 4329         -
            crate::model::StructureListMember {
 4330         -
                /* ServerBuilderGenerator.kt:546 */
 4331         -
                a: self.a,
 4332         -
                /* ServerBuilderGenerator.kt:546 */
 4333         -
                b: self.b,
 4334         -
                /* ServerBuilderGenerator.kt:542 */
 4335         -
            }
 4336         -
            /* ServerBuilderGenerator.kt:283 */
 4337         -
        }
 4338         -
        /* ServerBuilderGenerator.kt:215 */
 4339         -
    }
 4340         -
 4341         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4342         -
}
 4343         -
pub mod foo_enum_list {
 4344         -
 4345         -
    /* CollectionConstraintViolationGenerator.kt:78 */
 4346         -
    #[allow(clippy::enum_variant_names)]
 4347         -
    #[derive(Debug, PartialEq)]
 4348         -
    pub enum ConstraintViolation {
 4349         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 4350         -
        /// The first component of the tuple is the index in the collection where the
 4351         -
        /// first constraint violation was found.
 4352         -
        #[doc(hidden)]
 4353         -
        Member(usize, crate::model::foo_enum::ConstraintViolation),
 4354         -
    }
 4355         -
 4356         -
    impl ::std::fmt::Display for ConstraintViolation {
 4357         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4358         -
            let message = match self {
 4359         -
                Self::Member(index, failing_member) => format!(
 4360         -
                    "Value at index {index} failed to satisfy constraint. {}",
 4361         -
                    failing_member
 4362         -
                ),
 4363         -
            };
 4364         -
            write!(f, "{message}")
        5742  +
        /* ServerBuilderGenerator.kt:331 */
        5743  +
        #[allow(missing_docs)] // documentation missing in model
        5744  +
                               /* ServerBuilderGenerator.kt:343 */
        5745  +
        pub fn short_header(mut self, input: ::std::option::Option<i16>) -> Self {
        5746  +
            /* ServerBuilderGenerator.kt:344 */
        5747  +
            self.short_header =
        5748  +
                /* ServerBuilderGenerator.kt:376 */input
        5749  +
            /* ServerBuilderGenerator.kt:344 */;
        5750  +
            self
        5751  +
            /* ServerBuilderGenerator.kt:343 */
 4365   5752   
        }
        5753  +
        /* ServerBuilderGenerator.kt:426 */
        5754  +
        #[allow(missing_docs)] // documentation missing in model
        5755  +
                               /* ServerBuilderGenerator.kt:428 */
        5756  +
        pub(crate) fn set_short_header(
        5757  +
            mut self,
        5758  +
            input: Option<impl ::std::convert::Into<i16>>,
        5759  +
        ) -> Self {
        5760  +
            /* ServerBuilderGenerator.kt:429 */
        5761  +
            self.short_header = input.map(|v| v.into());
        5762  +
            self
        5763  +
            /* ServerBuilderGenerator.kt:428 */
 4366   5764   
        }
 4367         -
 4368         -
    impl ::std::error::Error for ConstraintViolation {}
 4369         -
    /* CollectionConstraintViolationGenerator.kt:104 */
 4370         -
    impl ConstraintViolation {
 4371         -
        pub(crate) fn as_validation_exception_field(
 4372         -
            self,
 4373         -
            path: ::std::string::String,
 4374         -
        ) -> crate::model::ValidationExceptionField {
 4375         -
            match self {
 4376         -
                Self::Member(index, member_constraint_violation) => member_constraint_violation
 4377         -
                    .as_validation_exception_field(path + "/" + &index.to_string()),
        5765  +
        /* ServerBuilderGenerator.kt:331 */
        5766  +
        #[allow(missing_docs)] // documentation missing in model
        5767  +
                               /* ServerBuilderGenerator.kt:343 */
        5768  +
        pub fn int_header(mut self, input: ::std::option::Option<i32>) -> Self {
        5769  +
            /* ServerBuilderGenerator.kt:344 */
        5770  +
            self.int_header =
        5771  +
                /* ServerBuilderGenerator.kt:376 */input
        5772  +
            /* ServerBuilderGenerator.kt:344 */;
        5773  +
            self
        5774  +
            /* ServerBuilderGenerator.kt:343 */
 4378   5775   
        }
        5776  +
        /* ServerBuilderGenerator.kt:426 */
        5777  +
        #[allow(missing_docs)] // documentation missing in model
        5778  +
                               /* ServerBuilderGenerator.kt:428 */
        5779  +
        pub(crate) fn set_int_header(
        5780  +
            mut self,
        5781  +
            input: Option<impl ::std::convert::Into<i32>>,
        5782  +
        ) -> Self {
        5783  +
            /* ServerBuilderGenerator.kt:429 */
        5784  +
            self.int_header = input.map(|v| v.into());
        5785  +
            self
        5786  +
            /* ServerBuilderGenerator.kt:428 */
 4379   5787   
        }
        5788  +
        /* ServerBuilderGenerator.kt:331 */
        5789  +
        #[allow(missing_docs)] // documentation missing in model
        5790  +
                               /* ServerBuilderGenerator.kt:343 */
        5791  +
        pub fn long_header(mut self, input: ::std::option::Option<i64>) -> Self {
        5792  +
            /* ServerBuilderGenerator.kt:344 */
        5793  +
            self.long_header =
        5794  +
                /* ServerBuilderGenerator.kt:376 */input
        5795  +
            /* ServerBuilderGenerator.kt:344 */;
        5796  +
            self
        5797  +
            /* ServerBuilderGenerator.kt:343 */
 4380   5798   
        }
 4381         -
 4382         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4383         -
}
 4384         -
/// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4385         -
pub mod recursive_shapes_input_output_nested1 {
 4386         -
 4387         -
    /* ServerBuilderGenerator.kt:461 */
 4388         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
 4389         -
        fn from(builder: Builder) -> Self {
 4390         -
            builder.build()
        5799  +
        /* ServerBuilderGenerator.kt:426 */
        5800  +
        #[allow(missing_docs)] // documentation missing in model
        5801  +
                               /* ServerBuilderGenerator.kt:428 */
        5802  +
        pub(crate) fn set_long_header(
        5803  +
            mut self,
        5804  +
            input: Option<impl ::std::convert::Into<i64>>,
        5805  +
        ) -> Self {
        5806  +
            /* ServerBuilderGenerator.kt:429 */
        5807  +
            self.long_header = input.map(|v| v.into());
        5808  +
            self
        5809  +
            /* ServerBuilderGenerator.kt:428 */
 4391   5810   
        }
        5811  +
        /* ServerBuilderGenerator.kt:331 */
        5812  +
        #[allow(missing_docs)] // documentation missing in model
        5813  +
                               /* ServerBuilderGenerator.kt:343 */
        5814  +
        pub fn blob_header(
        5815  +
            mut self,
        5816  +
            input: ::std::option::Option<::aws_smithy_types::Blob>,
        5817  +
        ) -> Self {
        5818  +
            /* ServerBuilderGenerator.kt:344 */
        5819  +
            self.blob_header =
        5820  +
                /* ServerBuilderGenerator.kt:376 */input
        5821  +
            /* ServerBuilderGenerator.kt:344 */;
        5822  +
            self
        5823  +
            /* ServerBuilderGenerator.kt:343 */
 4392   5824   
        }
 4393         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4394         -
    /* RustType.kt:534 */
 4395         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4396         -
    /* ServerBuilderGenerator.kt:211 */
 4397         -
    pub struct Builder {
 4398         -
        /* ServerBuilderGenerator.kt:308 */
 4399         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 4400         -
        /* ServerBuilderGenerator.kt:308 */
 4401         -
        pub(crate) nested: ::std::option::Option<
 4402         -
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4403         -
        >,
 4404         -
        /* ServerBuilderGenerator.kt:211 */
        5825  +
        /* ServerBuilderGenerator.kt:426 */
        5826  +
        #[allow(missing_docs)] // documentation missing in model
        5827  +
                               /* ServerBuilderGenerator.kt:428 */
        5828  +
        pub(crate) fn set_blob_header(
        5829  +
            mut self,
        5830  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
        5831  +
        ) -> Self {
        5832  +
            /* ServerBuilderGenerator.kt:429 */
        5833  +
            self.blob_header = input.map(|v| v.into());
        5834  +
            self
        5835  +
            /* ServerBuilderGenerator.kt:428 */
 4405   5836   
        }
 4406         -
    /* ServerBuilderGenerator.kt:215 */
 4407         -
    impl Builder {
 4408   5837   
        /* ServerBuilderGenerator.kt:331 */
 4409   5838   
        #[allow(missing_docs)] // documentation missing in model
 4410   5839   
                               /* ServerBuilderGenerator.kt:343 */
 4411         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5840  +
        pub fn string_header(
        5841  +
            mut self,
        5842  +
            input: ::std::option::Option<::std::string::String>,
        5843  +
        ) -> Self {
 4412   5844   
            /* ServerBuilderGenerator.kt:344 */
 4413         -
            self.foo =
        5845  +
            self.string_header =
 4414   5846   
                /* ServerBuilderGenerator.kt:376 */input
 4415   5847   
            /* ServerBuilderGenerator.kt:344 */;
 4416   5848   
            self
 4417   5849   
            /* ServerBuilderGenerator.kt:343 */
 4418   5850   
        }
 4419   5851   
        /* ServerBuilderGenerator.kt:426 */
 4420   5852   
        #[allow(missing_docs)] // documentation missing in model
 4421   5853   
                               /* ServerBuilderGenerator.kt:428 */
 4422         -
        pub(crate) fn set_foo(
        5854  +
        pub(crate) fn set_string_header(
 4423   5855   
            mut self,
 4424   5856   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4425   5857   
        ) -> Self {
 4426   5858   
            /* ServerBuilderGenerator.kt:429 */
 4427         -
            self.foo = input.map(|v| v.into());
        5859  +
            self.string_header = input.map(|v| v.into());
 4428   5860   
            self
 4429   5861   
            /* ServerBuilderGenerator.kt:428 */
 4430   5862   
        }
 4431   5863   
        /* ServerBuilderGenerator.kt:331 */
 4432   5864   
        #[allow(missing_docs)] // documentation missing in model
 4433   5865   
                               /* ServerBuilderGenerator.kt:343 */
 4434         -
        pub fn nested(
        5866  +
        pub fn timestamp_header(
 4435   5867   
            mut self,
 4436         -
            input: ::std::option::Option<
 4437         -
                ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4438         -
            >,
        5868  +
            input: ::std::option::Option<::aws_smithy_types::DateTime>,
 4439   5869   
        ) -> Self {
 4440   5870   
            /* ServerBuilderGenerator.kt:344 */
 4441         -
            self.nested =
        5871  +
            self.timestamp_header =
 4442   5872   
                /* ServerBuilderGenerator.kt:376 */input
 4443   5873   
            /* ServerBuilderGenerator.kt:344 */;
 4444   5874   
            self
 4445   5875   
            /* ServerBuilderGenerator.kt:343 */
 4446   5876   
        }
 4447   5877   
        /* ServerBuilderGenerator.kt:426 */
 4448   5878   
        #[allow(missing_docs)] // documentation missing in model
 4449   5879   
                               /* ServerBuilderGenerator.kt:428 */
 4450         -
        pub(crate) fn set_nested(
        5880  +
        pub(crate) fn set_timestamp_header(
 4451   5881   
            mut self,
 4452         -
            input: Option<
 4453         -
                impl ::std::convert::Into<
 4454         -
                    ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4455         -
                >,
 4456         -
            >,
        5882  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::DateTime>>,
 4457   5883   
        ) -> Self {
 4458   5884   
            /* ServerBuilderGenerator.kt:429 */
 4459         -
            self.nested = input.map(|v| v.into());
        5885  +
            self.timestamp_header = input.map(|v| v.into());
 4460   5886   
            self
 4461   5887   
            /* ServerBuilderGenerator.kt:428 */
 4462   5888   
        }
 4463         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        5889  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`HeadersEvent`](crate::model::HeadersEvent).
 4464   5890   
        /* ServerBuilderGenerator.kt:271 */
 4465         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        5891  +
        pub fn build(self) -> crate::model::HeadersEvent {
 4466   5892   
            self.build_enforcing_all_constraints()
 4467   5893   
        }
 4468   5894   
        /* ServerBuilderGenerator.kt:283 */
 4469         -
        fn build_enforcing_all_constraints(
 4470         -
            self,
 4471         -
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
        5895  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersEvent {
 4472   5896   
            /* ServerBuilderGenerator.kt:542 */
 4473         -
            crate::model::RecursiveShapesInputOutputNested1 {
        5897  +
            crate::model::HeadersEvent {
 4474   5898   
                /* ServerBuilderGenerator.kt:546 */
 4475         -
                foo: self.foo,
        5899  +
                boolean_header: self.boolean_header,
 4476   5900   
                /* ServerBuilderGenerator.kt:546 */
 4477         -
                nested: self.nested,
        5901  +
                byte_header: self.byte_header,
        5902  +
                /* ServerBuilderGenerator.kt:546 */
        5903  +
                short_header: self.short_header,
        5904  +
                /* ServerBuilderGenerator.kt:546 */
        5905  +
                int_header: self.int_header,
        5906  +
                /* ServerBuilderGenerator.kt:546 */
        5907  +
                long_header: self.long_header,
        5908  +
                /* ServerBuilderGenerator.kt:546 */
        5909  +
                blob_header: self.blob_header,
        5910  +
                /* ServerBuilderGenerator.kt:546 */
        5911  +
                string_header: self.string_header,
        5912  +
                /* ServerBuilderGenerator.kt:546 */
        5913  +
                timestamp_header: self.timestamp_header,
 4478   5914   
                /* ServerBuilderGenerator.kt:542 */
 4479   5915   
            }
 4480   5916   
            /* ServerBuilderGenerator.kt:283 */
 4481   5917   
        }
 4482   5918   
        /* ServerBuilderGenerator.kt:215 */
 4483   5919   
    }
 4484   5920   
 4485   5921   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4486   5922   
}
 4487         -
/// /* ServerBuilderGenerator.kt:171 */See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 4488         -
pub mod recursive_shapes_input_output_nested2 {
        5923  +
/// /* ServerBuilderGenerator.kt:171 */See [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        5924  +
pub mod blob_payload_event {
 4489   5925   
 4490   5926   
    /* ServerBuilderGenerator.kt:461 */
 4491         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
        5927  +
    impl ::std::convert::From<Builder> for crate::model::BlobPayloadEvent {
 4492   5928   
        fn from(builder: Builder) -> Self {
 4493   5929   
            builder.build()
 4494   5930   
        }
 4495   5931   
    }
 4496         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5932  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
 4497   5933   
    /* RustType.kt:534 */
 4498   5934   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4499   5935   
    /* ServerBuilderGenerator.kt:211 */
 4500   5936   
    pub struct Builder {
 4501   5937   
        /* ServerBuilderGenerator.kt:308 */
 4502         -
        pub(crate) bar: ::std::option::Option<::std::string::String>,
 4503         -
        /* ServerBuilderGenerator.kt:308 */
 4504         -
        pub(crate) recursive_member:
 4505         -
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        5938  +
        pub(crate) payload: ::std::option::Option<::aws_smithy_types::Blob>,
 4506   5939   
        /* ServerBuilderGenerator.kt:211 */
 4507   5940   
    }
 4508   5941   
    /* ServerBuilderGenerator.kt:215 */
 4509   5942   
    impl Builder {
 4510   5943   
        /* ServerBuilderGenerator.kt:331 */
 4511   5944   
        #[allow(missing_docs)] // documentation missing in model
 4512   5945   
                               /* ServerBuilderGenerator.kt:343 */
 4513         -
        pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5946  +
        pub fn payload(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
 4514   5947   
            /* ServerBuilderGenerator.kt:344 */
 4515         -
            self.bar =
        5948  +
            self.payload =
 4516   5949   
                /* ServerBuilderGenerator.kt:376 */input
 4517   5950   
            /* ServerBuilderGenerator.kt:344 */;
 4518   5951   
            self
 4519   5952   
            /* ServerBuilderGenerator.kt:343 */
 4520   5953   
        }
 4521   5954   
        /* ServerBuilderGenerator.kt:426 */
 4522   5955   
        #[allow(missing_docs)] // documentation missing in model
 4523   5956   
                               /* ServerBuilderGenerator.kt:428 */
 4524         -
        pub(crate) fn set_bar(
        5957  +
        pub(crate) fn set_payload(
 4525   5958   
            mut self,
 4526         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5959  +
            input: Option<impl ::std::convert::Into<::aws_smithy_types::Blob>>,
 4527   5960   
        ) -> Self {
 4528   5961   
            /* ServerBuilderGenerator.kt:429 */
 4529         -
            self.bar = input.map(|v| v.into());
        5962  +
            self.payload = input.map(|v| v.into());
 4530   5963   
            self
 4531   5964   
            /* ServerBuilderGenerator.kt:428 */
 4532   5965   
        }
        5966  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        5967  +
        /* ServerBuilderGenerator.kt:271 */
        5968  +
        pub fn build(self) -> crate::model::BlobPayloadEvent {
        5969  +
            self.build_enforcing_all_constraints()
        5970  +
        }
        5971  +
        /* ServerBuilderGenerator.kt:283 */
        5972  +
        fn build_enforcing_all_constraints(self) -> crate::model::BlobPayloadEvent {
        5973  +
            /* ServerBuilderGenerator.kt:542 */
        5974  +
            crate::model::BlobPayloadEvent {
        5975  +
                /* ServerBuilderGenerator.kt:546 */
        5976  +
                payload: self.payload,
        5977  +
                /* ServerBuilderGenerator.kt:542 */
        5978  +
            }
        5979  +
            /* ServerBuilderGenerator.kt:283 */
        5980  +
        }
        5981  +
        /* ServerBuilderGenerator.kt:215 */
        5982  +
    }
        5983  +
        5984  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        5985  +
}
        5986  +
/// /* ServerBuilderGenerator.kt:171 */See [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        5987  +
pub mod string_payload_event {
        5988  +
        5989  +
    /* ServerBuilderGenerator.kt:461 */
        5990  +
    impl ::std::convert::From<Builder> for crate::model::StringPayloadEvent {
        5991  +
        fn from(builder: Builder) -> Self {
        5992  +
            builder.build()
        5993  +
        }
        5994  +
    }
        5995  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        5996  +
    /* RustType.kt:534 */
        5997  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5998  +
    /* ServerBuilderGenerator.kt:211 */
        5999  +
    pub struct Builder {
        6000  +
        /* ServerBuilderGenerator.kt:308 */
        6001  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
        6002  +
        /* ServerBuilderGenerator.kt:211 */
        6003  +
    }
        6004  +
    /* ServerBuilderGenerator.kt:215 */
        6005  +
    impl Builder {
 4533   6006   
        /* ServerBuilderGenerator.kt:331 */
 4534   6007   
        #[allow(missing_docs)] // documentation missing in model
 4535   6008   
                               /* ServerBuilderGenerator.kt:343 */
 4536         -
        pub fn recursive_member(
 4537         -
            mut self,
 4538         -
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 4539         -
        ) -> Self {
        6009  +
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4540   6010   
            /* ServerBuilderGenerator.kt:344 */
 4541         -
            self.recursive_member =
        6011  +
            self.payload =
 4542   6012   
                /* ServerBuilderGenerator.kt:376 */input
 4543   6013   
            /* ServerBuilderGenerator.kt:344 */;
 4544   6014   
            self
 4545   6015   
            /* ServerBuilderGenerator.kt:343 */
 4546   6016   
        }
 4547   6017   
        /* ServerBuilderGenerator.kt:426 */
 4548   6018   
        #[allow(missing_docs)] // documentation missing in model
 4549   6019   
                               /* ServerBuilderGenerator.kt:428 */
 4550         -
        pub(crate) fn set_recursive_member(
        6020  +
        pub(crate) fn set_payload(
 4551   6021   
            mut self,
 4552         -
            input: Option<
 4553         -
                impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
 4554         -
            >,
        6022  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4555   6023   
        ) -> Self {
 4556   6024   
            /* ServerBuilderGenerator.kt:429 */
 4557         -
            self.recursive_member = input.map(|v| v.into());
        6025  +
            self.payload = input.map(|v| v.into());
 4558   6026   
            self
 4559   6027   
            /* ServerBuilderGenerator.kt:428 */
 4560   6028   
        }
 4561         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        6029  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StringPayloadEvent`](crate::model::StringPayloadEvent).
 4562   6030   
        /* ServerBuilderGenerator.kt:271 */
 4563         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
        6031  +
        pub fn build(self) -> crate::model::StringPayloadEvent {
 4564   6032   
            self.build_enforcing_all_constraints()
 4565   6033   
        }
 4566   6034   
        /* ServerBuilderGenerator.kt:283 */
 4567         -
        fn build_enforcing_all_constraints(
 4568         -
            self,
 4569         -
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
        6035  +
        fn build_enforcing_all_constraints(self) -> crate::model::StringPayloadEvent {
 4570   6036   
            /* ServerBuilderGenerator.kt:542 */
 4571         -
            crate::model::RecursiveShapesInputOutputNested2 {
 4572         -
                /* ServerBuilderGenerator.kt:546 */
 4573         -
                bar: self.bar,
        6037  +
            crate::model::StringPayloadEvent {
 4574   6038   
                /* ServerBuilderGenerator.kt:546 */
 4575         -
                recursive_member: self.recursive_member,
        6039  +
                payload: self.payload,
 4576   6040   
                /* ServerBuilderGenerator.kt:542 */
 4577   6041   
            }
 4578   6042   
            /* ServerBuilderGenerator.kt:283 */
 4579   6043   
        }
 4580   6044   
        /* ServerBuilderGenerator.kt:215 */
 4581   6045   
    }
 4582   6046   
 4583   6047   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4584   6048   
}
 4585         -
/// /* CodegenDelegator.kt:52 */See [`IntegerEnumSet`](crate::model::IntegerEnumSet).
 4586         -
pub mod integer_enum_set {
 4587         -
 4588         -
    /* CollectionConstraintViolationGenerator.kt:78 */
 4589         -
    #[allow(clippy::enum_variant_names)]
 4590         -
    #[derive(Debug, PartialEq)]
 4591         -
    pub enum ConstraintViolation {
 4592         -
        /// Constraint violation error when the list does not contain unique items
 4593         -
        UniqueItems {
 4594         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4595         -
            /// at least two elements.
 4596         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4597         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4598         -
            /// Nothing is guaranteed about the order of the indices.
 4599         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4600         -
            /// The original vector, that contains duplicate items.
 4601         -
            original: ::std::vec::Vec<i32>,
 4602         -
        },
 4603         -
    }
 4604         -
 4605         -
    impl ::std::fmt::Display for ConstraintViolation {
 4606         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4607         -
            let message = match self {
 4608         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4609         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4610         -
                            };
 4611         -
            write!(f, "{message}")
 4612         -
        }
 4613         -
    }
 4614         -
 4615         -
    impl ::std::error::Error for ConstraintViolation {}
 4616         -
    /* CollectionConstraintViolationGenerator.kt:104 */
 4617         -
    impl ConstraintViolation {
 4618         -
        pub(crate) fn as_validation_exception_field(
 4619         -
            self,
 4620         -
            path: ::std::string::String,
 4621         -
        ) -> crate::model::ValidationExceptionField {
 4622         -
            match self {
 4623         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4624         -
                                crate::model::ValidationExceptionField {
 4625         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4626         -
                                    path,
 4627         -
                                },
 4628         -
                    }
 4629         -
        }
 4630         -
    }
 4631         -
 4632         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4633         -
}
 4634         -
pub mod foo_enum_map {
 4635         -
 4636         -
    /* MapConstraintViolationGenerator.kt:82 */
 4637         -
    #[allow(clippy::enum_variant_names)]
 4638         -
    #[derive(Debug, PartialEq)]
 4639         -
    pub enum ConstraintViolation {
 4640         -
        #[doc(hidden)]
 4641         -
        Value(
 4642         -
            ::std::string::String,
 4643         -
            crate::model::foo_enum::ConstraintViolation,
 4644         -
        ),
 4645         -
    }
        6049  +
/// /* ServerBuilderGenerator.kt:171 */See [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6050  +
pub mod structure_payload_event {
 4646   6051   
 4647         -
    impl ::std::fmt::Display for ConstraintViolation {
 4648         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4649         -
            match self {
 4650         -
                Self::Value(_, value_constraint_violation) => {
 4651         -
                    write!(f, "{}", value_constraint_violation)
 4652         -
                }
        6052  +
    /* ServerBuilderGenerator.kt:461 */
        6053  +
    impl ::std::convert::From<Builder> for crate::model::StructurePayloadEvent {
        6054  +
        fn from(builder: Builder) -> Self {
        6055  +
            builder.build()
 4653   6056   
        }
 4654   6057   
    }
        6058  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6059  +
    /* RustType.kt:534 */
        6060  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6061  +
    /* ServerBuilderGenerator.kt:211 */
        6062  +
    pub struct Builder {
        6063  +
        /* ServerBuilderGenerator.kt:308 */
        6064  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
        6065  +
        /* ServerBuilderGenerator.kt:211 */
 4655   6066   
    }
 4656         -
 4657         -
    impl ::std::error::Error for ConstraintViolation {}
 4658         -
    /* MapConstraintViolationGenerator.kt:111 */
 4659         -
    impl ConstraintViolation {
 4660         -
        pub(crate) fn as_validation_exception_field(
 4661         -
            self,
 4662         -
            path: ::std::string::String,
 4663         -
        ) -> crate::model::ValidationExceptionField {
 4664         -
            match self {
 4665         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4666         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
        6067  +
    /* ServerBuilderGenerator.kt:215 */
        6068  +
    impl Builder {
        6069  +
        /* ServerBuilderGenerator.kt:331 */
        6070  +
        #[allow(missing_docs)] // documentation missing in model
        6071  +
                               /* ServerBuilderGenerator.kt:343 */
        6072  +
        pub fn payload(
        6073  +
            mut self,
        6074  +
            input: ::std::option::Option<crate::model::PayloadStructure>,
        6075  +
        ) -> Self {
        6076  +
            /* ServerBuilderGenerator.kt:344 */
        6077  +
            self.payload =
        6078  +
                /* ServerBuilderGenerator.kt:376 */input
        6079  +
            /* ServerBuilderGenerator.kt:344 */;
        6080  +
            self
        6081  +
            /* ServerBuilderGenerator.kt:343 */
 4667   6082   
        }
        6083  +
        /* ServerBuilderGenerator.kt:426 */
        6084  +
        #[allow(missing_docs)] // documentation missing in model
        6085  +
                               /* ServerBuilderGenerator.kt:428 */
        6086  +
        pub(crate) fn set_payload(
        6087  +
            mut self,
        6088  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadStructure>>,
        6089  +
        ) -> Self {
        6090  +
            /* ServerBuilderGenerator.kt:429 */
        6091  +
            self.payload = input.map(|v| v.into());
        6092  +
            self
        6093  +
            /* ServerBuilderGenerator.kt:428 */
 4668   6094   
        }
        6095  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6096  +
        /* ServerBuilderGenerator.kt:271 */
        6097  +
        pub fn build(self) -> crate::model::StructurePayloadEvent {
        6098  +
            self.build_enforcing_all_constraints()
 4669   6099   
        }
 4670         -
 4671         -
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4672         -
}
 4673         -
/// /* CodegenDelegator.kt:52 */See [`FooEnumSet`](crate::model::FooEnumSet).
 4674         -
pub mod foo_enum_set {
 4675         -
 4676         -
    /* CollectionConstraintViolationGenerator.kt:78 */
 4677         -
    #[allow(clippy::enum_variant_names)]
 4678         -
    #[derive(Debug, PartialEq)]
 4679         -
    pub enum ConstraintViolation {
 4680         -
        /// Constraint violation error when the list does not contain unique items
 4681         -
        UniqueItems {
 4682         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4683         -
            /// at least two elements.
 4684         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4685         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4686         -
            /// Nothing is guaranteed about the order of the indices.
 4687         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4688         -
            /// The original vector, that contains duplicate items.
 4689         -
            original: ::std::vec::Vec<crate::model::FooEnum>,
 4690         -
        },
 4691         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 4692         -
        /// The first component of the tuple is the index in the collection where the
 4693         -
        /// first constraint violation was found.
 4694         -
        #[doc(hidden)]
 4695         -
        Member(usize, crate::model::foo_enum::ConstraintViolation),
        6100  +
        /* ServerBuilderGenerator.kt:283 */
        6101  +
        fn build_enforcing_all_constraints(self) -> crate::model::StructurePayloadEvent {
        6102  +
            /* ServerBuilderGenerator.kt:542 */
        6103  +
            crate::model::StructurePayloadEvent {
        6104  +
                /* ServerBuilderGenerator.kt:546 */
        6105  +
                payload: self.payload,
        6106  +
                /* ServerBuilderGenerator.kt:542 */
 4696   6107   
            }
 4697         -
 4698         -
    impl ::std::fmt::Display for ConstraintViolation {
 4699         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4700         -
            let message = match self {
 4701         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4702         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4703         -
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
 4704         -
                           failing_member)
 4705         -
                            };
 4706         -
            write!(f, "{message}")
        6108  +
            /* ServerBuilderGenerator.kt:283 */
 4707   6109   
        }
        6110  +
        /* ServerBuilderGenerator.kt:215 */
 4708   6111   
    }
 4709   6112   
 4710         -
    impl ::std::error::Error for ConstraintViolation {}
 4711         -
    /* CollectionConstraintViolationGenerator.kt:104 */
 4712         -
    impl ConstraintViolation {
 4713         -
        pub(crate) fn as_validation_exception_field(
 4714         -
            self,
 4715         -
            path: ::std::string::String,
 4716         -
        ) -> crate::model::ValidationExceptionField {
 4717         -
            match self {
 4718         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4719         -
                                crate::model::ValidationExceptionField {
 4720         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4721         -
                                    path,
 4722         -
                                },
 4723         -
    Self::Member(index, member_constraint_violation) =>
 4724         -
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
        6113  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        6114  +
}
        6115  +
/// /* ServerBuilderGenerator.kt:171 */See [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6116  +
pub mod union_payload_event {
        6117  +
        6118  +
    /* ServerBuilderGenerator.kt:461 */
        6119  +
    impl ::std::convert::From<Builder> for crate::model::UnionPayloadEvent {
        6120  +
        fn from(builder: Builder) -> Self {
        6121  +
            builder.build()
        6122  +
        }
        6123  +
    }
        6124  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6125  +
    /* RustType.kt:534 */
        6126  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6127  +
    /* ServerBuilderGenerator.kt:211 */
        6128  +
    pub struct Builder {
        6129  +
        /* ServerBuilderGenerator.kt:308 */
        6130  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadUnion>,
        6131  +
        /* ServerBuilderGenerator.kt:211 */
        6132  +
    }
        6133  +
    /* ServerBuilderGenerator.kt:215 */
        6134  +
    impl Builder {
        6135  +
        /* ServerBuilderGenerator.kt:331 */
        6136  +
        #[allow(missing_docs)] // documentation missing in model
        6137  +
                               /* ServerBuilderGenerator.kt:343 */
        6138  +
        pub fn payload(mut self, input: ::std::option::Option<crate::model::PayloadUnion>) -> Self {
        6139  +
            /* ServerBuilderGenerator.kt:344 */
        6140  +
            self.payload =
        6141  +
                /* ServerBuilderGenerator.kt:376 */input
        6142  +
            /* ServerBuilderGenerator.kt:344 */;
        6143  +
            self
        6144  +
            /* ServerBuilderGenerator.kt:343 */
        6145  +
        }
        6146  +
        /* ServerBuilderGenerator.kt:426 */
        6147  +
        #[allow(missing_docs)] // documentation missing in model
        6148  +
                               /* ServerBuilderGenerator.kt:428 */
        6149  +
        pub(crate) fn set_payload(
        6150  +
            mut self,
        6151  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadUnion>>,
        6152  +
        ) -> Self {
        6153  +
            /* ServerBuilderGenerator.kt:429 */
        6154  +
            self.payload = input.map(|v| v.into());
        6155  +
            self
        6156  +
            /* ServerBuilderGenerator.kt:428 */
        6157  +
        }
        6158  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6159  +
        /* ServerBuilderGenerator.kt:271 */
        6160  +
        pub fn build(self) -> crate::model::UnionPayloadEvent {
        6161  +
            self.build_enforcing_all_constraints()
        6162  +
        }
        6163  +
        /* ServerBuilderGenerator.kt:283 */
        6164  +
        fn build_enforcing_all_constraints(self) -> crate::model::UnionPayloadEvent {
        6165  +
            /* ServerBuilderGenerator.kt:542 */
        6166  +
            crate::model::UnionPayloadEvent {
        6167  +
                /* ServerBuilderGenerator.kt:546 */
        6168  +
                payload: self.payload,
        6169  +
                /* ServerBuilderGenerator.kt:542 */
 4725   6170   
            }
        6171  +
            /* ServerBuilderGenerator.kt:283 */
 4726   6172   
        }
        6173  +
        /* ServerBuilderGenerator.kt:215 */
 4727   6174   
    }
 4728   6175   
 4729   6176   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4730   6177   
}
 4731         -
/// /* ServerBuilderGenerator.kt:171 */See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 4732         -
pub mod complex_nested_error_data {
        6178  +
/// /* ServerBuilderGenerator.kt:171 */See [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6179  +
pub mod headers_and_explicit_payload_event {
 4733   6180   
 4734   6181   
    /* ServerBuilderGenerator.kt:461 */
 4735         -
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
        6182  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndExplicitPayloadEvent {
 4736   6183   
        fn from(builder: Builder) -> Self {
 4737   6184   
            builder.build()
 4738   6185   
        }
 4739   6186   
    }
 4740         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        6187  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
 4741   6188   
    /* RustType.kt:534 */
 4742   6189   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4743   6190   
    /* ServerBuilderGenerator.kt:211 */
 4744   6191   
    pub struct Builder {
 4745   6192   
        /* ServerBuilderGenerator.kt:308 */
 4746         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        6193  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
        6194  +
        /* ServerBuilderGenerator.kt:308 */
        6195  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
 4747   6196   
        /* ServerBuilderGenerator.kt:211 */
 4748   6197   
    }
 4749   6198   
    /* ServerBuilderGenerator.kt:215 */
 4750   6199   
    impl Builder {
 4751   6200   
        /* ServerBuilderGenerator.kt:331 */
 4752   6201   
        #[allow(missing_docs)] // documentation missing in model
 4753   6202   
                               /* ServerBuilderGenerator.kt:343 */
 4754         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6203  +
        pub fn header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4755   6204   
            /* ServerBuilderGenerator.kt:344 */
 4756         -
            self.foo =
        6205  +
            self.header =
 4757   6206   
                /* ServerBuilderGenerator.kt:376 */input
 4758   6207   
            /* ServerBuilderGenerator.kt:344 */;
 4759   6208   
            self
 4760   6209   
            /* ServerBuilderGenerator.kt:343 */
 4761   6210   
        }
 4762         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        6211  +
        /* ServerBuilderGenerator.kt:426 */
        6212  +
        #[allow(missing_docs)] // documentation missing in model
        6213  +
                               /* ServerBuilderGenerator.kt:428 */
        6214  +
        pub(crate) fn set_header(
        6215  +
            mut self,
        6216  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        6217  +
        ) -> Self {
        6218  +
            /* ServerBuilderGenerator.kt:429 */
        6219  +
            self.header = input.map(|v| v.into());
        6220  +
            self
        6221  +
            /* ServerBuilderGenerator.kt:428 */
        6222  +
        }
        6223  +
        /* ServerBuilderGenerator.kt:331 */
        6224  +
        #[allow(missing_docs)] // documentation missing in model
        6225  +
                               /* ServerBuilderGenerator.kt:343 */
        6226  +
        pub fn payload(
        6227  +
            mut self,
        6228  +
            input: ::std::option::Option<crate::model::PayloadStructure>,
        6229  +
        ) -> Self {
        6230  +
            /* ServerBuilderGenerator.kt:344 */
        6231  +
            self.payload =
        6232  +
                /* ServerBuilderGenerator.kt:376 */input
        6233  +
            /* ServerBuilderGenerator.kt:344 */;
        6234  +
            self
        6235  +
            /* ServerBuilderGenerator.kt:343 */
        6236  +
        }
        6237  +
        /* ServerBuilderGenerator.kt:426 */
        6238  +
        #[allow(missing_docs)] // documentation missing in model
        6239  +
                               /* ServerBuilderGenerator.kt:428 */
        6240  +
        pub(crate) fn set_payload(
        6241  +
            mut self,
        6242  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadStructure>>,
        6243  +
        ) -> Self {
        6244  +
            /* ServerBuilderGenerator.kt:429 */
        6245  +
            self.payload = input.map(|v| v.into());
        6246  +
            self
        6247  +
            /* ServerBuilderGenerator.kt:428 */
        6248  +
        }
        6249  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
 4763   6250   
        /* ServerBuilderGenerator.kt:271 */
 4764         -
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
        6251  +
        pub fn build(self) -> crate::model::HeadersAndExplicitPayloadEvent {
 4765   6252   
            self.build_enforcing_all_constraints()
 4766   6253   
        }
 4767   6254   
        /* ServerBuilderGenerator.kt:283 */
 4768         -
        fn build_enforcing_all_constraints(self) -> crate::model::ComplexNestedErrorData {
        6255  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersAndExplicitPayloadEvent {
 4769   6256   
            /* ServerBuilderGenerator.kt:542 */
 4770         -
            crate::model::ComplexNestedErrorData {
        6257  +
            crate::model::HeadersAndExplicitPayloadEvent {
 4771   6258   
                /* ServerBuilderGenerator.kt:546 */
 4772         -
                foo: self.foo,
        6259  +
                header: self.header,
        6260  +
                /* ServerBuilderGenerator.kt:546 */
        6261  +
                payload: self.payload,
 4773   6262   
                /* ServerBuilderGenerator.kt:542 */
 4774   6263   
            }
 4775   6264   
            /* ServerBuilderGenerator.kt:283 */
 4776   6265   
        }
 4777   6266   
        /* ServerBuilderGenerator.kt:215 */
 4778   6267   
    }
 4779   6268   
 4780   6269   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4781   6270   
}
 4782         -
/// /* ServerBuilderGenerator.kt:171 */See [`NestedPayload`](crate::model::NestedPayload).
 4783         -
pub mod nested_payload {
        6271  +
/// /* ServerBuilderGenerator.kt:171 */See [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        6272  +
pub mod headers_and_implicit_payload_event {
 4784   6273   
 4785   6274   
    /* ServerBuilderGenerator.kt:461 */
 4786         -
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        6275  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndImplicitPayloadEvent {
 4787   6276   
        fn from(builder: Builder) -> Self {
 4788   6277   
            builder.build()
 4789   6278   
        }
 4790   6279   
    }
 4791         -
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`NestedPayload`](crate::model::NestedPayload).
        6280  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
 4792   6281   
    /* RustType.kt:534 */
 4793   6282   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4794   6283   
    /* ServerBuilderGenerator.kt:211 */
 4795   6284   
    pub struct Builder {
 4796   6285   
        /* ServerBuilderGenerator.kt:308 */
 4797         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        6286  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
 4798   6287   
        /* ServerBuilderGenerator.kt:308 */
 4799         -
        pub(crate) name: ::std::option::Option<::std::string::String>,
        6288  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
 4800   6289   
        /* ServerBuilderGenerator.kt:211 */
 4801   6290   
    }
 4802   6291   
    /* ServerBuilderGenerator.kt:215 */
 4803   6292   
    impl Builder {
 4804   6293   
        /* ServerBuilderGenerator.kt:331 */
 4805   6294   
        #[allow(missing_docs)] // documentation missing in model
 4806   6295   
                               /* ServerBuilderGenerator.kt:343 */
 4807         -
        pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6296  +
        pub fn header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4808   6297   
            /* ServerBuilderGenerator.kt:344 */
 4809         -
            self.greeting =
        6298  +
            self.header =
 4810   6299   
                /* ServerBuilderGenerator.kt:376 */input
 4811   6300   
            /* ServerBuilderGenerator.kt:344 */;
 4812   6301   
            self
 4813   6302   
            /* ServerBuilderGenerator.kt:343 */
 4814   6303   
        }
 4815   6304   
        /* ServerBuilderGenerator.kt:426 */
 4816   6305   
        #[allow(missing_docs)] // documentation missing in model
 4817   6306   
                               /* ServerBuilderGenerator.kt:428 */
 4818         -
        pub(crate) fn set_greeting(
        6307  +
        pub(crate) fn set_header(
 4819   6308   
            mut self,
 4820   6309   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4821   6310   
        ) -> Self {
 4822   6311   
            /* ServerBuilderGenerator.kt:429 */
 4823         -
            self.greeting = input.map(|v| v.into());
        6312  +
            self.header = input.map(|v| v.into());
 4824   6313   
            self
 4825   6314   
            /* ServerBuilderGenerator.kt:428 */
 4826   6315   
        }
 4827   6316   
        /* ServerBuilderGenerator.kt:331 */
 4828   6317   
        #[allow(missing_docs)] // documentation missing in model
 4829   6318   
                               /* ServerBuilderGenerator.kt:343 */
 4830         -
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6319  +
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4831   6320   
            /* ServerBuilderGenerator.kt:344 */
 4832         -
            self.name =
        6321  +
            self.payload =
 4833   6322   
                /* ServerBuilderGenerator.kt:376 */input
 4834   6323   
            /* ServerBuilderGenerator.kt:344 */;
 4835   6324   
            self
 4836   6325   
            /* ServerBuilderGenerator.kt:343 */
 4837   6326   
        }
 4838   6327   
        /* ServerBuilderGenerator.kt:426 */
 4839   6328   
        #[allow(missing_docs)] // documentation missing in model
 4840   6329   
                               /* ServerBuilderGenerator.kt:428 */
 4841         -
        pub(crate) fn set_name(
        6330  +
        pub(crate) fn set_payload(
 4842   6331   
            mut self,
 4843   6332   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4844   6333   
        ) -> Self {
 4845   6334   
            /* ServerBuilderGenerator.kt:429 */
 4846         -
            self.name = input.map(|v| v.into());
        6335  +
            self.payload = input.map(|v| v.into());
 4847   6336   
            self
 4848   6337   
            /* ServerBuilderGenerator.kt:428 */
 4849   6338   
        }
 4850         -
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
        6339  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
 4851   6340   
        /* ServerBuilderGenerator.kt:271 */
 4852         -
        pub fn build(self) -> crate::model::NestedPayload {
        6341  +
        pub fn build(self) -> crate::model::HeadersAndImplicitPayloadEvent {
 4853   6342   
            self.build_enforcing_all_constraints()
 4854   6343   
        }
 4855   6344   
        /* ServerBuilderGenerator.kt:283 */
 4856         -
        fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
        6345  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersAndImplicitPayloadEvent {
 4857   6346   
            /* ServerBuilderGenerator.kt:542 */
 4858         -
            crate::model::NestedPayload {
        6347  +
            crate::model::HeadersAndImplicitPayloadEvent {
 4859   6348   
                /* ServerBuilderGenerator.kt:546 */
 4860         -
                greeting: self.greeting,
        6349  +
                header: self.header,
 4861   6350   
                /* ServerBuilderGenerator.kt:546 */
 4862         -
                name: self.name,
        6351  +
                payload: self.payload,
 4863   6352   
                /* ServerBuilderGenerator.kt:542 */
 4864   6353   
            }
 4865   6354   
            /* ServerBuilderGenerator.kt:283 */
 4866   6355   
        }
 4867   6356   
        /* ServerBuilderGenerator.kt:215 */
 4868   6357   
    }
 4869   6358   
 4870   6359   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4871   6360   
}
 4872         -
/// /* CodegenDelegator.kt:52 */See [`IntegerSet`](crate::model::IntegerSet).
 4873         -
pub mod integer_set {
        6361  +
/// /* ServerBuilderGenerator.kt:171 */See [`SingletonEvent`](crate::model::SingletonEvent).
        6362  +
pub mod singleton_event {
 4874   6363   
 4875         -
    /* CollectionConstraintViolationGenerator.kt:78 */
 4876         -
    #[allow(clippy::enum_variant_names)]
 4877         -
    #[derive(Debug, PartialEq)]
 4878         -
    pub enum ConstraintViolation {
 4879         -
        /// Constraint violation error when the list does not contain unique items
 4880         -
        UniqueItems {
 4881         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4882         -
            /// at least two elements.
 4883         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4884         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4885         -
            /// Nothing is guaranteed about the order of the indices.
 4886         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4887         -
            /// The original vector, that contains duplicate items.
 4888         -
            original: ::std::vec::Vec<i32>,
 4889         -
        },
        6364  +
    /* ServerBuilderGenerator.kt:461 */
        6365  +
    impl ::std::convert::From<Builder> for crate::model::SingletonEvent {
        6366  +
        fn from(builder: Builder) -> Self {
        6367  +
            builder.build()
 4890   6368   
        }
 4891         -
 4892         -
    impl ::std::fmt::Display for ConstraintViolation {
 4893         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4894         -
            let message = match self {
 4895         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4896         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4897         -
                            };
 4898         -
            write!(f, "{message}")
 4899   6369   
    }
        6370  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`SingletonEvent`](crate::model::SingletonEvent).
        6371  +
    /* RustType.kt:534 */
        6372  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6373  +
    /* ServerBuilderGenerator.kt:211 */
        6374  +
    pub struct Builder {
        6375  +
        /* ServerBuilderGenerator.kt:308 */
        6376  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        6377  +
        /* ServerBuilderGenerator.kt:211 */
        6378  +
    }
        6379  +
    /* ServerBuilderGenerator.kt:215 */
        6380  +
    impl Builder {
        6381  +
        /* ServerBuilderGenerator.kt:331 */
        6382  +
        #[allow(missing_docs)] // documentation missing in model
        6383  +
                               /* ServerBuilderGenerator.kt:343 */
        6384  +
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6385  +
            /* ServerBuilderGenerator.kt:344 */
        6386  +
            self.value =
        6387  +
                /* ServerBuilderGenerator.kt:376 */input
        6388  +
            /* ServerBuilderGenerator.kt:344 */;
        6389  +
            self
        6390  +
            /* ServerBuilderGenerator.kt:343 */
        6391  +
        }
        6392  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`SingletonEvent`](crate::model::SingletonEvent).
        6393  +
        /* ServerBuilderGenerator.kt:271 */
        6394  +
        pub fn build(self) -> crate::model::SingletonEvent {
        6395  +
            self.build_enforcing_all_constraints()
        6396  +
        }
        6397  +
        /* ServerBuilderGenerator.kt:283 */
        6398  +
        fn build_enforcing_all_constraints(self) -> crate::model::SingletonEvent {
        6399  +
            /* ServerBuilderGenerator.kt:542 */
        6400  +
            crate::model::SingletonEvent {
        6401  +
                /* ServerBuilderGenerator.kt:546 */
        6402  +
                value: self.value,
        6403  +
                /* ServerBuilderGenerator.kt:542 */
        6404  +
            }
        6405  +
            /* ServerBuilderGenerator.kt:283 */
        6406  +
        }
        6407  +
        /* ServerBuilderGenerator.kt:215 */
 4900   6408   
    }
 4901   6409   
 4902         -
    impl ::std::error::Error for ConstraintViolation {}
 4903         -
    /* CollectionConstraintViolationGenerator.kt:104 */
 4904         -
    impl ConstraintViolation {
 4905         -
        pub(crate) fn as_validation_exception_field(
 4906         -
            self,
 4907         -
            path: ::std::string::String,
 4908         -
        ) -> crate::model::ValidationExceptionField {
 4909         -
            match self {
 4910         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4911         -
                                crate::model::ValidationExceptionField {
 4912         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4913         -
                                    path,
 4914         -
                                },
        6410  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
        6411  +
}
        6412  +
/// /* ServerBuilderGenerator.kt:171 */See [`PayloadStructure`](crate::model::PayloadStructure).
        6413  +
pub mod payload_structure {
        6414  +
        6415  +
    /* ServerBuilderGenerator.kt:461 */
        6416  +
    impl ::std::convert::From<Builder> for crate::model::PayloadStructure {
        6417  +
        fn from(builder: Builder) -> Self {
        6418  +
            builder.build()
        6419  +
        }
        6420  +
    }
        6421  +
    /// /* ServerBuilderGenerator.kt:201 */A builder for [`PayloadStructure`](crate::model::PayloadStructure).
        6422  +
    /* RustType.kt:534 */
        6423  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6424  +
    /* ServerBuilderGenerator.kt:211 */
        6425  +
    pub struct Builder {
        6426  +
        /* ServerBuilderGenerator.kt:308 */
        6427  +
        pub(crate) structure_member: ::std::option::Option<::std::string::String>,
        6428  +
        /* ServerBuilderGenerator.kt:211 */
        6429  +
    }
        6430  +
    /* ServerBuilderGenerator.kt:215 */
        6431  +
    impl Builder {
        6432  +
        /* ServerBuilderGenerator.kt:331 */
        6433  +
        #[allow(missing_docs)] // documentation missing in model
        6434  +
                               /* ServerBuilderGenerator.kt:343 */
        6435  +
        pub fn structure_member(
        6436  +
            mut self,
        6437  +
            input: ::std::option::Option<::std::string::String>,
        6438  +
        ) -> Self {
        6439  +
            /* ServerBuilderGenerator.kt:344 */
        6440  +
            self.structure_member =
        6441  +
                /* ServerBuilderGenerator.kt:376 */input
        6442  +
            /* ServerBuilderGenerator.kt:344 */;
        6443  +
            self
        6444  +
            /* ServerBuilderGenerator.kt:343 */
        6445  +
        }
        6446  +
        /* ServerBuilderGenerator.kt:426 */
        6447  +
        #[allow(missing_docs)] // documentation missing in model
        6448  +
                               /* ServerBuilderGenerator.kt:428 */
        6449  +
        pub(crate) fn set_structure_member(
        6450  +
            mut self,
        6451  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        6452  +
        ) -> Self {
        6453  +
            /* ServerBuilderGenerator.kt:429 */
        6454  +
            self.structure_member = input.map(|v| v.into());
        6455  +
            self
        6456  +
            /* ServerBuilderGenerator.kt:428 */
        6457  +
        }
        6458  +
        /// /* ServerBuilderGenerator.kt:258 */Consumes the builder and constructs a [`PayloadStructure`](crate::model::PayloadStructure).
        6459  +
        /* ServerBuilderGenerator.kt:271 */
        6460  +
        pub fn build(self) -> crate::model::PayloadStructure {
        6461  +
            self.build_enforcing_all_constraints()
        6462  +
        }
        6463  +
        /* ServerBuilderGenerator.kt:283 */
        6464  +
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadStructure {
        6465  +
            /* ServerBuilderGenerator.kt:542 */
        6466  +
            crate::model::PayloadStructure {
        6467  +
                /* ServerBuilderGenerator.kt:546 */
        6468  +
                structure_member: self.structure_member,
        6469  +
                /* ServerBuilderGenerator.kt:542 */
 4915   6470   
            }
        6471  +
            /* ServerBuilderGenerator.kt:283 */
 4916   6472   
        }
        6473  +
        /* ServerBuilderGenerator.kt:215 */
 4917   6474   
    }
 4918   6475   
 4919   6476   
    /* RustCrateInlineModuleComposingWriter.kt:299 */
 4920   6477   
}