Server Test Python

Server Test Python

rev. d838bf488731ae5e751cce0fe13f339a5b9be858

Files changed:

tmp-codegen-diff/codegen-server-test-python/rest_json/rust-server-codegen-python/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
   24     25   
   25     26   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
   26     27   
//! A fast and customizable Rust implementation of the RestJson Smithy service.
   27     28   
//!
   28     29   
//! # Using RestJson
   29     30   
//!
   30     31   
//! The primary entrypoint is [`RestJson`]: it satisfies the [`Service<http::Request, Response = http::Response>`](::tower::Service)
   31     32   
//! trait and therefore can be handed to a [`hyper` server](https://github.com/hyperium/hyper) via [`RestJson::into_make_service`]
   32     33   
//! or used in AWS Lambda
   33     34   
#![cfg_attr(
@@ -150,151 +282,291 @@
  170    171   
//!    let config = RestJsonConfig::builder().build();
  171    172   
//!    let app = RestJson::builder(config)
  172    173   
//!        .all_query_string_types(all_query_string_types)
  173    174   
//!        .constant_and_variable_query_string(constant_and_variable_query_string)
  174    175   
//!        .constant_query_string(constant_query_string)
  175    176   
//!        .content_type_parameters(content_type_parameters)
  176    177   
//!        .datetime_offsets(datetime_offsets)
  177    178   
//!        .document_type(document_type)
  178    179   
//!        .document_type_as_map_value(document_type_as_map_value)
  179    180   
//!        .document_type_as_payload(document_type_as_payload)
         181  +
//!        .duplex_stream(duplex_stream)
         182  +
//!        .duplex_stream_with_distinct_streams(duplex_stream_with_distinct_streams)
         183  +
//!        .duplex_stream_with_initial_messages(duplex_stream_with_initial_messages)
  180    184   
//!        .empty_input_and_empty_output(empty_input_and_empty_output)
  181    185   
//!        .endpoint_operation(endpoint_operation)
  182    186   
//!        .endpoint_with_host_label_operation(endpoint_with_host_label_operation)
  183    187   
//!        .fractional_seconds(fractional_seconds)
  184    188   
//!        .greeting_with_errors(greeting_with_errors)
  185    189   
//!        .host_with_path_operation(host_with_path_operation)
  186    190   
//!        .http_checksum_required(http_checksum_required)
  187    191   
//!        .http_empty_prefix_headers(http_empty_prefix_headers)
  188    192   
//!        .http_enum_payload(http_enum_payload)
  189    193   
//!        .http_payload_traits(http_payload_traits)
  190    194   
//!        .http_payload_traits_with_media_type(http_payload_traits_with_media_type)
  191    195   
//!        .http_payload_with_structure(http_payload_with_structure)
  192    196   
//!        .http_payload_with_union(http_payload_with_union)
  193    197   
//!        .http_prefix_headers(http_prefix_headers)
  194    198   
//!        .http_prefix_headers_in_response(http_prefix_headers_in_response)
         199  +
//!        .http_query_params_only_operation(http_query_params_only_operation)
  195    200   
//!        .http_request_with_float_labels(http_request_with_float_labels)
  196    201   
//!        .http_request_with_greedy_label_in_path(http_request_with_greedy_label_in_path)
  197    202   
//!        .http_request_with_labels(http_request_with_labels)
  198    203   
//!        .http_request_with_labels_and_timestamp_format(http_request_with_labels_and_timestamp_format)
  199    204   
//!        .http_request_with_regex_literal(http_request_with_regex_literal)
  200    205   
//!        .http_response_code(http_response_code)
  201    206   
//!        .http_string_payload(http_string_payload)
  202    207   
//!        .ignore_query_params_in_response(ignore_query_params_in_response)
  203    208   
//!        .input_and_output_with_headers(input_and_output_with_headers)
         209  +
//!        .input_stream(input_stream)
         210  +
//!        .input_stream_with_initial_request(input_stream_with_initial_request)
  204    211   
//!        .json_blobs(json_blobs)
  205    212   
//!        .json_enums(json_enums)
  206    213   
//!        .json_int_enums(json_int_enums)
  207    214   
//!        .json_lists(json_lists)
  208    215   
//!        .json_maps(json_maps)
  209    216   
//!        .json_timestamps(json_timestamps)
  210    217   
//!        .json_unions(json_unions)
  211    218   
//!        .malformed_accept_with_body(malformed_accept_with_body)
  212    219   
//!        .malformed_accept_with_generic_string(malformed_accept_with_generic_string)
  213    220   
//!        .malformed_accept_with_payload(malformed_accept_with_payload)
  214    221   
//!        .malformed_blob(malformed_blob)
  215    222   
//!        .malformed_boolean(malformed_boolean)
  216    223   
//!        .malformed_byte(malformed_byte)
  217    224   
//!        .malformed_content_type_with_body(malformed_content_type_with_body)
  218    225   
//!        .malformed_content_type_with_generic_string(malformed_content_type_with_generic_string)
  219    226   
//!        .malformed_content_type_without_body(malformed_content_type_without_body)
  220    227   
//!        .malformed_content_type_without_body_empty_input(malformed_content_type_without_body_empty_input)
  221    228   
//!        .malformed_content_type_with_payload(malformed_content_type_with_payload)
  222    229   
//!        .malformed_double(malformed_double)
  223    230   
//!        .malformed_float(malformed_float)
  224    231   
//!        .malformed_integer(malformed_integer)
  225    232   
//!        .malformed_list(malformed_list)
  226    233   
//!        .malformed_long(malformed_long)
  227    234   
//!        .malformed_map(malformed_map)
  228    235   
//!        .malformed_request_body(malformed_request_body)
  229    236   
//!        .malformed_short(malformed_short)
  230    237   
//!        .malformed_string(malformed_string)
  231    238   
//!        .malformed_timestamp_body_date_time(malformed_timestamp_body_date_time)
  232    239   
//!        .malformed_timestamp_body_default(malformed_timestamp_body_default)
  233    240   
//!        .malformed_timestamp_body_http_date(malformed_timestamp_body_http_date)
  234    241   
//!        .malformed_timestamp_header_date_time(malformed_timestamp_header_date_time)
  235    242   
//!        .malformed_timestamp_header_default(malformed_timestamp_header_default)
  236    243   
//!        .malformed_timestamp_header_epoch(malformed_timestamp_header_epoch)
  237    244   
//!        .malformed_timestamp_path_default(malformed_timestamp_path_default)
  238    245   
//!        .malformed_timestamp_path_epoch(malformed_timestamp_path_epoch)
  239    246   
//!        .malformed_timestamp_path_http_date(malformed_timestamp_path_http_date)
  240    247   
//!        .malformed_timestamp_query_default(malformed_timestamp_query_default)
  241    248   
//!        .malformed_timestamp_query_epoch(malformed_timestamp_query_epoch)
  242    249   
//!        .malformed_timestamp_query_http_date(malformed_timestamp_query_http_date)
  243    250   
//!        .malformed_union(malformed_union)
  244    251   
//!        .media_type_header(media_type_header)
  245    252   
//!        .no_input_and_no_output(no_input_and_no_output)
  246    253   
//!        .no_input_and_output(no_input_and_output)
  247    254   
//!        .null_and_empty_headers_client(null_and_empty_headers_client)
  248    255   
//!        .null_and_empty_headers_server(null_and_empty_headers_server)
  249    256   
//!        .omits_null_serializes_empty_string(omits_null_serializes_empty_string)
  250    257   
//!        .omits_serializing_empty_lists(omits_serializing_empty_lists)
  251    258   
//!        .operation_with_defaults(operation_with_defaults)
  252    259   
//!        .operation_with_nested_structure(operation_with_nested_structure)
         260  +
//!        .output_stream(output_stream)
         261  +
//!        .output_stream_with_initial_response(output_stream_with_initial_response)
  253    262   
//!        .post_player_action(post_player_action)
  254    263   
//!        .post_union_with_json_name(post_union_with_json_name)
  255    264   
//!        .put_with_content_encoding(put_with_content_encoding)
  256    265   
//!        .query_idempotency_token_auto_fill(query_idempotency_token_auto_fill)
  257    266   
//!        .query_params_as_string_list_map(query_params_as_string_list_map)
  258    267   
//!        .query_precedence(query_precedence)
  259    268   
//!        .recursive_shapes(recursive_shapes)
  260    269   
//!        .response_code_http_fallback(response_code_http_fallback)
  261    270   
//!        .response_code_required(response_code_required)
  262    271   
//!        .simple_scalar_properties(simple_scalar_properties)
@@ -295,304 +450,483 @@
  315    324   
//! }
  316    325   
//!
  317    326   
//! async fn document_type_as_map_value(input: input::DocumentTypeAsMapValueInput) -> Result<output::DocumentTypeAsMapValueOutput, error::DocumentTypeAsMapValueError> {
  318    327   
//!     todo!()
  319    328   
//! }
  320    329   
//!
  321    330   
//! async fn document_type_as_payload(input: input::DocumentTypeAsPayloadInput) -> Result<output::DocumentTypeAsPayloadOutput, error::DocumentTypeAsPayloadError> {
  322    331   
//!     todo!()
  323    332   
//! }
  324    333   
//!
         334  +
//! async fn duplex_stream(input: input::DuplexStreamInput) -> Result<output::DuplexStreamOutput, error::DuplexStreamError> {
         335  +
//!     todo!()
         336  +
//! }
         337  +
//!
         338  +
//! async fn duplex_stream_with_distinct_streams(input: input::DuplexStreamWithDistinctStreamsInput) -> Result<output::DuplexStreamWithDistinctStreamsOutput, error::DuplexStreamWithDistinctStreamsError> {
         339  +
//!     todo!()
         340  +
//! }
         341  +
//!
         342  +
//! async fn duplex_stream_with_initial_messages(input: input::DuplexStreamWithInitialMessagesInput) -> Result<output::DuplexStreamWithInitialMessagesOutput, error::DuplexStreamWithInitialMessagesError> {
         343  +
//!     todo!()
         344  +
//! }
         345  +
//!
  325    346   
//! async fn empty_input_and_empty_output(input: input::EmptyInputAndEmptyOutputInput) -> Result<output::EmptyInputAndEmptyOutputOutput, error::EmptyInputAndEmptyOutputError> {
  326    347   
//!     todo!()
  327    348   
//! }
  328    349   
//!
  329    350   
//! async fn endpoint_operation(input: input::EndpointOperationInput) -> Result<output::EndpointOperationOutput, error::EndpointOperationError> {
  330    351   
//!     todo!()
  331    352   
//! }
  332    353   
//!
  333    354   
//! async fn endpoint_with_host_label_operation(input: input::EndpointWithHostLabelOperationInput) -> Result<output::EndpointWithHostLabelOperationOutput, error::EndpointWithHostLabelOperationError> {
  334    355   
//!     todo!()
  335    356   
//! }
  336    357   
//!
  337    358   
//! async fn fractional_seconds(input: input::FractionalSecondsInput) -> Result<output::FractionalSecondsOutput, error::FractionalSecondsError> {
  338    359   
//!     todo!()
  339    360   
//! }
  340    361   
//!
  341    362   
//! async fn greeting_with_errors(input: input::GreetingWithErrorsInput) -> Result<output::GreetingWithErrorsOutput, error::GreetingWithErrorsError> {
  342    363   
//!     todo!()
  343    364   
//! }
  344    365   
//!
  345    366   
//! async fn host_with_path_operation(input: input::HostWithPathOperationInput) -> Result<output::HostWithPathOperationOutput, error::HostWithPathOperationError> {
  346    367   
//!     todo!()
  347    368   
//! }
  348    369   
//!
  349    370   
//! async fn http_checksum_required(input: input::HttpChecksumRequiredInput) -> Result<output::HttpChecksumRequiredOutput, error::HttpChecksumRequiredError> {
  350    371   
//!     todo!()
  351    372   
//! }
  352    373   
//!
  353    374   
//! async fn http_empty_prefix_headers(input: input::HttpEmptyPrefixHeadersInput) -> Result<output::HttpEmptyPrefixHeadersOutput, error::HttpEmptyPrefixHeadersError> {
  354    375   
//!     todo!()
  355    376   
//! }
  356    377   
//!
  357    378   
//! async fn http_enum_payload(input: input::HttpEnumPayloadInput) -> Result<output::HttpEnumPayloadOutput, error::HttpEnumPayloadError> {
  358    379   
//!     todo!()
  359    380   
//! }
  360    381   
//!
  361    382   
//! async fn http_payload_traits(input: input::HttpPayloadTraitsInput) -> Result<output::HttpPayloadTraitsOutput, error::HttpPayloadTraitsError> {
  362    383   
//!     todo!()
  363    384   
//! }
  364    385   
//!
  365    386   
//! async fn http_payload_traits_with_media_type(input: input::HttpPayloadTraitsWithMediaTypeInput) -> Result<output::HttpPayloadTraitsWithMediaTypeOutput, error::HttpPayloadTraitsWithMediaTypeError> {
  366    387   
//!     todo!()
  367    388   
//! }
  368    389   
//!
  369    390   
//! async fn http_payload_with_structure(input: input::HttpPayloadWithStructureInput) -> Result<output::HttpPayloadWithStructureOutput, error::HttpPayloadWithStructureError> {
  370    391   
//!     todo!()
  371    392   
//! }
  372    393   
//!
  373    394   
//! async fn http_payload_with_union(input: input::HttpPayloadWithUnionInput) -> Result<output::HttpPayloadWithUnionOutput, error::HttpPayloadWithUnionError> {
  374    395   
//!     todo!()
  375    396   
//! }
  376    397   
//!
  377    398   
//! async fn http_prefix_headers(input: input::HttpPrefixHeadersInput) -> Result<output::HttpPrefixHeadersOutput, error::HttpPrefixHeadersError> {
  378    399   
//!     todo!()
  379    400   
//! }
  380    401   
//!
  381    402   
//! async fn http_prefix_headers_in_response(input: input::HttpPrefixHeadersInResponseInput) -> Result<output::HttpPrefixHeadersInResponseOutput, error::HttpPrefixHeadersInResponseError> {
  382    403   
//!     todo!()
  383    404   
//! }
  384    405   
//!
         406  +
//! async fn http_query_params_only_operation(input: input::HttpQueryParamsOnlyOperationInput) -> Result<output::HttpQueryParamsOnlyOperationOutput, error::HttpQueryParamsOnlyOperationError> {
         407  +
//!     todo!()
         408  +
//! }
         409  +
//!
  385    410   
//! async fn http_request_with_float_labels(input: input::HttpRequestWithFloatLabelsInput) -> Result<output::HttpRequestWithFloatLabelsOutput, error::HttpRequestWithFloatLabelsError> {
  386    411   
//!     todo!()
  387    412   
//! }
  388    413   
//!
  389    414   
//! async fn http_request_with_greedy_label_in_path(input: input::HttpRequestWithGreedyLabelInPathInput) -> Result<output::HttpRequestWithGreedyLabelInPathOutput, error::HttpRequestWithGreedyLabelInPathError> {
  390    415   
//!     todo!()
  391    416   
//! }
  392    417   
//!
  393    418   
//! async fn http_request_with_labels(input: input::HttpRequestWithLabelsInput) -> Result<output::HttpRequestWithLabelsOutput, error::HttpRequestWithLabelsError> {
  394    419   
//!     todo!()
  395    420   
//! }
  396    421   
//!
  397    422   
//! async fn http_request_with_labels_and_timestamp_format(input: input::HttpRequestWithLabelsAndTimestampFormatInput) -> Result<output::HttpRequestWithLabelsAndTimestampFormatOutput, error::HttpRequestWithLabelsAndTimestampFormatError> {
  398    423   
//!     todo!()
  399    424   
//! }
  400    425   
//!
  401    426   
//! async fn http_request_with_regex_literal(input: input::HttpRequestWithRegexLiteralInput) -> Result<output::HttpRequestWithRegexLiteralOutput, error::HttpRequestWithRegexLiteralError> {
  402    427   
//!     todo!()
  403    428   
//! }
  404    429   
//!
  405    430   
//! async fn http_response_code(input: input::HttpResponseCodeInput) -> Result<output::HttpResponseCodeOutput, error::HttpResponseCodeError> {
  406    431   
//!     todo!()
  407    432   
//! }
  408    433   
//!
  409    434   
//! async fn http_string_payload(input: input::HttpStringPayloadInput) -> Result<output::HttpStringPayloadOutput, error::HttpStringPayloadError> {
  410    435   
//!     todo!()
  411    436   
//! }
  412    437   
//!
  413    438   
//! async fn ignore_query_params_in_response(input: input::IgnoreQueryParamsInResponseInput) -> Result<output::IgnoreQueryParamsInResponseOutput, error::IgnoreQueryParamsInResponseError> {
  414    439   
//!     todo!()
  415    440   
//! }
  416    441   
//!
  417    442   
//! async fn input_and_output_with_headers(input: input::InputAndOutputWithHeadersInput) -> Result<output::InputAndOutputWithHeadersOutput, error::InputAndOutputWithHeadersError> {
  418    443   
//!     todo!()
  419    444   
//! }
  420    445   
//!
         446  +
//! async fn input_stream(input: input::InputStreamInput) -> Result<output::InputStreamOutput, error::InputStreamError> {
         447  +
//!     todo!()
         448  +
//! }
         449  +
//!
         450  +
//! async fn input_stream_with_initial_request(input: input::InputStreamWithInitialRequestInput) -> Result<output::InputStreamWithInitialRequestOutput, error::InputStreamWithInitialRequestError> {
         451  +
//!     todo!()
         452  +
//! }
         453  +
//!
  421    454   
//! async fn json_blobs(input: input::JsonBlobsInput) -> Result<output::JsonBlobsOutput, error::JsonBlobsError> {
  422    455   
//!     todo!()
  423    456   
//! }
  424    457   
//!
  425    458   
//! async fn json_enums(input: input::JsonEnumsInput) -> Result<output::JsonEnumsOutput, error::JsonEnumsError> {
  426    459   
//!     todo!()
  427    460   
//! }
  428    461   
//!
  429    462   
//! async fn json_int_enums(input: input::JsonIntEnumsInput) -> Result<output::JsonIntEnumsOutput, error::JsonIntEnumsError> {
  430    463   
//!     todo!()
@@ -587,620 +646,687 @@
  607    640   
//! }
  608    641   
//!
  609    642   
//! async fn operation_with_defaults(input: input::OperationWithDefaultsInput) -> Result<output::OperationWithDefaultsOutput, error::OperationWithDefaultsError> {
  610    643   
//!     todo!()
  611    644   
//! }
  612    645   
//!
  613    646   
//! async fn operation_with_nested_structure(input: input::OperationWithNestedStructureInput) -> Result<output::OperationWithNestedStructureOutput, error::OperationWithNestedStructureError> {
  614    647   
//!     todo!()
  615    648   
//! }
  616    649   
//!
         650  +
//! async fn output_stream(input: input::OutputStreamInput) -> Result<output::OutputStreamOutput, error::OutputStreamError> {
         651  +
//!     todo!()
         652  +
//! }
         653  +
//!
         654  +
//! async fn output_stream_with_initial_response(input: input::OutputStreamWithInitialResponseInput) -> Result<output::OutputStreamWithInitialResponseOutput, error::OutputStreamWithInitialResponseError> {
         655  +
//!     todo!()
         656  +
//! }
         657  +
//!
  617    658   
//! async fn post_player_action(input: input::PostPlayerActionInput) -> Result<output::PostPlayerActionOutput, error::PostPlayerActionError> {
  618    659   
//!     todo!()
  619    660   
//! }
  620    661   
//!
  621    662   
//! async fn post_union_with_json_name(input: input::PostUnionWithJsonNameInput) -> Result<output::PostUnionWithJsonNameOutput, error::PostUnionWithJsonNameError> {
  622    663   
//!     todo!()
  623    664   
//! }
  624    665   
//!
  625    666   
//! async fn put_with_content_encoding(input: input::PutWithContentEncodingInput) -> Result<output::PutWithContentEncodingOutput, error::PutWithContentEncodingError> {
  626    667   
//!     todo!()
@@ -731,772 +787,833 @@
  751    792   
/// The [plugin system](::aws_smithy_legacy_http_server::plugin) makes use of these
  752    793   
/// [zero-sized types](https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts) (ZSTs) to
  753    794   
/// parameterize [`Plugin`](::aws_smithy_legacy_http_server::plugin::Plugin) implementations. Their traits, such as
  754    795   
/// [`OperationShape`](::aws_smithy_legacy_http_server::operation::OperationShape), can be used to provide
  755    796   
/// operation specific information to the [`Layer`](::tower::Layer) being applied.
  756    797   
pub mod operation_shape;
  757    798   
  758    799   
/// Output structures for operations. Documentation on these types is copied from the model.
  759    800   
pub mod output;
  760    801   
         802  +
/// Python wrapper types for event streams.
         803  +
pub mod python_event_stream;
         804  +
  761    805   
/// Export PyO3 symbols in the shared library
  762    806   
pub mod python_module_export;
  763    807   
  764    808   
/// Operation adapters that delegate to Python handlers.
  765    809   
pub mod python_operation_adaptor;
  766    810   
  767    811   
/// Python server and application implementation.
  768    812   
pub mod python_server_application;
  769    813   
  770    814   
mod service;
  771    815   
  772    816   
/// Data primitives referenced by other data types.
  773    817   
pub mod types;
  774    818   
  775    819   
/// Unconstrained types for constrained shapes.
  776    820   
mod unconstrained;
  777    821   
  778    822   
mod mimes;
  779    823   
         824  +
mod event_stream_serde;
         825  +
  780    826   
pub(crate) mod protocol_serde;
  781    827   
  782    828   
/// Re-exported Python types from supporting crates.
  783    829   
pub mod python_types {
  784    830   
    pub use ::aws_smithy_http_server_python::types::Blob;
  785    831   
    pub use ::aws_smithy_http_server_python::types::DateTime;
  786    832   
    pub use ::aws_smithy_http_server_python::types::Document;
  787    833   
}

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

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

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

@@ -1,1 +719,1893 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[::pyo3::pyclass]
    3         -
/// :param path str:
    4         -
/// :param message str:
    5         -
/// :rtype None:
    6         -
/// Describes one specific validation failure for an input member.
           2  +
#[allow(missing_docs)] // documentation missing in model
           3  +
///
           4  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
           5  +
/// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
           6  +
///
           7  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
           8  +
///
    7      9   
#[derive(
    8     10   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    9     11   
)]
   10         -
pub struct ValidationExceptionField {
   11         -
    #[pyo3(get, set)]
   12         -
    /// :type str:
   13         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   14         -
    pub path: ::std::string::String,
   15         -
    #[pyo3(get, set)]
   16         -
    /// :type str:
   17         -
    /// A detailed description of the validation failure.
   18         -
    pub message: ::std::string::String,
   19         -
}
   20         -
impl ValidationExceptionField {
   21         -
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
   22         -
    pub fn path(&self) -> &str {
   23         -
        use std::ops::Deref;
   24         -
        self.path.deref()
   25         -
    }
   26         -
    /// A detailed description of the validation failure.
   27         -
    pub fn message(&self) -> &str {
   28         -
        use std::ops::Deref;
   29         -
        self.message.deref()
   30         -
    }
   31         -
}
   32         -
#[allow(clippy::new_without_default)]
   33         -
#[allow(clippy::too_many_arguments)]
   34         -
#[::pyo3::pymethods]
   35         -
impl ValidationExceptionField {
   36         -
    #[new]
   37         -
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38         -
        Self { path, message }
   39         -
    }
   40         -
    fn __repr__(&self) -> String {
   41         -
        format!("{self:?}")
          12  +
pub(crate) struct StringSet(pub(crate) ::std::vec::Vec<::std::string::String>);
          13  +
impl StringSet {
          14  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
          15  +
    pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
          16  +
        self.0
   42     17   
    }
   43         -
    fn __str__(&self) -> String {
   44         -
        format!("{self:?}")
          18  +
          19  +
    fn check_unique_items(
          20  +
        items: ::std::vec::Vec<::std::string::String>,
          21  +
    ) -> ::std::result::Result<
          22  +
        ::std::vec::Vec<::std::string::String>,
          23  +
        crate::model::string_set_internal::ConstraintViolation,
          24  +
    > {
          25  +
        let mut seen = ::std::collections::HashMap::new();
          26  +
        let mut duplicate_indices = ::std::vec::Vec::new();
          27  +
        for (idx, item) in items.iter().enumerate() {
          28  +
            if let Some(prev_idx) = seen.insert(item, idx) {
          29  +
                duplicate_indices.push(prev_idx);
          30  +
            }
          31  +
        }
          32  +
          33  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
          34  +
        for idx in &duplicate_indices {
          35  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
          36  +
                last_duplicate_indices.push(prev_idx);
          37  +
            }
          38  +
        }
          39  +
        duplicate_indices.extend(last_duplicate_indices);
          40  +
          41  +
        if !duplicate_indices.is_empty() {
          42  +
            debug_assert!(duplicate_indices.len() >= 2);
          43  +
            Err(
          44  +
                crate::model::string_set_internal::ConstraintViolation::UniqueItems {
          45  +
                    duplicate_indices,
          46  +
                    original: items,
          47  +
                },
          48  +
            )
          49  +
        } else {
          50  +
            Ok(items)
          51  +
        }
   45     52   
    }
   46     53   
}
   47         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
   48         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   49         -
        ob.extract::<ValidationExceptionField>().map(Box::new)
          54  +
impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
          55  +
    type Error = crate::model::string_set_internal::ConstraintViolation;
          56  +
          57  +
    /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
          58  +
    fn try_from(
          59  +
        value: ::std::vec::Vec<::std::string::String>,
          60  +
    ) -> ::std::result::Result<Self, Self::Error> {
          61  +
        let value = Self::check_unique_items(value)?;
          62  +
          63  +
        Ok(Self(value))
   50     64   
    }
   51     65   
}
   52     66   
   53         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
   54         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   55         -
        (*self).into_py(py)
          67  +
impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
          68  +
    fn from(value: StringSet) -> Self {
          69  +
        value.into_inner()
   56     70   
    }
   57     71   
}
   58         -
impl ValidationExceptionField {
   59         -
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
   60         -
    pub fn builder() -> crate::model::validation_exception_field::Builder {
   61         -
        crate::model::validation_exception_field::Builder::default()
   62         -
    }
          72  +
impl crate::constrained::Constrained for StringSet {
          73  +
    type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
   63     74   
}
   64     75   
   65     76   
#[::pyo3::pyclass]
   66         -
/// :param greeting str:
   67         -
/// :param language typing.Optional\[str\]:
   68         -
/// :param farewell typing.Optional\[rest_json.model.Farewell\]:
   69         -
/// :rtype None:
   70     77   
#[allow(missing_docs)] // documentation missing in model
   71     78   
#[derive(
   72         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
          79  +
    ::std::clone::Clone,
          80  +
    ::std::cmp::Eq,
          81  +
    ::std::cmp::Ord,
          82  +
    ::std::cmp::PartialEq,
          83  +
    ::std::cmp::PartialOrd,
          84  +
    ::std::fmt::Debug,
          85  +
    ::std::hash::Hash,
   73     86   
)]
   74         -
pub struct Dialog {
   75         -
    #[pyo3(get, set)]
   76         -
    /// :type typing.Optional\[str\]:
   77         -
    #[allow(missing_docs)] // documentation missing in model
   78         -
    pub language: ::std::option::Option<::std::string::String>,
   79         -
    #[pyo3(get, set)]
   80         -
    /// :type str:
          87  +
pub enum FooEnum {
   81     88   
    #[allow(missing_docs)] // documentation missing in model
   82         -
    pub greeting: ::std::string::String,
   83         -
    #[pyo3(get, set)]
   84         -
    /// :type typing.Optional\[rest_json.model.Farewell\]:
          89  +
    Zero,
   85     90   
    #[allow(missing_docs)] // documentation missing in model
   86         -
    pub farewell: ::std::option::Option<crate::model::Farewell>,
   87         -
}
   88         -
impl Dialog {
          91  +
    One,
   89     92   
    #[allow(missing_docs)] // documentation missing in model
   90         -
    pub fn language(&self) -> ::std::option::Option<&str> {
   91         -
        self.language.as_deref()
   92         -
    }
          93  +
    Bar,
   93     94   
    #[allow(missing_docs)] // documentation missing in model
   94         -
    pub fn greeting(&self) -> &str {
   95         -
        use std::ops::Deref;
   96         -
        self.greeting.deref()
   97         -
    }
          95  +
    Baz,
   98     96   
    #[allow(missing_docs)] // documentation missing in model
   99         -
    pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
  100         -
        self.farewell.as_ref()
  101         -
    }
          97  +
    Foo,
  102     98   
}
  103         -
#[allow(clippy::new_without_default)]
  104         -
#[allow(clippy::too_many_arguments)]
  105         -
#[::pyo3::pymethods]
  106         -
impl Dialog {
  107         -
    #[new]
  108         -
    pub fn new(
  109         -
        greeting: ::std::string::String,
  110         -
        language: ::std::option::Option<::std::string::String>,
  111         -
        farewell: ::std::option::Option<crate::model::Farewell>,
  112         -
    ) -> Self {
  113         -
        Self {
  114         -
            greeting,
  115         -
            language,
  116         -
            farewell,
          99  +
pub(crate) mod foo_enum_internal {
         100  +
    #[derive(Debug, PartialEq)]
         101  +
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
         102  +
         103  +
    impl ::std::fmt::Display for ConstraintViolation {
         104  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         105  +
            write!(
         106  +
                f,
         107  +
                r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
         108  +
            )
  117    109   
        }
  118    110   
    }
  119         -
    fn __repr__(&self) -> String {
  120         -
        format!("{self:?}")
         111  +
         112  +
    impl ::std::error::Error for ConstraintViolation {}
         113  +
    impl ConstraintViolation {
         114  +
        pub(crate) fn as_validation_exception_field(
         115  +
            self,
         116  +
            path: ::std::string::String,
         117  +
        ) -> crate::model::ValidationExceptionField {
         118  +
            crate::model::ValidationExceptionField {
         119  +
                message: format!(
         120  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
         121  +
                    &path
         122  +
                ),
         123  +
                path,
         124  +
            }
         125  +
        }
  121    126   
    }
  122         -
    fn __str__(&self) -> String {
  123         -
        format!("{self:?}")
         127  +
}
         128  +
impl ::std::convert::TryFrom<&str> for FooEnum {
         129  +
    type Error = crate::model::foo_enum_internal::ConstraintViolation;
         130  +
    fn try_from(
         131  +
        s: &str,
         132  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
         133  +
        match s {
         134  +
            "0" => Ok(FooEnum::Zero),
         135  +
            "1" => Ok(FooEnum::One),
         136  +
            "Bar" => Ok(FooEnum::Bar),
         137  +
            "Baz" => Ok(FooEnum::Baz),
         138  +
            "Foo" => Ok(FooEnum::Foo),
         139  +
            _ => Err(crate::model::foo_enum_internal::ConstraintViolation(
         140  +
                s.to_owned(),
         141  +
            )),
         142  +
        }
  124    143   
    }
  125    144   
}
  126         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Dialog> {
  127         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  128         -
        ob.extract::<Dialog>().map(Box::new)
         145  +
impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
         146  +
    type Error = crate::model::foo_enum_internal::ConstraintViolation;
         147  +
    fn try_from(
         148  +
        s: ::std::string::String,
         149  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
         150  +
    {
         151  +
        s.as_str().try_into()
  129    152   
    }
  130    153   
}
  131         -
  132         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Dialog> {
  133         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  134         -
        (*self).into_py(py)
         154  +
impl std::str::FromStr for FooEnum {
         155  +
    type Err = crate::model::foo_enum_internal::ConstraintViolation;
         156  +
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
         157  +
        Self::try_from(s)
  135    158   
    }
  136    159   
}
  137         -
impl crate::constrained::Constrained for crate::model::Dialog {
  138         -
    type Unconstrained = crate::model::dialog_internal::Builder;
         160  +
impl FooEnum {
         161  +
    /// Returns the `&str` value of the enum member.
         162  +
    pub fn as_str(&self) -> &str {
         163  +
        match self {
         164  +
            FooEnum::Zero => "0",
         165  +
            FooEnum::One => "1",
         166  +
            FooEnum::Bar => "Bar",
         167  +
            FooEnum::Baz => "Baz",
         168  +
            FooEnum::Foo => "Foo",
         169  +
        }
         170  +
    }
         171  +
    /// Returns all the `&str` representations of the enum members.
         172  +
    pub const fn values() -> &'static [&'static str] {
         173  +
        &["0", "1", "Bar", "Baz", "Foo"]
         174  +
    }
  139    175   
}
  140         -
impl Dialog {
  141         -
    /// Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
  142         -
    pub fn builder() -> crate::model::dialog::Builder {
  143         -
        crate::model::dialog::Builder::default()
         176  +
impl ::std::convert::AsRef<str> for FooEnum {
         177  +
    fn as_ref(&self) -> &str {
         178  +
        self.as_str()
  144    179   
    }
  145    180   
}
  146         -
  147         -
#[::pyo3::pyclass]
  148         -
/// :param phrase str:
  149         -
/// :rtype None:
  150         -
#[allow(missing_docs)] // documentation missing in model
  151         -
#[derive(
  152         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  153         -
)]
  154         -
pub struct Farewell {
  155         -
    #[pyo3(get, set)]
  156         -
    /// :type str:
  157         -
    #[allow(missing_docs)] // documentation missing in model
  158         -
    pub phrase: ::std::string::String,
  159         -
}
  160         -
impl Farewell {
  161         -
    #[allow(missing_docs)] // documentation missing in model
  162         -
    pub fn phrase(&self) -> &str {
  163         -
        use std::ops::Deref;
  164         -
        self.phrase.deref()
  165         -
    }
  166         -
}
  167         -
#[allow(clippy::new_without_default)]
  168         -
#[allow(clippy::too_many_arguments)]
  169    181   
#[::pyo3::pymethods]
  170         -
impl Farewell {
  171         -
    #[new]
  172         -
    pub fn new(phrase: ::std::string::String) -> Self {
  173         -
        Self { phrase }
         182  +
impl FooEnum {
         183  +
    #[getter]
         184  +
    pub fn name(&self) -> &str {
         185  +
        match self {
         186  +
            FooEnum::Zero => "Zero",
         187  +
            FooEnum::One => "One",
         188  +
            FooEnum::Bar => "Bar",
         189  +
            FooEnum::Baz => "Baz",
         190  +
            FooEnum::Foo => "Foo",
         191  +
        }
         192  +
    }
         193  +
    #[getter]
         194  +
    pub fn value(&self) -> &str {
         195  +
        self.as_str()
  174    196   
    }
  175    197   
    fn __repr__(&self) -> String {
  176         -
        format!("{self:?}")
         198  +
        self.as_str().to_owned()
  177    199   
    }
  178    200   
    fn __str__(&self) -> String {
  179         -
        format!("{self:?}")
         201  +
        self.as_str().to_owned()
  180    202   
    }
  181    203   
}
  182         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Farewell> {
  183         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  184         -
        ob.extract::<Farewell>().map(Box::new)
         204  +
impl crate::constrained::Constrained for FooEnum {
         205  +
    type Unconstrained = ::std::string::String;
         206  +
}
         207  +
         208  +
impl ::std::convert::From<::std::string::String>
         209  +
    for crate::constrained::MaybeConstrained<crate::model::FooEnum>
         210  +
{
         211  +
    fn from(value: ::std::string::String) -> Self {
         212  +
        Self::Unconstrained(value)
  185    213   
    }
  186    214   
}
  187    215   
  188         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Farewell> {
  189         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  190         -
        (*self).into_py(py)
         216  +
#[allow(missing_docs)] // documentation missing in model
         217  +
///
         218  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         219  +
/// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
         220  +
///
         221  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         222  +
///
         223  +
#[derive(
         224  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         225  +
)]
         226  +
pub(crate) struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
         227  +
impl IntegerSet {
         228  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
         229  +
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
         230  +
        self.0
         231  +
    }
         232  +
         233  +
    fn check_unique_items(
         234  +
        items: ::std::vec::Vec<i32>,
         235  +
    ) -> ::std::result::Result<
         236  +
        ::std::vec::Vec<i32>,
         237  +
        crate::model::integer_set_internal::ConstraintViolation,
         238  +
    > {
         239  +
        let mut seen = ::std::collections::HashMap::new();
         240  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         241  +
        for (idx, item) in items.iter().enumerate() {
         242  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         243  +
                duplicate_indices.push(prev_idx);
         244  +
            }
         245  +
        }
         246  +
         247  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         248  +
        for idx in &duplicate_indices {
         249  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         250  +
                last_duplicate_indices.push(prev_idx);
         251  +
            }
         252  +
        }
         253  +
        duplicate_indices.extend(last_duplicate_indices);
         254  +
         255  +
        if !duplicate_indices.is_empty() {
         256  +
            debug_assert!(duplicate_indices.len() >= 2);
         257  +
            Err(
         258  +
                crate::model::integer_set_internal::ConstraintViolation::UniqueItems {
         259  +
                    duplicate_indices,
         260  +
                    original: items,
         261  +
                },
         262  +
            )
         263  +
        } else {
         264  +
            Ok(items)
         265  +
        }
  191    266   
    }
  192    267   
}
  193         -
impl crate::constrained::Constrained for crate::model::Farewell {
  194         -
    type Unconstrained = crate::model::farewell_internal::Builder;
         268  +
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
         269  +
    type Error = crate::model::integer_set_internal::ConstraintViolation;
         270  +
         271  +
    /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
         272  +
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
         273  +
        let value = Self::check_unique_items(value)?;
         274  +
         275  +
        Ok(Self(value))
         276  +
    }
  195    277   
}
  196         -
impl Farewell {
  197         -
    /// Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
  198         -
    pub fn builder() -> crate::model::farewell::Builder {
  199         -
        crate::model::farewell::Builder::default()
         278  +
         279  +
impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
         280  +
    fn from(value: IntegerSet) -> Self {
         281  +
        value.into_inner()
  200    282   
    }
  201    283   
}
         284  +
impl crate::constrained::Constrained for IntegerSet {
         285  +
    type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
         286  +
}
  202    287   
  203    288   
#[::pyo3::pyclass]
  204         -
/// :param dialog rest_json.model.Dialog:
  205         -
/// :param dialog_list typing.List\[rest_json.model.Dialog\]:
  206         -
/// :param dialog_map typing.Dict\[str, rest_json.model.Dialog\]:
         289  +
/// :param greeting typing.Optional\[str\]:
         290  +
/// :param name typing.Optional\[str\]:
  207    291   
/// :rtype None:
  208    292   
#[allow(missing_docs)] // documentation missing in model
  209         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  210         -
pub struct TopLevel {
  211         -
    #[pyo3(get, set)]
  212         -
    /// :type rest_json.model.Dialog:
  213         -
    #[allow(missing_docs)] // documentation missing in model
  214         -
    pub dialog: crate::model::Dialog,
         293  +
#[derive(
         294  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         295  +
)]
         296  +
pub struct NestedPayload {
  215    297   
    #[pyo3(get, set)]
  216         -
    /// :type typing.List\[rest_json.model.Dialog\]:
         298  +
    /// :type typing.Optional\[str\]:
  217    299   
    #[allow(missing_docs)] // documentation missing in model
  218         -
    pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
         300  +
    pub greeting: ::std::option::Option<::std::string::String>,
  219    301   
    #[pyo3(get, set)]
  220         -
    /// :type typing.Dict\[str, rest_json.model.Dialog\]:
         302  +
    /// :type typing.Optional\[str\]:
  221    303   
    #[allow(missing_docs)] // documentation missing in model
  222         -
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
         304  +
    pub name: ::std::option::Option<::std::string::String>,
  223    305   
}
  224         -
impl TopLevel {
  225         -
    #[allow(missing_docs)] // documentation missing in model
  226         -
    pub fn dialog(&self) -> &crate::model::Dialog {
  227         -
        &self.dialog
  228         -
    }
         306  +
impl NestedPayload {
  229    307   
    #[allow(missing_docs)] // documentation missing in model
  230         -
    pub fn dialog_list(&self) -> &[crate::model::Dialog] {
  231         -
        use std::ops::Deref;
  232         -
        self.dialog_list.deref()
         308  +
    pub fn greeting(&self) -> ::std::option::Option<&str> {
         309  +
        self.greeting.as_deref()
  233    310   
    }
  234    311   
    #[allow(missing_docs)] // documentation missing in model
  235         -
    pub fn dialog_map(
  236         -
        &self,
  237         -
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
  238         -
        &self.dialog_map
         312  +
    pub fn name(&self) -> ::std::option::Option<&str> {
         313  +
        self.name.as_deref()
  239    314   
    }
  240    315   
}
  241    316   
#[allow(clippy::new_without_default)]
  242    317   
#[allow(clippy::too_many_arguments)]
  243    318   
#[::pyo3::pymethods]
  244         -
impl TopLevel {
         319  +
impl NestedPayload {
  245    320   
    #[new]
  246    321   
    pub fn new(
  247         -
        dialog: crate::model::Dialog,
  248         -
        dialog_list: ::std::vec::Vec<crate::model::Dialog>,
  249         -
        dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
         322  +
        greeting: ::std::option::Option<::std::string::String>,
         323  +
        name: ::std::option::Option<::std::string::String>,
  250    324   
    ) -> Self {
  251         -
        Self {
  252         -
            dialog,
  253         -
            dialog_list,
  254         -
            dialog_map,
  255         -
        }
         325  +
        Self { greeting, name }
  256    326   
    }
  257    327   
    fn __repr__(&self) -> String {
  258    328   
        format!("{self:?}")
  259    329   
    }
  260    330   
    fn __str__(&self) -> String {
  261    331   
        format!("{self:?}")
  262    332   
    }
  263    333   
}
  264         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TopLevel> {
         334  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<NestedPayload> {
  265    335   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  266         -
        ob.extract::<TopLevel>().map(Box::new)
         336  +
        ob.extract::<NestedPayload>().map(Box::new)
  267    337   
    }
  268    338   
}
  269    339   
  270         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TopLevel> {
         340  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<NestedPayload> {
  271    341   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  272    342   
        (*self).into_py(py)
  273    343   
    }
  274    344   
}
  275         -
impl crate::constrained::Constrained for crate::model::TopLevel {
  276         -
    type Unconstrained = crate::model::top_level_internal::Builder;
         345  +
impl crate::constrained::Constrained for crate::model::NestedPayload {
         346  +
    type Unconstrained = crate::model::nested_payload_internal::Builder;
  277    347   
}
  278         -
impl TopLevel {
  279         -
    /// Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
  280         -
    pub fn builder() -> crate::model::top_level::Builder {
  281         -
        crate::model::top_level::Builder::default()
         348  +
impl NestedPayload {
         349  +
    /// Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
         350  +
    pub fn builder() -> crate::model::nested_payload::Builder {
         351  +
        crate::model::nested_payload::Builder::default()
  282    352   
    }
  283    353   
}
  284    354   
  285    355   
#[::pyo3::pyclass]
  286    356   
#[allow(missing_docs)] // documentation missing in model
  287    357   
#[derive(
  288    358   
    ::std::clone::Clone,
  289    359   
    ::std::cmp::Eq,
  290    360   
    ::std::cmp::Ord,
  291    361   
    ::std::cmp::PartialEq,
  292    362   
    ::std::cmp::PartialOrd,
  293    363   
    ::std::fmt::Debug,
  294    364   
    ::std::hash::Hash,
  295    365   
)]
  296         -
pub enum TestEnum {
  297         -
    #[allow(missing_docs)] // documentation missing in model
  298         -
    Bar,
  299         -
    #[allow(missing_docs)] // documentation missing in model
  300         -
    Baz,
         366  +
pub enum StringEnum {
  301    367   
    #[allow(missing_docs)] // documentation missing in model
  302         -
    Foo,
         368  +
    V,
  303    369   
}
  304         -
pub(crate) mod test_enum_internal {
         370  +
pub(crate) mod string_enum_internal {
  305    371   
    #[derive(Debug, PartialEq)]
  306    372   
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
  307    373   
  308    374   
    impl ::std::fmt::Display for ConstraintViolation {
  309    375   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  310    376   
            write!(
  311    377   
                f,
  312         -
                r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
         378  +
                r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
  313    379   
            )
  314    380   
        }
  315    381   
    }
  316    382   
  317    383   
    impl ::std::error::Error for ConstraintViolation {}
  318    384   
    impl ConstraintViolation {
  319    385   
        pub(crate) fn as_validation_exception_field(
  320    386   
            self,
  321    387   
            path: ::std::string::String,
  322    388   
        ) -> crate::model::ValidationExceptionField {
  323    389   
            crate::model::ValidationExceptionField {
  324    390   
                message: format!(
  325         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
         391  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
  326    392   
                    &path
  327    393   
                ),
  328    394   
                path,
  329    395   
            }
  330    396   
        }
  331    397   
    }
  332    398   
}
  333         -
impl ::std::convert::TryFrom<&str> for TestEnum {
  334         -
    type Error = crate::model::test_enum_internal::ConstraintViolation;
         399  +
impl ::std::convert::TryFrom<&str> for StringEnum {
         400  +
    type Error = crate::model::string_enum_internal::ConstraintViolation;
  335    401   
    fn try_from(
  336    402   
        s: &str,
  337    403   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
  338    404   
        match s {
  339         -
            "BAR" => Ok(TestEnum::Bar),
  340         -
            "BAZ" => Ok(TestEnum::Baz),
  341         -
            "FOO" => Ok(TestEnum::Foo),
  342         -
            _ => Err(crate::model::test_enum_internal::ConstraintViolation(
         405  +
            "enumvalue" => Ok(StringEnum::V),
         406  +
            _ => Err(crate::model::string_enum_internal::ConstraintViolation(
  343    407   
                s.to_owned(),
  344    408   
            )),
  345    409   
        }
  346    410   
    }
  347    411   
}
  348         -
impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
  349         -
    type Error = crate::model::test_enum_internal::ConstraintViolation;
         412  +
impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
         413  +
    type Error = crate::model::string_enum_internal::ConstraintViolation;
  350    414   
    fn try_from(
  351    415   
        s: ::std::string::String,
  352    416   
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
  353    417   
    {
  354    418   
        s.as_str().try_into()
  355    419   
    }
  356    420   
}
  357         -
impl std::str::FromStr for TestEnum {
  358         -
    type Err = crate::model::test_enum_internal::ConstraintViolation;
         421  +
impl std::str::FromStr for StringEnum {
         422  +
    type Err = crate::model::string_enum_internal::ConstraintViolation;
  359    423   
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
  360    424   
        Self::try_from(s)
  361    425   
    }
  362    426   
}
  363         -
impl TestEnum {
         427  +
impl StringEnum {
  364    428   
    /// Returns the `&str` value of the enum member.
  365    429   
    pub fn as_str(&self) -> &str {
  366    430   
        match self {
  367         -
            TestEnum::Bar => "BAR",
  368         -
            TestEnum::Baz => "BAZ",
  369         -
            TestEnum::Foo => "FOO",
         431  +
            StringEnum::V => "enumvalue",
  370    432   
        }
  371    433   
    }
  372    434   
    /// Returns all the `&str` representations of the enum members.
  373    435   
    pub const fn values() -> &'static [&'static str] {
  374         -
        &["BAR", "BAZ", "FOO"]
         436  +
        &["enumvalue"]
  375    437   
    }
  376    438   
}
  377         -
impl ::std::convert::AsRef<str> for TestEnum {
         439  +
impl ::std::convert::AsRef<str> for StringEnum {
  378    440   
    fn as_ref(&self) -> &str {
  379    441   
        self.as_str()
  380    442   
    }
  381    443   
}
  382    444   
#[::pyo3::pymethods]
  383         -
impl TestEnum {
         445  +
impl StringEnum {
  384    446   
    #[getter]
  385    447   
    pub fn name(&self) -> &str {
  386    448   
        match self {
  387         -
            TestEnum::Bar => "Bar",
  388         -
            TestEnum::Baz => "Baz",
  389         -
            TestEnum::Foo => "Foo",
         449  +
            StringEnum::V => "V",
  390    450   
        }
  391    451   
    }
  392    452   
    #[getter]
  393    453   
    pub fn value(&self) -> &str {
  394    454   
        self.as_str()
  395    455   
    }
  396    456   
    fn __repr__(&self) -> String {
  397    457   
        self.as_str().to_owned()
  398    458   
    }
  399    459   
    fn __str__(&self) -> String {
  400    460   
        self.as_str().to_owned()
  401    461   
    }
  402    462   
}
  403         -
impl crate::constrained::Constrained for TestEnum {
         463  +
impl crate::constrained::Constrained for StringEnum {
  404    464   
    type Unconstrained = ::std::string::String;
  405    465   
}
  406    466   
  407    467   
impl ::std::convert::From<::std::string::String>
  408         -
    for crate::constrained::MaybeConstrained<crate::model::TestEnum>
         468  +
    for crate::constrained::MaybeConstrained<crate::model::StringEnum>
  409    469   
{
  410    470   
    fn from(value: ::std::string::String) -> Self {
  411    471   
        Self::Unconstrained(value)
  412    472   
    }
  413    473   
}
  414    474   
  415         -
#[::pyo3::pyclass]
  416         -
/// :param member int:
  417         -
/// :rtype None:
  418    475   
#[allow(missing_docs)] // documentation missing in model
  419    476   
#[derive(
  420    477   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  421    478   
)]
  422         -
pub struct ClientOptionalDefaults {
         479  +
pub enum UnionPayload {
         480  +
    #[allow(missing_docs)] // documentation missing in model
         481  +
    Greeting(::std::string::String),
         482  +
}
         483  +
impl UnionPayload {
         484  +
    #[allow(irrefutable_let_patterns)]
         485  +
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
         486  +
    /// Returns `Err(&Self)` if it can't be converted.
         487  +
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         488  +
        if let UnionPayload::Greeting(val) = &self {
         489  +
            ::std::result::Result::Ok(val)
         490  +
        } else {
         491  +
            ::std::result::Result::Err(self)
         492  +
        }
         493  +
    }
         494  +
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
         495  +
    pub fn is_greeting(&self) -> bool {
         496  +
        self.as_greeting().is_ok()
         497  +
    }
         498  +
}
         499  +
#[pyo3::pyclass(name = "UnionPayload")]
         500  +
#[derive(
         501  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         502  +
)]
         503  +
pub struct PyUnionMarkerUnionPayload(pub UnionPayload);
         504  +
#[::pyo3::pymethods]
         505  +
impl PyUnionMarkerUnionPayload {
         506  +
    #[allow(irrefutable_let_patterns)]
         507  +
    #[staticmethod]
         508  +
    /// Creates a new union instance of [`Greeting`](crate::model::UnionPayload::Greeting)
         509  +
    /// :param data str:
         510  +
    /// :rtype UnionPayload:
         511  +
    pub fn greeting(data: ::std::string::String) -> Self {
         512  +
        Self(UnionPayload::Greeting(data))
         513  +
    }
         514  +
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
         515  +
    /// :rtype str:
         516  +
    pub fn as_greeting(&self) -> ::pyo3::PyResult<::std::string::String> {
         517  +
        match self.0.as_greeting() {
         518  +
            Ok(variant) => Ok(variant.clone()),
         519  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
         520  +
                r"UnionPayload variant is not of type str",
         521  +
            )),
         522  +
        }
         523  +
    }
         524  +
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
         525  +
    /// :rtype bool:
         526  +
    pub fn is_greeting(&self) -> bool {
         527  +
        self.0.is_greeting()
         528  +
    }
         529  +
}
         530  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionPayload {
         531  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
         532  +
        PyUnionMarkerUnionPayload(self).into_py(py)
         533  +
    }
         534  +
}
         535  +
impl<'source> ::pyo3::FromPyObject<'source> for UnionPayload {
         536  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         537  +
        let data: PyUnionMarkerUnionPayload = obj.extract()?;
         538  +
        Ok(data.0)
         539  +
    }
         540  +
}
         541  +
         542  +
#[::pyo3::pyclass]
         543  +
/// :param foo typing.Optional\[str\]:
         544  +
/// :rtype None:
         545  +
#[allow(missing_docs)] // documentation missing in model
         546  +
#[derive(
         547  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         548  +
)]
         549  +
pub struct ComplexNestedErrorData {
  423    550   
    #[pyo3(get, set)]
  424         -
    /// :type int:
         551  +
    /// :type typing.Optional\[str\]:
  425    552   
    #[allow(missing_docs)] // documentation missing in model
  426         -
    pub member: i32,
         553  +
    pub foo: ::std::option::Option<::std::string::String>,
  427    554   
}
  428         -
impl ClientOptionalDefaults {
         555  +
impl ComplexNestedErrorData {
  429    556   
    #[allow(missing_docs)] // documentation missing in model
  430         -
    pub fn member(&self) -> i32 {
  431         -
        self.member
         557  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
         558  +
        self.foo.as_deref()
  432    559   
    }
  433    560   
}
  434    561   
#[allow(clippy::new_without_default)]
  435    562   
#[allow(clippy::too_many_arguments)]
  436    563   
#[::pyo3::pymethods]
  437         -
impl ClientOptionalDefaults {
         564  +
impl ComplexNestedErrorData {
  438    565   
    #[new]
  439         -
    pub fn new(member: i32) -> Self {
  440         -
        Self { member }
         566  +
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
         567  +
        Self { foo }
  441    568   
    }
  442    569   
    fn __repr__(&self) -> String {
  443    570   
        format!("{self:?}")
  444    571   
    }
  445    572   
    fn __str__(&self) -> String {
  446    573   
        format!("{self:?}")
  447    574   
    }
  448    575   
}
  449         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ClientOptionalDefaults> {
         576  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
  450    577   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  451         -
        ob.extract::<ClientOptionalDefaults>().map(Box::new)
         578  +
        ob.extract::<ComplexNestedErrorData>().map(Box::new)
  452    579   
    }
  453    580   
}
  454    581   
  455         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ClientOptionalDefaults> {
         582  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
  456    583   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  457    584   
        (*self).into_py(py)
  458    585   
    }
  459    586   
}
  460         -
impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
  461         -
    type Unconstrained = crate::model::client_optional_defaults_internal::Builder;
         587  +
impl ComplexNestedErrorData {
         588  +
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
         589  +
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
         590  +
        crate::model::complex_nested_error_data::Builder::default()
         591  +
    }
  462    592   
}
  463         -
impl ClientOptionalDefaults {
  464         -
    /// Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
  465         -
    pub fn builder() -> crate::model::client_optional_defaults::Builder {
  466         -
        crate::model::client_optional_defaults::Builder::default()
         593  +
         594  +
#[allow(missing_docs)] // documentation missing in model
         595  +
///
         596  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         597  +
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
         598  +
///
         599  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         600  +
///
         601  +
#[derive(
         602  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         603  +
)]
         604  +
pub(crate) struct FooEnumSet(pub(crate) ::std::vec::Vec<crate::model::FooEnum>);
         605  +
impl FooEnumSet {
         606  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
         607  +
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
         608  +
        self.0
         609  +
    }
         610  +
         611  +
    fn check_unique_items(
         612  +
        items: ::std::vec::Vec<crate::model::FooEnum>,
         613  +
    ) -> ::std::result::Result<
         614  +
        ::std::vec::Vec<crate::model::FooEnum>,
         615  +
        crate::model::foo_enum_set_internal::ConstraintViolation,
         616  +
    > {
         617  +
        let mut seen = ::std::collections::HashMap::new();
         618  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         619  +
        for (idx, item) in items.iter().enumerate() {
         620  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         621  +
                duplicate_indices.push(prev_idx);
         622  +
            }
         623  +
        }
         624  +
         625  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         626  +
        for idx in &duplicate_indices {
         627  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         628  +
                last_duplicate_indices.push(prev_idx);
         629  +
            }
         630  +
        }
         631  +
        duplicate_indices.extend(last_duplicate_indices);
         632  +
         633  +
        if !duplicate_indices.is_empty() {
         634  +
            debug_assert!(duplicate_indices.len() >= 2);
         635  +
            Err(
         636  +
                crate::model::foo_enum_set_internal::ConstraintViolation::UniqueItems {
         637  +
                    duplicate_indices,
         638  +
                    original: items,
         639  +
                },
         640  +
            )
         641  +
        } else {
         642  +
            Ok(items)
         643  +
        }
  467    644   
    }
  468    645   
}
         646  +
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
         647  +
    type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
         648  +
         649  +
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
         650  +
    fn try_from(
         651  +
        value: ::std::vec::Vec<crate::model::FooEnum>,
         652  +
    ) -> ::std::result::Result<Self, Self::Error> {
         653  +
        let value = Self::check_unique_items(value)?;
         654  +
         655  +
        Ok(Self(value))
         656  +
    }
         657  +
}
         658  +
         659  +
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
         660  +
    fn from(value: FooEnumSet) -> Self {
         661  +
        value.into_inner()
         662  +
    }
         663  +
}
         664  +
impl crate::constrained::Constrained for FooEnumSet {
         665  +
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
         666  +
}
  469    667   
  470         -
#[::pyo3::pyclass]
  471         -
/// :param default_string str:
  472         -
/// :param default_boolean bool:
  473         -
/// :param default_list typing.List\[str\]:
  474         -
/// :param default_document_map rest_json.types.Document:
  475         -
/// :param default_document_string rest_json.types.Document:
  476         -
/// :param default_document_boolean rest_json.types.Document:
  477         -
/// :param default_document_list rest_json.types.Document:
  478         -
/// :param default_timestamp rest_json.types.DateTime:
  479         -
/// :param default_blob rest_json.types.Blob:
  480         -
/// :param default_byte int:
  481         -
/// :param default_short int:
  482         -
/// :param default_integer int:
  483         -
/// :param default_long int:
  484         -
/// :param default_float float:
  485         -
/// :param default_double float:
  486         -
/// :param default_map typing.Dict\[str, str\]:
  487         -
/// :param default_enum rest_json.model.TestEnum:
  488         -
/// :param default_int_enum int:
  489         -
/// :param empty_string str:
  490         -
/// :param false_boolean bool:
  491         -
/// :param empty_blob rest_json.types.Blob:
  492         -
/// :param zero_byte int:
  493         -
/// :param zero_short int:
  494         -
/// :param zero_integer int:
  495         -
/// :param zero_long int:
  496         -
/// :param zero_float float:
  497         -
/// :param zero_double float:
  498         -
/// :param default_null_document typing.Optional\[rest_json.types.Document\]:
  499         -
/// :rtype None:
  500    668   
#[allow(missing_docs)] // documentation missing in model
  501         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  502         -
pub struct Defaults {
  503         -
    #[pyo3(get, set)]
  504         -
    /// :type str:
  505         -
    #[allow(missing_docs)] // documentation missing in model
  506         -
    pub default_string: ::std::string::String,
  507         -
    #[pyo3(get, set)]
  508         -
    /// :type bool:
  509         -
    #[allow(missing_docs)] // documentation missing in model
  510         -
    pub default_boolean: bool,
  511         -
    #[pyo3(get, set)]
  512         -
    /// :type typing.List\[str\]:
  513         -
    #[allow(missing_docs)] // documentation missing in model
  514         -
    pub default_list: ::std::vec::Vec<::std::string::String>,
  515         -
    #[pyo3(get, set)]
  516         -
    /// :type rest_json.types.Document:
  517         -
    #[allow(missing_docs)] // documentation missing in model
  518         -
    pub default_document_map: ::aws_smithy_http_server_python::types::Document,
  519         -
    #[pyo3(get, set)]
  520         -
    /// :type rest_json.types.Document:
  521         -
    #[allow(missing_docs)] // documentation missing in model
  522         -
    pub default_document_string: ::aws_smithy_http_server_python::types::Document,
  523         -
    #[pyo3(get, set)]
  524         -
    /// :type rest_json.types.Document:
  525         -
    #[allow(missing_docs)] // documentation missing in model
  526         -
    pub default_document_boolean: ::aws_smithy_http_server_python::types::Document,
  527         -
    #[pyo3(get, set)]
  528         -
    /// :type rest_json.types.Document:
  529         -
    #[allow(missing_docs)] // documentation missing in model
  530         -
    pub default_document_list: ::aws_smithy_http_server_python::types::Document,
  531         -
    #[pyo3(get, set)]
  532         -
    /// :type typing.Optional\[rest_json.types.Document\]:
  533         -
    #[allow(missing_docs)] // documentation missing in model
  534         -
    pub default_null_document:
  535         -
        ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
  536         -
    #[pyo3(get, set)]
  537         -
    /// :type rest_json.types.DateTime:
  538         -
    #[allow(missing_docs)] // documentation missing in model
  539         -
    pub default_timestamp: ::aws_smithy_http_server_python::types::DateTime,
  540         -
    #[pyo3(get, set)]
  541         -
    /// :type rest_json.types.Blob:
  542         -
    #[allow(missing_docs)] // documentation missing in model
  543         -
    pub default_blob: ::aws_smithy_http_server_python::types::Blob,
  544         -
    #[pyo3(get, set)]
  545         -
    /// :type int:
  546         -
    #[allow(missing_docs)] // documentation missing in model
  547         -
    pub default_byte: i8,
  548         -
    #[pyo3(get, set)]
  549         -
    /// :type int:
  550         -
    #[allow(missing_docs)] // documentation missing in model
  551         -
    pub default_short: i16,
  552         -
    #[pyo3(get, set)]
  553         -
    /// :type int:
  554         -
    #[allow(missing_docs)] // documentation missing in model
  555         -
    pub default_integer: i32,
  556         -
    #[pyo3(get, set)]
  557         -
    /// :type int:
  558         -
    #[allow(missing_docs)] // documentation missing in model
  559         -
    pub default_long: i64,
  560         -
    #[pyo3(get, set)]
  561         -
    /// :type float:
  562         -
    #[allow(missing_docs)] // documentation missing in model
  563         -
    pub default_float: f32,
  564         -
    #[pyo3(get, set)]
  565         -
    /// :type float:
  566         -
    #[allow(missing_docs)] // documentation missing in model
  567         -
    pub default_double: f64,
  568         -
    #[pyo3(get, set)]
  569         -
    /// :type typing.Dict\[str, str\]:
  570         -
    #[allow(missing_docs)] // documentation missing in model
  571         -
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  572         -
    #[pyo3(get, set)]
  573         -
    /// :type rest_json.model.TestEnum:
  574         -
    #[allow(missing_docs)] // documentation missing in model
  575         -
    pub default_enum: crate::model::TestEnum,
  576         -
    #[pyo3(get, set)]
  577         -
    /// :type int:
  578         -
    #[allow(missing_docs)] // documentation missing in model
  579         -
    pub default_int_enum: i32,
  580         -
    #[pyo3(get, set)]
  581         -
    /// :type str:
  582         -
    #[allow(missing_docs)] // documentation missing in model
  583         -
    pub empty_string: ::std::string::String,
  584         -
    #[pyo3(get, set)]
  585         -
    /// :type bool:
  586         -
    #[allow(missing_docs)] // documentation missing in model
  587         -
    pub false_boolean: bool,
  588         -
    #[pyo3(get, set)]
  589         -
    /// :type rest_json.types.Blob:
  590         -
    #[allow(missing_docs)] // documentation missing in model
  591         -
    pub empty_blob: ::aws_smithy_http_server_python::types::Blob,
  592         -
    #[pyo3(get, set)]
  593         -
    /// :type int:
  594         -
    #[allow(missing_docs)] // documentation missing in model
  595         -
    pub zero_byte: i8,
  596         -
    #[pyo3(get, set)]
  597         -
    /// :type int:
  598         -
    #[allow(missing_docs)] // documentation missing in model
  599         -
    pub zero_short: i16,
  600         -
    #[pyo3(get, set)]
  601         -
    /// :type int:
  602         -
    #[allow(missing_docs)] // documentation missing in model
  603         -
    pub zero_integer: i32,
  604         -
    #[pyo3(get, set)]
  605         -
    /// :type int:
  606         -
    #[allow(missing_docs)] // documentation missing in model
  607         -
    pub zero_long: i64,
         669  +
///
         670  +
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
         671  +
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
         672  +
///
         673  +
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
         674  +
///
         675  +
#[derive(
         676  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         677  +
)]
         678  +
pub(crate) struct IntegerEnumSet(pub(crate) ::std::vec::Vec<i32>);
         679  +
impl IntegerEnumSet {
         680  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
         681  +
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
         682  +
        self.0
         683  +
    }
         684  +
         685  +
    fn check_unique_items(
         686  +
        items: ::std::vec::Vec<i32>,
         687  +
    ) -> ::std::result::Result<
         688  +
        ::std::vec::Vec<i32>,
         689  +
        crate::model::integer_enum_set_internal::ConstraintViolation,
         690  +
    > {
         691  +
        let mut seen = ::std::collections::HashMap::new();
         692  +
        let mut duplicate_indices = ::std::vec::Vec::new();
         693  +
        for (idx, item) in items.iter().enumerate() {
         694  +
            if let Some(prev_idx) = seen.insert(item, idx) {
         695  +
                duplicate_indices.push(prev_idx);
         696  +
            }
         697  +
        }
         698  +
         699  +
        let mut last_duplicate_indices = ::std::vec::Vec::new();
         700  +
        for idx in &duplicate_indices {
         701  +
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
         702  +
                last_duplicate_indices.push(prev_idx);
         703  +
            }
         704  +
        }
         705  +
        duplicate_indices.extend(last_duplicate_indices);
         706  +
         707  +
        if !duplicate_indices.is_empty() {
         708  +
            debug_assert!(duplicate_indices.len() >= 2);
         709  +
            Err(
         710  +
                crate::model::integer_enum_set_internal::ConstraintViolation::UniqueItems {
         711  +
                    duplicate_indices,
         712  +
                    original: items,
         713  +
                },
         714  +
            )
         715  +
        } else {
         716  +
            Ok(items)
         717  +
        }
         718  +
    }
         719  +
}
         720  +
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
         721  +
    type Error = crate::model::integer_enum_set_internal::ConstraintViolation;
         722  +
         723  +
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
         724  +
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
         725  +
        let value = Self::check_unique_items(value)?;
         726  +
         727  +
        Ok(Self(value))
         728  +
    }
         729  +
}
         730  +
         731  +
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
         732  +
    fn from(value: IntegerEnumSet) -> Self {
         733  +
        value.into_inner()
         734  +
    }
         735  +
}
         736  +
impl crate::constrained::Constrained for IntegerEnumSet {
         737  +
    type Unconstrained =
         738  +
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
         739  +
}
         740  +
         741  +
#[::pyo3::pyclass]
         742  +
/// :param foo typing.Optional\[str\]:
         743  +
/// :param nested typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
         744  +
/// :rtype None:
         745  +
#[allow(missing_docs)] // documentation missing in model
         746  +
#[derive(
         747  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         748  +
)]
         749  +
pub struct RecursiveShapesInputOutputNested1 {
  608    750   
    #[pyo3(get, set)]
  609         -
    /// :type float:
         751  +
    /// :type typing.Optional\[str\]:
  610    752   
    #[allow(missing_docs)] // documentation missing in model
  611         -
    pub zero_float: f32,
         753  +
    pub foo: ::std::option::Option<::std::string::String>,
  612    754   
    #[pyo3(get, set)]
  613         -
    /// :type float:
         755  +
    /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
  614    756   
    #[allow(missing_docs)] // documentation missing in model
  615         -
    pub zero_double: f64,
         757  +
    pub nested:
         758  +
        ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
  616    759   
}
  617         -
impl Defaults {
         760  +
impl RecursiveShapesInputOutputNested1 {
  618    761   
    #[allow(missing_docs)] // documentation missing in model
  619         -
    pub fn default_string(&self) -> &str {
  620         -
        use std::ops::Deref;
  621         -
        self.default_string.deref()
         762  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
         763  +
        self.foo.as_deref()
  622    764   
    }
  623    765   
    #[allow(missing_docs)] // documentation missing in model
  624         -
    pub fn default_boolean(&self) -> bool {
  625         -
        self.default_boolean
         766  +
    pub fn nested(
         767  +
        &self,
         768  +
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
         769  +
        self.nested.as_deref()
  626    770   
    }
  627         -
    #[allow(missing_docs)] // documentation missing in model
  628         -
    pub fn default_list(&self) -> &[::std::string::String] {
  629         -
        use std::ops::Deref;
  630         -
        self.default_list.deref()
         771  +
}
         772  +
#[allow(clippy::new_without_default)]
         773  +
#[allow(clippy::too_many_arguments)]
         774  +
#[::pyo3::pymethods]
         775  +
impl RecursiveShapesInputOutputNested1 {
         776  +
    #[new]
         777  +
    pub fn new(
         778  +
        foo: ::std::option::Option<::std::string::String>,
         779  +
        nested: ::std::option::Option<
         780  +
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
         781  +
        >,
         782  +
    ) -> Self {
         783  +
        Self { foo, nested }
  631    784   
    }
  632         -
    #[allow(missing_docs)] // documentation missing in model
  633         -
    pub fn default_document_map(&self) -> &::aws_smithy_http_server_python::types::Document {
  634         -
        &self.default_document_map
         785  +
    fn __repr__(&self) -> String {
         786  +
        format!("{self:?}")
  635    787   
    }
  636         -
    #[allow(missing_docs)] // documentation missing in model
  637         -
    pub fn default_document_string(&self) -> &::aws_smithy_http_server_python::types::Document {
  638         -
        &self.default_document_string
         788  +
    fn __str__(&self) -> String {
         789  +
        format!("{self:?}")
  639    790   
    }
  640         -
    #[allow(missing_docs)] // documentation missing in model
  641         -
    pub fn default_document_boolean(&self) -> &::aws_smithy_http_server_python::types::Document {
  642         -
        &self.default_document_boolean
         791  +
}
         792  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
         793  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         794  +
        ob.extract::<RecursiveShapesInputOutputNested1>()
         795  +
            .map(Box::new)
  643    796   
    }
  644         -
    #[allow(missing_docs)] // documentation missing in model
  645         -
    pub fn default_document_list(&self) -> &::aws_smithy_http_server_python::types::Document {
  646         -
        &self.default_document_list
         797  +
}
         798  +
         799  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
         800  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
         801  +
        (*self).into_py(py)
  647    802   
    }
  648         -
    #[allow(missing_docs)] // documentation missing in model
  649         -
    pub fn default_null_document(
  650         -
        &self,
  651         -
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Document> {
  652         -
        self.default_null_document.as_ref()
         803  +
}
         804  +
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
         805  +
    type Unconstrained = crate::model::recursive_shapes_input_output_nested1_internal::Builder;
         806  +
}
         807  +
impl RecursiveShapesInputOutputNested1 {
         808  +
    /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
         809  +
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
         810  +
        crate::model::recursive_shapes_input_output_nested1::Builder::default()
  653    811   
    }
         812  +
}
         813  +
         814  +
/// A union with a representative set of types for members.
         815  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         816  +
pub enum MyUnion {
  654    817   
    #[allow(missing_docs)] // documentation missing in model
  655         -
    pub fn default_timestamp(&self) -> &::aws_smithy_http_server_python::types::DateTime {
  656         -
        &self.default_timestamp
  657         -
    }
         818  +
    BlobValue(::aws_smithy_http_server_python::types::Blob),
  658    819   
    #[allow(missing_docs)] // documentation missing in model
  659         -
    pub fn default_blob(&self) -> &::aws_smithy_http_server_python::types::Blob {
  660         -
        &self.default_blob
  661         -
    }
         820  +
    BooleanValue(bool),
  662    821   
    #[allow(missing_docs)] // documentation missing in model
  663         -
    pub fn default_byte(&self) -> i8 {
  664         -
        self.default_byte
  665         -
    }
         822  +
    EnumValue(crate::model::FooEnum),
  666    823   
    #[allow(missing_docs)] // documentation missing in model
  667         -
    pub fn default_short(&self) -> i16 {
  668         -
        self.default_short
  669         -
    }
         824  +
    ListValue(::std::vec::Vec<::std::string::String>),
  670    825   
    #[allow(missing_docs)] // documentation missing in model
  671         -
    pub fn default_integer(&self) -> i32 {
  672         -
        self.default_integer
  673         -
    }
         826  +
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
  674    827   
    #[allow(missing_docs)] // documentation missing in model
  675         -
    pub fn default_long(&self) -> i64 {
  676         -
        self.default_long
  677         -
    }
         828  +
    NumberValue(i32),
  678    829   
    #[allow(missing_docs)] // documentation missing in model
  679         -
    pub fn default_float(&self) -> f32 {
  680         -
        self.default_float
  681         -
    }
         830  +
    RenamedStructureValue(crate::model::RenamedGreeting),
  682    831   
    #[allow(missing_docs)] // documentation missing in model
  683         -
    pub fn default_double(&self) -> f64 {
  684         -
        self.default_double
  685         -
    }
         832  +
    StringValue(::std::string::String),
  686    833   
    #[allow(missing_docs)] // documentation missing in model
  687         -
    pub fn default_map(
  688         -
        &self,
  689         -
    ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
         834  +
    StructureValue(crate::model::GreetingStruct),
         835  +
    #[allow(missing_docs)] // documentation missing in model
         836  +
    TimestampValue(::aws_smithy_http_server_python::types::DateTime),
         837  +
}
         838  +
impl MyUnion {
         839  +
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
         840  +
    /// Returns `Err(&Self)` if it can't be converted.
         841  +
    pub fn as_blob_value(
         842  +
        &self,
         843  +
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
         844  +
        if let MyUnion::BlobValue(val) = &self {
         845  +
            ::std::result::Result::Ok(val)
         846  +
        } else {
         847  +
            ::std::result::Result::Err(self)
         848  +
        }
         849  +
    }
         850  +
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
         851  +
    pub fn is_blob_value(&self) -> bool {
         852  +
        self.as_blob_value().is_ok()
         853  +
    }
         854  +
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
         855  +
    /// Returns `Err(&Self)` if it can't be converted.
         856  +
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
         857  +
        if let MyUnion::BooleanValue(val) = &self {
         858  +
            ::std::result::Result::Ok(val)
         859  +
        } else {
         860  +
            ::std::result::Result::Err(self)
         861  +
        }
         862  +
    }
         863  +
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
         864  +
    pub fn is_boolean_value(&self) -> bool {
         865  +
        self.as_boolean_value().is_ok()
         866  +
    }
         867  +
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
         868  +
    /// Returns `Err(&Self)` if it can't be converted.
         869  +
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
         870  +
        if let MyUnion::EnumValue(val) = &self {
         871  +
            ::std::result::Result::Ok(val)
         872  +
        } else {
         873  +
            ::std::result::Result::Err(self)
         874  +
        }
         875  +
    }
         876  +
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
         877  +
    pub fn is_enum_value(&self) -> bool {
         878  +
        self.as_enum_value().is_ok()
         879  +
    }
         880  +
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
         881  +
    /// Returns `Err(&Self)` if it can't be converted.
         882  +
    pub fn as_list_value(
         883  +
        &self,
         884  +
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
         885  +
        if let MyUnion::ListValue(val) = &self {
         886  +
            ::std::result::Result::Ok(val)
         887  +
        } else {
         888  +
            ::std::result::Result::Err(self)
         889  +
        }
         890  +
    }
         891  +
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
         892  +
    pub fn is_list_value(&self) -> bool {
         893  +
        self.as_list_value().is_ok()
         894  +
    }
         895  +
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
         896  +
    /// Returns `Err(&Self)` if it can't be converted.
         897  +
    pub fn as_map_value(
         898  +
        &self,
         899  +
    ) -> ::std::result::Result<
         900  +
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
         901  +
        &Self,
         902  +
    > {
         903  +
        if let MyUnion::MapValue(val) = &self {
         904  +
            ::std::result::Result::Ok(val)
         905  +
        } else {
         906  +
            ::std::result::Result::Err(self)
         907  +
        }
         908  +
    }
         909  +
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
         910  +
    pub fn is_map_value(&self) -> bool {
         911  +
        self.as_map_value().is_ok()
         912  +
    }
         913  +
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
         914  +
    /// Returns `Err(&Self)` if it can't be converted.
         915  +
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
         916  +
        if let MyUnion::NumberValue(val) = &self {
         917  +
            ::std::result::Result::Ok(val)
         918  +
        } else {
         919  +
            ::std::result::Result::Err(self)
         920  +
        }
         921  +
    }
         922  +
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
         923  +
    pub fn is_number_value(&self) -> bool {
         924  +
        self.as_number_value().is_ok()
         925  +
    }
         926  +
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
         927  +
    /// Returns `Err(&Self)` if it can't be converted.
         928  +
    pub fn as_renamed_structure_value(
         929  +
        &self,
         930  +
    ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
         931  +
        if let MyUnion::RenamedStructureValue(val) = &self {
         932  +
            ::std::result::Result::Ok(val)
         933  +
        } else {
         934  +
            ::std::result::Result::Err(self)
         935  +
        }
         936  +
    }
         937  +
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
         938  +
    pub fn is_renamed_structure_value(&self) -> bool {
         939  +
        self.as_renamed_structure_value().is_ok()
         940  +
    }
         941  +
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
         942  +
    /// Returns `Err(&Self)` if it can't be converted.
         943  +
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
         944  +
        if let MyUnion::StringValue(val) = &self {
         945  +
            ::std::result::Result::Ok(val)
         946  +
        } else {
         947  +
            ::std::result::Result::Err(self)
         948  +
        }
         949  +
    }
         950  +
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
         951  +
    pub fn is_string_value(&self) -> bool {
         952  +
        self.as_string_value().is_ok()
         953  +
    }
         954  +
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
         955  +
    /// Returns `Err(&Self)` if it can't be converted.
         956  +
    pub fn as_structure_value(
         957  +
        &self,
         958  +
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
         959  +
        if let MyUnion::StructureValue(val) = &self {
         960  +
            ::std::result::Result::Ok(val)
         961  +
        } else {
         962  +
            ::std::result::Result::Err(self)
         963  +
        }
         964  +
    }
         965  +
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
         966  +
    pub fn is_structure_value(&self) -> bool {
         967  +
        self.as_structure_value().is_ok()
         968  +
    }
         969  +
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
         970  +
    /// Returns `Err(&Self)` if it can't be converted.
         971  +
    pub fn as_timestamp_value(
         972  +
        &self,
         973  +
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
         974  +
        if let MyUnion::TimestampValue(val) = &self {
         975  +
            ::std::result::Result::Ok(val)
         976  +
        } else {
         977  +
            ::std::result::Result::Err(self)
         978  +
        }
         979  +
    }
         980  +
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
         981  +
    pub fn is_timestamp_value(&self) -> bool {
         982  +
        self.as_timestamp_value().is_ok()
         983  +
    }
         984  +
}
         985  +
#[pyo3::pyclass(name = "MyUnion")]
         986  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         987  +
pub struct PyUnionMarkerMyUnion(pub MyUnion);
         988  +
#[::pyo3::pymethods]
         989  +
impl PyUnionMarkerMyUnion {
         990  +
    #[staticmethod]
         991  +
    /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
         992  +
    /// :param data rest_json.types.Blob:
         993  +
    /// :rtype MyUnion:
         994  +
    pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
         995  +
        Self(MyUnion::BlobValue(data))
         996  +
    }
         997  +
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
         998  +
    /// :rtype rest_json.types.Blob:
         999  +
    pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
        1000  +
        match self.0.as_blob_value() {
        1001  +
            Ok(variant) => Ok(variant.clone()),
        1002  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1003  +
                r"MyUnion variant is not of type rest_json.types.Blob",
        1004  +
            )),
        1005  +
        }
        1006  +
    }
        1007  +
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
        1008  +
    /// :rtype bool:
        1009  +
    pub fn is_blob_value(&self) -> bool {
        1010  +
        self.0.is_blob_value()
        1011  +
    }
        1012  +
    #[staticmethod]
        1013  +
    /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
        1014  +
    /// :param data bool:
        1015  +
    /// :rtype MyUnion:
        1016  +
    pub fn boolean_value(data: bool) -> Self {
        1017  +
        Self(MyUnion::BooleanValue(data))
        1018  +
    }
        1019  +
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
        1020  +
    /// :rtype bool:
        1021  +
    pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
        1022  +
        match self.0.as_boolean_value() {
        1023  +
            Ok(variant) => Ok(*variant),
        1024  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1025  +
                r"MyUnion variant is not of type bool",
        1026  +
            )),
        1027  +
        }
        1028  +
    }
        1029  +
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
        1030  +
    /// :rtype bool:
        1031  +
    pub fn is_boolean_value(&self) -> bool {
        1032  +
        self.0.is_boolean_value()
        1033  +
    }
        1034  +
    #[staticmethod]
        1035  +
    /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
        1036  +
    /// :param data rest_json.model.FooEnum:
        1037  +
    /// :rtype MyUnion:
        1038  +
    pub fn enum_value(data: crate::model::FooEnum) -> Self {
        1039  +
        Self(MyUnion::EnumValue(data))
        1040  +
    }
        1041  +
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
        1042  +
    /// :rtype rest_json.model.FooEnum:
        1043  +
    pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
        1044  +
        match self.0.as_enum_value() {
        1045  +
            Ok(variant) => Ok(variant.clone()),
        1046  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1047  +
                r"MyUnion variant is not of type rest_json.model.FooEnum",
        1048  +
            )),
        1049  +
        }
        1050  +
    }
        1051  +
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
        1052  +
    /// :rtype bool:
        1053  +
    pub fn is_enum_value(&self) -> bool {
        1054  +
        self.0.is_enum_value()
        1055  +
    }
        1056  +
    #[staticmethod]
        1057  +
    /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
        1058  +
    /// :param data typing.List\[str\]:
        1059  +
    /// :rtype MyUnion:
        1060  +
    pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
        1061  +
        Self(MyUnion::ListValue(data))
        1062  +
    }
        1063  +
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
        1064  +
    /// :rtype typing.List\[str\]:
        1065  +
    pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
        1066  +
        match self.0.as_list_value() {
        1067  +
            Ok(variant) => Ok(variant.clone()),
        1068  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1069  +
                r"MyUnion variant is not of type typing.List\[str\]",
        1070  +
            )),
        1071  +
        }
        1072  +
    }
        1073  +
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
        1074  +
    /// :rtype bool:
        1075  +
    pub fn is_list_value(&self) -> bool {
        1076  +
        self.0.is_list_value()
        1077  +
    }
        1078  +
    #[staticmethod]
        1079  +
    /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
        1080  +
    /// :param data typing.Dict\[str, str\]:
        1081  +
    /// :rtype MyUnion:
        1082  +
    pub fn map_value(
        1083  +
        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        1084  +
    ) -> Self {
        1085  +
        Self(MyUnion::MapValue(data))
        1086  +
    }
        1087  +
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
        1088  +
    /// :rtype typing.Dict\[str, str\]:
        1089  +
    pub fn as_map_value(
        1090  +
        &self,
        1091  +
    ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
        1092  +
    {
        1093  +
        match self.0.as_map_value() {
        1094  +
            Ok(variant) => Ok(variant.clone()),
        1095  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1096  +
                r"MyUnion variant is not of type typing.Dict\[str, str\]",
        1097  +
            )),
        1098  +
        }
        1099  +
    }
        1100  +
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
        1101  +
    /// :rtype bool:
        1102  +
    pub fn is_map_value(&self) -> bool {
        1103  +
        self.0.is_map_value()
        1104  +
    }
        1105  +
    #[staticmethod]
        1106  +
    /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
        1107  +
    /// :param data int:
        1108  +
    /// :rtype MyUnion:
        1109  +
    pub fn number_value(data: i32) -> Self {
        1110  +
        Self(MyUnion::NumberValue(data))
        1111  +
    }
        1112  +
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
        1113  +
    /// :rtype int:
        1114  +
    pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
        1115  +
        match self.0.as_number_value() {
        1116  +
            Ok(variant) => Ok(*variant),
        1117  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1118  +
                r"MyUnion variant is not of type int",
        1119  +
            )),
        1120  +
        }
        1121  +
    }
        1122  +
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
        1123  +
    /// :rtype bool:
        1124  +
    pub fn is_number_value(&self) -> bool {
        1125  +
        self.0.is_number_value()
        1126  +
    }
        1127  +
    #[staticmethod]
        1128  +
    /// Creates a new union instance of [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue)
        1129  +
    /// :param data rest_json.model.RenamedGreeting:
        1130  +
    /// :rtype MyUnion:
        1131  +
    pub fn renamed_structure_value(data: crate::model::RenamedGreeting) -> Self {
        1132  +
        Self(MyUnion::RenamedStructureValue(data))
        1133  +
    }
        1134  +
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
        1135  +
    /// :rtype rest_json.model.RenamedGreeting:
        1136  +
    pub fn as_renamed_structure_value(&self) -> ::pyo3::PyResult<crate::model::RenamedGreeting> {
        1137  +
        match self.0.as_renamed_structure_value() {
        1138  +
            Ok(variant) => Ok(variant.clone()),
        1139  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1140  +
                r"MyUnion variant is not of type rest_json.model.RenamedGreeting",
        1141  +
            )),
        1142  +
        }
        1143  +
    }
        1144  +
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
        1145  +
    /// :rtype bool:
        1146  +
    pub fn is_renamed_structure_value(&self) -> bool {
        1147  +
        self.0.is_renamed_structure_value()
        1148  +
    }
        1149  +
    #[staticmethod]
        1150  +
    /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
        1151  +
    /// :param data str:
        1152  +
    /// :rtype MyUnion:
        1153  +
    pub fn string_value(data: ::std::string::String) -> Self {
        1154  +
        Self(MyUnion::StringValue(data))
        1155  +
    }
        1156  +
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
        1157  +
    /// :rtype str:
        1158  +
    pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
        1159  +
        match self.0.as_string_value() {
        1160  +
            Ok(variant) => Ok(variant.clone()),
        1161  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1162  +
                r"MyUnion variant is not of type str",
        1163  +
            )),
        1164  +
        }
        1165  +
    }
        1166  +
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
        1167  +
    /// :rtype bool:
        1168  +
    pub fn is_string_value(&self) -> bool {
        1169  +
        self.0.is_string_value()
        1170  +
    }
        1171  +
    #[staticmethod]
        1172  +
    /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
        1173  +
    /// :param data rest_json.model.GreetingStruct:
        1174  +
    /// :rtype MyUnion:
        1175  +
    pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
        1176  +
        Self(MyUnion::StructureValue(data))
        1177  +
    }
        1178  +
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
        1179  +
    /// :rtype rest_json.model.GreetingStruct:
        1180  +
    pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
        1181  +
        match self.0.as_structure_value() {
        1182  +
            Ok(variant) => Ok(variant.clone()),
        1183  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1184  +
                r"MyUnion variant is not of type rest_json.model.GreetingStruct",
        1185  +
            )),
        1186  +
        }
        1187  +
    }
        1188  +
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
        1189  +
    /// :rtype bool:
        1190  +
    pub fn is_structure_value(&self) -> bool {
        1191  +
        self.0.is_structure_value()
        1192  +
    }
        1193  +
    #[staticmethod]
        1194  +
    /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
        1195  +
    /// :param data rest_json.types.DateTime:
        1196  +
    /// :rtype MyUnion:
        1197  +
    pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
        1198  +
        Self(MyUnion::TimestampValue(data))
        1199  +
    }
        1200  +
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
        1201  +
    /// :rtype rest_json.types.DateTime:
        1202  +
    pub fn as_timestamp_value(
        1203  +
        &self,
        1204  +
    ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
        1205  +
        match self.0.as_timestamp_value() {
        1206  +
            Ok(variant) => Ok(variant.clone()),
        1207  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1208  +
                r"MyUnion variant is not of type rest_json.types.DateTime",
        1209  +
            )),
        1210  +
        }
        1211  +
    }
        1212  +
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
        1213  +
    /// :rtype bool:
        1214  +
    pub fn is_timestamp_value(&self) -> bool {
        1215  +
        self.0.is_timestamp_value()
        1216  +
    }
        1217  +
}
        1218  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
        1219  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1220  +
        PyUnionMarkerMyUnion(self).into_py(py)
        1221  +
    }
        1222  +
}
        1223  +
impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
        1224  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1225  +
        let data: PyUnionMarkerMyUnion = obj.extract()?;
        1226  +
        Ok(data.0)
        1227  +
    }
        1228  +
}
        1229  +
        1230  +
#[allow(missing_docs)] // documentation missing in model
        1231  +
#[derive(
        1232  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1233  +
)]
        1234  +
pub enum PlayerAction {
        1235  +
    /// Quit the game.
        1236  +
    Quit,
        1237  +
}
        1238  +
impl PlayerAction {
        1239  +
    #[allow(irrefutable_let_patterns)]
        1240  +
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
        1241  +
    /// Returns `Err(&Self)` if it can't be converted.
        1242  +
    pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
        1243  +
        if let PlayerAction::Quit = &self {
        1244  +
            ::std::result::Result::Ok(())
        1245  +
        } else {
        1246  +
            ::std::result::Result::Err(self)
        1247  +
        }
        1248  +
    }
        1249  +
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
        1250  +
    pub fn is_quit(&self) -> bool {
        1251  +
        self.as_quit().is_ok()
        1252  +
    }
        1253  +
}
        1254  +
#[pyo3::pyclass(name = "PlayerAction")]
        1255  +
#[derive(
        1256  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1257  +
)]
        1258  +
pub struct PyUnionMarkerPlayerAction(pub PlayerAction);
        1259  +
#[::pyo3::pymethods]
        1260  +
impl PyUnionMarkerPlayerAction {
        1261  +
    #[allow(irrefutable_let_patterns)]
        1262  +
    #[staticmethod]
        1263  +
    /// Creates a new union instance of [`Quit`](crate::model::PlayerAction::Quit)
        1264  +
    /// :rtype PlayerAction:
        1265  +
    pub fn quit() -> Self {
        1266  +
        Self(PlayerAction::Quit)
        1267  +
    }
        1268  +
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
        1269  +
    /// :rtype None:
        1270  +
    pub fn as_quit(&self) -> ::pyo3::PyResult<()> {
        1271  +
        self.0.as_quit().map_err(|_| {
        1272  +
            ::pyo3::exceptions::PyValueError::new_err("PlayerAction variant is not None")
        1273  +
        })
        1274  +
    }
        1275  +
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
        1276  +
    /// :rtype bool:
        1277  +
    pub fn is_quit(&self) -> bool {
        1278  +
        self.0.is_quit()
        1279  +
    }
        1280  +
}
        1281  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for PlayerAction {
        1282  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1283  +
        PyUnionMarkerPlayerAction(self).into_py(py)
        1284  +
    }
        1285  +
}
        1286  +
impl<'source> ::pyo3::FromPyObject<'source> for PlayerAction {
        1287  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1288  +
        let data: PyUnionMarkerPlayerAction = obj.extract()?;
        1289  +
        Ok(data.0)
        1290  +
    }
        1291  +
}
        1292  +
        1293  +
#[allow(missing_docs)] // documentation missing in model
        1294  +
#[derive(
        1295  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1296  +
)]
        1297  +
pub enum UnionWithJsonName {
        1298  +
    #[allow(missing_docs)] // documentation missing in model
        1299  +
    Bar(::std::string::String),
        1300  +
    #[allow(missing_docs)] // documentation missing in model
        1301  +
    Baz(::std::string::String),
        1302  +
    #[allow(missing_docs)] // documentation missing in model
        1303  +
    Foo(::std::string::String),
        1304  +
}
        1305  +
impl UnionWithJsonName {
        1306  +
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
        1307  +
    /// Returns `Err(&Self)` if it can't be converted.
        1308  +
    pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1309  +
        if let UnionWithJsonName::Bar(val) = &self {
        1310  +
            ::std::result::Result::Ok(val)
        1311  +
        } else {
        1312  +
            ::std::result::Result::Err(self)
        1313  +
        }
        1314  +
    }
        1315  +
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
        1316  +
    pub fn is_bar(&self) -> bool {
        1317  +
        self.as_bar().is_ok()
        1318  +
    }
        1319  +
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
        1320  +
    /// Returns `Err(&Self)` if it can't be converted.
        1321  +
    pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1322  +
        if let UnionWithJsonName::Baz(val) = &self {
        1323  +
            ::std::result::Result::Ok(val)
        1324  +
        } else {
        1325  +
            ::std::result::Result::Err(self)
        1326  +
        }
        1327  +
    }
        1328  +
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
        1329  +
    pub fn is_baz(&self) -> bool {
        1330  +
        self.as_baz().is_ok()
        1331  +
    }
        1332  +
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
        1333  +
    /// Returns `Err(&Self)` if it can't be converted.
        1334  +
    pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1335  +
        if let UnionWithJsonName::Foo(val) = &self {
        1336  +
            ::std::result::Result::Ok(val)
        1337  +
        } else {
        1338  +
            ::std::result::Result::Err(self)
        1339  +
        }
        1340  +
    }
        1341  +
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
        1342  +
    pub fn is_foo(&self) -> bool {
        1343  +
        self.as_foo().is_ok()
        1344  +
    }
        1345  +
}
        1346  +
#[pyo3::pyclass(name = "UnionWithJsonName")]
        1347  +
#[derive(
        1348  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1349  +
)]
        1350  +
pub struct PyUnionMarkerUnionWithJsonName(pub UnionWithJsonName);
        1351  +
#[::pyo3::pymethods]
        1352  +
impl PyUnionMarkerUnionWithJsonName {
        1353  +
    #[staticmethod]
        1354  +
    /// Creates a new union instance of [`Bar`](crate::model::UnionWithJsonName::Bar)
        1355  +
    /// :param data str:
        1356  +
    /// :rtype UnionWithJsonName:
        1357  +
    pub fn bar(data: ::std::string::String) -> Self {
        1358  +
        Self(UnionWithJsonName::Bar(data))
        1359  +
    }
        1360  +
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
        1361  +
    /// :rtype str:
        1362  +
    pub fn as_bar(&self) -> ::pyo3::PyResult<::std::string::String> {
        1363  +
        match self.0.as_bar() {
        1364  +
            Ok(variant) => Ok(variant.clone()),
        1365  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1366  +
                r"UnionWithJsonName variant is not of type str",
        1367  +
            )),
        1368  +
        }
        1369  +
    }
        1370  +
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
        1371  +
    /// :rtype bool:
        1372  +
    pub fn is_bar(&self) -> bool {
        1373  +
        self.0.is_bar()
        1374  +
    }
        1375  +
    #[staticmethod]
        1376  +
    /// Creates a new union instance of [`Baz`](crate::model::UnionWithJsonName::Baz)
        1377  +
    /// :param data str:
        1378  +
    /// :rtype UnionWithJsonName:
        1379  +
    pub fn baz(data: ::std::string::String) -> Self {
        1380  +
        Self(UnionWithJsonName::Baz(data))
        1381  +
    }
        1382  +
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
        1383  +
    /// :rtype str:
        1384  +
    pub fn as_baz(&self) -> ::pyo3::PyResult<::std::string::String> {
        1385  +
        match self.0.as_baz() {
        1386  +
            Ok(variant) => Ok(variant.clone()),
        1387  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1388  +
                r"UnionWithJsonName variant is not of type str",
        1389  +
            )),
        1390  +
        }
        1391  +
    }
        1392  +
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
        1393  +
    /// :rtype bool:
        1394  +
    pub fn is_baz(&self) -> bool {
        1395  +
        self.0.is_baz()
        1396  +
    }
        1397  +
    #[staticmethod]
        1398  +
    /// Creates a new union instance of [`Foo`](crate::model::UnionWithJsonName::Foo)
        1399  +
    /// :param data str:
        1400  +
    /// :rtype UnionWithJsonName:
        1401  +
    pub fn foo(data: ::std::string::String) -> Self {
        1402  +
        Self(UnionWithJsonName::Foo(data))
        1403  +
    }
        1404  +
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
        1405  +
    /// :rtype str:
        1406  +
    pub fn as_foo(&self) -> ::pyo3::PyResult<::std::string::String> {
        1407  +
        match self.0.as_foo() {
        1408  +
            Ok(variant) => Ok(variant.clone()),
        1409  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1410  +
                r"UnionWithJsonName variant is not of type str",
        1411  +
            )),
        1412  +
        }
        1413  +
    }
        1414  +
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
        1415  +
    /// :rtype bool:
        1416  +
    pub fn is_foo(&self) -> bool {
        1417  +
        self.0.is_foo()
        1418  +
    }
        1419  +
}
        1420  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionWithJsonName {
        1421  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1422  +
        PyUnionMarkerUnionWithJsonName(self).into_py(py)
        1423  +
    }
        1424  +
}
        1425  +
impl<'source> ::pyo3::FromPyObject<'source> for UnionWithJsonName {
        1426  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1427  +
        let data: PyUnionMarkerUnionWithJsonName = obj.extract()?;
        1428  +
        Ok(data.0)
        1429  +
    }
        1430  +
}
        1431  +
        1432  +
#[allow(missing_docs)] // documentation missing in model
        1433  +
#[derive(
        1434  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1435  +
)]
        1436  +
pub enum SimpleUnion {
        1437  +
    #[allow(missing_docs)] // documentation missing in model
        1438  +
    Int(i32),
        1439  +
    #[allow(missing_docs)] // documentation missing in model
        1440  +
    String(::std::string::String),
        1441  +
}
        1442  +
impl SimpleUnion {
        1443  +
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
        1444  +
    /// Returns `Err(&Self)` if it can't be converted.
        1445  +
    pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
        1446  +
        if let SimpleUnion::Int(val) = &self {
        1447  +
            ::std::result::Result::Ok(val)
        1448  +
        } else {
        1449  +
            ::std::result::Result::Err(self)
        1450  +
        }
        1451  +
    }
        1452  +
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
        1453  +
    pub fn is_int(&self) -> bool {
        1454  +
        self.as_int().is_ok()
        1455  +
    }
        1456  +
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
        1457  +
    /// Returns `Err(&Self)` if it can't be converted.
        1458  +
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1459  +
        if let SimpleUnion::String(val) = &self {
        1460  +
            ::std::result::Result::Ok(val)
        1461  +
        } else {
        1462  +
            ::std::result::Result::Err(self)
        1463  +
        }
        1464  +
    }
        1465  +
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
        1466  +
    pub fn is_string(&self) -> bool {
        1467  +
        self.as_string().is_ok()
        1468  +
    }
        1469  +
}
        1470  +
#[pyo3::pyclass(name = "SimpleUnion")]
        1471  +
#[derive(
        1472  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1473  +
)]
        1474  +
pub struct PyUnionMarkerSimpleUnion(pub SimpleUnion);
        1475  +
#[::pyo3::pymethods]
        1476  +
impl PyUnionMarkerSimpleUnion {
        1477  +
    #[staticmethod]
        1478  +
    /// Creates a new union instance of [`Int`](crate::model::SimpleUnion::Int)
        1479  +
    /// :param data int:
        1480  +
    /// :rtype SimpleUnion:
        1481  +
    pub fn int(data: i32) -> Self {
        1482  +
        Self(SimpleUnion::Int(data))
        1483  +
    }
        1484  +
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
        1485  +
    /// :rtype int:
        1486  +
    pub fn as_int(&self) -> ::pyo3::PyResult<i32> {
        1487  +
        match self.0.as_int() {
        1488  +
            Ok(variant) => Ok(*variant),
        1489  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1490  +
                r"SimpleUnion variant is not of type int",
        1491  +
            )),
        1492  +
        }
        1493  +
    }
        1494  +
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
        1495  +
    /// :rtype bool:
        1496  +
    pub fn is_int(&self) -> bool {
        1497  +
        self.0.is_int()
        1498  +
    }
        1499  +
    #[staticmethod]
        1500  +
    /// Creates a new union instance of [`String`](crate::model::SimpleUnion::String)
        1501  +
    /// :param data str:
        1502  +
    /// :rtype SimpleUnion:
        1503  +
    pub fn string(data: ::std::string::String) -> Self {
        1504  +
        Self(SimpleUnion::String(data))
        1505  +
    }
        1506  +
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
        1507  +
    /// :rtype str:
        1508  +
    pub fn as_string(&self) -> ::pyo3::PyResult<::std::string::String> {
        1509  +
        match self.0.as_string() {
        1510  +
            Ok(variant) => Ok(variant.clone()),
        1511  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1512  +
                r"SimpleUnion variant is not of type str",
        1513  +
            )),
        1514  +
        }
        1515  +
    }
        1516  +
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
        1517  +
    /// :rtype bool:
        1518  +
    pub fn is_string(&self) -> bool {
        1519  +
        self.0.is_string()
        1520  +
    }
        1521  +
}
        1522  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for SimpleUnion {
        1523  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1524  +
        PyUnionMarkerSimpleUnion(self).into_py(py)
        1525  +
    }
        1526  +
}
        1527  +
impl<'source> ::pyo3::FromPyObject<'source> for SimpleUnion {
        1528  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1529  +
        let data: PyUnionMarkerSimpleUnion = obj.extract()?;
        1530  +
        Ok(data.0)
        1531  +
    }
        1532  +
}
        1533  +
        1534  +
#[::pyo3::pyclass]
        1535  +
/// :param timeout typing.Optional\[int\]:
        1536  +
/// :rtype None:
        1537  +
#[allow(missing_docs)] // documentation missing in model
        1538  +
#[derive(
        1539  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1540  +
)]
        1541  +
pub struct TestConfig {
        1542  +
    #[pyo3(get, set)]
        1543  +
    /// :type typing.Optional\[int\]:
        1544  +
    #[allow(missing_docs)] // documentation missing in model
        1545  +
    pub timeout: ::std::option::Option<i32>,
        1546  +
}
        1547  +
impl TestConfig {
        1548  +
    #[allow(missing_docs)] // documentation missing in model
        1549  +
    pub fn timeout(&self) -> ::std::option::Option<i32> {
        1550  +
        self.timeout
        1551  +
    }
        1552  +
}
        1553  +
#[allow(clippy::new_without_default)]
        1554  +
#[allow(clippy::too_many_arguments)]
        1555  +
#[::pyo3::pymethods]
        1556  +
impl TestConfig {
        1557  +
    #[new]
        1558  +
    pub fn new(timeout: ::std::option::Option<i32>) -> Self {
        1559  +
        Self { timeout }
        1560  +
    }
        1561  +
    fn __repr__(&self) -> String {
        1562  +
        format!("{self:?}")
        1563  +
    }
        1564  +
    fn __str__(&self) -> String {
        1565  +
        format!("{self:?}")
        1566  +
    }
        1567  +
}
        1568  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TestConfig> {
        1569  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1570  +
        ob.extract::<TestConfig>().map(Box::new)
        1571  +
    }
        1572  +
}
        1573  +
        1574  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TestConfig> {
        1575  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1576  +
        (*self).into_py(py)
        1577  +
    }
        1578  +
}
        1579  +
impl crate::constrained::Constrained for crate::model::TestConfig {
        1580  +
    type Unconstrained = crate::model::test_config_internal::Builder;
        1581  +
}
        1582  +
impl TestConfig {
        1583  +
    /// Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
        1584  +
    pub fn builder() -> crate::model::test_config::Builder {
        1585  +
        crate::model::test_config::Builder::default()
        1586  +
    }
        1587  +
}
        1588  +
        1589  +
#[::pyo3::pyclass]
        1590  +
/// :param data typing.Optional\[int\]:
        1591  +
/// :rtype None:
        1592  +
#[allow(missing_docs)] // documentation missing in model
        1593  +
#[derive(
        1594  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1595  +
)]
        1596  +
pub struct PayloadConfig {
        1597  +
    #[pyo3(get, set)]
        1598  +
    /// :type typing.Optional\[int\]:
        1599  +
    #[allow(missing_docs)] // documentation missing in model
        1600  +
    pub data: ::std::option::Option<i32>,
        1601  +
}
        1602  +
impl PayloadConfig {
        1603  +
    #[allow(missing_docs)] // documentation missing in model
        1604  +
    pub fn data(&self) -> ::std::option::Option<i32> {
        1605  +
        self.data
        1606  +
    }
        1607  +
}
        1608  +
#[allow(clippy::new_without_default)]
        1609  +
#[allow(clippy::too_many_arguments)]
        1610  +
#[::pyo3::pymethods]
        1611  +
impl PayloadConfig {
        1612  +
    #[new]
        1613  +
    pub fn new(data: ::std::option::Option<i32>) -> Self {
        1614  +
        Self { data }
        1615  +
    }
        1616  +
    fn __repr__(&self) -> String {
        1617  +
        format!("{self:?}")
        1618  +
    }
        1619  +
    fn __str__(&self) -> String {
        1620  +
        format!("{self:?}")
        1621  +
    }
        1622  +
}
        1623  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PayloadConfig> {
        1624  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1625  +
        ob.extract::<PayloadConfig>().map(Box::new)
        1626  +
    }
        1627  +
}
        1628  +
        1629  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PayloadConfig> {
        1630  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1631  +
        (*self).into_py(py)
        1632  +
    }
        1633  +
}
        1634  +
impl crate::constrained::Constrained for crate::model::PayloadConfig {
        1635  +
    type Unconstrained = crate::model::payload_config_internal::Builder;
        1636  +
}
        1637  +
impl PayloadConfig {
        1638  +
    /// Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
        1639  +
    pub fn builder() -> crate::model::payload_config::Builder {
        1640  +
        crate::model::payload_config::Builder::default()
        1641  +
    }
        1642  +
}
        1643  +
        1644  +
#[::pyo3::pyclass]
        1645  +
/// :param default_string str:
        1646  +
/// :param default_boolean bool:
        1647  +
/// :param default_list typing.List\[str\]:
        1648  +
/// :param default_document_map rest_json.types.Document:
        1649  +
/// :param default_document_string rest_json.types.Document:
        1650  +
/// :param default_document_boolean rest_json.types.Document:
        1651  +
/// :param default_document_list rest_json.types.Document:
        1652  +
/// :param default_timestamp rest_json.types.DateTime:
        1653  +
/// :param default_blob rest_json.types.Blob:
        1654  +
/// :param default_byte int:
        1655  +
/// :param default_short int:
        1656  +
/// :param default_integer int:
        1657  +
/// :param default_long int:
        1658  +
/// :param default_float float:
        1659  +
/// :param default_double float:
        1660  +
/// :param default_map typing.Dict\[str, str\]:
        1661  +
/// :param default_enum rest_json.model.TestEnum:
        1662  +
/// :param default_int_enum int:
        1663  +
/// :param empty_string str:
        1664  +
/// :param false_boolean bool:
        1665  +
/// :param empty_blob rest_json.types.Blob:
        1666  +
/// :param zero_byte int:
        1667  +
/// :param zero_short int:
        1668  +
/// :param zero_integer int:
        1669  +
/// :param zero_long int:
        1670  +
/// :param zero_float float:
        1671  +
/// :param zero_double float:
        1672  +
/// :param default_null_document typing.Optional\[rest_json.types.Document\]:
        1673  +
/// :rtype None:
        1674  +
#[allow(missing_docs)] // documentation missing in model
        1675  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1676  +
pub struct Defaults {
        1677  +
    #[pyo3(get, set)]
        1678  +
    /// :type str:
        1679  +
    #[allow(missing_docs)] // documentation missing in model
        1680  +
    pub default_string: ::std::string::String,
        1681  +
    #[pyo3(get, set)]
        1682  +
    /// :type bool:
        1683  +
    #[allow(missing_docs)] // documentation missing in model
        1684  +
    pub default_boolean: bool,
        1685  +
    #[pyo3(get, set)]
        1686  +
    /// :type typing.List\[str\]:
        1687  +
    #[allow(missing_docs)] // documentation missing in model
        1688  +
    pub default_list: ::std::vec::Vec<::std::string::String>,
        1689  +
    #[pyo3(get, set)]
        1690  +
    /// :type rest_json.types.Document:
        1691  +
    #[allow(missing_docs)] // documentation missing in model
        1692  +
    pub default_document_map: ::aws_smithy_http_server_python::types::Document,
        1693  +
    #[pyo3(get, set)]
        1694  +
    /// :type rest_json.types.Document:
        1695  +
    #[allow(missing_docs)] // documentation missing in model
        1696  +
    pub default_document_string: ::aws_smithy_http_server_python::types::Document,
        1697  +
    #[pyo3(get, set)]
        1698  +
    /// :type rest_json.types.Document:
        1699  +
    #[allow(missing_docs)] // documentation missing in model
        1700  +
    pub default_document_boolean: ::aws_smithy_http_server_python::types::Document,
        1701  +
    #[pyo3(get, set)]
        1702  +
    /// :type rest_json.types.Document:
        1703  +
    #[allow(missing_docs)] // documentation missing in model
        1704  +
    pub default_document_list: ::aws_smithy_http_server_python::types::Document,
        1705  +
    #[pyo3(get, set)]
        1706  +
    /// :type typing.Optional\[rest_json.types.Document\]:
        1707  +
    #[allow(missing_docs)] // documentation missing in model
        1708  +
    pub default_null_document:
        1709  +
        ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        1710  +
    #[pyo3(get, set)]
        1711  +
    /// :type rest_json.types.DateTime:
        1712  +
    #[allow(missing_docs)] // documentation missing in model
        1713  +
    pub default_timestamp: ::aws_smithy_http_server_python::types::DateTime,
        1714  +
    #[pyo3(get, set)]
        1715  +
    /// :type rest_json.types.Blob:
        1716  +
    #[allow(missing_docs)] // documentation missing in model
        1717  +
    pub default_blob: ::aws_smithy_http_server_python::types::Blob,
        1718  +
    #[pyo3(get, set)]
        1719  +
    /// :type int:
        1720  +
    #[allow(missing_docs)] // documentation missing in model
        1721  +
    pub default_byte: i8,
        1722  +
    #[pyo3(get, set)]
        1723  +
    /// :type int:
        1724  +
    #[allow(missing_docs)] // documentation missing in model
        1725  +
    pub default_short: i16,
        1726  +
    #[pyo3(get, set)]
        1727  +
    /// :type int:
        1728  +
    #[allow(missing_docs)] // documentation missing in model
        1729  +
    pub default_integer: i32,
        1730  +
    #[pyo3(get, set)]
        1731  +
    /// :type int:
        1732  +
    #[allow(missing_docs)] // documentation missing in model
        1733  +
    pub default_long: i64,
        1734  +
    #[pyo3(get, set)]
        1735  +
    /// :type float:
        1736  +
    #[allow(missing_docs)] // documentation missing in model
        1737  +
    pub default_float: f32,
        1738  +
    #[pyo3(get, set)]
        1739  +
    /// :type float:
        1740  +
    #[allow(missing_docs)] // documentation missing in model
        1741  +
    pub default_double: f64,
        1742  +
    #[pyo3(get, set)]
        1743  +
    /// :type typing.Dict\[str, str\]:
        1744  +
    #[allow(missing_docs)] // documentation missing in model
        1745  +
    pub default_map: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        1746  +
    #[pyo3(get, set)]
        1747  +
    /// :type rest_json.model.TestEnum:
        1748  +
    #[allow(missing_docs)] // documentation missing in model
        1749  +
    pub default_enum: crate::model::TestEnum,
        1750  +
    #[pyo3(get, set)]
        1751  +
    /// :type int:
        1752  +
    #[allow(missing_docs)] // documentation missing in model
        1753  +
    pub default_int_enum: i32,
        1754  +
    #[pyo3(get, set)]
        1755  +
    /// :type str:
        1756  +
    #[allow(missing_docs)] // documentation missing in model
        1757  +
    pub empty_string: ::std::string::String,
        1758  +
    #[pyo3(get, set)]
        1759  +
    /// :type bool:
        1760  +
    #[allow(missing_docs)] // documentation missing in model
        1761  +
    pub false_boolean: bool,
        1762  +
    #[pyo3(get, set)]
        1763  +
    /// :type rest_json.types.Blob:
        1764  +
    #[allow(missing_docs)] // documentation missing in model
        1765  +
    pub empty_blob: ::aws_smithy_http_server_python::types::Blob,
        1766  +
    #[pyo3(get, set)]
        1767  +
    /// :type int:
        1768  +
    #[allow(missing_docs)] // documentation missing in model
        1769  +
    pub zero_byte: i8,
        1770  +
    #[pyo3(get, set)]
        1771  +
    /// :type int:
        1772  +
    #[allow(missing_docs)] // documentation missing in model
        1773  +
    pub zero_short: i16,
        1774  +
    #[pyo3(get, set)]
        1775  +
    /// :type int:
        1776  +
    #[allow(missing_docs)] // documentation missing in model
        1777  +
    pub zero_integer: i32,
        1778  +
    #[pyo3(get, set)]
        1779  +
    /// :type int:
        1780  +
    #[allow(missing_docs)] // documentation missing in model
        1781  +
    pub zero_long: i64,
        1782  +
    #[pyo3(get, set)]
        1783  +
    /// :type float:
        1784  +
    #[allow(missing_docs)] // documentation missing in model
        1785  +
    pub zero_float: f32,
        1786  +
    #[pyo3(get, set)]
        1787  +
    /// :type float:
        1788  +
    #[allow(missing_docs)] // documentation missing in model
        1789  +
    pub zero_double: f64,
        1790  +
}
        1791  +
impl Defaults {
        1792  +
    #[allow(missing_docs)] // documentation missing in model
        1793  +
    pub fn default_string(&self) -> &str {
        1794  +
        use std::ops::Deref;
        1795  +
        self.default_string.deref()
        1796  +
    }
        1797  +
    #[allow(missing_docs)] // documentation missing in model
        1798  +
    pub fn default_boolean(&self) -> bool {
        1799  +
        self.default_boolean
        1800  +
    }
        1801  +
    #[allow(missing_docs)] // documentation missing in model
        1802  +
    pub fn default_list(&self) -> &[::std::string::String] {
        1803  +
        use std::ops::Deref;
        1804  +
        self.default_list.deref()
        1805  +
    }
        1806  +
    #[allow(missing_docs)] // documentation missing in model
        1807  +
    pub fn default_document_map(&self) -> &::aws_smithy_http_server_python::types::Document {
        1808  +
        &self.default_document_map
        1809  +
    }
        1810  +
    #[allow(missing_docs)] // documentation missing in model
        1811  +
    pub fn default_document_string(&self) -> &::aws_smithy_http_server_python::types::Document {
        1812  +
        &self.default_document_string
        1813  +
    }
        1814  +
    #[allow(missing_docs)] // documentation missing in model
        1815  +
    pub fn default_document_boolean(&self) -> &::aws_smithy_http_server_python::types::Document {
        1816  +
        &self.default_document_boolean
        1817  +
    }
        1818  +
    #[allow(missing_docs)] // documentation missing in model
        1819  +
    pub fn default_document_list(&self) -> &::aws_smithy_http_server_python::types::Document {
        1820  +
        &self.default_document_list
        1821  +
    }
        1822  +
    #[allow(missing_docs)] // documentation missing in model
        1823  +
    pub fn default_null_document(
        1824  +
        &self,
        1825  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Document> {
        1826  +
        self.default_null_document.as_ref()
        1827  +
    }
        1828  +
    #[allow(missing_docs)] // documentation missing in model
        1829  +
    pub fn default_timestamp(&self) -> &::aws_smithy_http_server_python::types::DateTime {
        1830  +
        &self.default_timestamp
        1831  +
    }
        1832  +
    #[allow(missing_docs)] // documentation missing in model
        1833  +
    pub fn default_blob(&self) -> &::aws_smithy_http_server_python::types::Blob {
        1834  +
        &self.default_blob
        1835  +
    }
        1836  +
    #[allow(missing_docs)] // documentation missing in model
        1837  +
    pub fn default_byte(&self) -> i8 {
        1838  +
        self.default_byte
        1839  +
    }
        1840  +
    #[allow(missing_docs)] // documentation missing in model
        1841  +
    pub fn default_short(&self) -> i16 {
        1842  +
        self.default_short
        1843  +
    }
        1844  +
    #[allow(missing_docs)] // documentation missing in model
        1845  +
    pub fn default_integer(&self) -> i32 {
        1846  +
        self.default_integer
        1847  +
    }
        1848  +
    #[allow(missing_docs)] // documentation missing in model
        1849  +
    pub fn default_long(&self) -> i64 {
        1850  +
        self.default_long
        1851  +
    }
        1852  +
    #[allow(missing_docs)] // documentation missing in model
        1853  +
    pub fn default_float(&self) -> f32 {
        1854  +
        self.default_float
        1855  +
    }
        1856  +
    #[allow(missing_docs)] // documentation missing in model
        1857  +
    pub fn default_double(&self) -> f64 {
        1858  +
        self.default_double
        1859  +
    }
        1860  +
    #[allow(missing_docs)] // documentation missing in model
        1861  +
    pub fn default_map(
        1862  +
        &self,
        1863  +
    ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
  690   1864   
        &self.default_map
  691   1865   
    }
  692   1866   
    #[allow(missing_docs)] // documentation missing in model
  693   1867   
    pub fn default_enum(&self) -> &crate::model::TestEnum {
  694   1868   
        &self.default_enum
  695   1869   
    }
  696   1870   
    #[allow(missing_docs)] // documentation missing in model
  697   1871   
    pub fn default_int_enum(&self) -> i32 {
  698   1872   
        self.default_int_enum
  699   1873   
    }
@@ -783,1957 +4853,6604 @@
  803   1977   
            default_null_document,
  804   1978   
        }
  805   1979   
    }
  806   1980   
    fn __repr__(&self) -> String {
  807   1981   
        format!("{self:?}")
  808   1982   
    }
  809   1983   
    fn __str__(&self) -> String {
  810   1984   
        format!("{self:?}")
  811   1985   
    }
  812   1986   
}
  813         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Defaults> {
        1987  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Defaults> {
        1988  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1989  +
        ob.extract::<Defaults>().map(Box::new)
        1990  +
    }
        1991  +
}
        1992  +
        1993  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Defaults> {
        1994  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1995  +
        (*self).into_py(py)
        1996  +
    }
        1997  +
}
        1998  +
impl crate::constrained::Constrained for crate::model::Defaults {
        1999  +
    type Unconstrained = crate::model::defaults_internal::Builder;
        2000  +
}
        2001  +
impl Defaults {
        2002  +
    /// Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
        2003  +
    pub fn builder() -> crate::model::defaults::Builder {
        2004  +
        crate::model::defaults::Builder::default()
        2005  +
    }
        2006  +
}
        2007  +
        2008  +
#[::pyo3::pyclass]
        2009  +
/// :param member int:
        2010  +
/// :rtype None:
        2011  +
#[allow(missing_docs)] // documentation missing in model
        2012  +
#[derive(
        2013  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2014  +
)]
        2015  +
pub struct ClientOptionalDefaults {
        2016  +
    #[pyo3(get, set)]
        2017  +
    /// :type int:
        2018  +
    #[allow(missing_docs)] // documentation missing in model
        2019  +
    pub member: i32,
        2020  +
}
        2021  +
impl ClientOptionalDefaults {
        2022  +
    #[allow(missing_docs)] // documentation missing in model
        2023  +
    pub fn member(&self) -> i32 {
        2024  +
        self.member
        2025  +
    }
        2026  +
}
        2027  +
#[allow(clippy::new_without_default)]
        2028  +
#[allow(clippy::too_many_arguments)]
        2029  +
#[::pyo3::pymethods]
        2030  +
impl ClientOptionalDefaults {
        2031  +
    #[new]
        2032  +
    pub fn new(member: i32) -> Self {
        2033  +
        Self { member }
        2034  +
    }
        2035  +
    fn __repr__(&self) -> String {
        2036  +
        format!("{self:?}")
        2037  +
    }
        2038  +
    fn __str__(&self) -> String {
        2039  +
        format!("{self:?}")
        2040  +
    }
        2041  +
}
        2042  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ClientOptionalDefaults> {
  814   2043   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  815         -
        ob.extract::<Defaults>().map(Box::new)
        2044  +
        ob.extract::<ClientOptionalDefaults>().map(Box::new)
  816   2045   
    }
  817   2046   
}
  818   2047   
  819         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Defaults> {
        2048  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ClientOptionalDefaults> {
  820   2049   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  821   2050   
        (*self).into_py(py)
  822   2051   
    }
  823   2052   
}
  824         -
impl crate::constrained::Constrained for crate::model::Defaults {
  825         -
    type Unconstrained = crate::model::defaults_internal::Builder;
        2053  +
impl crate::constrained::Constrained for crate::model::ClientOptionalDefaults {
        2054  +
    type Unconstrained = crate::model::client_optional_defaults_internal::Builder;
  826   2055   
}
  827         -
impl Defaults {
  828         -
    /// Creates a new builder-style object to manufacture [`Defaults`](crate::model::Defaults).
  829         -
    pub fn builder() -> crate::model::defaults::Builder {
  830         -
        crate::model::defaults::Builder::default()
        2056  +
impl ClientOptionalDefaults {
        2057  +
    /// Creates a new builder-style object to manufacture [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        2058  +
    pub fn builder() -> crate::model::client_optional_defaults::Builder {
        2059  +
        crate::model::client_optional_defaults::Builder::default()
  831   2060   
    }
  832   2061   
}
  833   2062   
  834   2063   
#[::pyo3::pyclass]
  835         -
/// :param data typing.Optional\[int\]:
  836         -
/// :rtype None:
  837   2064   
#[allow(missing_docs)] // documentation missing in model
  838   2065   
#[derive(
  839         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2066  +
    ::std::clone::Clone,
        2067  +
    ::std::cmp::Eq,
        2068  +
    ::std::cmp::Ord,
        2069  +
    ::std::cmp::PartialEq,
        2070  +
    ::std::cmp::PartialOrd,
        2071  +
    ::std::fmt::Debug,
        2072  +
    ::std::hash::Hash,
  840   2073   
)]
  841         -
pub struct PayloadConfig {
        2074  +
pub enum TestEnum {
        2075  +
    #[allow(missing_docs)] // documentation missing in model
        2076  +
    Bar,
        2077  +
    #[allow(missing_docs)] // documentation missing in model
        2078  +
    Baz,
        2079  +
    #[allow(missing_docs)] // documentation missing in model
        2080  +
    Foo,
        2081  +
}
        2082  +
pub(crate) mod test_enum_internal {
        2083  +
    #[derive(Debug, PartialEq)]
        2084  +
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
        2085  +
        2086  +
    impl ::std::fmt::Display for ConstraintViolation {
        2087  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2088  +
            write!(
        2089  +
                f,
        2090  +
                r#"Value provided for 'aws.protocoltests.restjson#TestEnum' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#
        2091  +
            )
        2092  +
        }
        2093  +
    }
        2094  +
        2095  +
    impl ::std::error::Error for ConstraintViolation {}
        2096  +
    impl ConstraintViolation {
        2097  +
        pub(crate) fn as_validation_exception_field(
        2098  +
            self,
        2099  +
            path: ::std::string::String,
        2100  +
        ) -> crate::model::ValidationExceptionField {
        2101  +
            crate::model::ValidationExceptionField {
        2102  +
                message: format!(
        2103  +
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [FOO, BAR, BAZ]"#,
        2104  +
                    &path
        2105  +
                ),
        2106  +
                path,
        2107  +
            }
        2108  +
        }
        2109  +
    }
        2110  +
}
        2111  +
impl ::std::convert::TryFrom<&str> for TestEnum {
        2112  +
    type Error = crate::model::test_enum_internal::ConstraintViolation;
        2113  +
    fn try_from(
        2114  +
        s: &str,
        2115  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
        2116  +
        match s {
        2117  +
            "BAR" => Ok(TestEnum::Bar),
        2118  +
            "BAZ" => Ok(TestEnum::Baz),
        2119  +
            "FOO" => Ok(TestEnum::Foo),
        2120  +
            _ => Err(crate::model::test_enum_internal::ConstraintViolation(
        2121  +
                s.to_owned(),
        2122  +
            )),
        2123  +
        }
        2124  +
    }
        2125  +
}
        2126  +
impl ::std::convert::TryFrom<::std::string::String> for TestEnum {
        2127  +
    type Error = crate::model::test_enum_internal::ConstraintViolation;
        2128  +
    fn try_from(
        2129  +
        s: ::std::string::String,
        2130  +
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
        2131  +
    {
        2132  +
        s.as_str().try_into()
        2133  +
    }
        2134  +
}
        2135  +
impl std::str::FromStr for TestEnum {
        2136  +
    type Err = crate::model::test_enum_internal::ConstraintViolation;
        2137  +
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
        2138  +
        Self::try_from(s)
        2139  +
    }
        2140  +
}
        2141  +
impl TestEnum {
        2142  +
    /// Returns the `&str` value of the enum member.
        2143  +
    pub fn as_str(&self) -> &str {
        2144  +
        match self {
        2145  +
            TestEnum::Bar => "BAR",
        2146  +
            TestEnum::Baz => "BAZ",
        2147  +
            TestEnum::Foo => "FOO",
        2148  +
        }
        2149  +
    }
        2150  +
    /// Returns all the `&str` representations of the enum members.
        2151  +
    pub const fn values() -> &'static [&'static str] {
        2152  +
        &["BAR", "BAZ", "FOO"]
        2153  +
    }
        2154  +
}
        2155  +
impl ::std::convert::AsRef<str> for TestEnum {
        2156  +
    fn as_ref(&self) -> &str {
        2157  +
        self.as_str()
        2158  +
    }
        2159  +
}
        2160  +
#[::pyo3::pymethods]
        2161  +
impl TestEnum {
        2162  +
    #[getter]
        2163  +
    pub fn name(&self) -> &str {
        2164  +
        match self {
        2165  +
            TestEnum::Bar => "Bar",
        2166  +
            TestEnum::Baz => "Baz",
        2167  +
            TestEnum::Foo => "Foo",
        2168  +
        }
        2169  +
    }
        2170  +
    #[getter]
        2171  +
    pub fn value(&self) -> &str {
        2172  +
        self.as_str()
        2173  +
    }
        2174  +
    fn __repr__(&self) -> String {
        2175  +
        self.as_str().to_owned()
        2176  +
    }
        2177  +
    fn __str__(&self) -> String {
        2178  +
        self.as_str().to_owned()
        2179  +
    }
        2180  +
}
        2181  +
impl crate::constrained::Constrained for TestEnum {
        2182  +
    type Unconstrained = ::std::string::String;
        2183  +
}
        2184  +
        2185  +
impl ::std::convert::From<::std::string::String>
        2186  +
    for crate::constrained::MaybeConstrained<crate::model::TestEnum>
        2187  +
{
        2188  +
    fn from(value: ::std::string::String) -> Self {
        2189  +
        Self::Unconstrained(value)
        2190  +
    }
        2191  +
}
        2192  +
        2193  +
#[::pyo3::pyclass]
        2194  +
/// :param dialog rest_json.model.Dialog:
        2195  +
/// :param dialog_list typing.List\[rest_json.model.Dialog\]:
        2196  +
/// :param dialog_map typing.Dict\[str, rest_json.model.Dialog\]:
        2197  +
/// :rtype None:
        2198  +
#[allow(missing_docs)] // documentation missing in model
        2199  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        2200  +
pub struct TopLevel {
  842   2201   
    #[pyo3(get, set)]
  843         -
    /// :type typing.Optional\[int\]:
        2202  +
    /// :type rest_json.model.Dialog:
  844   2203   
    #[allow(missing_docs)] // documentation missing in model
  845         -
    pub data: ::std::option::Option<i32>,
        2204  +
    pub dialog: crate::model::Dialog,
        2205  +
    #[pyo3(get, set)]
        2206  +
    /// :type typing.List\[rest_json.model.Dialog\]:
        2207  +
    #[allow(missing_docs)] // documentation missing in model
        2208  +
    pub dialog_list: ::std::vec::Vec<crate::model::Dialog>,
        2209  +
    #[pyo3(get, set)]
        2210  +
    /// :type typing.Dict\[str, rest_json.model.Dialog\]:
        2211  +
    #[allow(missing_docs)] // documentation missing in model
        2212  +
    pub dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
  846   2213   
}
  847         -
impl PayloadConfig {
        2214  +
impl TopLevel {
  848   2215   
    #[allow(missing_docs)] // documentation missing in model
  849         -
    pub fn data(&self) -> ::std::option::Option<i32> {
  850         -
        self.data
        2216  +
    pub fn dialog(&self) -> &crate::model::Dialog {
        2217  +
        &self.dialog
        2218  +
    }
        2219  +
    #[allow(missing_docs)] // documentation missing in model
        2220  +
    pub fn dialog_list(&self) -> &[crate::model::Dialog] {
        2221  +
        use std::ops::Deref;
        2222  +
        self.dialog_list.deref()
        2223  +
    }
        2224  +
    #[allow(missing_docs)] // documentation missing in model
        2225  +
    pub fn dialog_map(
        2226  +
        &self,
        2227  +
    ) -> &::std::collections::HashMap<::std::string::String, crate::model::Dialog> {
        2228  +
        &self.dialog_map
  851   2229   
    }
  852   2230   
}
  853   2231   
#[allow(clippy::new_without_default)]
  854   2232   
#[allow(clippy::too_many_arguments)]
  855   2233   
#[::pyo3::pymethods]
  856         -
impl PayloadConfig {
        2234  +
impl TopLevel {
  857   2235   
    #[new]
  858         -
    pub fn new(data: ::std::option::Option<i32>) -> Self {
  859         -
        Self { data }
        2236  +
    pub fn new(
        2237  +
        dialog: crate::model::Dialog,
        2238  +
        dialog_list: ::std::vec::Vec<crate::model::Dialog>,
        2239  +
        dialog_map: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        2240  +
    ) -> Self {
        2241  +
        Self {
        2242  +
            dialog,
        2243  +
            dialog_list,
        2244  +
            dialog_map,
        2245  +
        }
  860   2246   
    }
  861   2247   
    fn __repr__(&self) -> String {
  862   2248   
        format!("{self:?}")
  863   2249   
    }
  864   2250   
    fn __str__(&self) -> String {
  865   2251   
        format!("{self:?}")
  866   2252   
    }
  867   2253   
}
  868         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PayloadConfig> {
        2254  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TopLevel> {
  869   2255   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  870         -
        ob.extract::<PayloadConfig>().map(Box::new)
        2256  +
        ob.extract::<TopLevel>().map(Box::new)
  871   2257   
    }
  872   2258   
}
  873   2259   
  874         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PayloadConfig> {
        2260  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TopLevel> {
  875   2261   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  876   2262   
        (*self).into_py(py)
  877   2263   
    }
  878   2264   
}
  879         -
impl crate::constrained::Constrained for crate::model::PayloadConfig {
  880         -
    type Unconstrained = crate::model::payload_config_internal::Builder;
        2265  +
impl crate::constrained::Constrained for crate::model::TopLevel {
        2266  +
    type Unconstrained = crate::model::top_level_internal::Builder;
  881   2267   
}
  882         -
impl PayloadConfig {
  883         -
    /// Creates a new builder-style object to manufacture [`PayloadConfig`](crate::model::PayloadConfig).
  884         -
    pub fn builder() -> crate::model::payload_config::Builder {
  885         -
        crate::model::payload_config::Builder::default()
        2268  +
impl TopLevel {
        2269  +
    /// Creates a new builder-style object to manufacture [`TopLevel`](crate::model::TopLevel).
        2270  +
    pub fn builder() -> crate::model::top_level::Builder {
        2271  +
        crate::model::top_level::Builder::default()
  886   2272   
    }
  887   2273   
}
  888   2274   
  889   2275   
#[::pyo3::pyclass]
  890         -
/// :param timeout typing.Optional\[int\]:
        2276  +
/// :param greeting str:
        2277  +
/// :param language typing.Optional\[str\]:
        2278  +
/// :param farewell typing.Optional\[rest_json.model.Farewell\]:
  891   2279   
/// :rtype None:
  892   2280   
#[allow(missing_docs)] // documentation missing in model
  893   2281   
#[derive(
  894   2282   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  895   2283   
)]
  896         -
pub struct TestConfig {
        2284  +
pub struct Dialog {
  897   2285   
    #[pyo3(get, set)]
  898         -
    /// :type typing.Optional\[int\]:
        2286  +
    /// :type typing.Optional\[str\]:
  899   2287   
    #[allow(missing_docs)] // documentation missing in model
  900         -
    pub timeout: ::std::option::Option<i32>,
        2288  +
    pub language: ::std::option::Option<::std::string::String>,
        2289  +
    #[pyo3(get, set)]
        2290  +
    /// :type str:
        2291  +
    #[allow(missing_docs)] // documentation missing in model
        2292  +
    pub greeting: ::std::string::String,
        2293  +
    #[pyo3(get, set)]
        2294  +
    /// :type typing.Optional\[rest_json.model.Farewell\]:
        2295  +
    #[allow(missing_docs)] // documentation missing in model
        2296  +
    pub farewell: ::std::option::Option<crate::model::Farewell>,
  901   2297   
}
  902         -
impl TestConfig {
        2298  +
impl Dialog {
  903   2299   
    #[allow(missing_docs)] // documentation missing in model
  904         -
    pub fn timeout(&self) -> ::std::option::Option<i32> {
  905         -
        self.timeout
        2300  +
    pub fn language(&self) -> ::std::option::Option<&str> {
        2301  +
        self.language.as_deref()
        2302  +
    }
        2303  +
    #[allow(missing_docs)] // documentation missing in model
        2304  +
    pub fn greeting(&self) -> &str {
        2305  +
        use std::ops::Deref;
        2306  +
        self.greeting.deref()
        2307  +
    }
        2308  +
    #[allow(missing_docs)] // documentation missing in model
        2309  +
    pub fn farewell(&self) -> ::std::option::Option<&crate::model::Farewell> {
        2310  +
        self.farewell.as_ref()
  906   2311   
    }
  907   2312   
}
  908   2313   
#[allow(clippy::new_without_default)]
  909   2314   
#[allow(clippy::too_many_arguments)]
  910   2315   
#[::pyo3::pymethods]
  911         -
impl TestConfig {
        2316  +
impl Dialog {
  912   2317   
    #[new]
  913         -
    pub fn new(timeout: ::std::option::Option<i32>) -> Self {
  914         -
        Self { timeout }
        2318  +
    pub fn new(
        2319  +
        greeting: ::std::string::String,
        2320  +
        language: ::std::option::Option<::std::string::String>,
        2321  +
        farewell: ::std::option::Option<crate::model::Farewell>,
        2322  +
    ) -> Self {
        2323  +
        Self {
        2324  +
            greeting,
        2325  +
            language,
        2326  +
            farewell,
        2327  +
        }
  915   2328   
    }
  916   2329   
    fn __repr__(&self) -> String {
  917   2330   
        format!("{self:?}")
  918   2331   
    }
  919   2332   
    fn __str__(&self) -> String {
  920   2333   
        format!("{self:?}")
  921   2334   
    }
  922   2335   
}
  923         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TestConfig> {
        2336  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Dialog> {
  924   2337   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  925         -
        ob.extract::<TestConfig>().map(Box::new)
        2338  +
        ob.extract::<Dialog>().map(Box::new)
  926   2339   
    }
  927   2340   
}
  928   2341   
  929         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TestConfig> {
        2342  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Dialog> {
  930   2343   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  931   2344   
        (*self).into_py(py)
  932   2345   
    }
  933   2346   
}
  934         -
impl crate::constrained::Constrained for crate::model::TestConfig {
  935         -
    type Unconstrained = crate::model::test_config_internal::Builder;
        2347  +
impl crate::constrained::Constrained for crate::model::Dialog {
        2348  +
    type Unconstrained = crate::model::dialog_internal::Builder;
  936   2349   
}
  937         -
impl TestConfig {
  938         -
    /// Creates a new builder-style object to manufacture [`TestConfig`](crate::model::TestConfig).
  939         -
    pub fn builder() -> crate::model::test_config::Builder {
  940         -
        crate::model::test_config::Builder::default()
        2350  +
impl Dialog {
        2351  +
    /// Creates a new builder-style object to manufacture [`Dialog`](crate::model::Dialog).
        2352  +
    pub fn builder() -> crate::model::dialog::Builder {
        2353  +
        crate::model::dialog::Builder::default()
  941   2354   
    }
  942   2355   
}
  943   2356   
  944   2357   
#[allow(missing_docs)] // documentation missing in model
  945         -
#[derive(
  946         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  947         -
)]
  948         -
pub enum SimpleUnion {
        2358  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        2359  +
pub enum EventStream {
  949   2360   
    #[allow(missing_docs)] // documentation missing in model
  950         -
    Int(i32),
        2361  +
    BlobPayload(crate::model::BlobPayloadEvent),
  951   2362   
    #[allow(missing_docs)] // documentation missing in model
  952         -
    String(::std::string::String),
        2363  +
    Headers(crate::model::HeadersEvent),
        2364  +
    #[allow(missing_docs)] // documentation missing in model
        2365  +
    HeadersAndExplicitPayload(crate::model::HeadersAndExplicitPayloadEvent),
        2366  +
    #[allow(missing_docs)] // documentation missing in model
        2367  +
    HeadersAndImplicitPayload(crate::model::HeadersAndImplicitPayloadEvent),
        2368  +
    #[allow(missing_docs)] // documentation missing in model
        2369  +
    StringPayload(crate::model::StringPayloadEvent),
        2370  +
    #[allow(missing_docs)] // documentation missing in model
        2371  +
    StructurePayload(crate::model::StructurePayloadEvent),
        2372  +
    #[allow(missing_docs)] // documentation missing in model
        2373  +
    UnionPayload(crate::model::UnionPayloadEvent),
  953   2374   
}
  954         -
impl SimpleUnion {
  955         -
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
        2375  +
impl EventStream {
        2376  +
    /// Tries to convert the enum instance into [`BlobPayload`](crate::model::EventStream::BlobPayload), extracting the inner [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
  956   2377   
    /// Returns `Err(&Self)` if it can't be converted.
  957         -
    pub fn as_int(&self) -> ::std::result::Result<&i32, &Self> {
  958         -
        if let SimpleUnion::Int(val) = &self {
        2378  +
    pub fn as_blob_payload(&self) -> ::std::result::Result<&crate::model::BlobPayloadEvent, &Self> {
        2379  +
        if let EventStream::BlobPayload(val) = &self {
  959   2380   
            ::std::result::Result::Ok(val)
  960   2381   
        } else {
  961   2382   
            ::std::result::Result::Err(self)
  962   2383   
        }
  963   2384   
    }
  964         -
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
  965         -
    pub fn is_int(&self) -> bool {
  966         -
        self.as_int().is_ok()
        2385  +
    /// Returns true if this is a [`BlobPayload`](crate::model::EventStream::BlobPayload).
        2386  +
    pub fn is_blob_payload(&self) -> bool {
        2387  +
        self.as_blob_payload().is_ok()
  967   2388   
    }
  968         -
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
        2389  +
    /// Tries to convert the enum instance into [`Headers`](crate::model::EventStream::Headers), extracting the inner [`HeadersEvent`](crate::model::HeadersEvent).
  969   2390   
    /// Returns `Err(&Self)` if it can't be converted.
  970         -
    pub fn as_string(&self) -> ::std::result::Result<&::std::string::String, &Self> {
  971         -
        if let SimpleUnion::String(val) = &self {
        2391  +
    pub fn as_headers(&self) -> ::std::result::Result<&crate::model::HeadersEvent, &Self> {
        2392  +
        if let EventStream::Headers(val) = &self {
  972   2393   
            ::std::result::Result::Ok(val)
  973   2394   
        } else {
  974   2395   
            ::std::result::Result::Err(self)
  975   2396   
        }
  976   2397   
    }
  977         -
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
  978         -
    pub fn is_string(&self) -> bool {
  979         -
        self.as_string().is_ok()
  980         -
    }
  981         -
}
  982         -
#[pyo3::pyclass(name = "SimpleUnion")]
  983         -
#[derive(
  984         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  985         -
)]
  986         -
pub struct PyUnionMarkerSimpleUnion(pub SimpleUnion);
  987         -
#[::pyo3::pymethods]
  988         -
impl PyUnionMarkerSimpleUnion {
  989         -
    #[staticmethod]
  990         -
    /// Creates a new union instance of [`Int`](crate::model::SimpleUnion::Int)
  991         -
    /// :param data int:
  992         -
    /// :rtype SimpleUnion:
  993         -
    pub fn int(data: i32) -> Self {
  994         -
        Self(SimpleUnion::Int(data))
        2398  +
    /// Returns true if this is a [`Headers`](crate::model::EventStream::Headers).
        2399  +
    pub fn is_headers(&self) -> bool {
        2400  +
        self.as_headers().is_ok()
  995   2401   
    }
  996         -
    /// Tries to convert the enum instance into [`Int`](crate::model::SimpleUnion::Int), extracting the inner [`i32`](i32).
  997         -
    /// :rtype int:
  998         -
    pub fn as_int(&self) -> ::pyo3::PyResult<i32> {
  999         -
        match self.0.as_int() {
 1000         -
            Ok(variant) => Ok(*variant),
 1001         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1002         -
                r"SimpleUnion variant is not of type int",
 1003         -
            )),
        2402  +
    /// Tries to convert the enum instance into [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload), extracting the inner [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        2403  +
    /// Returns `Err(&Self)` if it can't be converted.
        2404  +
    pub fn as_headers_and_explicit_payload(
        2405  +
        &self,
        2406  +
    ) -> ::std::result::Result<&crate::model::HeadersAndExplicitPayloadEvent, &Self> {
        2407  +
        if let EventStream::HeadersAndExplicitPayload(val) = &self {
        2408  +
            ::std::result::Result::Ok(val)
        2409  +
        } else {
        2410  +
            ::std::result::Result::Err(self)
 1004   2411   
        }
 1005   2412   
    }
 1006         -
    /// Returns true if this is a [`Int`](crate::model::SimpleUnion::Int).
 1007         -
    /// :rtype bool:
 1008         -
    pub fn is_int(&self) -> bool {
 1009         -
        self.0.is_int()
 1010         -
    }
 1011         -
    #[staticmethod]
 1012         -
    /// Creates a new union instance of [`String`](crate::model::SimpleUnion::String)
 1013         -
    /// :param data str:
 1014         -
    /// :rtype SimpleUnion:
 1015         -
    pub fn string(data: ::std::string::String) -> Self {
 1016         -
        Self(SimpleUnion::String(data))
        2413  +
    /// Returns true if this is a [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload).
        2414  +
    pub fn is_headers_and_explicit_payload(&self) -> bool {
        2415  +
        self.as_headers_and_explicit_payload().is_ok()
 1017   2416   
    }
 1018         -
    /// Tries to convert the enum instance into [`String`](crate::model::SimpleUnion::String), extracting the inner [`String`](::std::string::String).
 1019         -
    /// :rtype str:
 1020         -
    pub fn as_string(&self) -> ::pyo3::PyResult<::std::string::String> {
 1021         -
        match self.0.as_string() {
 1022         -
            Ok(variant) => Ok(variant.clone()),
 1023         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1024         -
                r"SimpleUnion variant is not of type str",
 1025         -
            )),
        2417  +
    /// Tries to convert the enum instance into [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload), extracting the inner [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        2418  +
    /// Returns `Err(&Self)` if it can't be converted.
        2419  +
    pub fn as_headers_and_implicit_payload(
        2420  +
        &self,
        2421  +
    ) -> ::std::result::Result<&crate::model::HeadersAndImplicitPayloadEvent, &Self> {
        2422  +
        if let EventStream::HeadersAndImplicitPayload(val) = &self {
        2423  +
            ::std::result::Result::Ok(val)
        2424  +
        } else {
        2425  +
            ::std::result::Result::Err(self)
 1026   2426   
        }
 1027   2427   
    }
 1028         -
    /// Returns true if this is a [`String`](crate::model::SimpleUnion::String).
 1029         -
    /// :rtype bool:
 1030         -
    pub fn is_string(&self) -> bool {
 1031         -
        self.0.is_string()
 1032         -
    }
 1033         -
}
 1034         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for SimpleUnion {
 1035         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1036         -
        PyUnionMarkerSimpleUnion(self).into_py(py)
 1037         -
    }
 1038         -
}
 1039         -
impl<'source> ::pyo3::FromPyObject<'source> for SimpleUnion {
 1040         -
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1041         -
        let data: PyUnionMarkerSimpleUnion = obj.extract()?;
 1042         -
        Ok(data.0)
        2428  +
    /// Returns true if this is a [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload).
        2429  +
    pub fn is_headers_and_implicit_payload(&self) -> bool {
        2430  +
        self.as_headers_and_implicit_payload().is_ok()
 1043   2431   
    }
 1044         -
}
 1045         -
 1046         -
#[allow(missing_docs)] // documentation missing in model
 1047         -
#[derive(
 1048         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1049         -
)]
 1050         -
pub enum UnionWithJsonName {
 1051         -
    #[allow(missing_docs)] // documentation missing in model
 1052         -
    Bar(::std::string::String),
 1053         -
    #[allow(missing_docs)] // documentation missing in model
 1054         -
    Baz(::std::string::String),
 1055         -
    #[allow(missing_docs)] // documentation missing in model
 1056         -
    Foo(::std::string::String),
 1057         -
}
 1058         -
impl UnionWithJsonName {
 1059         -
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
        2432  +
    /// Tries to convert the enum instance into [`StringPayload`](crate::model::EventStream::StringPayload), extracting the inner [`StringPayloadEvent`](crate::model::StringPayloadEvent).
 1060   2433   
    /// Returns `Err(&Self)` if it can't be converted.
 1061         -
    pub fn as_bar(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1062         -
        if let UnionWithJsonName::Bar(val) = &self {
        2434  +
    pub fn as_string_payload(
        2435  +
        &self,
        2436  +
    ) -> ::std::result::Result<&crate::model::StringPayloadEvent, &Self> {
        2437  +
        if let EventStream::StringPayload(val) = &self {
 1063   2438   
            ::std::result::Result::Ok(val)
 1064   2439   
        } else {
 1065   2440   
            ::std::result::Result::Err(self)
 1066   2441   
        }
 1067   2442   
    }
 1068         -
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
 1069         -
    pub fn is_bar(&self) -> bool {
 1070         -
        self.as_bar().is_ok()
        2443  +
    /// Returns true if this is a [`StringPayload`](crate::model::EventStream::StringPayload).
        2444  +
    pub fn is_string_payload(&self) -> bool {
        2445  +
        self.as_string_payload().is_ok()
 1071   2446   
    }
 1072         -
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
        2447  +
    /// Tries to convert the enum instance into [`StructurePayload`](crate::model::EventStream::StructurePayload), extracting the inner [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
 1073   2448   
    /// Returns `Err(&Self)` if it can't be converted.
 1074         -
    pub fn as_baz(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1075         -
        if let UnionWithJsonName::Baz(val) = &self {
        2449  +
    pub fn as_structure_payload(
        2450  +
        &self,
        2451  +
    ) -> ::std::result::Result<&crate::model::StructurePayloadEvent, &Self> {
        2452  +
        if let EventStream::StructurePayload(val) = &self {
 1076   2453   
            ::std::result::Result::Ok(val)
 1077   2454   
        } else {
 1078   2455   
            ::std::result::Result::Err(self)
 1079   2456   
        }
 1080   2457   
    }
 1081         -
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
 1082         -
    pub fn is_baz(&self) -> bool {
 1083         -
        self.as_baz().is_ok()
        2458  +
    /// Returns true if this is a [`StructurePayload`](crate::model::EventStream::StructurePayload).
        2459  +
    pub fn is_structure_payload(&self) -> bool {
        2460  +
        self.as_structure_payload().is_ok()
 1084   2461   
    }
 1085         -
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
        2462  +
    /// Tries to convert the enum instance into [`UnionPayload`](crate::model::EventStream::UnionPayload), extracting the inner [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
 1086   2463   
    /// Returns `Err(&Self)` if it can't be converted.
 1087         -
    pub fn as_foo(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1088         -
        if let UnionWithJsonName::Foo(val) = &self {
        2464  +
    pub fn as_union_payload(
        2465  +
        &self,
        2466  +
    ) -> ::std::result::Result<&crate::model::UnionPayloadEvent, &Self> {
        2467  +
        if let EventStream::UnionPayload(val) = &self {
 1089   2468   
            ::std::result::Result::Ok(val)
 1090   2469   
        } else {
 1091   2470   
            ::std::result::Result::Err(self)
 1092   2471   
        }
 1093   2472   
    }
 1094         -
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
 1095         -
    pub fn is_foo(&self) -> bool {
 1096         -
        self.as_foo().is_ok()
        2473  +
    /// Returns true if this is a [`UnionPayload`](crate::model::EventStream::UnionPayload).
        2474  +
    pub fn is_union_payload(&self) -> bool {
        2475  +
        self.as_union_payload().is_ok()
 1097   2476   
    }
 1098   2477   
}
 1099         -
#[pyo3::pyclass(name = "UnionWithJsonName")]
 1100         -
#[derive(
 1101         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1102         -
)]
 1103         -
pub struct PyUnionMarkerUnionWithJsonName(pub UnionWithJsonName);
        2478  +
#[pyo3::pyclass(name = "EventStream")]
        2479  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        2480  +
pub struct PyUnionMarkerEventStream(pub EventStream);
 1104   2481   
#[::pyo3::pymethods]
 1105         -
impl PyUnionMarkerUnionWithJsonName {
        2482  +
impl PyUnionMarkerEventStream {
 1106   2483   
    #[staticmethod]
 1107         -
    /// Creates a new union instance of [`Bar`](crate::model::UnionWithJsonName::Bar)
 1108         -
    /// :param data str:
 1109         -
    /// :rtype UnionWithJsonName:
 1110         -
    pub fn bar(data: ::std::string::String) -> Self {
 1111         -
        Self(UnionWithJsonName::Bar(data))
        2484  +
    /// Creates a new union instance of [`BlobPayload`](crate::model::EventStream::BlobPayload)
        2485  +
    /// :param data rest_json.model.BlobPayloadEvent:
        2486  +
    /// :rtype EventStream:
        2487  +
    pub fn blob_payload(data: crate::model::BlobPayloadEvent) -> Self {
        2488  +
        Self(EventStream::BlobPayload(data))
        2489  +
    }
        2490  +
    /// Tries to convert the enum instance into [`BlobPayload`](crate::model::EventStream::BlobPayload), extracting the inner [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        2491  +
    /// :rtype rest_json.model.BlobPayloadEvent:
        2492  +
    pub fn as_blob_payload(&self) -> ::pyo3::PyResult<crate::model::BlobPayloadEvent> {
        2493  +
        match self.0.as_blob_payload() {
        2494  +
            Ok(variant) => Ok(variant.clone()),
        2495  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        2496  +
                r"EventStream variant is not of type rest_json.model.BlobPayloadEvent",
        2497  +
            )),
        2498  +
        }
 1112   2499   
    }
 1113         -
    /// Tries to convert the enum instance into [`Bar`](crate::model::UnionWithJsonName::Bar), extracting the inner [`String`](::std::string::String).
 1114         -
    /// :rtype str:
 1115         -
    pub fn as_bar(&self) -> ::pyo3::PyResult<::std::string::String> {
 1116         -
        match self.0.as_bar() {
        2500  +
    /// Returns true if this is a [`BlobPayload`](crate::model::EventStream::BlobPayload).
        2501  +
    /// :rtype bool:
        2502  +
    pub fn is_blob_payload(&self) -> bool {
        2503  +
        self.0.is_blob_payload()
        2504  +
    }
        2505  +
    #[staticmethod]
        2506  +
    /// Creates a new union instance of [`Headers`](crate::model::EventStream::Headers)
        2507  +
    /// :param data rest_json.model.HeadersEvent:
        2508  +
    /// :rtype EventStream:
        2509  +
    pub fn headers(data: crate::model::HeadersEvent) -> Self {
        2510  +
        Self(EventStream::Headers(data))
        2511  +
    }
        2512  +
    /// Tries to convert the enum instance into [`Headers`](crate::model::EventStream::Headers), extracting the inner [`HeadersEvent`](crate::model::HeadersEvent).
        2513  +
    /// :rtype rest_json.model.HeadersEvent:
        2514  +
    pub fn as_headers(&self) -> ::pyo3::PyResult<crate::model::HeadersEvent> {
        2515  +
        match self.0.as_headers() {
 1117   2516   
            Ok(variant) => Ok(variant.clone()),
 1118   2517   
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1119         -
                r"UnionWithJsonName variant is not of type str",
        2518  +
                r"EventStream variant is not of type rest_json.model.HeadersEvent",
 1120   2519   
            )),
 1121   2520   
        }
 1122   2521   
    }
 1123         -
    /// Returns true if this is a [`Bar`](crate::model::UnionWithJsonName::Bar).
        2522  +
    /// Returns true if this is a [`Headers`](crate::model::EventStream::Headers).
 1124   2523   
    /// :rtype bool:
 1125         -
    pub fn is_bar(&self) -> bool {
 1126         -
        self.0.is_bar()
        2524  +
    pub fn is_headers(&self) -> bool {
        2525  +
        self.0.is_headers()
 1127   2526   
    }
 1128   2527   
    #[staticmethod]
 1129         -
    /// Creates a new union instance of [`Baz`](crate::model::UnionWithJsonName::Baz)
 1130         -
    /// :param data str:
 1131         -
    /// :rtype UnionWithJsonName:
 1132         -
    pub fn baz(data: ::std::string::String) -> Self {
 1133         -
        Self(UnionWithJsonName::Baz(data))
        2528  +
    /// Creates a new union instance of [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload)
        2529  +
    /// :param data rest_json.model.HeadersAndExplicitPayloadEvent:
        2530  +
    /// :rtype EventStream:
        2531  +
    pub fn headers_and_explicit_payload(
        2532  +
        data: crate::model::HeadersAndExplicitPayloadEvent,
        2533  +
    ) -> Self {
        2534  +
        Self(EventStream::HeadersAndExplicitPayload(data))
 1134   2535   
    }
 1135         -
    /// Tries to convert the enum instance into [`Baz`](crate::model::UnionWithJsonName::Baz), extracting the inner [`String`](::std::string::String).
 1136         -
    /// :rtype str:
 1137         -
    pub fn as_baz(&self) -> ::pyo3::PyResult<::std::string::String> {
 1138         -
        match self.0.as_baz() {
        2536  +
    /// Tries to convert the enum instance into [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload), extracting the inner [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        2537  +
    /// :rtype rest_json.model.HeadersAndExplicitPayloadEvent:
        2538  +
    pub fn as_headers_and_explicit_payload(
        2539  +
        &self,
        2540  +
    ) -> ::pyo3::PyResult<crate::model::HeadersAndExplicitPayloadEvent> {
        2541  +
        match self.0.as_headers_and_explicit_payload() {
 1139   2542   
            Ok(variant) => Ok(variant.clone()),
 1140   2543   
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1141         -
                r"UnionWithJsonName variant is not of type str",
        2544  +
                r"EventStream variant is not of type rest_json.model.HeadersAndExplicitPayloadEvent",
 1142   2545   
            )),
 1143   2546   
        }
 1144   2547   
    }
 1145         -
    /// Returns true if this is a [`Baz`](crate::model::UnionWithJsonName::Baz).
        2548  +
    /// Returns true if this is a [`HeadersAndExplicitPayload`](crate::model::EventStream::HeadersAndExplicitPayload).
 1146   2549   
    /// :rtype bool:
 1147         -
    pub fn is_baz(&self) -> bool {
 1148         -
        self.0.is_baz()
        2550  +
    pub fn is_headers_and_explicit_payload(&self) -> bool {
        2551  +
        self.0.is_headers_and_explicit_payload()
 1149   2552   
    }
 1150   2553   
    #[staticmethod]
 1151         -
    /// Creates a new union instance of [`Foo`](crate::model::UnionWithJsonName::Foo)
 1152         -
    /// :param data str:
 1153         -
    /// :rtype UnionWithJsonName:
 1154         -
    pub fn foo(data: ::std::string::String) -> Self {
 1155         -
        Self(UnionWithJsonName::Foo(data))
        2554  +
    /// Creates a new union instance of [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload)
        2555  +
    /// :param data rest_json.model.HeadersAndImplicitPayloadEvent:
        2556  +
    /// :rtype EventStream:
        2557  +
    pub fn headers_and_implicit_payload(
        2558  +
        data: crate::model::HeadersAndImplicitPayloadEvent,
        2559  +
    ) -> Self {
        2560  +
        Self(EventStream::HeadersAndImplicitPayload(data))
 1156   2561   
    }
 1157         -
    /// Tries to convert the enum instance into [`Foo`](crate::model::UnionWithJsonName::Foo), extracting the inner [`String`](::std::string::String).
 1158         -
    /// :rtype str:
 1159         -
    pub fn as_foo(&self) -> ::pyo3::PyResult<::std::string::String> {
 1160         -
        match self.0.as_foo() {
        2562  +
    /// Tries to convert the enum instance into [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload), extracting the inner [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        2563  +
    /// :rtype rest_json.model.HeadersAndImplicitPayloadEvent:
        2564  +
    pub fn as_headers_and_implicit_payload(
        2565  +
        &self,
        2566  +
    ) -> ::pyo3::PyResult<crate::model::HeadersAndImplicitPayloadEvent> {
        2567  +
        match self.0.as_headers_and_implicit_payload() {
 1161   2568   
            Ok(variant) => Ok(variant.clone()),
 1162   2569   
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1163         -
                r"UnionWithJsonName variant is not of type str",
        2570  +
                r"EventStream variant is not of type rest_json.model.HeadersAndImplicitPayloadEvent",
 1164   2571   
            )),
 1165   2572   
        }
 1166   2573   
    }
 1167         -
    /// Returns true if this is a [`Foo`](crate::model::UnionWithJsonName::Foo).
        2574  +
    /// Returns true if this is a [`HeadersAndImplicitPayload`](crate::model::EventStream::HeadersAndImplicitPayload).
 1168   2575   
    /// :rtype bool:
 1169         -
    pub fn is_foo(&self) -> bool {
 1170         -
        self.0.is_foo()
        2576  +
    pub fn is_headers_and_implicit_payload(&self) -> bool {
        2577  +
        self.0.is_headers_and_implicit_payload()
        2578  +
    }
        2579  +
    #[staticmethod]
        2580  +
    /// Creates a new union instance of [`StringPayload`](crate::model::EventStream::StringPayload)
        2581  +
    /// :param data rest_json.model.StringPayloadEvent:
        2582  +
    /// :rtype EventStream:
        2583  +
    pub fn string_payload(data: crate::model::StringPayloadEvent) -> Self {
        2584  +
        Self(EventStream::StringPayload(data))
        2585  +
    }
        2586  +
    /// Tries to convert the enum instance into [`StringPayload`](crate::model::EventStream::StringPayload), extracting the inner [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        2587  +
    /// :rtype rest_json.model.StringPayloadEvent:
        2588  +
    pub fn as_string_payload(&self) -> ::pyo3::PyResult<crate::model::StringPayloadEvent> {
        2589  +
        match self.0.as_string_payload() {
        2590  +
            Ok(variant) => Ok(variant.clone()),
        2591  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        2592  +
                r"EventStream variant is not of type rest_json.model.StringPayloadEvent",
        2593  +
            )),
        2594  +
        }
        2595  +
    }
        2596  +
    /// Returns true if this is a [`StringPayload`](crate::model::EventStream::StringPayload).
        2597  +
    /// :rtype bool:
        2598  +
    pub fn is_string_payload(&self) -> bool {
        2599  +
        self.0.is_string_payload()
        2600  +
    }
        2601  +
    #[staticmethod]
        2602  +
    /// Creates a new union instance of [`StructurePayload`](crate::model::EventStream::StructurePayload)
        2603  +
    /// :param data rest_json.model.StructurePayloadEvent:
        2604  +
    /// :rtype EventStream:
        2605  +
    pub fn structure_payload(data: crate::model::StructurePayloadEvent) -> Self {
        2606  +
        Self(EventStream::StructurePayload(data))
        2607  +
    }
        2608  +
    /// Tries to convert the enum instance into [`StructurePayload`](crate::model::EventStream::StructurePayload), extracting the inner [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        2609  +
    /// :rtype rest_json.model.StructurePayloadEvent:
        2610  +
    pub fn as_structure_payload(&self) -> ::pyo3::PyResult<crate::model::StructurePayloadEvent> {
        2611  +
        match self.0.as_structure_payload() {
        2612  +
            Ok(variant) => Ok(variant.clone()),
        2613  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        2614  +
                r"EventStream variant is not of type rest_json.model.StructurePayloadEvent",
        2615  +
            )),
        2616  +
        }
        2617  +
    }
        2618  +
    /// Returns true if this is a [`StructurePayload`](crate::model::EventStream::StructurePayload).
        2619  +
    /// :rtype bool:
        2620  +
    pub fn is_structure_payload(&self) -> bool {
        2621  +
        self.0.is_structure_payload()
        2622  +
    }
        2623  +
    #[staticmethod]
        2624  +
    /// Creates a new union instance of [`UnionPayload`](crate::model::EventStream::UnionPayload)
        2625  +
    /// :param data rest_json.model.UnionPayloadEvent:
        2626  +
    /// :rtype EventStream:
        2627  +
    pub fn union_payload(data: crate::model::UnionPayloadEvent) -> Self {
        2628  +
        Self(EventStream::UnionPayload(data))
        2629  +
    }
        2630  +
    /// Tries to convert the enum instance into [`UnionPayload`](crate::model::EventStream::UnionPayload), extracting the inner [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        2631  +
    /// :rtype rest_json.model.UnionPayloadEvent:
        2632  +
    pub fn as_union_payload(&self) -> ::pyo3::PyResult<crate::model::UnionPayloadEvent> {
        2633  +
        match self.0.as_union_payload() {
        2634  +
            Ok(variant) => Ok(variant.clone()),
        2635  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        2636  +
                r"EventStream variant is not of type rest_json.model.UnionPayloadEvent",
        2637  +
            )),
        2638  +
        }
        2639  +
    }
        2640  +
    /// Returns true if this is a [`UnionPayload`](crate::model::EventStream::UnionPayload).
        2641  +
    /// :rtype bool:
        2642  +
    pub fn is_union_payload(&self) -> bool {
        2643  +
        self.0.is_union_payload()
 1171   2644   
    }
 1172   2645   
}
 1173         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionWithJsonName {
        2646  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for EventStream {
 1174   2647   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1175         -
        PyUnionMarkerUnionWithJsonName(self).into_py(py)
        2648  +
        PyUnionMarkerEventStream(self).into_py(py)
 1176   2649   
    }
 1177   2650   
}
 1178         -
impl<'source> ::pyo3::FromPyObject<'source> for UnionWithJsonName {
        2651  +
impl<'source> ::pyo3::FromPyObject<'source> for EventStream {
 1179   2652   
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1180         -
        let data: PyUnionMarkerUnionWithJsonName = obj.extract()?;
        2653  +
        let data: PyUnionMarkerEventStream = obj.extract()?;
 1181   2654   
        Ok(data.0)
 1182   2655   
    }
 1183   2656   
}
 1184   2657   
 1185   2658   
#[allow(missing_docs)] // documentation missing in model
 1186   2659   
#[derive(
 1187   2660   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1188   2661   
)]
 1189         -
pub enum PlayerAction {
 1190         -
    /// Quit the game.
 1191         -
    Quit,
        2662  +
pub enum SingletonEventStream {
        2663  +
    #[allow(missing_docs)] // documentation missing in model
        2664  +
    Singleton(crate::model::SingletonEvent),
 1192   2665   
}
 1193         -
impl PlayerAction {
        2666  +
impl SingletonEventStream {
 1194   2667   
    #[allow(irrefutable_let_patterns)]
 1195         -
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
        2668  +
    /// Tries to convert the enum instance into [`Singleton`](crate::model::SingletonEventStream::Singleton), extracting the inner [`SingletonEvent`](crate::model::SingletonEvent).
 1196   2669   
    /// Returns `Err(&Self)` if it can't be converted.
 1197         -
    pub fn as_quit(&self) -> ::std::result::Result<(), &Self> {
 1198         -
        if let PlayerAction::Quit = &self {
 1199         -
            ::std::result::Result::Ok(())
        2670  +
    pub fn as_singleton(&self) -> ::std::result::Result<&crate::model::SingletonEvent, &Self> {
        2671  +
        if let SingletonEventStream::Singleton(val) = &self {
        2672  +
            ::std::result::Result::Ok(val)
 1200   2673   
        } else {
 1201   2674   
            ::std::result::Result::Err(self)
 1202   2675   
        }
 1203   2676   
    }
 1204         -
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
 1205         -
    pub fn is_quit(&self) -> bool {
 1206         -
        self.as_quit().is_ok()
        2677  +
    /// Returns true if this is a [`Singleton`](crate::model::SingletonEventStream::Singleton).
        2678  +
    pub fn is_singleton(&self) -> bool {
        2679  +
        self.as_singleton().is_ok()
 1207   2680   
    }
 1208   2681   
}
 1209         -
#[pyo3::pyclass(name = "PlayerAction")]
        2682  +
#[pyo3::pyclass(name = "SingletonEventStream")]
 1210   2683   
#[derive(
 1211   2684   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1212   2685   
)]
 1213         -
pub struct PyUnionMarkerPlayerAction(pub PlayerAction);
        2686  +
pub struct PyUnionMarkerSingletonEventStream(pub SingletonEventStream);
 1214   2687   
#[::pyo3::pymethods]
 1215         -
impl PyUnionMarkerPlayerAction {
        2688  +
impl PyUnionMarkerSingletonEventStream {
 1216   2689   
    #[allow(irrefutable_let_patterns)]
 1217   2690   
    #[staticmethod]
 1218         -
    /// Creates a new union instance of [`Quit`](crate::model::PlayerAction::Quit)
 1219         -
    /// :rtype PlayerAction:
 1220         -
    pub fn quit() -> Self {
 1221         -
        Self(PlayerAction::Quit)
 1222         -
    }
 1223         -
    /// Tries to convert the enum instance into [`Quit`](crate::model::PlayerAction::Quit), extracting the inner `()`.
 1224         -
    /// :rtype None:
 1225         -
    pub fn as_quit(&self) -> ::pyo3::PyResult<()> {
 1226         -
        self.0.as_quit().map_err(|_| {
 1227         -
            ::pyo3::exceptions::PyValueError::new_err("PlayerAction variant is not None")
 1228         -
        })
        2691  +
    /// Creates a new union instance of [`Singleton`](crate::model::SingletonEventStream::Singleton)
        2692  +
    /// :param data rest_json.model.SingletonEvent:
        2693  +
    /// :rtype SingletonEventStream:
        2694  +
    pub fn singleton(data: crate::model::SingletonEvent) -> Self {
        2695  +
        Self(SingletonEventStream::Singleton(data))
        2696  +
    }
        2697  +
    /// Tries to convert the enum instance into [`Singleton`](crate::model::SingletonEventStream::Singleton), extracting the inner [`SingletonEvent`](crate::model::SingletonEvent).
        2698  +
    /// :rtype rest_json.model.SingletonEvent:
        2699  +
    pub fn as_singleton(&self) -> ::pyo3::PyResult<crate::model::SingletonEvent> {
        2700  +
        match self.0.as_singleton() {
        2701  +
            Ok(variant) => Ok(variant.clone()),
        2702  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        2703  +
                r"SingletonEventStream variant is not of type rest_json.model.SingletonEvent",
        2704  +
            )),
        2705  +
        }
 1229   2706   
    }
 1230         -
    /// Returns true if this is a [`Quit`](crate::model::PlayerAction::Quit).
        2707  +
    /// Returns true if this is a [`Singleton`](crate::model::SingletonEventStream::Singleton).
 1231   2708   
    /// :rtype bool:
 1232         -
    pub fn is_quit(&self) -> bool {
 1233         -
        self.0.is_quit()
        2709  +
    pub fn is_singleton(&self) -> bool {
        2710  +
        self.0.is_singleton()
 1234   2711   
    }
 1235   2712   
}
 1236         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for PlayerAction {
        2713  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for SingletonEventStream {
 1237   2714   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1238         -
        PyUnionMarkerPlayerAction(self).into_py(py)
        2715  +
        PyUnionMarkerSingletonEventStream(self).into_py(py)
 1239   2716   
    }
 1240   2717   
}
 1241         -
impl<'source> ::pyo3::FromPyObject<'source> for PlayerAction {
        2718  +
impl<'source> ::pyo3::FromPyObject<'source> for SingletonEventStream {
 1242   2719   
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1243         -
        let data: PyUnionMarkerPlayerAction = obj.extract()?;
        2720  +
        let data: PyUnionMarkerSingletonEventStream = obj.extract()?;
 1244   2721   
        Ok(data.0)
 1245   2722   
    }
 1246   2723   
}
 1247   2724   
 1248   2725   
#[::pyo3::pyclass]
        2726  +
/// :param path str:
        2727  +
/// :param message str:
 1249   2728   
/// :rtype None:
 1250         -
#[allow(missing_docs)] // documentation missing in model
        2729  +
/// Describes one specific validation failure for an input member.
 1251   2730   
#[derive(
 1252   2731   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1253   2732   
)]
 1254         -
pub struct Unit {}
        2733  +
pub struct ValidationExceptionField {
        2734  +
    #[pyo3(get, set)]
        2735  +
    /// :type str:
        2736  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        2737  +
    pub path: ::std::string::String,
        2738  +
    #[pyo3(get, set)]
        2739  +
    /// :type str:
        2740  +
    /// A detailed description of the validation failure.
        2741  +
    pub message: ::std::string::String,
        2742  +
}
        2743  +
impl ValidationExceptionField {
        2744  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        2745  +
    pub fn path(&self) -> &str {
        2746  +
        use std::ops::Deref;
        2747  +
        self.path.deref()
        2748  +
    }
        2749  +
    /// A detailed description of the validation failure.
        2750  +
    pub fn message(&self) -> &str {
        2751  +
        use std::ops::Deref;
        2752  +
        self.message.deref()
        2753  +
    }
        2754  +
}
 1255   2755   
#[allow(clippy::new_without_default)]
 1256   2756   
#[allow(clippy::too_many_arguments)]
 1257   2757   
#[::pyo3::pymethods]
 1258         -
impl Unit {
        2758  +
impl ValidationExceptionField {
 1259   2759   
    #[new]
 1260         -
    pub fn new() -> Self {
 1261         -
        Self {}
        2760  +
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
        2761  +
        Self { path, message }
 1262   2762   
    }
 1263   2763   
    fn __repr__(&self) -> String {
 1264   2764   
        format!("{self:?}")
 1265   2765   
    }
 1266   2766   
    fn __str__(&self) -> String {
 1267   2767   
        format!("{self:?}")
 1268   2768   
    }
 1269   2769   
}
 1270         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Unit> {
        2770  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
 1271   2771   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1272         -
        ob.extract::<Unit>().map(Box::new)
        2772  +
        ob.extract::<ValidationExceptionField>().map(Box::new)
 1273   2773   
    }
 1274   2774   
}
 1275   2775   
 1276         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Unit> {
        2776  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
 1277   2777   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1278   2778   
        (*self).into_py(py)
 1279   2779   
    }
 1280   2780   
}
 1281         -
impl crate::constrained::Constrained for crate::model::Unit {
 1282         -
    type Unconstrained = crate::model::unit_internal::Builder;
 1283         -
}
 1284         -
impl Unit {
 1285         -
    /// Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
 1286         -
    pub fn builder() -> crate::model::unit::Builder {
 1287         -
        crate::model::unit::Builder::default()
        2781  +
impl ValidationExceptionField {
        2782  +
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        2783  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
        2784  +
        crate::model::validation_exception_field::Builder::default()
 1288   2785   
    }
 1289   2786   
}
 1290   2787   
 1291         -
/// A union with a representative set of types for members.
 1292         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
 1293         -
pub enum MyUnion {
 1294         -
    #[allow(missing_docs)] // documentation missing in model
 1295         -
    BlobValue(::aws_smithy_http_server_python::types::Blob),
 1296         -
    #[allow(missing_docs)] // documentation missing in model
 1297         -
    BooleanValue(bool),
 1298         -
    #[allow(missing_docs)] // documentation missing in model
 1299         -
    EnumValue(crate::model::FooEnum),
 1300         -
    #[allow(missing_docs)] // documentation missing in model
 1301         -
    ListValue(::std::vec::Vec<::std::string::String>),
 1302         -
    #[allow(missing_docs)] // documentation missing in model
 1303         -
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
 1304         -
    #[allow(missing_docs)] // documentation missing in model
 1305         -
    NumberValue(i32),
        2788  +
#[::pyo3::pyclass]
        2789  +
/// :param bar typing.Optional\[str\]:
        2790  +
/// :param recursive_member typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
        2791  +
/// :rtype None:
        2792  +
#[allow(missing_docs)] // documentation missing in model
        2793  +
#[derive(
        2794  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2795  +
)]
        2796  +
pub struct RecursiveShapesInputOutputNested2 {
        2797  +
    #[pyo3(get, set)]
        2798  +
    /// :type typing.Optional\[str\]:
 1306   2799   
    #[allow(missing_docs)] // documentation missing in model
 1307         -
    RenamedStructureValue(crate::model::RenamedGreeting),
        2800  +
    pub bar: ::std::option::Option<::std::string::String>,
        2801  +
    #[pyo3(get, set)]
        2802  +
    /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
 1308   2803   
    #[allow(missing_docs)] // documentation missing in model
 1309         -
    StringValue(::std::string::String),
        2804  +
    pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        2805  +
}
        2806  +
impl RecursiveShapesInputOutputNested2 {
 1310   2807   
    #[allow(missing_docs)] // documentation missing in model
 1311         -
    StructureValue(crate::model::GreetingStruct),
        2808  +
    pub fn bar(&self) -> ::std::option::Option<&str> {
        2809  +
        self.bar.as_deref()
        2810  +
    }
 1312   2811   
    #[allow(missing_docs)] // documentation missing in model
 1313         -
    TimestampValue(::aws_smithy_http_server_python::types::DateTime),
 1314         -
}
 1315         -
impl MyUnion {
 1316         -
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
 1317         -
    /// Returns `Err(&Self)` if it can't be converted.
 1318         -
    pub fn as_blob_value(
        2812  +
    pub fn recursive_member(
 1319   2813   
        &self,
 1320         -
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
 1321         -
        if let MyUnion::BlobValue(val) = &self {
 1322         -
            ::std::result::Result::Ok(val)
 1323         -
        } else {
 1324         -
            ::std::result::Result::Err(self)
 1325         -
        }
 1326         -
    }
 1327         -
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
 1328         -
    pub fn is_blob_value(&self) -> bool {
 1329         -
        self.as_blob_value().is_ok()
        2814  +
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
        2815  +
        self.recursive_member.as_ref()
 1330   2816   
    }
 1331         -
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
 1332         -
    /// Returns `Err(&Self)` if it can't be converted.
 1333         -
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
 1334         -
        if let MyUnion::BooleanValue(val) = &self {
 1335         -
            ::std::result::Result::Ok(val)
 1336         -
        } else {
 1337         -
            ::std::result::Result::Err(self)
        2817  +
}
        2818  +
#[allow(clippy::new_without_default)]
        2819  +
#[allow(clippy::too_many_arguments)]
        2820  +
#[::pyo3::pymethods]
        2821  +
impl RecursiveShapesInputOutputNested2 {
        2822  +
    #[new]
        2823  +
    pub fn new(
        2824  +
        bar: ::std::option::Option<::std::string::String>,
        2825  +
        recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        2826  +
    ) -> Self {
        2827  +
        Self {
        2828  +
            bar,
        2829  +
            recursive_member,
 1338   2830   
        }
 1339   2831   
    }
 1340         -
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
 1341         -
    pub fn is_boolean_value(&self) -> bool {
 1342         -
        self.as_boolean_value().is_ok()
        2832  +
    fn __repr__(&self) -> String {
        2833  +
        format!("{self:?}")
 1343   2834   
    }
 1344         -
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
 1345         -
    /// Returns `Err(&Self)` if it can't be converted.
 1346         -
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
 1347         -
        if let MyUnion::EnumValue(val) = &self {
 1348         -
            ::std::result::Result::Ok(val)
 1349         -
        } else {
 1350         -
            ::std::result::Result::Err(self)
 1351         -
        }
        2835  +
    fn __str__(&self) -> String {
        2836  +
        format!("{self:?}")
 1352   2837   
    }
 1353         -
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
 1354         -
    pub fn is_enum_value(&self) -> bool {
 1355         -
        self.as_enum_value().is_ok()
        2838  +
}
        2839  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
        2840  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        2841  +
        ob.extract::<RecursiveShapesInputOutputNested2>()
        2842  +
            .map(Box::new)
 1356   2843   
    }
 1357         -
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
 1358         -
    /// Returns `Err(&Self)` if it can't be converted.
 1359         -
    pub fn as_list_value(
 1360         -
        &self,
 1361         -
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
 1362         -
        if let MyUnion::ListValue(val) = &self {
 1363         -
            ::std::result::Result::Ok(val)
 1364         -
        } else {
 1365         -
            ::std::result::Result::Err(self)
 1366         -
        }
        2844  +
}
        2845  +
        2846  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
        2847  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        2848  +
        (*self).into_py(py)
 1367   2849   
    }
 1368         -
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
 1369         -
    pub fn is_list_value(&self) -> bool {
 1370         -
        self.as_list_value().is_ok()
        2850  +
}
        2851  +
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
        2852  +
    type Unconstrained = crate::model::recursive_shapes_input_output_nested2_internal::Builder;
        2853  +
}
        2854  +
impl RecursiveShapesInputOutputNested2 {
        2855  +
    /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        2856  +
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
        2857  +
        crate::model::recursive_shapes_input_output_nested2::Builder::default()
 1371   2858   
    }
 1372         -
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
 1373         -
    /// Returns `Err(&Self)` if it can't be converted.
 1374         -
    pub fn as_map_value(
 1375         -
        &self,
 1376         -
    ) -> ::std::result::Result<
 1377         -
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1378         -
        &Self,
 1379         -
    > {
 1380         -
        if let MyUnion::MapValue(val) = &self {
 1381         -
            ::std::result::Result::Ok(val)
 1382         -
        } else {
 1383         -
            ::std::result::Result::Err(self)
 1384         -
        }
        2859  +
}
        2860  +
        2861  +
#[::pyo3::pyclass]
        2862  +
/// :param a typing.Optional\[str\]:
        2863  +
/// :param b typing.Optional\[str\]:
        2864  +
/// :rtype None:
        2865  +
#[allow(missing_docs)] // documentation missing in model
        2866  +
#[derive(
        2867  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2868  +
)]
        2869  +
pub struct StructureListMember {
        2870  +
    #[pyo3(get, set)]
        2871  +
    /// :type typing.Optional\[str\]:
        2872  +
    #[allow(missing_docs)] // documentation missing in model
        2873  +
    pub a: ::std::option::Option<::std::string::String>,
        2874  +
    #[pyo3(get, set)]
        2875  +
    /// :type typing.Optional\[str\]:
        2876  +
    #[allow(missing_docs)] // documentation missing in model
        2877  +
    pub b: ::std::option::Option<::std::string::String>,
        2878  +
}
        2879  +
impl StructureListMember {
        2880  +
    #[allow(missing_docs)] // documentation missing in model
        2881  +
    pub fn a(&self) -> ::std::option::Option<&str> {
        2882  +
        self.a.as_deref()
 1385   2883   
    }
 1386         -
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
 1387         -
    pub fn is_map_value(&self) -> bool {
 1388         -
        self.as_map_value().is_ok()
        2884  +
    #[allow(missing_docs)] // documentation missing in model
        2885  +
    pub fn b(&self) -> ::std::option::Option<&str> {
        2886  +
        self.b.as_deref()
        2887  +
    }
        2888  +
}
        2889  +
#[allow(clippy::new_without_default)]
        2890  +
#[allow(clippy::too_many_arguments)]
        2891  +
#[::pyo3::pymethods]
        2892  +
impl StructureListMember {
        2893  +
    #[new]
        2894  +
    pub fn new(
        2895  +
        a: ::std::option::Option<::std::string::String>,
        2896  +
        b: ::std::option::Option<::std::string::String>,
        2897  +
    ) -> Self {
        2898  +
        Self { a, b }
 1389   2899   
    }
 1390         -
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
 1391         -
    /// Returns `Err(&Self)` if it can't be converted.
 1392         -
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
 1393         -
        if let MyUnion::NumberValue(val) = &self {
 1394         -
            ::std::result::Result::Ok(val)
 1395         -
        } else {
 1396         -
            ::std::result::Result::Err(self)
 1397         -
        }
        2900  +
    fn __repr__(&self) -> String {
        2901  +
        format!("{self:?}")
 1398   2902   
    }
 1399         -
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
 1400         -
    pub fn is_number_value(&self) -> bool {
 1401         -
        self.as_number_value().is_ok()
        2903  +
    fn __str__(&self) -> String {
        2904  +
        format!("{self:?}")
 1402   2905   
    }
 1403         -
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
 1404         -
    /// Returns `Err(&Self)` if it can't be converted.
 1405         -
    pub fn as_renamed_structure_value(
 1406         -
        &self,
 1407         -
    ) -> ::std::result::Result<&crate::model::RenamedGreeting, &Self> {
 1408         -
        if let MyUnion::RenamedStructureValue(val) = &self {
 1409         -
            ::std::result::Result::Ok(val)
 1410         -
        } else {
 1411         -
            ::std::result::Result::Err(self)
 1412         -
        }
        2906  +
}
        2907  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructureListMember> {
        2908  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        2909  +
        ob.extract::<StructureListMember>().map(Box::new)
 1413   2910   
    }
 1414         -
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
 1415         -
    pub fn is_renamed_structure_value(&self) -> bool {
 1416         -
        self.as_renamed_structure_value().is_ok()
        2911  +
}
        2912  +
        2913  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructureListMember> {
        2914  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        2915  +
        (*self).into_py(py)
 1417   2916   
    }
 1418         -
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
 1419         -
    /// Returns `Err(&Self)` if it can't be converted.
 1420         -
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 1421         -
        if let MyUnion::StringValue(val) = &self {
 1422         -
            ::std::result::Result::Ok(val)
 1423         -
        } else {
 1424         -
            ::std::result::Result::Err(self)
 1425         -
        }
        2917  +
}
        2918  +
impl crate::constrained::Constrained for crate::model::StructureListMember {
        2919  +
    type Unconstrained = crate::model::structure_list_member_internal::Builder;
        2920  +
}
        2921  +
impl StructureListMember {
        2922  +
    /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
        2923  +
    pub fn builder() -> crate::model::structure_list_member::Builder {
        2924  +
        crate::model::structure_list_member::Builder::default()
 1426   2925   
    }
 1427         -
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
 1428         -
    pub fn is_string_value(&self) -> bool {
 1429         -
        self.as_string_value().is_ok()
        2926  +
}
        2927  +
        2928  +
#[::pyo3::pyclass]
        2929  +
/// :param hi typing.Optional\[str\]:
        2930  +
/// :rtype None:
        2931  +
#[allow(missing_docs)] // documentation missing in model
        2932  +
#[derive(
        2933  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2934  +
)]
        2935  +
pub struct GreetingStruct {
        2936  +
    #[pyo3(get, set)]
        2937  +
    /// :type typing.Optional\[str\]:
        2938  +
    #[allow(missing_docs)] // documentation missing in model
        2939  +
    pub hi: ::std::option::Option<::std::string::String>,
        2940  +
}
        2941  +
impl GreetingStruct {
        2942  +
    #[allow(missing_docs)] // documentation missing in model
        2943  +
    pub fn hi(&self) -> ::std::option::Option<&str> {
        2944  +
        self.hi.as_deref()
 1430   2945   
    }
 1431         -
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
 1432         -
    /// Returns `Err(&Self)` if it can't be converted.
 1433         -
    pub fn as_structure_value(
 1434         -
        &self,
 1435         -
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
 1436         -
        if let MyUnion::StructureValue(val) = &self {
 1437         -
            ::std::result::Result::Ok(val)
 1438         -
        } else {
 1439         -
            ::std::result::Result::Err(self)
 1440         -
        }
        2946  +
}
        2947  +
#[allow(clippy::new_without_default)]
        2948  +
#[allow(clippy::too_many_arguments)]
        2949  +
#[::pyo3::pymethods]
        2950  +
impl GreetingStruct {
        2951  +
    #[new]
        2952  +
    pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
        2953  +
        Self { hi }
 1441   2954   
    }
 1442         -
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
 1443         -
    pub fn is_structure_value(&self) -> bool {
 1444         -
        self.as_structure_value().is_ok()
        2955  +
    fn __repr__(&self) -> String {
        2956  +
        format!("{self:?}")
 1445   2957   
    }
 1446         -
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
 1447         -
    /// Returns `Err(&Self)` if it can't be converted.
 1448         -
    pub fn as_timestamp_value(
 1449         -
        &self,
 1450         -
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
 1451         -
        if let MyUnion::TimestampValue(val) = &self {
 1452         -
            ::std::result::Result::Ok(val)
 1453         -
        } else {
 1454         -
            ::std::result::Result::Err(self)
 1455         -
        }
        2958  +
    fn __str__(&self) -> String {
        2959  +
        format!("{self:?}")
 1456   2960   
    }
 1457         -
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
 1458         -
    pub fn is_timestamp_value(&self) -> bool {
 1459         -
        self.as_timestamp_value().is_ok()
        2961  +
}
        2962  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
        2963  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        2964  +
        ob.extract::<GreetingStruct>().map(Box::new)
 1460   2965   
    }
 1461   2966   
}
 1462         -
#[pyo3::pyclass(name = "MyUnion")]
 1463         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
 1464         -
pub struct PyUnionMarkerMyUnion(pub MyUnion);
 1465         -
#[::pyo3::pymethods]
 1466         -
impl PyUnionMarkerMyUnion {
 1467         -
    #[staticmethod]
 1468         -
    /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
 1469         -
    /// :param data rest_json.types.Blob:
 1470         -
    /// :rtype MyUnion:
 1471         -
    pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
 1472         -
        Self(MyUnion::BlobValue(data))
        2967  +
        2968  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
        2969  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        2970  +
        (*self).into_py(py)
 1473   2971   
    }
 1474         -
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
 1475         -
    /// :rtype rest_json.types.Blob:
 1476         -
    pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
 1477         -
        match self.0.as_blob_value() {
 1478         -
            Ok(variant) => Ok(variant.clone()),
 1479         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1480         -
                r"MyUnion variant is not of type rest_json.types.Blob",
 1481         -
            )),
 1482         -
        }
        2972  +
}
        2973  +
impl crate::constrained::Constrained for crate::model::GreetingStruct {
        2974  +
    type Unconstrained = crate::model::greeting_struct_internal::Builder;
        2975  +
}
        2976  +
impl GreetingStruct {
        2977  +
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
        2978  +
    pub fn builder() -> crate::model::greeting_struct::Builder {
        2979  +
        crate::model::greeting_struct::Builder::default()
 1483   2980   
    }
 1484         -
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
 1485         -
    /// :rtype bool:
 1486         -
    pub fn is_blob_value(&self) -> bool {
 1487         -
        self.0.is_blob_value()
        2981  +
}
        2982  +
        2983  +
#[::pyo3::pyclass]
        2984  +
/// :param salutation typing.Optional\[str\]:
        2985  +
/// :rtype None:
        2986  +
#[allow(missing_docs)] // documentation missing in model
        2987  +
#[derive(
        2988  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        2989  +
)]
        2990  +
pub struct RenamedGreeting {
        2991  +
    #[pyo3(get, set)]
        2992  +
    /// :type typing.Optional\[str\]:
        2993  +
    #[allow(missing_docs)] // documentation missing in model
        2994  +
    pub salutation: ::std::option::Option<::std::string::String>,
        2995  +
}
        2996  +
impl RenamedGreeting {
        2997  +
    #[allow(missing_docs)] // documentation missing in model
        2998  +
    pub fn salutation(&self) -> ::std::option::Option<&str> {
        2999  +
        self.salutation.as_deref()
 1488   3000   
    }
 1489         -
    #[staticmethod]
 1490         -
    /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
 1491         -
    /// :param data bool:
 1492         -
    /// :rtype MyUnion:
 1493         -
    pub fn boolean_value(data: bool) -> Self {
 1494         -
        Self(MyUnion::BooleanValue(data))
        3001  +
}
        3002  +
#[allow(clippy::new_without_default)]
        3003  +
#[allow(clippy::too_many_arguments)]
        3004  +
#[::pyo3::pymethods]
        3005  +
impl RenamedGreeting {
        3006  +
    #[new]
        3007  +
    pub fn new(salutation: ::std::option::Option<::std::string::String>) -> Self {
        3008  +
        Self { salutation }
 1495   3009   
    }
 1496         -
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
 1497         -
    /// :rtype bool:
 1498         -
    pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
 1499         -
        match self.0.as_boolean_value() {
 1500         -
            Ok(variant) => Ok(*variant),
 1501         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1502         -
                r"MyUnion variant is not of type bool",
 1503         -
            )),
 1504         -
        }
        3010  +
    fn __repr__(&self) -> String {
        3011  +
        format!("{self:?}")
 1505   3012   
    }
 1506         -
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
 1507         -
    /// :rtype bool:
 1508         -
    pub fn is_boolean_value(&self) -> bool {
 1509         -
        self.0.is_boolean_value()
        3013  +
    fn __str__(&self) -> String {
        3014  +
        format!("{self:?}")
 1510   3015   
    }
 1511         -
    #[staticmethod]
 1512         -
    /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
 1513         -
    /// :param data rest_json.model.FooEnum:
 1514         -
    /// :rtype MyUnion:
 1515         -
    pub fn enum_value(data: crate::model::FooEnum) -> Self {
 1516         -
        Self(MyUnion::EnumValue(data))
        3016  +
}
        3017  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RenamedGreeting> {
        3018  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3019  +
        ob.extract::<RenamedGreeting>().map(Box::new)
 1517   3020   
    }
 1518         -
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
 1519         -
    /// :rtype rest_json.model.FooEnum:
 1520         -
    pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
 1521         -
        match self.0.as_enum_value() {
 1522         -
            Ok(variant) => Ok(variant.clone()),
 1523         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1524         -
                r"MyUnion variant is not of type rest_json.model.FooEnum",
 1525         -
            )),
 1526         -
        }
        3021  +
}
        3022  +
        3023  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RenamedGreeting> {
        3024  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        3025  +
        (*self).into_py(py)
 1527   3026   
    }
 1528         -
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
 1529         -
    /// :rtype bool:
 1530         -
    pub fn is_enum_value(&self) -> bool {
 1531         -
        self.0.is_enum_value()
        3027  +
}
        3028  +
impl crate::constrained::Constrained for crate::model::RenamedGreeting {
        3029  +
    type Unconstrained = crate::model::renamed_greeting_internal::Builder;
        3030  +
}
        3031  +
impl RenamedGreeting {
        3032  +
    /// Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
        3033  +
    pub fn builder() -> crate::model::renamed_greeting::Builder {
        3034  +
        crate::model::renamed_greeting::Builder::default()
        3035  +
    }
        3036  +
}
        3037  +
        3038  +
#[::pyo3::pyclass]
        3039  +
/// :rtype None:
        3040  +
#[allow(missing_docs)] // documentation missing in model
        3041  +
#[derive(
        3042  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        3043  +
)]
        3044  +
pub struct Unit {}
        3045  +
#[allow(clippy::new_without_default)]
        3046  +
#[allow(clippy::too_many_arguments)]
        3047  +
#[::pyo3::pymethods]
        3048  +
impl Unit {
        3049  +
    #[new]
        3050  +
    pub fn new() -> Self {
        3051  +
        Self {}
 1532   3052   
    }
 1533         -
    #[staticmethod]
 1534         -
    /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
 1535         -
    /// :param data typing.List\[str\]:
 1536         -
    /// :rtype MyUnion:
 1537         -
    pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
 1538         -
        Self(MyUnion::ListValue(data))
        3053  +
    fn __repr__(&self) -> String {
        3054  +
        format!("{self:?}")
 1539   3055   
    }
 1540         -
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
 1541         -
    /// :rtype typing.List\[str\]:
 1542         -
    pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
 1543         -
        match self.0.as_list_value() {
 1544         -
            Ok(variant) => Ok(variant.clone()),
 1545         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1546         -
                r"MyUnion variant is not of type typing.List\[str\]",
 1547         -
            )),
 1548         -
        }
        3056  +
    fn __str__(&self) -> String {
        3057  +
        format!("{self:?}")
 1549   3058   
    }
 1550         -
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
 1551         -
    /// :rtype bool:
 1552         -
    pub fn is_list_value(&self) -> bool {
 1553         -
        self.0.is_list_value()
        3059  +
}
        3060  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Unit> {
        3061  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3062  +
        ob.extract::<Unit>().map(Box::new)
 1554   3063   
    }
 1555         -
    #[staticmethod]
 1556         -
    /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
 1557         -
    /// :param data typing.Dict\[str, str\]:
 1558         -
    /// :rtype MyUnion:
 1559         -
    pub fn map_value(
 1560         -
        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1561         -
    ) -> Self {
 1562         -
        Self(MyUnion::MapValue(data))
        3064  +
}
        3065  +
        3066  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Unit> {
        3067  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        3068  +
        (*self).into_py(py)
 1563   3069   
    }
 1564         -
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
 1565         -
    /// :rtype typing.Dict\[str, str\]:
 1566         -
    pub fn as_map_value(
 1567         -
        &self,
 1568         -
    ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
 1569         -
    {
 1570         -
        match self.0.as_map_value() {
 1571         -
            Ok(variant) => Ok(variant.clone()),
 1572         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1573         -
                r"MyUnion variant is not of type typing.Dict\[str, str\]",
 1574         -
            )),
 1575         -
        }
        3070  +
}
        3071  +
impl crate::constrained::Constrained for crate::model::Unit {
        3072  +
    type Unconstrained = crate::model::unit_internal::Builder;
        3073  +
}
        3074  +
impl Unit {
        3075  +
    /// Creates a new builder-style object to manufacture [`Unit`](crate::model::Unit).
        3076  +
    pub fn builder() -> crate::model::unit::Builder {
        3077  +
        crate::model::unit::Builder::default()
 1576   3078   
    }
 1577         -
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
 1578         -
    /// :rtype bool:
 1579         -
    pub fn is_map_value(&self) -> bool {
 1580         -
        self.0.is_map_value()
        3079  +
}
        3080  +
        3081  +
#[::pyo3::pyclass]
        3082  +
/// :param phrase str:
        3083  +
/// :rtype None:
        3084  +
#[allow(missing_docs)] // documentation missing in model
        3085  +
#[derive(
        3086  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        3087  +
)]
        3088  +
pub struct Farewell {
        3089  +
    #[pyo3(get, set)]
        3090  +
    /// :type str:
        3091  +
    #[allow(missing_docs)] // documentation missing in model
        3092  +
    pub phrase: ::std::string::String,
        3093  +
}
        3094  +
impl Farewell {
        3095  +
    #[allow(missing_docs)] // documentation missing in model
        3096  +
    pub fn phrase(&self) -> &str {
        3097  +
        use std::ops::Deref;
        3098  +
        self.phrase.deref()
 1581   3099   
    }
 1582         -
    #[staticmethod]
 1583         -
    /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
 1584         -
    /// :param data int:
 1585         -
    /// :rtype MyUnion:
 1586         -
    pub fn number_value(data: i32) -> Self {
 1587         -
        Self(MyUnion::NumberValue(data))
        3100  +
}
        3101  +
#[allow(clippy::new_without_default)]
        3102  +
#[allow(clippy::too_many_arguments)]
        3103  +
#[::pyo3::pymethods]
        3104  +
impl Farewell {
        3105  +
    #[new]
        3106  +
    pub fn new(phrase: ::std::string::String) -> Self {
        3107  +
        Self { phrase }
 1588   3108   
    }
 1589         -
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
 1590         -
    /// :rtype int:
 1591         -
    pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
 1592         -
        match self.0.as_number_value() {
 1593         -
            Ok(variant) => Ok(*variant),
 1594         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1595         -
                r"MyUnion variant is not of type int",
 1596         -
            )),
 1597         -
        }
        3109  +
    fn __repr__(&self) -> String {
        3110  +
        format!("{self:?}")
 1598   3111   
    }
 1599         -
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
 1600         -
    /// :rtype bool:
 1601         -
    pub fn is_number_value(&self) -> bool {
 1602         -
        self.0.is_number_value()
        3112  +
    fn __str__(&self) -> String {
        3113  +
        format!("{self:?}")
 1603   3114   
    }
 1604         -
    #[staticmethod]
 1605         -
    /// Creates a new union instance of [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue)
 1606         -
    /// :param data rest_json.model.RenamedGreeting:
 1607         -
    /// :rtype MyUnion:
 1608         -
    pub fn renamed_structure_value(data: crate::model::RenamedGreeting) -> Self {
 1609         -
        Self(MyUnion::RenamedStructureValue(data))
        3115  +
}
        3116  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<Farewell> {
        3117  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3118  +
        ob.extract::<Farewell>().map(Box::new)
 1610   3119   
    }
 1611         -
    /// Tries to convert the enum instance into [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue), extracting the inner [`RenamedGreeting`](crate::model::RenamedGreeting).
 1612         -
    /// :rtype rest_json.model.RenamedGreeting:
 1613         -
    pub fn as_renamed_structure_value(&self) -> ::pyo3::PyResult<crate::model::RenamedGreeting> {
 1614         -
        match self.0.as_renamed_structure_value() {
 1615         -
            Ok(variant) => Ok(variant.clone()),
 1616         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1617         -
                r"MyUnion variant is not of type rest_json.model.RenamedGreeting",
 1618         -
            )),
 1619         -
        }
        3120  +
}
        3121  +
        3122  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<Farewell> {
        3123  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        3124  +
        (*self).into_py(py)
 1620   3125   
    }
 1621         -
    /// Returns true if this is a [`RenamedStructureValue`](crate::model::MyUnion::RenamedStructureValue).
 1622         -
    /// :rtype bool:
 1623         -
    pub fn is_renamed_structure_value(&self) -> bool {
 1624         -
        self.0.is_renamed_structure_value()
        3126  +
}
        3127  +
impl crate::constrained::Constrained for crate::model::Farewell {
        3128  +
    type Unconstrained = crate::model::farewell_internal::Builder;
        3129  +
}
        3130  +
impl Farewell {
        3131  +
    /// Creates a new builder-style object to manufacture [`Farewell`](crate::model::Farewell).
        3132  +
    pub fn builder() -> crate::model::farewell::Builder {
        3133  +
        crate::model::farewell::Builder::default()
 1625   3134   
    }
 1626         -
    #[staticmethod]
 1627         -
    /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
 1628         -
    /// :param data str:
 1629         -
    /// :rtype MyUnion:
 1630         -
    pub fn string_value(data: ::std::string::String) -> Self {
 1631         -
        Self(MyUnion::StringValue(data))
        3135  +
}
        3136  +
        3137  +
#[::pyo3::pyclass]
        3138  +
/// :param boolean_header typing.Optional\[bool\]:
        3139  +
/// :param byte_header typing.Optional\[int\]:
        3140  +
/// :param short_header typing.Optional\[int\]:
        3141  +
/// :param int_header typing.Optional\[int\]:
        3142  +
/// :param long_header typing.Optional\[int\]:
        3143  +
/// :param blob_header typing.Optional\[rest_json.types.Blob\]:
        3144  +
/// :param string_header typing.Optional\[str\]:
        3145  +
/// :param timestamp_header typing.Optional\[rest_json.types.DateTime\]:
        3146  +
/// :rtype None:
        3147  +
#[allow(missing_docs)] // documentation missing in model
        3148  +
#[derive(
        3149  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        3150  +
)]
        3151  +
pub struct HeadersEvent {
        3152  +
    #[pyo3(get, set)]
        3153  +
    /// :type typing.Optional\[bool\]:
        3154  +
    #[allow(missing_docs)] // documentation missing in model
        3155  +
    pub boolean_header: ::std::option::Option<bool>,
        3156  +
    #[pyo3(get, set)]
        3157  +
    /// :type typing.Optional\[int\]:
        3158  +
    #[allow(missing_docs)] // documentation missing in model
        3159  +
    pub byte_header: ::std::option::Option<i8>,
        3160  +
    #[pyo3(get, set)]
        3161  +
    /// :type typing.Optional\[int\]:
        3162  +
    #[allow(missing_docs)] // documentation missing in model
        3163  +
    pub short_header: ::std::option::Option<i16>,
        3164  +
    #[pyo3(get, set)]
        3165  +
    /// :type typing.Optional\[int\]:
        3166  +
    #[allow(missing_docs)] // documentation missing in model
        3167  +
    pub int_header: ::std::option::Option<i32>,
        3168  +
    #[pyo3(get, set)]
        3169  +
    /// :type typing.Optional\[int\]:
        3170  +
    #[allow(missing_docs)] // documentation missing in model
        3171  +
    pub long_header: ::std::option::Option<i64>,
        3172  +
    #[pyo3(get, set)]
        3173  +
    /// :type typing.Optional\[rest_json.types.Blob\]:
        3174  +
    #[allow(missing_docs)] // documentation missing in model
        3175  +
    pub blob_header: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        3176  +
    #[pyo3(get, set)]
        3177  +
    /// :type typing.Optional\[str\]:
        3178  +
    #[allow(missing_docs)] // documentation missing in model
        3179  +
    pub string_header: ::std::option::Option<::std::string::String>,
        3180  +
    #[pyo3(get, set)]
        3181  +
    /// :type typing.Optional\[rest_json.types.DateTime\]:
        3182  +
    #[allow(missing_docs)] // documentation missing in model
        3183  +
    pub timestamp_header: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
        3184  +
}
        3185  +
impl HeadersEvent {
        3186  +
    #[allow(missing_docs)] // documentation missing in model
        3187  +
    pub fn boolean_header(&self) -> ::std::option::Option<bool> {
        3188  +
        self.boolean_header
 1632   3189   
    }
 1633         -
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
 1634         -
    /// :rtype str:
 1635         -
    pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
 1636         -
        match self.0.as_string_value() {
 1637         -
            Ok(variant) => Ok(variant.clone()),
 1638         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1639         -
                r"MyUnion variant is not of type str",
 1640         -
            )),
 1641         -
        }
        3190  +
    #[allow(missing_docs)] // documentation missing in model
        3191  +
    pub fn byte_header(&self) -> ::std::option::Option<i8> {
        3192  +
        self.byte_header
 1642   3193   
    }
 1643         -
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
 1644         -
    /// :rtype bool:
 1645         -
    pub fn is_string_value(&self) -> bool {
 1646         -
        self.0.is_string_value()
        3194  +
    #[allow(missing_docs)] // documentation missing in model
        3195  +
    pub fn short_header(&self) -> ::std::option::Option<i16> {
        3196  +
        self.short_header
 1647   3197   
    }
 1648         -
    #[staticmethod]
 1649         -
    /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
 1650         -
    /// :param data rest_json.model.GreetingStruct:
 1651         -
    /// :rtype MyUnion:
 1652         -
    pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
 1653         -
        Self(MyUnion::StructureValue(data))
        3198  +
    #[allow(missing_docs)] // documentation missing in model
        3199  +
    pub fn int_header(&self) -> ::std::option::Option<i32> {
        3200  +
        self.int_header
 1654   3201   
    }
 1655         -
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
 1656         -
    /// :rtype rest_json.model.GreetingStruct:
 1657         -
    pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
 1658         -
        match self.0.as_structure_value() {
 1659         -
            Ok(variant) => Ok(variant.clone()),
 1660         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1661         -
                r"MyUnion variant is not of type rest_json.model.GreetingStruct",
 1662         -
            )),
 1663         -
        }
        3202  +
    #[allow(missing_docs)] // documentation missing in model
        3203  +
    pub fn long_header(&self) -> ::std::option::Option<i64> {
        3204  +
        self.long_header
 1664   3205   
    }
 1665         -
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
 1666         -
    /// :rtype bool:
 1667         -
    pub fn is_structure_value(&self) -> bool {
 1668         -
        self.0.is_structure_value()
        3206  +
    #[allow(missing_docs)] // documentation missing in model
        3207  +
    pub fn blob_header(
        3208  +
        &self,
        3209  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
        3210  +
        self.blob_header.as_ref()
 1669   3211   
    }
 1670         -
    #[staticmethod]
 1671         -
    /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
 1672         -
    /// :param data rest_json.types.DateTime:
 1673         -
    /// :rtype MyUnion:
 1674         -
    pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
 1675         -
        Self(MyUnion::TimestampValue(data))
        3212  +
    #[allow(missing_docs)] // documentation missing in model
        3213  +
    pub fn string_header(&self) -> ::std::option::Option<&str> {
        3214  +
        self.string_header.as_deref()
 1676   3215   
    }
 1677         -
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
 1678         -
    /// :rtype rest_json.types.DateTime:
 1679         -
    pub fn as_timestamp_value(
        3216  +
    #[allow(missing_docs)] // documentation missing in model
        3217  +
    pub fn timestamp_header(
 1680   3218   
        &self,
 1681         -
    ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
 1682         -
        match self.0.as_timestamp_value() {
 1683         -
            Ok(variant) => Ok(variant.clone()),
 1684         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 1685         -
                r"MyUnion variant is not of type rest_json.types.DateTime",
 1686         -
            )),
        3219  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
        3220  +
        self.timestamp_header.as_ref()
        3221  +
    }
        3222  +
}
        3223  +
#[allow(clippy::new_without_default)]
        3224  +
#[allow(clippy::too_many_arguments)]
        3225  +
#[::pyo3::pymethods]
        3226  +
impl HeadersEvent {
        3227  +
    #[new]
        3228  +
    pub fn new(
        3229  +
        boolean_header: ::std::option::Option<bool>,
        3230  +
        byte_header: ::std::option::Option<i8>,
        3231  +
        short_header: ::std::option::Option<i16>,
        3232  +
        int_header: ::std::option::Option<i32>,
        3233  +
        long_header: ::std::option::Option<i64>,
        3234  +
        blob_header: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        3235  +
        string_header: ::std::option::Option<::std::string::String>,
        3236  +
        timestamp_header: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
        3237  +
    ) -> Self {
        3238  +
        Self {
        3239  +
            boolean_header,
        3240  +
            byte_header,
        3241  +
            short_header,
        3242  +
            int_header,
        3243  +
            long_header,
        3244  +
            blob_header,
        3245  +
            string_header,
        3246  +
            timestamp_header,
 1687   3247   
        }
 1688   3248   
    }
 1689         -
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
 1690         -
    /// :rtype bool:
 1691         -
    pub fn is_timestamp_value(&self) -> bool {
 1692         -
        self.0.is_timestamp_value()
        3249  +
    fn __repr__(&self) -> String {
        3250  +
        format!("{self:?}")
        3251  +
    }
        3252  +
    fn __str__(&self) -> String {
        3253  +
        format!("{self:?}")
        3254  +
    }
        3255  +
}
        3256  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HeadersEvent> {
        3257  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3258  +
        ob.extract::<HeadersEvent>().map(Box::new)
 1693   3259   
    }
 1694   3260   
}
 1695         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
        3261  +
        3262  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HeadersEvent> {
 1696   3263   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1697         -
        PyUnionMarkerMyUnion(self).into_py(py)
        3264  +
        (*self).into_py(py)
 1698   3265   
    }
 1699   3266   
}
 1700         -
impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
 1701         -
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1702         -
        let data: PyUnionMarkerMyUnion = obj.extract()?;
 1703         -
        Ok(data.0)
        3267  +
impl crate::constrained::Constrained for crate::model::HeadersEvent {
        3268  +
    type Unconstrained = crate::model::headers_event_internal::Builder;
        3269  +
}
        3270  +
impl HeadersEvent {
        3271  +
    /// Creates a new builder-style object to manufacture [`HeadersEvent`](crate::model::HeadersEvent).
        3272  +
    pub fn builder() -> crate::model::headers_event::Builder {
        3273  +
        crate::model::headers_event::Builder::default()
 1704   3274   
    }
 1705   3275   
}
 1706   3276   
 1707   3277   
#[::pyo3::pyclass]
 1708         -
/// :param salutation typing.Optional\[str\]:
        3278  +
/// :param payload typing.Optional\[rest_json.types.Blob\]:
 1709   3279   
/// :rtype None:
 1710   3280   
#[allow(missing_docs)] // documentation missing in model
 1711   3281   
#[derive(
 1712   3282   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1713   3283   
)]
 1714         -
pub struct RenamedGreeting {
        3284  +
pub struct BlobPayloadEvent {
 1715   3285   
    #[pyo3(get, set)]
 1716         -
    /// :type typing.Optional\[str\]:
        3286  +
    /// :type typing.Optional\[rest_json.types.Blob\]:
 1717   3287   
    #[allow(missing_docs)] // documentation missing in model
 1718         -
    pub salutation: ::std::option::Option<::std::string::String>,
        3288  +
    pub payload: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1719   3289   
}
 1720         -
impl RenamedGreeting {
        3290  +
impl BlobPayloadEvent {
 1721   3291   
    #[allow(missing_docs)] // documentation missing in model
 1722         -
    pub fn salutation(&self) -> ::std::option::Option<&str> {
 1723         -
        self.salutation.as_deref()
        3292  +
    pub fn payload(&self) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
        3293  +
        self.payload.as_ref()
 1724   3294   
    }
 1725   3295   
}
 1726   3296   
#[allow(clippy::new_without_default)]
 1727   3297   
#[allow(clippy::too_many_arguments)]
 1728   3298   
#[::pyo3::pymethods]
 1729         -
impl RenamedGreeting {
        3299  +
impl BlobPayloadEvent {
 1730   3300   
    #[new]
 1731         -
    pub fn new(salutation: ::std::option::Option<::std::string::String>) -> Self {
 1732         -
        Self { salutation }
        3301  +
    pub fn new(
        3302  +
        payload: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        3303  +
    ) -> Self {
        3304  +
        Self { payload }
 1733   3305   
    }
 1734   3306   
    fn __repr__(&self) -> String {
 1735   3307   
        format!("{self:?}")
 1736   3308   
    }
 1737   3309   
    fn __str__(&self) -> String {
 1738   3310   
        format!("{self:?}")
 1739   3311   
    }
 1740   3312   
}
 1741         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RenamedGreeting> {
        3313  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<BlobPayloadEvent> {
 1742   3314   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1743         -
        ob.extract::<RenamedGreeting>().map(Box::new)
        3315  +
        ob.extract::<BlobPayloadEvent>().map(Box::new)
 1744   3316   
    }
 1745   3317   
}
 1746   3318   
 1747         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RenamedGreeting> {
        3319  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<BlobPayloadEvent> {
 1748   3320   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1749   3321   
        (*self).into_py(py)
 1750   3322   
    }
 1751   3323   
}
 1752         -
impl crate::constrained::Constrained for crate::model::RenamedGreeting {
 1753         -
    type Unconstrained = crate::model::renamed_greeting_internal::Builder;
        3324  +
impl crate::constrained::Constrained for crate::model::BlobPayloadEvent {
        3325  +
    type Unconstrained = crate::model::blob_payload_event_internal::Builder;
 1754   3326   
}
 1755         -
impl RenamedGreeting {
 1756         -
    /// Creates a new builder-style object to manufacture [`RenamedGreeting`](crate::model::RenamedGreeting).
 1757         -
    pub fn builder() -> crate::model::renamed_greeting::Builder {
 1758         -
        crate::model::renamed_greeting::Builder::default()
        3327  +
impl BlobPayloadEvent {
        3328  +
    /// Creates a new builder-style object to manufacture [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        3329  +
    pub fn builder() -> crate::model::blob_payload_event::Builder {
        3330  +
        crate::model::blob_payload_event::Builder::default()
 1759   3331   
    }
 1760   3332   
}
 1761   3333   
 1762   3334   
#[::pyo3::pyclass]
 1763         -
/// :param hi typing.Optional\[str\]:
        3335  +
/// :param payload typing.Optional\[str\]:
 1764   3336   
/// :rtype None:
 1765   3337   
#[allow(missing_docs)] // documentation missing in model
 1766   3338   
#[derive(
 1767   3339   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1768   3340   
)]
 1769         -
pub struct GreetingStruct {
        3341  +
pub struct StringPayloadEvent {
 1770   3342   
    #[pyo3(get, set)]
 1771   3343   
    /// :type typing.Optional\[str\]:
 1772   3344   
    #[allow(missing_docs)] // documentation missing in model
 1773         -
    pub hi: ::std::option::Option<::std::string::String>,
        3345  +
    pub payload: ::std::option::Option<::std::string::String>,
 1774   3346   
}
 1775         -
impl GreetingStruct {
        3347  +
impl StringPayloadEvent {
 1776   3348   
    #[allow(missing_docs)] // documentation missing in model
 1777         -
    pub fn hi(&self) -> ::std::option::Option<&str> {
 1778         -
        self.hi.as_deref()
        3349  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
        3350  +
        self.payload.as_deref()
 1779   3351   
    }
 1780   3352   
}
 1781   3353   
#[allow(clippy::new_without_default)]
 1782   3354   
#[allow(clippy::too_many_arguments)]
 1783   3355   
#[::pyo3::pymethods]
 1784         -
impl GreetingStruct {
        3356  +
impl StringPayloadEvent {
 1785   3357   
    #[new]
 1786         -
    pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
 1787         -
        Self { hi }
        3358  +
    pub fn new(payload: ::std::option::Option<::std::string::String>) -> Self {
        3359  +
        Self { payload }
 1788   3360   
    }
 1789   3361   
    fn __repr__(&self) -> String {
 1790   3362   
        format!("{self:?}")
 1791   3363   
    }
 1792   3364   
    fn __str__(&self) -> String {
 1793   3365   
        format!("{self:?}")
 1794   3366   
    }
 1795   3367   
}
 1796         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
        3368  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StringPayloadEvent> {
 1797   3369   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1798         -
        ob.extract::<GreetingStruct>().map(Box::new)
        3370  +
        ob.extract::<StringPayloadEvent>().map(Box::new)
 1799   3371   
    }
 1800   3372   
}
 1801   3373   
 1802         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
        3374  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StringPayloadEvent> {
 1803   3375   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1804   3376   
        (*self).into_py(py)
 1805   3377   
    }
 1806   3378   
}
 1807         -
impl crate::constrained::Constrained for crate::model::GreetingStruct {
 1808         -
    type Unconstrained = crate::model::greeting_struct_internal::Builder;
        3379  +
impl crate::constrained::Constrained for crate::model::StringPayloadEvent {
        3380  +
    type Unconstrained = crate::model::string_payload_event_internal::Builder;
 1809   3381   
}
 1810         -
impl GreetingStruct {
 1811         -
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
 1812         -
    pub fn builder() -> crate::model::greeting_struct::Builder {
 1813         -
        crate::model::greeting_struct::Builder::default()
        3382  +
impl StringPayloadEvent {
        3383  +
    /// Creates a new builder-style object to manufacture [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        3384  +
    pub fn builder() -> crate::model::string_payload_event::Builder {
        3385  +
        crate::model::string_payload_event::Builder::default()
 1814   3386   
    }
 1815   3387   
}
 1816   3388   
 1817   3389   
#[::pyo3::pyclass]
        3390  +
/// :param payload typing.Optional\[rest_json.model.PayloadStructure\]:
        3391  +
/// :rtype None:
 1818   3392   
#[allow(missing_docs)] // documentation missing in model
 1819   3393   
#[derive(
 1820         -
    ::std::clone::Clone,
 1821         -
    ::std::cmp::Eq,
 1822         -
    ::std::cmp::Ord,
 1823         -
    ::std::cmp::PartialEq,
 1824         -
    ::std::cmp::PartialOrd,
 1825         -
    ::std::fmt::Debug,
 1826         -
    ::std::hash::Hash,
        3394  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1827   3395   
)]
 1828         -
pub enum FooEnum {
 1829         -
    #[allow(missing_docs)] // documentation missing in model
 1830         -
    Zero,
 1831         -
    #[allow(missing_docs)] // documentation missing in model
 1832         -
    One,
 1833         -
    #[allow(missing_docs)] // documentation missing in model
 1834         -
    Bar,
 1835         -
    #[allow(missing_docs)] // documentation missing in model
 1836         -
    Baz,
        3396  +
pub struct StructurePayloadEvent {
        3397  +
    #[pyo3(get, set)]
        3398  +
    /// :type typing.Optional\[rest_json.model.PayloadStructure\]:
 1837   3399   
    #[allow(missing_docs)] // documentation missing in model
 1838         -
    Foo,
 1839         -
}
 1840         -
pub(crate) mod foo_enum_internal {
 1841         -
    #[derive(Debug, PartialEq)]
 1842         -
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
 1843         -
 1844         -
    impl ::std::fmt::Display for ConstraintViolation {
 1845         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1846         -
            write!(
 1847         -
                f,
 1848         -
                r#"Value provided for 'aws.protocoltests.shared#FooEnum' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#
 1849         -
            )
 1850         -
        }
 1851         -
    }
 1852         -
 1853         -
    impl ::std::error::Error for ConstraintViolation {}
 1854         -
    impl ConstraintViolation {
 1855         -
        pub(crate) fn as_validation_exception_field(
 1856         -
            self,
 1857         -
            path: ::std::string::String,
 1858         -
        ) -> crate::model::ValidationExceptionField {
 1859         -
            crate::model::ValidationExceptionField {
 1860         -
                message: format!(
 1861         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [Foo, Baz, Bar, 1, 0]"#,
 1862         -
                    &path
 1863         -
                ),
 1864         -
                path,
 1865         -
            }
 1866         -
        }
 1867         -
    }
 1868         -
}
 1869         -
impl ::std::convert::TryFrom<&str> for FooEnum {
 1870         -
    type Error = crate::model::foo_enum_internal::ConstraintViolation;
 1871         -
    fn try_from(
 1872         -
        s: &str,
 1873         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
 1874         -
        match s {
 1875         -
            "0" => Ok(FooEnum::Zero),
 1876         -
            "1" => Ok(FooEnum::One),
 1877         -
            "Bar" => Ok(FooEnum::Bar),
 1878         -
            "Baz" => Ok(FooEnum::Baz),
 1879         -
            "Foo" => Ok(FooEnum::Foo),
 1880         -
            _ => Err(crate::model::foo_enum_internal::ConstraintViolation(
 1881         -
                s.to_owned(),
 1882         -
            )),
 1883         -
        }
 1884         -
    }
 1885         -
}
 1886         -
impl ::std::convert::TryFrom<::std::string::String> for FooEnum {
 1887         -
    type Error = crate::model::foo_enum_internal::ConstraintViolation;
 1888         -
    fn try_from(
 1889         -
        s: ::std::string::String,
 1890         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
 1891         -
    {
 1892         -
        s.as_str().try_into()
 1893         -
    }
 1894         -
}
 1895         -
impl std::str::FromStr for FooEnum {
 1896         -
    type Err = crate::model::foo_enum_internal::ConstraintViolation;
 1897         -
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
 1898         -
        Self::try_from(s)
 1899         -
    }
 1900         -
}
 1901         -
impl FooEnum {
 1902         -
    /// Returns the `&str` value of the enum member.
 1903         -
    pub fn as_str(&self) -> &str {
 1904         -
        match self {
 1905         -
            FooEnum::Zero => "0",
 1906         -
            FooEnum::One => "1",
 1907         -
            FooEnum::Bar => "Bar",
 1908         -
            FooEnum::Baz => "Baz",
 1909         -
            FooEnum::Foo => "Foo",
 1910         -
        }
 1911         -
    }
 1912         -
    /// Returns all the `&str` representations of the enum members.
 1913         -
    pub const fn values() -> &'static [&'static str] {
 1914         -
        &["0", "1", "Bar", "Baz", "Foo"]
 1915         -
    }
        3400  +
    pub payload: ::std::option::Option<crate::model::PayloadStructure>,
 1916   3401   
}
 1917         -
impl ::std::convert::AsRef<str> for FooEnum {
 1918         -
    fn as_ref(&self) -> &str {
 1919         -
        self.as_str()
        3402  +
impl StructurePayloadEvent {
        3403  +
    #[allow(missing_docs)] // documentation missing in model
        3404  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadStructure> {
        3405  +
        self.payload.as_ref()
 1920   3406   
    }
 1921   3407   
}
        3408  +
#[allow(clippy::new_without_default)]
        3409  +
#[allow(clippy::too_many_arguments)]
 1922   3410   
#[::pyo3::pymethods]
 1923         -
impl FooEnum {
 1924         -
    #[getter]
 1925         -
    pub fn name(&self) -> &str {
 1926         -
        match self {
 1927         -
            FooEnum::Zero => "Zero",
 1928         -
            FooEnum::One => "One",
 1929         -
            FooEnum::Bar => "Bar",
 1930         -
            FooEnum::Baz => "Baz",
 1931         -
            FooEnum::Foo => "Foo",
 1932         -
        }
 1933         -
    }
 1934         -
    #[getter]
 1935         -
    pub fn value(&self) -> &str {
 1936         -
        self.as_str()
        3411  +
impl StructurePayloadEvent {
        3412  +
    #[new]
        3413  +
    pub fn new(payload: ::std::option::Option<crate::model::PayloadStructure>) -> Self {
        3414  +
        Self { payload }
 1937   3415   
    }
 1938   3416   
    fn __repr__(&self) -> String {
 1939         -
        self.as_str().to_owned()
        3417  +
        format!("{self:?}")
 1940   3418   
    }
 1941   3419   
    fn __str__(&self) -> String {
 1942         -
        self.as_str().to_owned()
 1943         -
    }
 1944         -
}
 1945         -
impl crate::constrained::Constrained for FooEnum {
 1946         -
    type Unconstrained = ::std::string::String;
 1947         -
}
 1948         -
 1949         -
impl ::std::convert::From<::std::string::String>
 1950         -
    for crate::constrained::MaybeConstrained<crate::model::FooEnum>
 1951         -
{
 1952         -
    fn from(value: ::std::string::String) -> Self {
 1953         -
        Self::Unconstrained(value)
 1954         -
    }
 1955         -
}
 1956         -
 1957         -
#[allow(missing_docs)] // documentation missing in model
 1958         -
///
 1959         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 1960         -
/// [constraint traits]. Use [`StringSet::try_from`] to construct values of this type.
 1961         -
///
 1962         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 1963         -
///
 1964         -
#[derive(
 1965         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1966         -
)]
 1967         -
pub(crate) struct StringSet(pub(crate) ::std::vec::Vec<::std::string::String>);
 1968         -
impl StringSet {
 1969         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<::std::string::String>`].
 1970         -
    pub fn into_inner(self) -> ::std::vec::Vec<::std::string::String> {
 1971         -
        self.0
 1972         -
    }
 1973         -
 1974         -
    fn check_unique_items(
 1975         -
        items: ::std::vec::Vec<::std::string::String>,
 1976         -
    ) -> ::std::result::Result<
 1977         -
        ::std::vec::Vec<::std::string::String>,
 1978         -
        crate::model::string_set_internal::ConstraintViolation,
 1979         -
    > {
 1980         -
        let mut seen = ::std::collections::HashMap::new();
 1981         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 1982         -
        for (idx, item) in items.iter().enumerate() {
 1983         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 1984         -
                duplicate_indices.push(prev_idx);
 1985         -
            }
 1986         -
        }
 1987         -
 1988         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 1989         -
        for idx in &duplicate_indices {
 1990         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 1991         -
                last_duplicate_indices.push(prev_idx);
 1992         -
            }
 1993         -
        }
 1994         -
        duplicate_indices.extend(last_duplicate_indices);
 1995         -
 1996         -
        if !duplicate_indices.is_empty() {
 1997         -
            debug_assert!(duplicate_indices.len() >= 2);
 1998         -
            Err(
 1999         -
                crate::model::string_set_internal::ConstraintViolation::UniqueItems {
 2000         -
                    duplicate_indices,
 2001         -
                    original: items,
 2002         -
                },
 2003         -
            )
 2004         -
        } else {
 2005         -
            Ok(items)
 2006         -
        }
        3420  +
        format!("{self:?}")
 2007   3421   
    }
 2008   3422   
}
 2009         -
impl ::std::convert::TryFrom<::std::vec::Vec<::std::string::String>> for StringSet {
 2010         -
    type Error = crate::model::string_set_internal::ConstraintViolation;
 2011         -
 2012         -
    /// Constructs a `StringSet` from an [`::std::vec::Vec<::std::string::String>`], failing when the provided value does not satisfy the modeled constraints.
 2013         -
    fn try_from(
 2014         -
        value: ::std::vec::Vec<::std::string::String>,
 2015         -
    ) -> ::std::result::Result<Self, Self::Error> {
 2016         -
        let value = Self::check_unique_items(value)?;
 2017         -
 2018         -
        Ok(Self(value))
        3423  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructurePayloadEvent> {
        3424  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3425  +
        ob.extract::<StructurePayloadEvent>().map(Box::new)
 2019   3426   
    }
 2020   3427   
}
 2021   3428   
 2022         -
impl ::std::convert::From<StringSet> for ::std::vec::Vec<::std::string::String> {
 2023         -
    fn from(value: StringSet) -> Self {
 2024         -
        value.into_inner()
        3429  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructurePayloadEvent> {
        3430  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        3431  +
        (*self).into_py(py)
 2025   3432   
    }
 2026   3433   
}
 2027         -
impl crate::constrained::Constrained for StringSet {
 2028         -
    type Unconstrained = crate::unconstrained::string_set_unconstrained::StringSetUnconstrained;
        3434  +
impl crate::constrained::Constrained for crate::model::StructurePayloadEvent {
        3435  +
    type Unconstrained = crate::model::structure_payload_event_internal::Builder;
        3436  +
}
        3437  +
impl StructurePayloadEvent {
        3438  +
    /// Creates a new builder-style object to manufacture [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        3439  +
    pub fn builder() -> crate::model::structure_payload_event::Builder {
        3440  +
        crate::model::structure_payload_event::Builder::default()
        3441  +
    }
 2029   3442   
}
 2030   3443   
 2031   3444   
#[::pyo3::pyclass]
 2032         -
/// :param a typing.Optional\[str\]:
 2033         -
/// :param b typing.Optional\[str\]:
        3445  +
/// :param payload typing.Optional\[rest_json.model.PayloadUnion\]:
 2034   3446   
/// :rtype None:
 2035   3447   
#[allow(missing_docs)] // documentation missing in model
 2036   3448   
#[derive(
 2037   3449   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2038   3450   
)]
 2039         -
pub struct StructureListMember {
 2040         -
    #[pyo3(get, set)]
 2041         -
    /// :type typing.Optional\[str\]:
 2042         -
    #[allow(missing_docs)] // documentation missing in model
 2043         -
    pub a: ::std::option::Option<::std::string::String>,
        3451  +
pub struct UnionPayloadEvent {
 2044   3452   
    #[pyo3(get, set)]
 2045         -
    /// :type typing.Optional\[str\]:
        3453  +
    /// :type typing.Optional\[rest_json.model.PayloadUnion\]:
 2046   3454   
    #[allow(missing_docs)] // documentation missing in model
 2047         -
    pub b: ::std::option::Option<::std::string::String>,
        3455  +
    pub payload: ::std::option::Option<crate::model::PayloadUnion>,
 2048   3456   
}
 2049         -
impl StructureListMember {
        3457  +
impl UnionPayloadEvent {
 2050   3458   
    #[allow(missing_docs)] // documentation missing in model
 2051         -
    pub fn a(&self) -> ::std::option::Option<&str> {
 2052         -
        self.a.as_deref()
 2053         -
    }
 2054         -
    #[allow(missing_docs)] // documentation missing in model
 2055         -
    pub fn b(&self) -> ::std::option::Option<&str> {
 2056         -
        self.b.as_deref()
        3459  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadUnion> {
        3460  +
        self.payload.as_ref()
 2057   3461   
    }
 2058   3462   
}
 2059   3463   
#[allow(clippy::new_without_default)]
 2060   3464   
#[allow(clippy::too_many_arguments)]
 2061   3465   
#[::pyo3::pymethods]
 2062         -
impl StructureListMember {
        3466  +
impl UnionPayloadEvent {
 2063   3467   
    #[new]
 2064         -
    pub fn new(
 2065         -
        a: ::std::option::Option<::std::string::String>,
 2066         -
        b: ::std::option::Option<::std::string::String>,
 2067         -
    ) -> Self {
 2068         -
        Self { a, b }
        3468  +
    pub fn new(payload: ::std::option::Option<crate::model::PayloadUnion>) -> Self {
        3469  +
        Self { payload }
 2069   3470   
    }
 2070   3471   
    fn __repr__(&self) -> String {
 2071   3472   
        format!("{self:?}")
 2072   3473   
    }
 2073   3474   
    fn __str__(&self) -> String {
 2074   3475   
        format!("{self:?}")
 2075   3476   
    }
 2076   3477   
}
 2077         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructureListMember> {
        3478  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<UnionPayloadEvent> {
 2078   3479   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2079         -
        ob.extract::<StructureListMember>().map(Box::new)
        3480  +
        ob.extract::<UnionPayloadEvent>().map(Box::new)
 2080   3481   
    }
 2081   3482   
}
 2082   3483   
 2083         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructureListMember> {
        3484  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<UnionPayloadEvent> {
 2084   3485   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2085   3486   
        (*self).into_py(py)
 2086   3487   
    }
 2087   3488   
}
 2088         -
impl crate::constrained::Constrained for crate::model::StructureListMember {
 2089         -
    type Unconstrained = crate::model::structure_list_member_internal::Builder;
        3489  +
impl crate::constrained::Constrained for crate::model::UnionPayloadEvent {
        3490  +
    type Unconstrained = crate::model::union_payload_event_internal::Builder;
 2090   3491   
}
 2091         -
impl StructureListMember {
 2092         -
    /// Creates a new builder-style object to manufacture [`StructureListMember`](crate::model::StructureListMember).
 2093         -
    pub fn builder() -> crate::model::structure_list_member::Builder {
 2094         -
        crate::model::structure_list_member::Builder::default()
        3492  +
impl UnionPayloadEvent {
        3493  +
    /// Creates a new builder-style object to manufacture [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        3494  +
    pub fn builder() -> crate::model::union_payload_event::Builder {
        3495  +
        crate::model::union_payload_event::Builder::default()
 2095   3496   
    }
 2096   3497   
}
 2097   3498   
 2098   3499   
#[::pyo3::pyclass]
 2099         -
/// :param foo typing.Optional\[str\]:
 2100         -
/// :param nested typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
        3500  +
/// :param header typing.Optional\[str\]:
        3501  +
/// :param payload typing.Optional\[rest_json.model.PayloadStructure\]:
 2101   3502   
/// :rtype None:
 2102   3503   
#[allow(missing_docs)] // documentation missing in model
 2103   3504   
#[derive(
 2104   3505   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2105   3506   
)]
 2106         -
pub struct RecursiveShapesInputOutputNested1 {
        3507  +
pub struct HeadersAndExplicitPayloadEvent {
 2107   3508   
    #[pyo3(get, set)]
 2108   3509   
    /// :type typing.Optional\[str\]:
 2109   3510   
    #[allow(missing_docs)] // documentation missing in model
 2110         -
    pub foo: ::std::option::Option<::std::string::String>,
        3511  +
    pub header: ::std::option::Option<::std::string::String>,
 2111   3512   
    #[pyo3(get, set)]
 2112         -
    /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested2\]:
        3513  +
    /// :type typing.Optional\[rest_json.model.PayloadStructure\]:
 2113   3514   
    #[allow(missing_docs)] // documentation missing in model
 2114         -
    pub nested:
 2115         -
        ::std::option::Option<::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>>,
        3515  +
    pub payload: ::std::option::Option<crate::model::PayloadStructure>,
 2116   3516   
}
 2117         -
impl RecursiveShapesInputOutputNested1 {
        3517  +
impl HeadersAndExplicitPayloadEvent {
 2118   3518   
    #[allow(missing_docs)] // documentation missing in model
 2119         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
 2120         -
        self.foo.as_deref()
        3519  +
    pub fn header(&self) -> ::std::option::Option<&str> {
        3520  +
        self.header.as_deref()
 2121   3521   
    }
 2122   3522   
    #[allow(missing_docs)] // documentation missing in model
 2123         -
    pub fn nested(
 2124         -
        &self,
 2125         -
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested2> {
 2126         -
        self.nested.as_deref()
        3523  +
    pub fn payload(&self) -> ::std::option::Option<&crate::model::PayloadStructure> {
        3524  +
        self.payload.as_ref()
 2127   3525   
    }
 2128   3526   
}
 2129   3527   
#[allow(clippy::new_without_default)]
 2130   3528   
#[allow(clippy::too_many_arguments)]
 2131   3529   
#[::pyo3::pymethods]
 2132         -
impl RecursiveShapesInputOutputNested1 {
        3530  +
impl HeadersAndExplicitPayloadEvent {
 2133   3531   
    #[new]
 2134   3532   
    pub fn new(
 2135         -
        foo: ::std::option::Option<::std::string::String>,
 2136         -
        nested: ::std::option::Option<
 2137         -
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 2138         -
        >,
        3533  +
        header: ::std::option::Option<::std::string::String>,
        3534  +
        payload: ::std::option::Option<crate::model::PayloadStructure>,
 2139   3535   
    ) -> Self {
 2140         -
        Self { foo, nested }
        3536  +
        Self { header, payload }
 2141   3537   
    }
 2142   3538   
    fn __repr__(&self) -> String {
 2143   3539   
        format!("{self:?}")
 2144   3540   
    }
 2145   3541   
    fn __str__(&self) -> String {
 2146   3542   
        format!("{self:?}")
 2147   3543   
    }
 2148   3544   
}
 2149         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
        3545  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HeadersAndExplicitPayloadEvent> {
 2150   3546   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2151         -
        ob.extract::<RecursiveShapesInputOutputNested1>()
 2152         -
            .map(Box::new)
        3547  +
        ob.extract::<HeadersAndExplicitPayloadEvent>().map(Box::new)
 2153   3548   
    }
 2154   3549   
}
 2155   3550   
 2156         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested1> {
        3551  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HeadersAndExplicitPayloadEvent> {
 2157   3552   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2158   3553   
        (*self).into_py(py)
 2159   3554   
    }
 2160   3555   
}
 2161         -
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested1 {
 2162         -
    type Unconstrained = crate::model::recursive_shapes_input_output_nested1_internal::Builder;
        3556  +
impl crate::constrained::Constrained for crate::model::HeadersAndExplicitPayloadEvent {
        3557  +
    type Unconstrained = crate::model::headers_and_explicit_payload_event_internal::Builder;
 2163   3558   
}
 2164         -
impl RecursiveShapesInputOutputNested1 {
 2165         -
    /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 2166         -
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested1::Builder {
 2167         -
        crate::model::recursive_shapes_input_output_nested1::Builder::default()
        3559  +
impl HeadersAndExplicitPayloadEvent {
        3560  +
    /// Creates a new builder-style object to manufacture [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        3561  +
    pub fn builder() -> crate::model::headers_and_explicit_payload_event::Builder {
        3562  +
        crate::model::headers_and_explicit_payload_event::Builder::default()
 2168   3563   
    }
 2169   3564   
}
 2170   3565   
 2171   3566   
#[::pyo3::pyclass]
 2172         -
/// :param bar typing.Optional\[str\]:
 2173         -
/// :param recursive_member typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
        3567  +
/// :param header typing.Optional\[str\]:
        3568  +
/// :param payload typing.Optional\[str\]:
 2174   3569   
/// :rtype None:
 2175   3570   
#[allow(missing_docs)] // documentation missing in model
 2176   3571   
#[derive(
 2177   3572   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2178   3573   
)]
 2179         -
pub struct RecursiveShapesInputOutputNested2 {
        3574  +
pub struct HeadersAndImplicitPayloadEvent {
 2180   3575   
    #[pyo3(get, set)]
 2181   3576   
    /// :type typing.Optional\[str\]:
 2182   3577   
    #[allow(missing_docs)] // documentation missing in model
 2183         -
    pub bar: ::std::option::Option<::std::string::String>,
        3578  +
    pub header: ::std::option::Option<::std::string::String>,
 2184   3579   
    #[pyo3(get, set)]
 2185         -
    /// :type typing.Optional\[rest_json.model.RecursiveShapesInputOutputNested1\]:
        3580  +
    /// :type typing.Optional\[str\]:
 2186   3581   
    #[allow(missing_docs)] // documentation missing in model
 2187         -
    pub recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        3582  +
    pub payload: ::std::option::Option<::std::string::String>,
 2188   3583   
}
 2189         -
impl RecursiveShapesInputOutputNested2 {
        3584  +
impl HeadersAndImplicitPayloadEvent {
 2190   3585   
    #[allow(missing_docs)] // documentation missing in model
 2191         -
    pub fn bar(&self) -> ::std::option::Option<&str> {
 2192         -
        self.bar.as_deref()
        3586  +
    pub fn header(&self) -> ::std::option::Option<&str> {
        3587  +
        self.header.as_deref()
 2193   3588   
    }
 2194   3589   
    #[allow(missing_docs)] // documentation missing in model
 2195         -
    pub fn recursive_member(
 2196         -
        &self,
 2197         -
    ) -> ::std::option::Option<&crate::model::RecursiveShapesInputOutputNested1> {
 2198         -
        self.recursive_member.as_ref()
        3590  +
    pub fn payload(&self) -> ::std::option::Option<&str> {
        3591  +
        self.payload.as_deref()
 2199   3592   
    }
 2200   3593   
}
 2201   3594   
#[allow(clippy::new_without_default)]
 2202   3595   
#[allow(clippy::too_many_arguments)]
 2203   3596   
#[::pyo3::pymethods]
 2204         -
impl RecursiveShapesInputOutputNested2 {
        3597  +
impl HeadersAndImplicitPayloadEvent {
 2205   3598   
    #[new]
 2206   3599   
    pub fn new(
 2207         -
        bar: ::std::option::Option<::std::string::String>,
 2208         -
        recursive_member: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        3600  +
        header: ::std::option::Option<::std::string::String>,
        3601  +
        payload: ::std::option::Option<::std::string::String>,
 2209   3602   
    ) -> Self {
 2210         -
        Self {
 2211         -
            bar,
 2212         -
            recursive_member,
 2213         -
        }
        3603  +
        Self { header, payload }
 2214   3604   
    }
 2215   3605   
    fn __repr__(&self) -> String {
 2216   3606   
        format!("{self:?}")
 2217   3607   
    }
 2218   3608   
    fn __str__(&self) -> String {
 2219   3609   
        format!("{self:?}")
 2220   3610   
    }
 2221   3611   
}
 2222         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
        3612  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HeadersAndImplicitPayloadEvent> {
 2223   3613   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2224         -
        ob.extract::<RecursiveShapesInputOutputNested2>()
 2225         -
            .map(Box::new)
        3614  +
        ob.extract::<HeadersAndImplicitPayloadEvent>().map(Box::new)
 2226   3615   
    }
 2227   3616   
}
 2228   3617   
 2229         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RecursiveShapesInputOutputNested2> {
        3618  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HeadersAndImplicitPayloadEvent> {
 2230   3619   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2231   3620   
        (*self).into_py(py)
 2232   3621   
    }
 2233   3622   
}
 2234         -
impl crate::constrained::Constrained for crate::model::RecursiveShapesInputOutputNested2 {
 2235         -
    type Unconstrained = crate::model::recursive_shapes_input_output_nested2_internal::Builder;
        3623  +
impl crate::constrained::Constrained for crate::model::HeadersAndImplicitPayloadEvent {
        3624  +
    type Unconstrained = crate::model::headers_and_implicit_payload_event_internal::Builder;
 2236   3625   
}
 2237         -
impl RecursiveShapesInputOutputNested2 {
 2238         -
    /// Creates a new builder-style object to manufacture [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 2239         -
    pub fn builder() -> crate::model::recursive_shapes_input_output_nested2::Builder {
 2240         -
        crate::model::recursive_shapes_input_output_nested2::Builder::default()
        3626  +
impl HeadersAndImplicitPayloadEvent {
        3627  +
    /// Creates a new builder-style object to manufacture [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        3628  +
    pub fn builder() -> crate::model::headers_and_implicit_payload_event::Builder {
        3629  +
        crate::model::headers_and_implicit_payload_event::Builder::default()
 2241   3630   
    }
 2242   3631   
}
 2243   3632   
        3633  +
#[::pyo3::pyclass]
        3634  +
/// :param value typing.Optional\[str\]:
        3635  +
/// :rtype None:
 2244   3636   
#[allow(missing_docs)] // documentation missing in model
 2245         -
///
 2246         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 2247         -
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
 2248         -
///
 2249         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 2250         -
///
 2251   3637   
#[derive(
 2252   3638   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2253   3639   
)]
 2254         -
pub(crate) struct IntegerEnumSet(pub(crate) ::std::vec::Vec<i32>);
 2255         -
impl IntegerEnumSet {
 2256         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
 2257         -
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
 2258         -
        self.0
 2259         -
    }
 2260         -
 2261         -
    fn check_unique_items(
 2262         -
        items: ::std::vec::Vec<i32>,
 2263         -
    ) -> ::std::result::Result<
 2264         -
        ::std::vec::Vec<i32>,
 2265         -
        crate::model::integer_enum_set_internal::ConstraintViolation,
 2266         -
    > {
 2267         -
        let mut seen = ::std::collections::HashMap::new();
 2268         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 2269         -
        for (idx, item) in items.iter().enumerate() {
 2270         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 2271         -
                duplicate_indices.push(prev_idx);
 2272         -
            }
 2273         -
        }
 2274         -
 2275         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 2276         -
        for idx in &duplicate_indices {
 2277         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 2278         -
                last_duplicate_indices.push(prev_idx);
 2279         -
            }
 2280         -
        }
 2281         -
        duplicate_indices.extend(last_duplicate_indices);
 2282         -
 2283         -
        if !duplicate_indices.is_empty() {
 2284         -
            debug_assert!(duplicate_indices.len() >= 2);
 2285         -
            Err(
 2286         -
                crate::model::integer_enum_set_internal::ConstraintViolation::UniqueItems {
 2287         -
                    duplicate_indices,
 2288         -
                    original: items,
 2289         -
                },
 2290         -
            )
 2291         -
        } else {
 2292         -
            Ok(items)
 2293         -
        }
 2294         -
    }
        3640  +
pub struct SingletonEvent {
        3641  +
    #[pyo3(get, set)]
        3642  +
    /// :type typing.Optional\[str\]:
        3643  +
    #[allow(missing_docs)] // documentation missing in model
        3644  +
    pub value: ::std::option::Option<::std::string::String>,
 2295   3645   
}
 2296         -
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
 2297         -
    type Error = crate::model::integer_enum_set_internal::ConstraintViolation;
 2298         -
 2299         -
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
 2300         -
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
 2301         -
        let value = Self::check_unique_items(value)?;
 2302         -
 2303         -
        Ok(Self(value))
        3646  +
impl SingletonEvent {
        3647  +
    #[allow(missing_docs)] // documentation missing in model
        3648  +
    pub fn value(&self) -> ::std::option::Option<&str> {
        3649  +
        self.value.as_deref()
 2304   3650   
    }
 2305   3651   
}
 2306         -
 2307         -
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
 2308         -
    fn from(value: IntegerEnumSet) -> Self {
 2309         -
        value.into_inner()
        3652  +
#[allow(clippy::new_without_default)]
        3653  +
#[allow(clippy::too_many_arguments)]
        3654  +
#[::pyo3::pymethods]
        3655  +
impl SingletonEvent {
        3656  +
    #[new]
        3657  +
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
        3658  +
        Self { value }
 2310   3659   
    }
 2311         -
}
 2312         -
impl crate::constrained::Constrained for IntegerEnumSet {
 2313         -
    type Unconstrained =
 2314         -
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
 2315         -
}
 2316         -
 2317         -
#[allow(missing_docs)] // documentation missing in model
 2318         -
///
 2319         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 2320         -
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
 2321         -
///
 2322         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 2323         -
///
 2324         -
#[derive(
 2325         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2326         -
)]
 2327         -
pub(crate) struct FooEnumSet(pub(crate) ::std::vec::Vec<crate::model::FooEnum>);
 2328         -
impl FooEnumSet {
 2329         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
 2330         -
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
 2331         -
        self.0
        3660  +
    fn __repr__(&self) -> String {
        3661  +
        format!("{self:?}")
 2332   3662   
    }
 2333         -
 2334         -
    fn check_unique_items(
 2335         -
        items: ::std::vec::Vec<crate::model::FooEnum>,
 2336         -
    ) -> ::std::result::Result<
 2337         -
        ::std::vec::Vec<crate::model::FooEnum>,
 2338         -
        crate::model::foo_enum_set_internal::ConstraintViolation,
 2339         -
    > {
 2340         -
        let mut seen = ::std::collections::HashMap::new();
 2341         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 2342         -
        for (idx, item) in items.iter().enumerate() {
 2343         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 2344         -
                duplicate_indices.push(prev_idx);
 2345         -
            }
 2346         -
        }
 2347         -
 2348         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 2349         -
        for idx in &duplicate_indices {
 2350         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 2351         -
                last_duplicate_indices.push(prev_idx);
 2352         -
            }
 2353         -
        }
 2354         -
        duplicate_indices.extend(last_duplicate_indices);
 2355         -
 2356         -
        if !duplicate_indices.is_empty() {
 2357         -
            debug_assert!(duplicate_indices.len() >= 2);
 2358         -
            Err(
 2359         -
                crate::model::foo_enum_set_internal::ConstraintViolation::UniqueItems {
 2360         -
                    duplicate_indices,
 2361         -
                    original: items,
 2362         -
                },
 2363         -
            )
 2364         -
        } else {
 2365         -
            Ok(items)
 2366         -
        }
        3663  +
    fn __str__(&self) -> String {
        3664  +
        format!("{self:?}")
 2367   3665   
    }
 2368   3666   
}
 2369         -
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
 2370         -
    type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
 2371         -
 2372         -
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
 2373         -
    fn try_from(
 2374         -
        value: ::std::vec::Vec<crate::model::FooEnum>,
 2375         -
    ) -> ::std::result::Result<Self, Self::Error> {
 2376         -
        let value = Self::check_unique_items(value)?;
 2377         -
 2378         -
        Ok(Self(value))
        3667  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<SingletonEvent> {
        3668  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        3669  +
        ob.extract::<SingletonEvent>().map(Box::new)
 2379   3670   
    }
 2380   3671   
}
 2381   3672   
 2382         -
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
 2383         -
    fn from(value: FooEnumSet) -> Self {
 2384         -
        value.into_inner()
        3673  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<SingletonEvent> {
        3674  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        3675  +
        (*self).into_py(py)
 2385   3676   
    }
 2386   3677   
}
 2387         -
impl crate::constrained::Constrained for FooEnumSet {
 2388         -
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
        3678  +
impl SingletonEvent {
        3679  +
    /// Creates a new builder-style object to manufacture [`SingletonEvent`](crate::model::SingletonEvent).
        3680  +
    pub fn builder() -> crate::model::singleton_event::Builder {
        3681  +
        crate::model::singleton_event::Builder::default()
        3682  +
    }
 2389   3683   
}
 2390   3684   
 2391   3685   
#[::pyo3::pyclass]
 2392         -
/// :param foo typing.Optional\[str\]:
        3686  +
/// :param structure_member typing.Optional\[str\]:
 2393   3687   
/// :rtype None:
 2394   3688   
#[allow(missing_docs)] // documentation missing in model
 2395   3689   
#[derive(
 2396   3690   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2397   3691   
)]
 2398         -
pub struct ComplexNestedErrorData {
        3692  +
pub struct PayloadStructure {
 2399   3693   
    #[pyo3(get, set)]
 2400   3694   
    /// :type typing.Optional\[str\]:
 2401   3695   
    #[allow(missing_docs)] // documentation missing in model
 2402         -
    pub foo: ::std::option::Option<::std::string::String>,
        3696  +
    pub structure_member: ::std::option::Option<::std::string::String>,
 2403   3697   
}
 2404         -
impl ComplexNestedErrorData {
        3698  +
impl PayloadStructure {
 2405   3699   
    #[allow(missing_docs)] // documentation missing in model
 2406         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
 2407         -
        self.foo.as_deref()
        3700  +
    pub fn structure_member(&self) -> ::std::option::Option<&str> {
        3701  +
        self.structure_member.as_deref()
 2408   3702   
    }
 2409   3703   
}
 2410   3704   
#[allow(clippy::new_without_default)]
 2411   3705   
#[allow(clippy::too_many_arguments)]
 2412   3706   
#[::pyo3::pymethods]
 2413         -
impl ComplexNestedErrorData {
        3707  +
impl PayloadStructure {
 2414   3708   
    #[new]
 2415         -
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
 2416         -
        Self { foo }
        3709  +
    pub fn new(structure_member: ::std::option::Option<::std::string::String>) -> Self {
        3710  +
        Self { structure_member }
 2417   3711   
    }
 2418   3712   
    fn __repr__(&self) -> String {
 2419   3713   
        format!("{self:?}")
 2420   3714   
    }
 2421   3715   
    fn __str__(&self) -> String {
 2422   3716   
        format!("{self:?}")
 2423   3717   
    }
 2424   3718   
}
 2425         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
        3719  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<PayloadStructure> {
 2426   3720   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2427         -
        ob.extract::<ComplexNestedErrorData>().map(Box::new)
        3721  +
        ob.extract::<PayloadStructure>().map(Box::new)
 2428   3722   
    }
 2429   3723   
}
 2430   3724   
 2431         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
        3725  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<PayloadStructure> {
 2432   3726   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2433   3727   
        (*self).into_py(py)
 2434   3728   
    }
 2435   3729   
}
 2436         -
impl ComplexNestedErrorData {
 2437         -
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 2438         -
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
 2439         -
        crate::model::complex_nested_error_data::Builder::default()
        3730  +
impl crate::constrained::Constrained for crate::model::PayloadStructure {
        3731  +
    type Unconstrained = crate::model::payload_structure_internal::Builder;
        3732  +
}
        3733  +
impl PayloadStructure {
        3734  +
    /// Creates a new builder-style object to manufacture [`PayloadStructure`](crate::model::PayloadStructure).
        3735  +
    pub fn builder() -> crate::model::payload_structure::Builder {
        3736  +
        crate::model::payload_structure::Builder::default()
 2440   3737   
    }
 2441   3738   
}
 2442   3739   
 2443   3740   
#[allow(missing_docs)] // documentation missing in model
 2444   3741   
#[derive(
 2445   3742   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2446   3743   
)]
 2447         -
pub enum UnionPayload {
        3744  +
pub enum PayloadUnion {
 2448   3745   
    #[allow(missing_docs)] // documentation missing in model
 2449         -
    Greeting(::std::string::String),
        3746  +
    UnionMember(::std::string::String),
 2450   3747   
}
 2451         -
impl UnionPayload {
        3748  +
impl PayloadUnion {
 2452   3749   
    #[allow(irrefutable_let_patterns)]
 2453         -
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
        3750  +
    /// Tries to convert the enum instance into [`UnionMember`](crate::model::PayloadUnion::UnionMember), extracting the inner [`String`](::std::string::String).
 2454   3751   
    /// Returns `Err(&Self)` if it can't be converted.
 2455         -
    pub fn as_greeting(&self) -> ::std::result::Result<&::std::string::String, &Self> {
 2456         -
        if let UnionPayload::Greeting(val) = &self {
        3752  +
    pub fn as_union_member(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        3753  +
        if let PayloadUnion::UnionMember(val) = &self {
 2457   3754   
            ::std::result::Result::Ok(val)
 2458   3755   
        } else {
 2459   3756   
            ::std::result::Result::Err(self)
 2460   3757   
        }
 2461   3758   
    }
 2462         -
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
 2463         -
    pub fn is_greeting(&self) -> bool {
 2464         -
        self.as_greeting().is_ok()
        3759  +
    /// Returns true if this is a [`UnionMember`](crate::model::PayloadUnion::UnionMember).
        3760  +
    pub fn is_union_member(&self) -> bool {
        3761  +
        self.as_union_member().is_ok()
 2465   3762   
    }
 2466   3763   
}
 2467         -
#[pyo3::pyclass(name = "UnionPayload")]
        3764  +
#[pyo3::pyclass(name = "PayloadUnion")]
 2468   3765   
#[derive(
 2469   3766   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2470   3767   
)]
 2471         -
pub struct PyUnionMarkerUnionPayload(pub UnionPayload);
        3768  +
pub struct PyUnionMarkerPayloadUnion(pub PayloadUnion);
 2472   3769   
#[::pyo3::pymethods]
 2473         -
impl PyUnionMarkerUnionPayload {
        3770  +
impl PyUnionMarkerPayloadUnion {
 2474   3771   
    #[allow(irrefutable_let_patterns)]
 2475   3772   
    #[staticmethod]
 2476         -
    /// Creates a new union instance of [`Greeting`](crate::model::UnionPayload::Greeting)
        3773  +
    /// Creates a new union instance of [`UnionMember`](crate::model::PayloadUnion::UnionMember)
 2477   3774   
    /// :param data str:
 2478         -
    /// :rtype UnionPayload:
 2479         -
    pub fn greeting(data: ::std::string::String) -> Self {
 2480         -
        Self(UnionPayload::Greeting(data))
        3775  +
    /// :rtype PayloadUnion:
        3776  +
    pub fn union_member(data: ::std::string::String) -> Self {
        3777  +
        Self(PayloadUnion::UnionMember(data))
 2481   3778   
    }
 2482         -
    /// Tries to convert the enum instance into [`Greeting`](crate::model::UnionPayload::Greeting), extracting the inner [`String`](::std::string::String).
        3779  +
    /// Tries to convert the enum instance into [`UnionMember`](crate::model::PayloadUnion::UnionMember), extracting the inner [`String`](::std::string::String).
 2483   3780   
    /// :rtype str:
 2484         -
    pub fn as_greeting(&self) -> ::pyo3::PyResult<::std::string::String> {
 2485         -
        match self.0.as_greeting() {
        3781  +
    pub fn as_union_member(&self) -> ::pyo3::PyResult<::std::string::String> {
        3782  +
        match self.0.as_union_member() {
 2486   3783   
            Ok(variant) => Ok(variant.clone()),
 2487   3784   
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
 2488         -
                r"UnionPayload variant is not of type str",
        3785  +
                r"PayloadUnion variant is not of type str",
 2489   3786   
            )),
 2490   3787   
        }
 2491   3788   
    }
 2492         -
    /// Returns true if this is a [`Greeting`](crate::model::UnionPayload::Greeting).
        3789  +
    /// Returns true if this is a [`UnionMember`](crate::model::PayloadUnion::UnionMember).
 2493   3790   
    /// :rtype bool:
 2494         -
    pub fn is_greeting(&self) -> bool {
 2495         -
        self.0.is_greeting()
        3791  +
    pub fn is_union_member(&self) -> bool {
        3792  +
        self.0.is_union_member()
 2496   3793   
    }
 2497   3794   
}
 2498         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for UnionPayload {
        3795  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for PayloadUnion {
 2499   3796   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2500         -
        PyUnionMarkerUnionPayload(self).into_py(py)
        3797  +
        PyUnionMarkerPayloadUnion(self).into_py(py)
 2501   3798   
    }
 2502   3799   
}
 2503         -
impl<'source> ::pyo3::FromPyObject<'source> for UnionPayload {
        3800  +
impl<'source> ::pyo3::FromPyObject<'source> for PayloadUnion {
 2504   3801   
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2505         -
        let data: PyUnionMarkerUnionPayload = obj.extract()?;
        3802  +
        let data: PyUnionMarkerPayloadUnion = obj.extract()?;
 2506   3803   
        Ok(data.0)
 2507   3804   
    }
 2508   3805   
}
        3806  +
pub(crate) mod string_set_internal {
        3807  +
        3808  +
    #[allow(clippy::enum_variant_names)]
        3809  +
    #[derive(Debug, PartialEq)]
        3810  +
    pub(crate) enum ConstraintViolation {
        3811  +
        /// Constraint violation error when the list does not contain unique items
        3812  +
        UniqueItems {
        3813  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3814  +
            /// at least two elements.
        3815  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3816  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3817  +
            /// Nothing is guaranteed about the order of the indices.
        3818  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3819  +
            /// The original vector, that contains duplicate items.
        3820  +
            original: ::std::vec::Vec<::std::string::String>,
        3821  +
        },
        3822  +
    }
        3823  +
        3824  +
    impl ::std::fmt::Display for ConstraintViolation {
        3825  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3826  +
            let message = match self {
        3827  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3828  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3829  +
                            };
        3830  +
            write!(f, "{message}")
        3831  +
        }
        3832  +
    }
        3833  +
        3834  +
    impl ::std::error::Error for ConstraintViolation {}
        3835  +
    impl ConstraintViolation {
        3836  +
        pub(crate) fn as_validation_exception_field(
        3837  +
            self,
        3838  +
            path: ::std::string::String,
        3839  +
        ) -> crate::model::ValidationExceptionField {
        3840  +
            match self {
        3841  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3842  +
                                crate::model::ValidationExceptionField {
        3843  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3844  +
                                    path,
        3845  +
                                },
        3846  +
                    }
        3847  +
        }
        3848  +
    }
        3849  +
}
        3850  +
pub(crate) mod foo_enum_list_internal {
        3851  +
        3852  +
    #[allow(clippy::enum_variant_names)]
        3853  +
    #[derive(Debug, PartialEq)]
        3854  +
    pub(crate) enum ConstraintViolation {
        3855  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        3856  +
        /// The first component of the tuple is the index in the collection where the
        3857  +
        /// first constraint violation was found.
        3858  +
        #[doc(hidden)]
        3859  +
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
        3860  +
    }
        3861  +
        3862  +
    impl ::std::fmt::Display for ConstraintViolation {
        3863  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3864  +
            let message = match self {
        3865  +
                Self::Member(index, failing_member) => format!(
        3866  +
                    "Value at index {index} failed to satisfy constraint. {}",
        3867  +
                    failing_member
        3868  +
                ),
        3869  +
            };
        3870  +
            write!(f, "{message}")
        3871  +
        }
        3872  +
    }
        3873  +
        3874  +
    impl ::std::error::Error for ConstraintViolation {}
        3875  +
    impl ConstraintViolation {
        3876  +
        pub(crate) fn as_validation_exception_field(
        3877  +
            self,
        3878  +
            path: ::std::string::String,
        3879  +
        ) -> crate::model::ValidationExceptionField {
        3880  +
            match self {
        3881  +
                Self::Member(index, member_constraint_violation) => member_constraint_violation
        3882  +
                    .as_validation_exception_field(path + "/" + &index.to_string()),
        3883  +
            }
        3884  +
        }
        3885  +
    }
        3886  +
}
        3887  +
pub(crate) mod integer_set_internal {
        3888  +
        3889  +
    #[allow(clippy::enum_variant_names)]
        3890  +
    #[derive(Debug, PartialEq)]
        3891  +
    pub(crate) enum ConstraintViolation {
        3892  +
        /// Constraint violation error when the list does not contain unique items
        3893  +
        UniqueItems {
        3894  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        3895  +
            /// at least two elements.
        3896  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        3897  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        3898  +
            /// Nothing is guaranteed about the order of the indices.
        3899  +
            duplicate_indices: ::std::vec::Vec<usize>,
        3900  +
            /// The original vector, that contains duplicate items.
        3901  +
            original: ::std::vec::Vec<i32>,
        3902  +
        },
        3903  +
    }
        3904  +
        3905  +
    impl ::std::fmt::Display for ConstraintViolation {
        3906  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        3907  +
            let message = match self {
        3908  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        3909  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        3910  +
                            };
        3911  +
            write!(f, "{message}")
        3912  +
        }
        3913  +
    }
        3914  +
        3915  +
    impl ::std::error::Error for ConstraintViolation {}
        3916  +
    impl ConstraintViolation {
        3917  +
        pub(crate) fn as_validation_exception_field(
        3918  +
            self,
        3919  +
            path: ::std::string::String,
        3920  +
        ) -> crate::model::ValidationExceptionField {
        3921  +
            match self {
        3922  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        3923  +
                                crate::model::ValidationExceptionField {
        3924  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        3925  +
                                    path,
        3926  +
                                },
        3927  +
                    }
        3928  +
        }
        3929  +
    }
        3930  +
}
        3931  +
/// See [`NestedPayload`](crate::model::NestedPayload).
        3932  +
pub(crate) mod nested_payload_internal {
        3933  +
        3934  +
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        3935  +
        fn from(builder: Builder) -> Self {
        3936  +
            builder.build()
        3937  +
        }
        3938  +
    }
        3939  +
    /// A builder for [`NestedPayload`](crate::model::NestedPayload).
        3940  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3941  +
    pub(crate) struct Builder {
        3942  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        3943  +
        pub(crate) name: ::std::option::Option<::std::string::String>,
        3944  +
    }
        3945  +
    impl Builder {
        3946  +
        #[allow(missing_docs)] // documentation missing in model
        3947  +
        pub(crate) fn set_greeting(
        3948  +
            mut self,
        3949  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3950  +
        ) -> Self {
        3951  +
            self.greeting = input.map(|v| v.into());
        3952  +
            self
        3953  +
        }
        3954  +
        #[allow(missing_docs)] // documentation missing in model
        3955  +
        pub(crate) fn set_name(
        3956  +
            mut self,
        3957  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        3958  +
        ) -> Self {
        3959  +
            self.name = input.map(|v| v.into());
        3960  +
            self
        3961  +
        }
        3962  +
        /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
        3963  +
        pub fn build(self) -> crate::model::NestedPayload {
        3964  +
            self.build_enforcing_all_constraints()
        3965  +
        }
        3966  +
        fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
        3967  +
            crate::model::NestedPayload {
        3968  +
                greeting: self.greeting,
        3969  +
                name: self.name,
        3970  +
            }
        3971  +
        }
        3972  +
    }
        3973  +
}
        3974  +
/// See [`NestedPayload`](crate::model::NestedPayload).
        3975  +
pub mod nested_payload {
        3976  +
        3977  +
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        3978  +
        fn from(builder: Builder) -> Self {
        3979  +
            builder.build()
        3980  +
        }
        3981  +
    }
        3982  +
    /// A builder for [`NestedPayload`](crate::model::NestedPayload).
        3983  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        3984  +
    pub struct Builder {
        3985  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        3986  +
        pub(crate) name: ::std::option::Option<::std::string::String>,
        3987  +
    }
        3988  +
    impl Builder {
        3989  +
        #[allow(missing_docs)] // documentation missing in model
        3990  +
        pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3991  +
            self.greeting = input;
        3992  +
            self
        3993  +
        }
        3994  +
        #[allow(missing_docs)] // documentation missing in model
        3995  +
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        3996  +
            self.name = input;
        3997  +
            self
        3998  +
        }
        3999  +
        /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
        4000  +
        pub fn build(self) -> crate::model::NestedPayload {
        4001  +
            self.build_enforcing_required_and_enum_traits()
        4002  +
        }
        4003  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::NestedPayload {
        4004  +
            crate::model::NestedPayload {
        4005  +
                greeting: self.greeting,
        4006  +
                name: self.name,
        4007  +
            }
        4008  +
        }
        4009  +
    }
        4010  +
}
        4011  +
/// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        4012  +
pub mod complex_nested_error_data {
        4013  +
        4014  +
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
        4015  +
        fn from(builder: Builder) -> Self {
        4016  +
            builder.build()
        4017  +
        }
        4018  +
    }
        4019  +
    /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        4020  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        4021  +
    pub struct Builder {
        4022  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        4023  +
    }
        4024  +
    impl Builder {
        4025  +
        #[allow(missing_docs)] // documentation missing in model
        4026  +
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        4027  +
            self.foo = input;
        4028  +
            self
        4029  +
        }
        4030  +
        /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        4031  +
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
        4032  +
            self.build_enforcing_required_and_enum_traits()
        4033  +
        }
        4034  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
        4035  +
            crate::model::ComplexNestedErrorData { foo: self.foo }
        4036  +
        }
        4037  +
    }
        4038  +
}
        4039  +
pub(crate) mod foo_enum_set_internal {
 2509   4040   
 2510         -
#[::pyo3::pyclass]
 2511         -
#[allow(missing_docs)] // documentation missing in model
 2512         -
#[derive(
 2513         -
    ::std::clone::Clone,
 2514         -
    ::std::cmp::Eq,
 2515         -
    ::std::cmp::Ord,
 2516         -
    ::std::cmp::PartialEq,
 2517         -
    ::std::cmp::PartialOrd,
 2518         -
    ::std::fmt::Debug,
 2519         -
    ::std::hash::Hash,
 2520         -
)]
 2521         -
pub enum StringEnum {
 2522         -
    #[allow(missing_docs)] // documentation missing in model
 2523         -
    V,
 2524         -
}
 2525         -
pub(crate) mod string_enum_internal {
        4041  +
    #[allow(clippy::enum_variant_names)]
 2526   4042   
    #[derive(Debug, PartialEq)]
 2527         -
    pub struct ConstraintViolation(pub(crate) ::std::string::String);
        4043  +
    pub(crate) enum ConstraintViolation {
        4044  +
        /// Constraint violation error when the list does not contain unique items
        4045  +
        UniqueItems {
        4046  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        4047  +
            /// at least two elements.
        4048  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        4049  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        4050  +
            /// Nothing is guaranteed about the order of the indices.
        4051  +
            duplicate_indices: ::std::vec::Vec<usize>,
        4052  +
            /// The original vector, that contains duplicate items.
        4053  +
            original: ::std::vec::Vec<crate::model::FooEnum>,
        4054  +
        },
        4055  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        4056  +
        /// The first component of the tuple is the index in the collection where the
        4057  +
        /// first constraint violation was found.
        4058  +
        #[doc(hidden)]
        4059  +
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
        4060  +
    }
 2528   4061   
 2529   4062   
    impl ::std::fmt::Display for ConstraintViolation {
 2530   4063   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2531         -
            write!(
 2532         -
                f,
 2533         -
                r#"Value provided for 'aws.protocoltests.restjson#StringEnum' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#
 2534         -
            )
        4064  +
            let message = match self {
        4065  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        4066  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        4067  +
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
        4068  +
                           failing_member)
        4069  +
                            };
        4070  +
            write!(f, "{message}")
 2535   4071   
        }
 2536   4072   
    }
 2537   4073   
 2538   4074   
    impl ::std::error::Error for ConstraintViolation {}
 2539   4075   
    impl ConstraintViolation {
 2540   4076   
        pub(crate) fn as_validation_exception_field(
 2541   4077   
            self,
 2542   4078   
            path: ::std::string::String,
 2543   4079   
        ) -> crate::model::ValidationExceptionField {
 2544         -
            crate::model::ValidationExceptionField {
 2545         -
                message: format!(
 2546         -
                    r#"Value at '{}' failed to satisfy constraint: Member must satisfy enum value set: [enumvalue]"#,
 2547         -
                    &path
 2548         -
                ),
 2549         -
                path,
 2550         -
            }
 2551         -
        }
 2552         -
    }
 2553         -
}
 2554         -
impl ::std::convert::TryFrom<&str> for StringEnum {
 2555         -
    type Error = crate::model::string_enum_internal::ConstraintViolation;
 2556         -
    fn try_from(
 2557         -
        s: &str,
 2558         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<&str>>::Error> {
 2559         -
        match s {
 2560         -
            "enumvalue" => Ok(StringEnum::V),
 2561         -
            _ => Err(crate::model::string_enum_internal::ConstraintViolation(
 2562         -
                s.to_owned(),
 2563         -
            )),
        4080  +
            match self {
        4081  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        4082  +
                                crate::model::ValidationExceptionField {
        4083  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        4084  +
                                    path,
        4085  +
                                },
        4086  +
    Self::Member(index, member_constraint_violation) =>
        4087  +
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
        4088  +
                    }
 2564   4089   
        }
 2565   4090   
    }
 2566   4091   
}
 2567         -
impl ::std::convert::TryFrom<::std::string::String> for StringEnum {
 2568         -
    type Error = crate::model::string_enum_internal::ConstraintViolation;
 2569         -
    fn try_from(
 2570         -
        s: ::std::string::String,
 2571         -
    ) -> ::std::result::Result<Self, <Self as ::std::convert::TryFrom<::std::string::String>>::Error>
 2572         -
    {
 2573         -
        s.as_str().try_into()
 2574         -
    }
 2575         -
}
 2576         -
impl std::str::FromStr for StringEnum {
 2577         -
    type Err = crate::model::string_enum_internal::ConstraintViolation;
 2578         -
    fn from_str(s: &str) -> std::result::Result<Self, <Self as std::str::FromStr>::Err> {
 2579         -
        Self::try_from(s)
        4092  +
pub(crate) mod foo_enum_map_internal {
        4093  +
        4094  +
    #[allow(clippy::enum_variant_names)]
        4095  +
    #[derive(Debug, PartialEq)]
        4096  +
    pub(crate) enum ConstraintViolation {
        4097  +
        #[doc(hidden)]
        4098  +
        Value(
        4099  +
            ::std::string::String,
        4100  +
            crate::model::foo_enum_internal::ConstraintViolation,
        4101  +
        ),
 2580   4102   
    }
 2581         -
}
 2582         -
impl StringEnum {
 2583         -
    /// Returns the `&str` value of the enum member.
 2584         -
    pub fn as_str(&self) -> &str {
 2585         -
        match self {
 2586         -
            StringEnum::V => "enumvalue",
        4103  +
        4104  +
    impl ::std::fmt::Display for ConstraintViolation {
        4105  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        4106  +
            match self {
        4107  +
                Self::Value(_, value_constraint_violation) => {
        4108  +
                    write!(f, "{}", value_constraint_violation)
        4109  +
                }
        4110  +
            }
 2587   4111   
        }
 2588   4112   
    }
 2589         -
    /// Returns all the `&str` representations of the enum members.
 2590         -
    pub const fn values() -> &'static [&'static str] {
 2591         -
        &["enumvalue"]
 2592         -
    }
 2593         -
}
 2594         -
impl ::std::convert::AsRef<str> for StringEnum {
 2595         -
    fn as_ref(&self) -> &str {
 2596         -
        self.as_str()
 2597         -
    }
 2598         -
}
 2599         -
#[::pyo3::pymethods]
 2600         -
impl StringEnum {
 2601         -
    #[getter]
 2602         -
    pub fn name(&self) -> &str {
 2603         -
        match self {
 2604         -
            StringEnum::V => "V",
        4113  +
        4114  +
    impl ::std::error::Error for ConstraintViolation {}
        4115  +
    impl ConstraintViolation {
        4116  +
        pub(crate) fn as_validation_exception_field(
        4117  +
            self,
        4118  +
            path: ::std::string::String,
        4119  +
        ) -> crate::model::ValidationExceptionField {
        4120  +
            match self {
        4121  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        4122  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
        4123  +
            }
 2605   4124   
        }
 2606   4125   
    }
 2607         -
    #[getter]
 2608         -
    pub fn value(&self) -> &str {
 2609         -
        self.as_str()
 2610         -
    }
 2611         -
    fn __repr__(&self) -> String {
 2612         -
        self.as_str().to_owned()
 2613         -
    }
 2614         -
    fn __str__(&self) -> String {
 2615         -
        self.as_str().to_owned()
 2616         -
    }
 2617         -
}
 2618         -
impl crate::constrained::Constrained for StringEnum {
 2619         -
    type Unconstrained = ::std::string::String;
 2620   4126   
}
        4127  +
pub(crate) mod integer_enum_set_internal {
 2621   4128   
 2622         -
impl ::std::convert::From<::std::string::String>
 2623         -
    for crate::constrained::MaybeConstrained<crate::model::StringEnum>
 2624         -
{
 2625         -
    fn from(value: ::std::string::String) -> Self {
 2626         -
        Self::Unconstrained(value)
        4129  +
    #[allow(clippy::enum_variant_names)]
        4130  +
    #[derive(Debug, PartialEq)]
        4131  +
    pub(crate) enum ConstraintViolation {
        4132  +
        /// Constraint violation error when the list does not contain unique items
        4133  +
        UniqueItems {
        4134  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        4135  +
            /// at least two elements.
        4136  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        4137  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        4138  +
            /// Nothing is guaranteed about the order of the indices.
        4139  +
            duplicate_indices: ::std::vec::Vec<usize>,
        4140  +
            /// The original vector, that contains duplicate items.
        4141  +
            original: ::std::vec::Vec<i32>,
        4142  +
        },
 2627   4143   
    }
 2628         -
}
 2629   4144   
 2630         -
#[::pyo3::pyclass]
 2631         -
/// :param greeting typing.Optional\[str\]:
 2632         -
/// :param name typing.Optional\[str\]:
 2633         -
/// :rtype None:
 2634         -
#[allow(missing_docs)] // documentation missing in model
 2635         -
#[derive(
 2636         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2637         -
)]
 2638         -
pub struct NestedPayload {
 2639         -
    #[pyo3(get, set)]
 2640         -
    /// :type typing.Optional\[str\]:
 2641         -
    #[allow(missing_docs)] // documentation missing in model
 2642         -
    pub greeting: ::std::option::Option<::std::string::String>,
 2643         -
    #[pyo3(get, set)]
 2644         -
    /// :type typing.Optional\[str\]:
 2645         -
    #[allow(missing_docs)] // documentation missing in model
 2646         -
    pub name: ::std::option::Option<::std::string::String>,
 2647         -
}
 2648         -
impl NestedPayload {
 2649         -
    #[allow(missing_docs)] // documentation missing in model
 2650         -
    pub fn greeting(&self) -> ::std::option::Option<&str> {
 2651         -
        self.greeting.as_deref()
        4145  +
    impl ::std::fmt::Display for ConstraintViolation {
        4146  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        4147  +
            let message = match self {
        4148  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        4149  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        4150  +
                            };
        4151  +
            write!(f, "{message}")
        4152  +
        }
 2652   4153   
    }
 2653         -
    #[allow(missing_docs)] // documentation missing in model
 2654         -
    pub fn name(&self) -> ::std::option::Option<&str> {
 2655         -
        self.name.as_deref()
        4154  +
        4155  +
    impl ::std::error::Error for ConstraintViolation {}
        4156  +
    impl ConstraintViolation {
        4157  +
        pub(crate) fn as_validation_exception_field(
        4158  +
            self,
        4159  +
            path: ::std::string::String,
        4160  +
        ) -> crate::model::ValidationExceptionField {
        4161  +
            match self {
        4162  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        4163  +
                                crate::model::ValidationExceptionField {
        4164  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        4165  +
                                    path,
        4166  +
                                },
        4167  +
                    }
        4168  +
        }
 2656   4169   
    }
 2657   4170   
}
 2658         -
#[allow(clippy::new_without_default)]
 2659         -
#[allow(clippy::too_many_arguments)]
 2660         -
#[::pyo3::pymethods]
 2661         -
impl NestedPayload {
 2662         -
    #[new]
 2663         -
    pub fn new(
 2664         -
        greeting: ::std::option::Option<::std::string::String>,
 2665         -
        name: ::std::option::Option<::std::string::String>,
 2666         -
    ) -> Self {
 2667         -
        Self { greeting, name }
 2668         -
    }
 2669         -
    fn __repr__(&self) -> String {
 2670         -
        format!("{self:?}")
        4171  +
/// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4172  +
pub(crate) mod recursive_shapes_input_output_nested1_internal {
        4173  +
        4174  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
        4175  +
        fn from(builder: Builder) -> Self {
        4176  +
            builder.build()
        4177  +
        }
 2671   4178   
    }
 2672         -
    fn __str__(&self) -> String {
 2673         -
        format!("{self:?}")
        4179  +
    /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4180  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        4181  +
    pub(crate) struct Builder {
        4182  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        4183  +
        pub(crate) nested: ::std::option::Option<
        4184  +
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        4185  +
        >,
 2674   4186   
    }
 2675         -
}
 2676         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<NestedPayload> {
 2677         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 2678         -
        ob.extract::<NestedPayload>().map(Box::new)
        4187  +
    impl Builder {
        4188  +
        #[allow(missing_docs)] // documentation missing in model
        4189  +
        pub(crate) fn set_foo(
        4190  +
            mut self,
        4191  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        4192  +
        ) -> Self {
        4193  +
            self.foo = input.map(|v| v.into());
        4194  +
            self
        4195  +
        }
        4196  +
        #[allow(missing_docs)] // documentation missing in model
        4197  +
        pub(crate) fn set_nested(
        4198  +
            mut self,
        4199  +
            input: Option<
        4200  +
                impl ::std::convert::Into<
        4201  +
                    ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        4202  +
                >,
        4203  +
            >,
        4204  +
        ) -> Self {
        4205  +
            self.nested = input.map(|v| v.into());
        4206  +
            self
        4207  +
        }
        4208  +
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4209  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        4210  +
            self.build_enforcing_all_constraints()
        4211  +
        }
        4212  +
        fn build_enforcing_all_constraints(
        4213  +
            self,
        4214  +
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
        4215  +
            crate::model::RecursiveShapesInputOutputNested1 {
        4216  +
                foo: self.foo,
        4217  +
                nested: self.nested,
        4218  +
            }
        4219  +
        }
 2679   4220   
    }
 2680   4221   
}
        4222  +
/// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4223  +
pub mod recursive_shapes_input_output_nested1 {
 2681   4224   
 2682         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<NestedPayload> {
 2683         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 2684         -
        (*self).into_py(py)
        4225  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
        4226  +
        fn from(builder: Builder) -> Self {
        4227  +
            builder.build()
        4228  +
        }
 2685   4229   
    }
 2686         -
}
 2687         -
impl crate::constrained::Constrained for crate::model::NestedPayload {
 2688         -
    type Unconstrained = crate::model::nested_payload_internal::Builder;
 2689         -
}
 2690         -
impl NestedPayload {
 2691         -
    /// Creates a new builder-style object to manufacture [`NestedPayload`](crate::model::NestedPayload).
 2692         -
    pub fn builder() -> crate::model::nested_payload::Builder {
 2693         -
        crate::model::nested_payload::Builder::default()
        4230  +
    /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4231  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        4232  +
    pub struct Builder {
        4233  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        4234  +
        pub(crate) nested: ::std::option::Option<
        4235  +
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        4236  +
        >,
        4237  +
    }
        4238  +
    impl Builder {
        4239  +
        #[allow(missing_docs)] // documentation missing in model
        4240  +
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        4241  +
            self.foo = input;
        4242  +
            self
        4243  +
        }
        4244  +
        #[allow(missing_docs)] // documentation missing in model
        4245  +
        pub fn nested(
        4246  +
            mut self,
        4247  +
            input: ::std::option::Option<
        4248  +
                ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
        4249  +
            >,
        4250  +
        ) -> Self {
        4251  +
            self.nested = input;
        4252  +
            self
        4253  +
        }
        4254  +
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        4255  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        4256  +
            self.build_enforcing_required_and_enum_traits()
        4257  +
        }
        4258  +
        fn build_enforcing_required_and_enum_traits(
        4259  +
            self,
        4260  +
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
        4261  +
            crate::model::RecursiveShapesInputOutputNested1 {
        4262  +
                foo: self.foo,
        4263  +
                nested: self.nested,
        4264  +
            }
        4265  +
        }
 2694   4266   
    }
 2695   4267   
}
        4268  +
pub(crate) mod dense_set_map_internal {
 2696   4269   
 2697         -
#[allow(missing_docs)] // documentation missing in model
 2698         -
///
 2699         -
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
 2700         -
/// [constraint traits]. Use [`IntegerSet::try_from`] to construct values of this type.
 2701         -
///
 2702         -
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
 2703         -
///
 2704         -
#[derive(
 2705         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 2706         -
)]
 2707         -
pub(crate) struct IntegerSet(pub(crate) ::std::vec::Vec<i32>);
 2708         -
impl IntegerSet {
 2709         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
 2710         -
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
 2711         -
        self.0
        4270  +
    #[allow(clippy::enum_variant_names)]
        4271  +
    #[derive(Debug, PartialEq)]
        4272  +
    pub(crate) enum ConstraintViolation {
        4273  +
        #[doc(hidden)]
        4274  +
        Value(
        4275  +
            ::std::string::String,
        4276  +
            crate::model::string_set_internal::ConstraintViolation,
        4277  +
        ),
 2712   4278   
    }
 2713   4279   
 2714         -
    fn check_unique_items(
 2715         -
        items: ::std::vec::Vec<i32>,
 2716         -
    ) -> ::std::result::Result<
 2717         -
        ::std::vec::Vec<i32>,
 2718         -
        crate::model::integer_set_internal::ConstraintViolation,
 2719         -
    > {
 2720         -
        let mut seen = ::std::collections::HashMap::new();
 2721         -
        let mut duplicate_indices = ::std::vec::Vec::new();
 2722         -
        for (idx, item) in items.iter().enumerate() {
 2723         -
            if let Some(prev_idx) = seen.insert(item, idx) {
 2724         -
                duplicate_indices.push(prev_idx);
        4280  +
    impl ::std::fmt::Display for ConstraintViolation {
        4281  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        4282  +
            match self {
        4283  +
                Self::Value(_, value_constraint_violation) => {
        4284  +
                    write!(f, "{}", value_constraint_violation)
        4285  +
                }
 2725   4286   
            }
 2726   4287   
        }
        4288  +
    }
 2727   4289   
 2728         -
        let mut last_duplicate_indices = ::std::vec::Vec::new();
 2729         -
        for idx in &duplicate_indices {
 2730         -
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
 2731         -
                last_duplicate_indices.push(prev_idx);
        4290  +
    impl ::std::error::Error for ConstraintViolation {}
        4291  +
    impl ConstraintViolation {
        4292  +
        pub(crate) fn as_validation_exception_field(
        4293  +
            self,
        4294  +
            path: ::std::string::String,
        4295  +
        ) -> crate::model::ValidationExceptionField {
        4296  +
            match self {
        4297  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        4298  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
 2732   4299   
            }
 2733   4300   
        }
 2734         -
        duplicate_indices.extend(last_duplicate_indices);
 2735         -
 2736         -
        if !duplicate_indices.is_empty() {
 2737         -
            debug_assert!(duplicate_indices.len() >= 2);
 2738         -
            Err(
 2739         -
                crate::model::integer_set_internal::ConstraintViolation::UniqueItems {
 2740         -
                    duplicate_indices,
 2741         -
                    original: items,
 2742         -
                },
 2743         -
            )
 2744         -
        } else {
 2745         -
            Ok(items)
 2746         -
        }
 2747   4301   
    }
 2748   4302   
}
 2749         -
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerSet {
 2750         -
    type Error = crate::model::integer_set_internal::ConstraintViolation;
        4303  +
pub(crate) mod sparse_set_map_internal {
 2751   4304   
 2752         -
    /// Constructs a `IntegerSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
 2753         -
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
 2754         -
        let value = Self::check_unique_items(value)?;
        4305  +
    #[allow(clippy::enum_variant_names)]
        4306  +
    #[derive(Debug, PartialEq)]
        4307  +
    pub(crate) enum ConstraintViolation {
        4308  +
        #[doc(hidden)]
        4309  +
        Value(
        4310  +
            ::std::string::String,
        4311  +
            crate::model::string_set_internal::ConstraintViolation,
        4312  +
        ),
        4313  +
    }
 2755   4314   
 2756         -
        Ok(Self(value))
        4315  +
    impl ::std::fmt::Display for ConstraintViolation {
        4316  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        4317  +
            match self {
        4318  +
                Self::Value(_, value_constraint_violation) => {
        4319  +
                    write!(f, "{}", value_constraint_violation)
        4320  +
                }
        4321  +
            }
        4322  +
        }
 2757   4323   
    }
 2758         -
}
 2759   4324   
 2760         -
impl ::std::convert::From<IntegerSet> for ::std::vec::Vec<i32> {
 2761         -
    fn from(value: IntegerSet) -> Self {
 2762         -
        value.into_inner()
        4325  +
    impl ::std::error::Error for ConstraintViolation {}
        4326  +
    impl ConstraintViolation {
        4327  +
        pub(crate) fn as_validation_exception_field(
        4328  +
            self,
        4329  +
            path: ::std::string::String,
        4330  +
        ) -> crate::model::ValidationExceptionField {
        4331  +
            match self {
        4332  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        4333  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
        4334  +
            }
        4335  +
        }
 2763   4336   
    }
 2764   4337   
}
 2765         -
impl crate::constrained::Constrained for IntegerSet {
 2766         -
    type Unconstrained = crate::unconstrained::integer_set_unconstrained::IntegerSetUnconstrained;
 2767         -
}
 2768         -
 2769         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2770         -
pub mod validation_exception_field {
        4338  +
pub(crate) mod my_union_internal {
 2771   4339   
 2772   4340   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2773         -
    /// Holds one variant for each of the ways the builder can fail.
 2774   4341   
    #[allow(clippy::enum_variant_names)]
 2775         -
    pub enum ConstraintViolation {
 2776         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
 2777         -
        MissingPath,
 2778         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
 2779         -
        MissingMessage,
        4342  +
    pub(crate) enum ConstraintViolation {
        4343  +
        EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
 2780   4344   
    }
 2781   4345   
    impl ::std::fmt::Display for ConstraintViolation {
 2782   4346   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 2783   4347   
            match self {
 2784         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
 2785         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
        4348  +
                Self::EnumValue(inner) => write!(f, "{inner}"),
 2786   4349   
            }
 2787   4350   
        }
 2788   4351   
    }
 2789         -
    impl ::std::error::Error for ConstraintViolation {}
 2790         -
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
 2791         -
        type Error = ConstraintViolation;
 2792   4352   
 2793         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 2794         -
            builder.build()
 2795         -
        }
 2796         -
    }
 2797         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2798         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2799         -
    pub struct Builder {
 2800         -
        pub(crate) path: ::std::option::Option<::std::string::String>,
 2801         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
 2802         -
    }
 2803         -
    impl Builder {
 2804         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
 2805         -
        pub fn path(mut self, input: ::std::string::String) -> Self {
 2806         -
            self.path = Some(input);
 2807         -
            self
 2808         -
        }
 2809         -
        /// A detailed description of the validation failure.
 2810         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
 2811         -
            self.message = Some(input);
 2812         -
            self
 2813         -
        }
 2814         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2815         -
        ///
 2816         -
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
 2817         -
        ///
 2818         -
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 2819         -
            self.build_enforcing_required_and_enum_traits()
 2820         -
        }
 2821         -
        fn build_enforcing_required_and_enum_traits(
        4353  +
    impl ::std::error::Error for ConstraintViolation {}
        4354  +
    impl ConstraintViolation {
        4355  +
        pub(crate) fn as_validation_exception_field(
 2822   4356   
            self,
 2823         -
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 2824         -
            Ok(crate::model::ValidationExceptionField {
 2825         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
 2826         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 2827         -
            })
        4357  +
            path: ::std::string::String,
        4358  +
        ) -> crate::model::ValidationExceptionField {
        4359  +
            match self {
        4360  +
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
        4361  +
            }
 2828   4362   
        }
 2829   4363   
    }
 2830   4364   
}
 2831         -
/// See [`Dialog`](crate::model::Dialog).
 2832         -
pub(crate) mod dialog_internal {
        4365  +
/// See [`TestConfig`](crate::model::TestConfig).
        4366  +
pub(crate) mod test_config_internal {
 2833   4367   
 2834         -
    impl ::std::convert::From<Builder> for crate::model::Dialog {
        4368  +
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
 2835   4369   
        fn from(builder: Builder) -> Self {
 2836   4370   
            builder.build()
 2837   4371   
        }
 2838   4372   
    }
 2839         -
    /// A builder for [`Dialog`](crate::model::Dialog).
        4373  +
    /// A builder for [`TestConfig`](crate::model::TestConfig).
 2840   4374   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2841   4375   
    pub(crate) struct Builder {
 2842         -
        pub(crate) language: ::std::option::Option<::std::string::String>,
 2843         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
 2844         -
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
        4376  +
        pub(crate) timeout: ::std::option::Option<i32>,
 2845   4377   
    }
 2846   4378   
    impl Builder {
 2847   4379   
        #[allow(missing_docs)] // documentation missing in model
 2848         -
        pub(crate) fn set_language(
 2849         -
            mut self,
 2850         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 2851         -
        ) -> Self {
 2852         -
            self.language = input.map(|v| v.into());
 2853         -
            self
 2854         -
        }
 2855         -
        #[allow(missing_docs)] // documentation missing in model
 2856         -
        pub(crate) fn set_greeting(
 2857         -
            mut self,
 2858         -
            input: impl ::std::convert::Into<::std::string::String>,
 2859         -
        ) -> Self {
 2860         -
            self.greeting = Some(input.into());
 2861         -
            self
 2862         -
        }
 2863         -
        #[allow(missing_docs)] // documentation missing in model
 2864         -
        pub(crate) fn set_farewell(
 2865         -
            mut self,
 2866         -
            input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
 2867         -
        ) -> Self {
 2868         -
            self.farewell = input.map(|v| v.into());
        4380  +
        pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        4381  +
            self.timeout = input.map(|v| v.into());
 2869   4382   
            self
 2870   4383   
        }
 2871         -
        /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
 2872         -
        pub fn build(self) -> crate::model::Dialog {
        4384  +
        /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
        4385  +
        pub fn build(self) -> crate::model::TestConfig {
 2873   4386   
            self.build_enforcing_all_constraints()
 2874   4387   
        }
 2875         -
        fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
 2876         -
            crate::model::Dialog {
 2877         -
                language: self.language,
 2878         -
                greeting: self.greeting.unwrap_or_else(|| String::from("hi")),
 2879         -
                farewell: self.farewell,
        4388  +
        fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
        4389  +
            crate::model::TestConfig {
        4390  +
                timeout: self.timeout,
 2880   4391   
            }
 2881   4392   
        }
 2882   4393   
    }
 2883   4394   
}
 2884         -
/// See [`Dialog`](crate::model::Dialog).
 2885         -
pub mod dialog {
        4395  +
/// See [`TestConfig`](crate::model::TestConfig).
        4396  +
pub mod test_config {
 2886   4397   
 2887         -
    impl ::std::convert::From<Builder> for crate::model::Dialog {
        4398  +
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
 2888   4399   
        fn from(builder: Builder) -> Self {
 2889   4400   
            builder.build()
 2890   4401   
        }
 2891   4402   
    }
 2892         -
    /// A builder for [`Dialog`](crate::model::Dialog).
        4403  +
    /// A builder for [`TestConfig`](crate::model::TestConfig).
 2893   4404   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2894   4405   
    pub struct Builder {
 2895         -
        pub(crate) language: ::std::option::Option<::std::string::String>,
 2896         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
 2897         -
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
        4406  +
        pub(crate) timeout: ::std::option::Option<i32>,
 2898   4407   
    }
 2899   4408   
    impl Builder {
 2900   4409   
        #[allow(missing_docs)] // documentation missing in model
 2901         -
        pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 2902         -
            self.language = input;
 2903         -
            self
 2904         -
        }
 2905         -
        #[allow(missing_docs)] // documentation missing in model
 2906         -
        pub fn greeting(mut self, input: ::std::string::String) -> Self {
 2907         -
            self.greeting = Some(input);
 2908         -
            self
 2909         -
        }
 2910         -
        #[allow(missing_docs)] // documentation missing in model
 2911         -
        pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
 2912         -
            self.farewell = input;
        4410  +
        pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
        4411  +
            self.timeout = input;
 2913   4412   
            self
 2914   4413   
        }
 2915         -
        /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
 2916         -
        pub fn build(self) -> crate::model::Dialog {
        4414  +
        /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
        4415  +
        pub fn build(self) -> crate::model::TestConfig {
 2917   4416   
            self.build_enforcing_required_and_enum_traits()
 2918   4417   
        }
 2919         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Dialog {
 2920         -
            crate::model::Dialog {
 2921         -
                language: self.language,
 2922         -
                greeting: self.greeting.unwrap_or_else(|| String::from("hi")),
 2923         -
                farewell: self.farewell,
        4418  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::TestConfig {
        4419  +
            crate::model::TestConfig {
        4420  +
                timeout: self.timeout,
 2924   4421   
            }
 2925   4422   
        }
 2926   4423   
    }
 2927   4424   
}
 2928         -
/// See [`Farewell`](crate::model::Farewell).
 2929         -
pub(crate) mod farewell_internal {
        4425  +
/// See [`PayloadConfig`](crate::model::PayloadConfig).
        4426  +
pub(crate) mod payload_config_internal {
 2930   4427   
 2931         -
    impl ::std::convert::From<Builder> for crate::model::Farewell {
        4428  +
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
 2932   4429   
        fn from(builder: Builder) -> Self {
 2933   4430   
            builder.build()
 2934   4431   
        }
 2935   4432   
    }
 2936         -
    /// A builder for [`Farewell`](crate::model::Farewell).
        4433  +
    /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
 2937   4434   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2938   4435   
    pub(crate) struct Builder {
 2939         -
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
        4436  +
        pub(crate) data: ::std::option::Option<i32>,
 2940   4437   
    }
 2941   4438   
    impl Builder {
 2942   4439   
        #[allow(missing_docs)] // documentation missing in model
 2943         -
        pub(crate) fn set_phrase(
 2944         -
            mut self,
 2945         -
            input: impl ::std::convert::Into<::std::string::String>,
 2946         -
        ) -> Self {
 2947         -
            self.phrase = Some(input.into());
        4440  +
        pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
        4441  +
            self.data = input.map(|v| v.into());
 2948   4442   
            self
 2949   4443   
        }
 2950         -
        /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
 2951         -
        pub fn build(self) -> crate::model::Farewell {
        4444  +
        /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
        4445  +
        pub fn build(self) -> crate::model::PayloadConfig {
 2952   4446   
            self.build_enforcing_all_constraints()
 2953   4447   
        }
 2954         -
        fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
 2955         -
            crate::model::Farewell {
 2956         -
                phrase: self.phrase.unwrap_or_else(|| String::from("bye")),
 2957         -
            }
        4448  +
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
        4449  +
            crate::model::PayloadConfig { data: self.data }
 2958   4450   
        }
 2959   4451   
    }
 2960   4452   
}
 2961         -
/// See [`Farewell`](crate::model::Farewell).
 2962         -
pub mod farewell {
        4453  +
/// See [`PayloadConfig`](crate::model::PayloadConfig).
        4454  +
pub mod payload_config {
 2963   4455   
 2964         -
    impl ::std::convert::From<Builder> for crate::model::Farewell {
        4456  +
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
 2965   4457   
        fn from(builder: Builder) -> Self {
 2966   4458   
            builder.build()
 2967   4459   
        }
 2968   4460   
    }
 2969         -
    /// A builder for [`Farewell`](crate::model::Farewell).
        4461  +
    /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
 2970   4462   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2971   4463   
    pub struct Builder {
 2972         -
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
        4464  +
        pub(crate) data: ::std::option::Option<i32>,
 2973   4465   
    }
 2974   4466   
    impl Builder {
 2975   4467   
        #[allow(missing_docs)] // documentation missing in model
 2976         -
        pub fn phrase(mut self, input: ::std::string::String) -> Self {
 2977         -
            self.phrase = Some(input);
        4468  +
        pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
        4469  +
            self.data = input;
 2978   4470   
            self
 2979   4471   
        }
 2980         -
        /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
 2981         -
        pub fn build(self) -> crate::model::Farewell {
        4472  +
        /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
        4473  +
        pub fn build(self) -> crate::model::PayloadConfig {
 2982   4474   
            self.build_enforcing_required_and_enum_traits()
 2983   4475   
        }
 2984         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Farewell {
 2985         -
            crate::model::Farewell {
 2986         -
                phrase: self.phrase.unwrap_or_else(|| String::from("bye")),
 2987         -
            }
        4476  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::PayloadConfig {
        4477  +
            crate::model::PayloadConfig { data: self.data }
 2988   4478   
        }
 2989   4479   
    }
 2990   4480   
}
 2991         -
/// See [`TopLevel`](crate::model::TopLevel).
 2992         -
pub(crate) mod top_level_internal {
        4481  +
/// See [`Defaults`](crate::model::Defaults).
        4482  +
pub(crate) mod defaults_internal {
 2993   4483   
 2994   4484   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 2995   4485   
    /// Holds one variant for each of the ways the builder can fail.
 2996   4486   
    #[non_exhaustive]
 2997   4487   
    #[allow(clippy::enum_variant_names)]
 2998   4488   
    pub(crate) enum ConstraintViolation {
 2999         -
        /// `dialog` was not provided but it is required when building `TopLevel`.
 3000         -
        MissingDialog,
        4489  +
        /// Constraint violation occurred building member `default_enum` when building `Defaults`.
        4490  +
        #[doc(hidden)]
        4491  +
        DefaultEnum(crate::model::test_enum_internal::ConstraintViolation),
 3001   4492   
    }
 3002   4493   
    impl ::std::fmt::Display for ConstraintViolation {
 3003   4494   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 3004   4495   
            match self {
 3005         -
                ConstraintViolation::MissingDialog => write!(
 3006         -
                    f,
 3007         -
                    "`dialog` was not provided but it is required when building `TopLevel`"
 3008         -
                ),
        4496  +
                ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
 3009   4497   
            }
 3010   4498   
        }
 3011   4499   
    }
 3012   4500   
    impl ::std::error::Error for ConstraintViolation {}
 3013   4501   
    impl ConstraintViolation {
 3014   4502   
        pub(crate) fn as_validation_exception_field(
 3015   4503   
            self,
 3016   4504   
            path: ::std::string::String,
 3017   4505   
        ) -> crate::model::ValidationExceptionField {
 3018   4506   
            match self {
 3019         -
            ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
 3020         -
                                                message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
 3021         -
                                                path: path + "/dialog",
 3022         -
                                            },
 3023         -
        }
        4507  +
                ConstraintViolation::DefaultEnum(inner) => {
        4508  +
                    inner.as_validation_exception_field(path + "/defaultEnum")
        4509  +
                }
        4510  +
            }
 3024   4511   
        }
 3025   4512   
    }
 3026   4513   
    impl ::std::convert::From<Builder>
 3027         -
        for crate::constrained::MaybeConstrained<crate::model::TopLevel>
        4514  +
        for crate::constrained::MaybeConstrained<crate::model::Defaults>
 3028   4515   
    {
 3029   4516   
        fn from(builder: Builder) -> Self {
 3030   4517   
            Self::Unconstrained(builder)
 3031   4518   
        }
 3032   4519   
    }
 3033         -
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
        4520  +
    impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
 3034   4521   
        type Error = ConstraintViolation;
 3035   4522   
 3036   4523   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 3037   4524   
            builder.build()
 3038   4525   
        }
 3039   4526   
    }
 3040         -
    /// A builder for [`TopLevel`](crate::model::TopLevel).
        4527  +
    /// A builder for [`Defaults`](crate::model::Defaults).
 3041   4528   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3042   4529   
    pub(crate) struct Builder {
 3043         -
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
 3044         -
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
 3045         -
        pub(crate) dialog_map: ::std::option::Option<
 3046         -
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4530  +
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
        4531  +
        pub(crate) default_boolean: ::std::option::Option<bool>,
        4532  +
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
        4533  +
        pub(crate) default_document_map:
        4534  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        4535  +
        pub(crate) default_document_string:
        4536  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        4537  +
        pub(crate) default_document_boolean:
        4538  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        4539  +
        pub(crate) default_document_list:
        4540  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        4541  +
        pub(crate) default_null_document:
        4542  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        4543  +
        pub(crate) default_timestamp:
        4544  +
            ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
        4545  +
        pub(crate) default_blob:
        4546  +
            ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        4547  +
        pub(crate) default_byte: ::std::option::Option<i8>,
        4548  +
        pub(crate) default_short: ::std::option::Option<i16>,
        4549  +
        pub(crate) default_integer: ::std::option::Option<i32>,
        4550  +
        pub(crate) default_long: ::std::option::Option<i64>,
        4551  +
        pub(crate) default_float: ::std::option::Option<f32>,
        4552  +
        pub(crate) default_double: ::std::option::Option<f64>,
        4553  +
        pub(crate) default_map: ::std::option::Option<
        4554  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3047   4555   
        >,
        4556  +
        pub(crate) default_enum:
        4557  +
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
        4558  +
        pub(crate) default_int_enum: ::std::option::Option<i32>,
        4559  +
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
        4560  +
        pub(crate) false_boolean: ::std::option::Option<bool>,
        4561  +
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        4562  +
        pub(crate) zero_byte: ::std::option::Option<i8>,
        4563  +
        pub(crate) zero_short: ::std::option::Option<i16>,
        4564  +
        pub(crate) zero_integer: ::std::option::Option<i32>,
        4565  +
        pub(crate) zero_long: ::std::option::Option<i64>,
        4566  +
        pub(crate) zero_float: ::std::option::Option<f32>,
        4567  +
        pub(crate) zero_double: ::std::option::Option<f64>,
 3048   4568   
    }
 3049   4569   
    impl Builder {
 3050   4570   
        #[allow(missing_docs)] // documentation missing in model
 3051         -
        pub(crate) fn set_dialog(
        4571  +
        pub(crate) fn set_default_string(
        4572  +
            mut self,
        4573  +
            input: impl ::std::convert::Into<::std::string::String>,
        4574  +
        ) -> Self {
        4575  +
            self.default_string = Some(input.into());
        4576  +
            self
        4577  +
        }
        4578  +
        #[allow(missing_docs)] // documentation missing in model
        4579  +
        pub(crate) fn set_default_boolean(
        4580  +
            mut self,
        4581  +
            input: impl ::std::convert::Into<bool>,
        4582  +
        ) -> Self {
        4583  +
            self.default_boolean = Some(input.into());
        4584  +
            self
        4585  +
        }
        4586  +
        #[allow(missing_docs)] // documentation missing in model
        4587  +
        pub(crate) fn set_default_list(
        4588  +
            mut self,
        4589  +
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
        4590  +
        ) -> Self {
        4591  +
            self.default_list = Some(input.into());
        4592  +
            self
        4593  +
        }
        4594  +
        #[allow(missing_docs)] // documentation missing in model
        4595  +
        pub(crate) fn set_default_document_map(
        4596  +
            mut self,
        4597  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4598  +
        ) -> Self {
        4599  +
            self.default_document_map = Some(input.into());
        4600  +
            self
        4601  +
        }
        4602  +
        #[allow(missing_docs)] // documentation missing in model
        4603  +
        pub(crate) fn set_default_document_string(
        4604  +
            mut self,
        4605  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4606  +
        ) -> Self {
        4607  +
            self.default_document_string = Some(input.into());
        4608  +
            self
        4609  +
        }
        4610  +
        #[allow(missing_docs)] // documentation missing in model
        4611  +
        pub(crate) fn set_default_document_boolean(
 3052   4612   
            mut self,
 3053         -
            input: impl ::std::convert::Into<crate::model::Dialog>,
        4613  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
 3054   4614   
        ) -> Self {
 3055         -
            self.dialog = Some(input.into());
        4615  +
            self.default_document_boolean = Some(input.into());
 3056   4616   
            self
 3057   4617   
        }
 3058   4618   
        #[allow(missing_docs)] // documentation missing in model
 3059         -
        pub(crate) fn set_dialog_list(
        4619  +
        pub(crate) fn set_default_document_list(
 3060   4620   
            mut self,
 3061         -
            input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
        4621  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
 3062   4622   
        ) -> Self {
 3063         -
            self.dialog_list = Some(input.into());
        4623  +
            self.default_document_list = Some(input.into());
 3064   4624   
            self
 3065   4625   
        }
 3066   4626   
        #[allow(missing_docs)] // documentation missing in model
 3067         -
        pub(crate) fn set_dialog_map(
        4627  +
        pub(crate) fn set_default_null_document(
 3068   4628   
            mut self,
 3069         -
            input: impl ::std::convert::Into<
 3070         -
                ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4629  +
            input: Option<
        4630  +
                impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
 3071   4631   
            >,
 3072   4632   
        ) -> Self {
 3073         -
            self.dialog_map = Some(input.into());
        4633  +
            self.default_null_document = input.map(|v| v.into());
 3074   4634   
            self
 3075   4635   
        }
 3076         -
        /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
 3077         -
        ///
 3078         -
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
 3079         -
        ///
 3080         -
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
 3081         -
            self.build_enforcing_all_constraints()
        4636  +
        #[allow(missing_docs)] // documentation missing in model
        4637  +
        pub(crate) fn set_default_timestamp(
        4638  +
            mut self,
        4639  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::DateTime>,
        4640  +
        ) -> Self {
        4641  +
            self.default_timestamp = Some(input.into());
        4642  +
            self
 3082   4643   
        }
 3083         -
        fn build_enforcing_all_constraints(
 3084         -
            self,
 3085         -
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
 3086         -
            Ok(crate::model::TopLevel {
 3087         -
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
 3088         -
                dialog_list: self.dialog_list.unwrap_or_default(),
 3089         -
                dialog_map: self.dialog_map.unwrap_or_default(),
 3090         -
            })
        4644  +
        #[allow(missing_docs)] // documentation missing in model
        4645  +
        pub(crate) fn set_default_blob(
        4646  +
            mut self,
        4647  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
        4648  +
        ) -> Self {
        4649  +
            self.default_blob = Some(input.into());
        4650  +
            self
 3091   4651   
        }
 3092         -
    }
 3093         -
}
 3094         -
/// See [`TopLevel`](crate::model::TopLevel).
 3095         -
pub mod top_level {
 3096         -
 3097         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 3098         -
    /// Holds one variant for each of the ways the builder can fail.
 3099         -
    #[allow(clippy::enum_variant_names)]
 3100         -
    pub enum ConstraintViolation {
 3101         -
        /// `dialog` was not provided but it is required when building `TopLevel`.
 3102         -
        MissingDialog,
 3103         -
    }
 3104         -
    impl ::std::fmt::Display for ConstraintViolation {
 3105         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 3106         -
            match self {
 3107         -
                ConstraintViolation::MissingDialog => write!(
 3108         -
                    f,
 3109         -
                    "`dialog` was not provided but it is required when building `TopLevel`"
 3110         -
                ),
 3111         -
            }
        4652  +
        #[allow(missing_docs)] // documentation missing in model
        4653  +
        pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        4654  +
            self.default_byte = Some(input.into());
        4655  +
            self
 3112   4656   
        }
 3113         -
    }
 3114         -
    impl ::std::error::Error for ConstraintViolation {}
 3115         -
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
 3116         -
        type Error = ConstraintViolation;
 3117         -
 3118         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 3119         -
            builder.build()
        4657  +
        #[allow(missing_docs)] // documentation missing in model
        4658  +
        pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        4659  +
            self.default_short = Some(input.into());
        4660  +
            self
 3120   4661   
        }
 3121         -
    }
 3122         -
    /// A builder for [`TopLevel`](crate::model::TopLevel).
 3123         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3124         -
    pub struct Builder {
 3125         -
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
 3126         -
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
 3127         -
        pub(crate) dialog_map: ::std::option::Option<
 3128         -
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 3129         -
        >,
 3130         -
    }
 3131         -
    impl Builder {
 3132   4662   
        #[allow(missing_docs)] // documentation missing in model
 3133         -
        pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
 3134         -
            self.dialog = Some(input);
        4663  +
        pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        4664  +
            self.default_integer = Some(input.into());
 3135   4665   
            self
 3136   4666   
        }
 3137   4667   
        #[allow(missing_docs)] // documentation missing in model
 3138         -
        pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
 3139         -
            self.dialog_list = Some(input);
        4668  +
        pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        4669  +
            self.default_long = Some(input.into());
 3140   4670   
            self
 3141   4671   
        }
 3142   4672   
        #[allow(missing_docs)] // documentation missing in model
 3143         -
        pub fn dialog_map(
        4673  +
        pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        4674  +
            self.default_float = Some(input.into());
        4675  +
            self
        4676  +
        }
        4677  +
        #[allow(missing_docs)] // documentation missing in model
        4678  +
        pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
        4679  +
            self.default_double = Some(input.into());
        4680  +
            self
        4681  +
        }
        4682  +
        #[allow(missing_docs)] // documentation missing in model
        4683  +
        pub(crate) fn set_default_map(
 3144   4684   
            mut self,
 3145         -
            input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        4685  +
            input: impl ::std::convert::Into<
        4686  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        4687  +
            >,
 3146   4688   
        ) -> Self {
 3147         -
            self.dialog_map = Some(input);
        4689  +
            self.default_map = Some(input.into());
 3148   4690   
            self
 3149   4691   
        }
 3150         -
        /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
 3151         -
        ///
 3152         -
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if you do not provide a value for all non-`Option`al members.
 3153         -
        ///
 3154         -
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
 3155         -
            self.build_enforcing_required_and_enum_traits()
        4692  +
        #[allow(missing_docs)] // documentation missing in model
        4693  +
        pub(crate) fn set_default_enum(
        4694  +
            mut self,
        4695  +
            input: impl ::std::convert::Into<
        4696  +
                crate::constrained::MaybeConstrained<crate::model::TestEnum>,
        4697  +
            >,
        4698  +
        ) -> Self {
        4699  +
            self.default_enum = Some(input.into());
        4700  +
            self
 3156   4701   
        }
 3157         -
        fn build_enforcing_required_and_enum_traits(
 3158         -
            self,
 3159         -
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
 3160         -
            Ok(crate::model::TopLevel {
 3161         -
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
 3162         -
                dialog_list: self.dialog_list.unwrap_or_default(),
 3163         -
                dialog_map: self.dialog_map.unwrap_or_default(),
 3164         -
            })
        4702  +
        #[allow(missing_docs)] // documentation missing in model
        4703  +
        pub(crate) fn set_default_int_enum(
        4704  +
            mut self,
        4705  +
            input: impl ::std::convert::Into<i32>,
        4706  +
        ) -> Self {
        4707  +
            self.default_int_enum = Some(input.into());
        4708  +
            self
 3165   4709   
        }
 3166         -
    }
 3167         -
}
 3168         -
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3169         -
pub(crate) mod client_optional_defaults_internal {
 3170         -
 3171         -
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 3172         -
        fn from(builder: Builder) -> Self {
 3173         -
            builder.build()
        4710  +
        #[allow(missing_docs)] // documentation missing in model
        4711  +
        pub(crate) fn set_empty_string(
        4712  +
            mut self,
        4713  +
            input: impl ::std::convert::Into<::std::string::String>,
        4714  +
        ) -> Self {
        4715  +
            self.empty_string = Some(input.into());
        4716  +
            self
 3174   4717   
        }
 3175         -
    }
 3176         -
    /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3177         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3178         -
    pub(crate) struct Builder {
 3179         -
        pub(crate) member: ::std::option::Option<i32>,
 3180         -
    }
 3181         -
    impl Builder {
 3182   4718   
        #[allow(missing_docs)] // documentation missing in model
 3183         -
        pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3184         -
            self.member = Some(input.into());
        4719  +
        pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
        4720  +
            self.false_boolean = Some(input.into());
 3185   4721   
            self
 3186   4722   
        }
 3187         -
        /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3188         -
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
 3189         -
            self.build_enforcing_all_constraints()
        4723  +
        #[allow(missing_docs)] // documentation missing in model
        4724  +
        pub(crate) fn set_empty_blob(
        4725  +
            mut self,
        4726  +
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
        4727  +
        ) -> Self {
        4728  +
            self.empty_blob = Some(input.into());
        4729  +
            self
 3190   4730   
        }
 3191         -
        fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
 3192         -
            crate::model::ClientOptionalDefaults {
 3193         -
                member: self.member.unwrap_or(0i32),
 3194         -
            }
        4731  +
        #[allow(missing_docs)] // documentation missing in model
        4732  +
        pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
        4733  +
            self.zero_byte = Some(input.into());
        4734  +
            self
 3195   4735   
        }
 3196         -
    }
 3197         -
}
 3198         -
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3199         -
pub mod client_optional_defaults {
 3200         -
 3201         -
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 3202         -
        fn from(builder: Builder) -> Self {
 3203         -
            builder.build()
        4736  +
        #[allow(missing_docs)] // documentation missing in model
        4737  +
        pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
        4738  +
            self.zero_short = Some(input.into());
        4739  +
            self
 3204   4740   
        }
 3205         -
    }
 3206         -
    /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3207         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3208         -
    pub struct Builder {
 3209         -
        pub(crate) member: ::std::option::Option<i32>,
 3210         -
    }
 3211         -
    impl Builder {
 3212   4741   
        #[allow(missing_docs)] // documentation missing in model
 3213         -
        pub fn member(mut self, input: i32) -> Self {
 3214         -
            self.member = Some(input);
        4742  +
        pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        4743  +
            self.zero_integer = Some(input.into());
 3215   4744   
            self
 3216   4745   
        }
 3217         -
        /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3218         -
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
 3219         -
            self.build_enforcing_required_and_enum_traits()
        4746  +
        #[allow(missing_docs)] // documentation missing in model
        4747  +
        pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
        4748  +
            self.zero_long = Some(input.into());
        4749  +
            self
 3220   4750   
        }
 3221         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ClientOptionalDefaults {
 3222         -
            crate::model::ClientOptionalDefaults {
 3223         -
                member: self.member.unwrap_or(0i32),
 3224         -
            }
        4751  +
        #[allow(missing_docs)] // documentation missing in model
        4752  +
        pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
        4753  +
            self.zero_float = Some(input.into());
        4754  +
            self
        4755  +
        }
        4756  +
        #[allow(missing_docs)] // documentation missing in model
        4757  +
        pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
        4758  +
            self.zero_double = Some(input.into());
        4759  +
            self
        4760  +
        }
        4761  +
        /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
        4762  +
        ///
        4763  +
        /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
        4764  +
        ///
        4765  +
        pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
        4766  +
            self.build_enforcing_all_constraints()
        4767  +
        }
        4768  +
        fn build_enforcing_all_constraints(
        4769  +
            self,
        4770  +
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
        4771  +
            Ok(crate::model::Defaults {
        4772  +
                default_string: self.default_string.unwrap_or_else(|| String::from("hi")),
        4773  +
                default_boolean: self.default_boolean.unwrap_or(true),
        4774  +
                default_list: self.default_list.unwrap_or_default(),
        4775  +
                default_document_map: self.default_document_map.unwrap_or_else(|| {
        4776  +
                    ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()).into()
        4777  +
                }),
        4778  +
                default_document_string: self.default_document_string.unwrap_or_else(|| {
        4779  +
                    ::aws_smithy_types::Document::String(::std::string::String::from("hi")).into()
        4780  +
                }),
        4781  +
                default_document_boolean: self
        4782  +
                    .default_document_boolean
        4783  +
                    .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
        4784  +
                default_document_list: self.default_document_list.unwrap_or_else(|| {
        4785  +
                    ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into()
        4786  +
                }),
        4787  +
                default_null_document: self.default_null_document,
        4788  +
                default_timestamp: self.default_timestamp.unwrap_or_else(|| {
        4789  +
                    ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into()
        4790  +
                }),
        4791  +
                default_blob: self
        4792  +
                    .default_blob
        4793  +
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj").into()),
        4794  +
                default_byte: self.default_byte.unwrap_or(1i8),
        4795  +
                default_short: self.default_short.unwrap_or(1i16),
        4796  +
                default_integer: self.default_integer.unwrap_or(10i32),
        4797  +
                default_long: self.default_long.unwrap_or(100i64),
        4798  +
                default_float: self.default_float.unwrap_or(1.0f32),
        4799  +
                default_double: self.default_double.unwrap_or(1.0f64),
        4800  +
                default_map: self.default_map.unwrap_or_default(),
        4801  +
                default_enum: self
        4802  +
                    .default_enum
        4803  +
                    .map(|v| match v {
        4804  +
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
        4805  +
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
        4806  +
                    })
        4807  +
                    .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
        4808  +
                    .transpose()?
        4809  +
                    .unwrap_or(
        4810  +
                        "FOO"
        4811  +
                            .parse::<crate::model::TestEnum>()
        4812  +
                            .expect("static value validated to member"),
        4813  +
                    ),
        4814  +
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
        4815  +
                empty_string: self.empty_string.unwrap_or_else(|| String::from("")),
        4816  +
                false_boolean: self.false_boolean.unwrap_or(false),
        4817  +
                empty_blob: self
        4818  +
                    .empty_blob
        4819  +
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("").into()),
        4820  +
                zero_byte: self.zero_byte.unwrap_or(0i8),
        4821  +
                zero_short: self.zero_short.unwrap_or(0i16),
        4822  +
                zero_integer: self.zero_integer.unwrap_or(0i32),
        4823  +
                zero_long: self.zero_long.unwrap_or(0i64),
        4824  +
                zero_float: self.zero_float.unwrap_or(0.0f32),
        4825  +
                zero_double: self.zero_double.unwrap_or(0.0f64),
        4826  +
            })
 3225   4827   
        }
 3226   4828   
    }
 3227   4829   
}
 3228   4830   
/// See [`Defaults`](crate::model::Defaults).
 3229         -
pub(crate) mod defaults_internal {
        4831  +
pub mod defaults {
 3230   4832   
 3231         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 3232         -
    /// Holds one variant for each of the ways the builder can fail.
 3233         -
    #[non_exhaustive]
 3234         -
    #[allow(clippy::enum_variant_names)]
 3235         -
    pub(crate) enum ConstraintViolation {
 3236         -
        /// Constraint violation occurred building member `default_enum` when building `Defaults`.
 3237         -
        #[doc(hidden)]
 3238         -
        DefaultEnum(crate::model::test_enum_internal::ConstraintViolation),
 3239         -
    }
 3240         -
    impl ::std::fmt::Display for ConstraintViolation {
 3241         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 3242         -
            match self {
 3243         -
                ConstraintViolation::DefaultEnum(_) => write!(f, "constraint violation occurred building member `default_enum` when building `Defaults`"),
 3244         -
            }
 3245         -
        }
 3246         -
    }
 3247         -
    impl ::std::error::Error for ConstraintViolation {}
 3248         -
    impl ConstraintViolation {
 3249         -
        pub(crate) fn as_validation_exception_field(
 3250         -
            self,
 3251         -
            path: ::std::string::String,
 3252         -
        ) -> crate::model::ValidationExceptionField {
 3253         -
            match self {
 3254         -
                ConstraintViolation::DefaultEnum(inner) => {
 3255         -
                    inner.as_validation_exception_field(path + "/defaultEnum")
 3256         -
                }
 3257         -
            }
 3258         -
        }
 3259         -
    }
 3260         -
    impl ::std::convert::From<Builder>
 3261         -
        for crate::constrained::MaybeConstrained<crate::model::Defaults>
 3262         -
    {
        4833  +
    impl ::std::convert::From<Builder> for crate::model::Defaults {
 3263   4834   
        fn from(builder: Builder) -> Self {
 3264         -
            Self::Unconstrained(builder)
 3265         -
        }
 3266         -
    }
 3267         -
    impl ::std::convert::TryFrom<Builder> for crate::model::Defaults {
 3268         -
        type Error = ConstraintViolation;
 3269         -
 3270         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 3271   4835   
            builder.build()
 3272   4836   
        }
 3273   4837   
    }
 3274   4838   
    /// A builder for [`Defaults`](crate::model::Defaults).
 3275   4839   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3276         -
    pub(crate) struct Builder {
        4840  +
    pub struct Builder {
 3277   4841   
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
 3278   4842   
        pub(crate) default_boolean: ::std::option::Option<bool>,
 3279   4843   
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
 3280   4844   
        pub(crate) default_document_map:
 3281   4845   
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3282   4846   
        pub(crate) default_document_string:
 3283   4847   
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3284   4848   
        pub(crate) default_document_boolean:
 3285   4849   
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3286   4850   
        pub(crate) default_document_list:
 3287   4851   
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3288   4852   
        pub(crate) default_null_document:
 3289   4853   
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3290   4854   
        pub(crate) default_timestamp:
 3291   4855   
            ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 3292   4856   
        pub(crate) default_blob:
 3293   4857   
            ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 3294   4858   
        pub(crate) default_byte: ::std::option::Option<i8>,
 3295   4859   
        pub(crate) default_short: ::std::option::Option<i16>,
 3296   4860   
        pub(crate) default_integer: ::std::option::Option<i32>,
 3297   4861   
        pub(crate) default_long: ::std::option::Option<i64>,
 3298   4862   
        pub(crate) default_float: ::std::option::Option<f32>,
 3299   4863   
        pub(crate) default_double: ::std::option::Option<f64>,
 3300   4864   
        pub(crate) default_map: ::std::option::Option<
 3301   4865   
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3302   4866   
        >,
 3303         -
        pub(crate) default_enum:
 3304         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TestEnum>>,
        4867  +
        pub(crate) default_enum: ::std::option::Option<crate::model::TestEnum>,
 3305   4868   
        pub(crate) default_int_enum: ::std::option::Option<i32>,
 3306   4869   
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
 3307   4870   
        pub(crate) false_boolean: ::std::option::Option<bool>,
 3308   4871   
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 3309   4872   
        pub(crate) zero_byte: ::std::option::Option<i8>,
 3310   4873   
        pub(crate) zero_short: ::std::option::Option<i16>,
 3311   4874   
        pub(crate) zero_integer: ::std::option::Option<i32>,
 3312   4875   
        pub(crate) zero_long: ::std::option::Option<i64>,
 3313   4876   
        pub(crate) zero_float: ::std::option::Option<f32>,
 3314   4877   
        pub(crate) zero_double: ::std::option::Option<f64>,
 3315   4878   
    }
 3316   4879   
    impl Builder {
 3317   4880   
        #[allow(missing_docs)] // documentation missing in model
 3318         -
        pub(crate) fn set_default_string(
 3319         -
            mut self,
 3320         -
            input: impl ::std::convert::Into<::std::string::String>,
 3321         -
        ) -> Self {
 3322         -
            self.default_string = Some(input.into());
        4881  +
        pub fn default_string(mut self, input: ::std::string::String) -> Self {
        4882  +
            self.default_string = Some(input);
 3323   4883   
            self
 3324   4884   
        }
 3325   4885   
        #[allow(missing_docs)] // documentation missing in model
 3326         -
        pub(crate) fn set_default_boolean(
 3327         -
            mut self,
 3328         -
            input: impl ::std::convert::Into<bool>,
 3329         -
        ) -> Self {
 3330         -
            self.default_boolean = Some(input.into());
        4886  +
        pub fn default_boolean(mut self, input: bool) -> Self {
        4887  +
            self.default_boolean = Some(input);
 3331   4888   
            self
 3332   4889   
        }
 3333   4890   
        #[allow(missing_docs)] // documentation missing in model
 3334         -
        pub(crate) fn set_default_list(
 3335         -
            mut self,
 3336         -
            input: impl ::std::convert::Into<::std::vec::Vec<::std::string::String>>,
 3337         -
        ) -> Self {
 3338         -
            self.default_list = Some(input.into());
        4891  +
        pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
        4892  +
            self.default_list = Some(input);
 3339   4893   
            self
 3340   4894   
        }
 3341   4895   
        #[allow(missing_docs)] // documentation missing in model
 3342         -
        pub(crate) fn set_default_document_map(
        4896  +
        pub fn default_document_map(
 3343   4897   
            mut self,
 3344         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4898  +
            input: ::aws_smithy_http_server_python::types::Document,
 3345   4899   
        ) -> Self {
 3346         -
            self.default_document_map = Some(input.into());
        4900  +
            self.default_document_map = Some(input);
 3347   4901   
            self
 3348   4902   
        }
 3349   4903   
        #[allow(missing_docs)] // documentation missing in model
 3350         -
        pub(crate) fn set_default_document_string(
        4904  +
        pub fn default_document_string(
 3351   4905   
            mut self,
 3352         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4906  +
            input: ::aws_smithy_http_server_python::types::Document,
 3353   4907   
        ) -> Self {
 3354         -
            self.default_document_string = Some(input.into());
        4908  +
            self.default_document_string = Some(input);
 3355   4909   
            self
 3356   4910   
        }
 3357   4911   
        #[allow(missing_docs)] // documentation missing in model
 3358         -
        pub(crate) fn set_default_document_boolean(
        4912  +
        pub fn default_document_boolean(
 3359   4913   
            mut self,
 3360         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4914  +
            input: ::aws_smithy_http_server_python::types::Document,
 3361   4915   
        ) -> Self {
 3362         -
            self.default_document_boolean = Some(input.into());
        4916  +
            self.default_document_boolean = Some(input);
 3363   4917   
            self
 3364   4918   
        }
 3365   4919   
        #[allow(missing_docs)] // documentation missing in model
 3366         -
        pub(crate) fn set_default_document_list(
        4920  +
        pub fn default_document_list(
 3367   4921   
            mut self,
 3368         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
        4922  +
            input: ::aws_smithy_http_server_python::types::Document,
 3369   4923   
        ) -> Self {
 3370         -
            self.default_document_list = Some(input.into());
        4924  +
            self.default_document_list = Some(input);
 3371   4925   
            self
 3372   4926   
        }
 3373   4927   
        #[allow(missing_docs)] // documentation missing in model
 3374         -
        pub(crate) fn set_default_null_document(
        4928  +
        pub fn default_null_document(
 3375   4929   
            mut self,
 3376         -
            input: Option<
 3377         -
                impl ::std::convert::Into<::aws_smithy_http_server_python::types::Document>,
 3378         -
            >,
        4930  +
            input: ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3379   4931   
        ) -> Self {
 3380         -
            self.default_null_document = input.map(|v| v.into());
        4932  +
            self.default_null_document = input;
 3381   4933   
            self
 3382   4934   
        }
 3383   4935   
        #[allow(missing_docs)] // documentation missing in model
 3384         -
        pub(crate) fn set_default_timestamp(
        4936  +
        pub fn default_timestamp(
 3385   4937   
            mut self,
 3386         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::DateTime>,
        4938  +
            input: ::aws_smithy_http_server_python::types::DateTime,
 3387   4939   
        ) -> Self {
 3388         -
            self.default_timestamp = Some(input.into());
        4940  +
            self.default_timestamp = Some(input);
 3389   4941   
            self
 3390   4942   
        }
 3391   4943   
        #[allow(missing_docs)] // documentation missing in model
 3392         -
        pub(crate) fn set_default_blob(
 3393         -
            mut self,
 3394         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
 3395         -
        ) -> Self {
 3396         -
            self.default_blob = Some(input.into());
        4944  +
        pub fn default_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
        4945  +
            self.default_blob = Some(input);
 3397   4946   
            self
 3398   4947   
        }
 3399   4948   
        #[allow(missing_docs)] // documentation missing in model
 3400         -
        pub(crate) fn set_default_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
 3401         -
            self.default_byte = Some(input.into());
        4949  +
        pub fn default_byte(mut self, input: i8) -> Self {
        4950  +
            self.default_byte = Some(input);
 3402   4951   
            self
 3403   4952   
        }
 3404   4953   
        #[allow(missing_docs)] // documentation missing in model
 3405         -
        pub(crate) fn set_default_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
 3406         -
            self.default_short = Some(input.into());
        4954  +
        pub fn default_short(mut self, input: i16) -> Self {
        4955  +
            self.default_short = Some(input);
 3407   4956   
            self
 3408   4957   
        }
 3409   4958   
        #[allow(missing_docs)] // documentation missing in model
 3410         -
        pub(crate) fn set_default_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3411         -
            self.default_integer = Some(input.into());
        4959  +
        pub fn default_integer(mut self, input: i32) -> Self {
        4960  +
            self.default_integer = Some(input);
 3412   4961   
            self
 3413   4962   
        }
 3414   4963   
        #[allow(missing_docs)] // documentation missing in model
 3415         -
        pub(crate) fn set_default_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
 3416         -
            self.default_long = Some(input.into());
        4964  +
        pub fn default_long(mut self, input: i64) -> Self {
        4965  +
            self.default_long = Some(input);
 3417   4966   
            self
 3418   4967   
        }
 3419   4968   
        #[allow(missing_docs)] // documentation missing in model
 3420         -
        pub(crate) fn set_default_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
 3421         -
            self.default_float = Some(input.into());
        4969  +
        pub fn default_float(mut self, input: f32) -> Self {
        4970  +
            self.default_float = Some(input);
 3422   4971   
            self
 3423   4972   
        }
 3424   4973   
        #[allow(missing_docs)] // documentation missing in model
 3425         -
        pub(crate) fn set_default_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 3426         -
            self.default_double = Some(input.into());
        4974  +
        pub fn default_double(mut self, input: f64) -> Self {
        4975  +
            self.default_double = Some(input);
 3427   4976   
            self
 3428   4977   
        }
 3429   4978   
        #[allow(missing_docs)] // documentation missing in model
 3430         -
        pub(crate) fn set_default_map(
        4979  +
        pub fn default_map(
 3431   4980   
            mut self,
 3432         -
            input: impl ::std::convert::Into<
 3433         -
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3434         -
            >,
        4981  +
            input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 3435   4982   
        ) -> Self {
 3436         -
            self.default_map = Some(input.into());
        4983  +
            self.default_map = Some(input);
 3437   4984   
            self
 3438   4985   
        }
 3439   4986   
        #[allow(missing_docs)] // documentation missing in model
 3440         -
        pub(crate) fn set_default_enum(
 3441         -
            mut self,
 3442         -
            input: impl ::std::convert::Into<
 3443         -
                crate::constrained::MaybeConstrained<crate::model::TestEnum>,
 3444         -
            >,
 3445         -
        ) -> Self {
 3446         -
            self.default_enum = Some(input.into());
        4987  +
        pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
        4988  +
            self.default_enum = Some(input);
 3447   4989   
            self
 3448   4990   
        }
 3449   4991   
        #[allow(missing_docs)] // documentation missing in model
 3450         -
        pub(crate) fn set_default_int_enum(
 3451         -
            mut self,
 3452         -
            input: impl ::std::convert::Into<i32>,
 3453         -
        ) -> Self {
 3454         -
            self.default_int_enum = Some(input.into());
        4992  +
        pub fn default_int_enum(mut self, input: i32) -> Self {
        4993  +
            self.default_int_enum = Some(input);
 3455   4994   
            self
 3456   4995   
        }
 3457   4996   
        #[allow(missing_docs)] // documentation missing in model
 3458         -
        pub(crate) fn set_empty_string(
 3459         -
            mut self,
 3460         -
            input: impl ::std::convert::Into<::std::string::String>,
 3461         -
        ) -> Self {
 3462         -
            self.empty_string = Some(input.into());
        4997  +
        pub fn empty_string(mut self, input: ::std::string::String) -> Self {
        4998  +
            self.empty_string = Some(input);
 3463   4999   
            self
 3464   5000   
        }
 3465   5001   
        #[allow(missing_docs)] // documentation missing in model
 3466         -
        pub(crate) fn set_false_boolean(mut self, input: impl ::std::convert::Into<bool>) -> Self {
 3467         -
            self.false_boolean = Some(input.into());
        5002  +
        pub fn false_boolean(mut self, input: bool) -> Self {
        5003  +
            self.false_boolean = Some(input);
 3468   5004   
            self
 3469   5005   
        }
 3470   5006   
        #[allow(missing_docs)] // documentation missing in model
 3471         -
        pub(crate) fn set_empty_blob(
 3472         -
            mut self,
 3473         -
            input: impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>,
 3474         -
        ) -> Self {
 3475         -
            self.empty_blob = Some(input.into());
        5007  +
        pub fn empty_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
        5008  +
            self.empty_blob = Some(input);
 3476   5009   
            self
 3477   5010   
        }
 3478   5011   
        #[allow(missing_docs)] // documentation missing in model
 3479         -
        pub(crate) fn set_zero_byte(mut self, input: impl ::std::convert::Into<i8>) -> Self {
 3480         -
            self.zero_byte = Some(input.into());
        5012  +
        pub fn zero_byte(mut self, input: i8) -> Self {
        5013  +
            self.zero_byte = Some(input);
 3481   5014   
            self
 3482   5015   
        }
 3483   5016   
        #[allow(missing_docs)] // documentation missing in model
 3484         -
        pub(crate) fn set_zero_short(mut self, input: impl ::std::convert::Into<i16>) -> Self {
 3485         -
            self.zero_short = Some(input.into());
        5017  +
        pub fn zero_short(mut self, input: i16) -> Self {
        5018  +
            self.zero_short = Some(input);
 3486   5019   
            self
 3487   5020   
        }
 3488   5021   
        #[allow(missing_docs)] // documentation missing in model
 3489         -
        pub(crate) fn set_zero_integer(mut self, input: impl ::std::convert::Into<i32>) -> Self {
 3490         -
            self.zero_integer = Some(input.into());
        5022  +
        pub fn zero_integer(mut self, input: i32) -> Self {
        5023  +
            self.zero_integer = Some(input);
 3491   5024   
            self
 3492   5025   
        }
 3493   5026   
        #[allow(missing_docs)] // documentation missing in model
 3494         -
        pub(crate) fn set_zero_long(mut self, input: impl ::std::convert::Into<i64>) -> Self {
 3495         -
            self.zero_long = Some(input.into());
        5027  +
        pub fn zero_long(mut self, input: i64) -> Self {
        5028  +
            self.zero_long = Some(input);
 3496   5029   
            self
 3497   5030   
        }
 3498   5031   
        #[allow(missing_docs)] // documentation missing in model
 3499         -
        pub(crate) fn set_zero_float(mut self, input: impl ::std::convert::Into<f32>) -> Self {
 3500         -
            self.zero_float = Some(input.into());
        5032  +
        pub fn zero_float(mut self, input: f32) -> Self {
        5033  +
            self.zero_float = Some(input);
 3501   5034   
            self
 3502   5035   
        }
 3503   5036   
        #[allow(missing_docs)] // documentation missing in model
 3504         -
        pub(crate) fn set_zero_double(mut self, input: impl ::std::convert::Into<f64>) -> Self {
 3505         -
            self.zero_double = Some(input.into());
        5037  +
        pub fn zero_double(mut self, input: f64) -> Self {
        5038  +
            self.zero_double = Some(input);
 3506   5039   
            self
 3507   5040   
        }
 3508   5041   
        /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
 3509         -
        ///
 3510         -
        /// The builder fails to construct a [`Defaults`](crate::model::Defaults) if a [`ConstraintViolation`] occurs.
 3511         -
        ///
 3512         -
        pub fn build(self) -> Result<crate::model::Defaults, ConstraintViolation> {
 3513         -
            self.build_enforcing_all_constraints()
        5042  +
        pub fn build(self) -> crate::model::Defaults {
        5043  +
            self.build_enforcing_required_and_enum_traits()
 3514   5044   
        }
 3515         -
        fn build_enforcing_all_constraints(
 3516         -
            self,
 3517         -
        ) -> Result<crate::model::Defaults, ConstraintViolation> {
 3518         -
            Ok(crate::model::Defaults {
        5045  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Defaults {
        5046  +
            crate::model::Defaults {
 3519   5047   
                default_string: self.default_string.unwrap_or_else(|| String::from("hi")),
 3520   5048   
                default_boolean: self.default_boolean.unwrap_or(true),
 3521   5049   
                default_list: self.default_list.unwrap_or_default(),
 3522   5050   
                default_document_map: self.default_document_map.unwrap_or_else(|| {
 3523   5051   
                    ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()).into()
 3524   5052   
                }),
 3525   5053   
                default_document_string: self.default_document_string.unwrap_or_else(|| {
 3526   5054   
                    ::aws_smithy_types::Document::String(::std::string::String::from("hi")).into()
 3527   5055   
                }),
 3528   5056   
                default_document_boolean: self
 3529   5057   
                    .default_document_boolean
 3530   5058   
                    .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
 3531   5059   
                default_document_list: self.default_document_list.unwrap_or_else(|| {
 3532   5060   
                    ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into()
 3533   5061   
                }),
 3534   5062   
                default_null_document: self.default_null_document,
 3535   5063   
                default_timestamp: self.default_timestamp.unwrap_or_else(|| {
 3536   5064   
                    ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into()
 3537   5065   
                }),
 3538   5066   
                default_blob: self
 3539   5067   
                    .default_blob
 3540   5068   
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj").into()),
 3541   5069   
                default_byte: self.default_byte.unwrap_or(1i8),
 3542   5070   
                default_short: self.default_short.unwrap_or(1i16),
 3543   5071   
                default_integer: self.default_integer.unwrap_or(10i32),
 3544   5072   
                default_long: self.default_long.unwrap_or(100i64),
 3545   5073   
                default_float: self.default_float.unwrap_or(1.0f32),
 3546   5074   
                default_double: self.default_double.unwrap_or(1.0f64),
 3547   5075   
                default_map: self.default_map.unwrap_or_default(),
 3548         -
                default_enum: self
 3549         -
                    .default_enum
 3550         -
                    .map(|v| match v {
 3551         -
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
 3552         -
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
 3553         -
                    })
 3554         -
                    .map(|res| res.map_err(ConstraintViolation::DefaultEnum))
 3555         -
                    .transpose()?
 3556         -
                    .unwrap_or(
 3557         -
                        "FOO"
 3558         -
                            .parse::<crate::model::TestEnum>()
 3559         -
                            .expect("static value validated to member"),
 3560         -
                    ),
        5076  +
                default_enum: self.default_enum.unwrap_or(
        5077  +
                    "FOO"
        5078  +
                        .parse::<crate::model::TestEnum>()
        5079  +
                        .expect("static value validated to member"),
        5080  +
                ),
 3561   5081   
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
 3562   5082   
                empty_string: self.empty_string.unwrap_or_else(|| String::from("")),
 3563   5083   
                false_boolean: self.false_boolean.unwrap_or(false),
 3564   5084   
                empty_blob: self
 3565   5085   
                    .empty_blob
 3566   5086   
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("").into()),
 3567   5087   
                zero_byte: self.zero_byte.unwrap_or(0i8),
 3568   5088   
                zero_short: self.zero_short.unwrap_or(0i16),
 3569   5089   
                zero_integer: self.zero_integer.unwrap_or(0i32),
 3570   5090   
                zero_long: self.zero_long.unwrap_or(0i64),
 3571   5091   
                zero_float: self.zero_float.unwrap_or(0.0f32),
 3572   5092   
                zero_double: self.zero_double.unwrap_or(0.0f64),
 3573         -
            })
        5093  +
            }
 3574   5094   
        }
 3575   5095   
    }
 3576   5096   
}
 3577         -
/// See [`Defaults`](crate::model::Defaults).
 3578         -
pub mod defaults {
        5097  +
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        5098  +
pub(crate) mod client_optional_defaults_internal {
 3579   5099   
 3580         -
    impl ::std::convert::From<Builder> for crate::model::Defaults {
        5100  +
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
 3581   5101   
        fn from(builder: Builder) -> Self {
 3582   5102   
            builder.build()
 3583   5103   
        }
 3584   5104   
    }
 3585         -
    /// A builder for [`Defaults`](crate::model::Defaults).
        5105  +
    /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        5106  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5107  +
    pub(crate) struct Builder {
        5108  +
        pub(crate) member: ::std::option::Option<i32>,
        5109  +
    }
        5110  +
    impl Builder {
        5111  +
        #[allow(missing_docs)] // documentation missing in model
        5112  +
        pub(crate) fn set_member(mut self, input: impl ::std::convert::Into<i32>) -> Self {
        5113  +
            self.member = Some(input.into());
        5114  +
            self
        5115  +
        }
        5116  +
        /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        5117  +
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
        5118  +
            self.build_enforcing_all_constraints()
        5119  +
        }
        5120  +
        fn build_enforcing_all_constraints(self) -> crate::model::ClientOptionalDefaults {
        5121  +
            crate::model::ClientOptionalDefaults {
        5122  +
                member: self.member.unwrap_or(0i32),
        5123  +
            }
        5124  +
        }
        5125  +
    }
        5126  +
}
        5127  +
/// See [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        5128  +
pub mod client_optional_defaults {
        5129  +
        5130  +
    impl ::std::convert::From<Builder> for crate::model::ClientOptionalDefaults {
        5131  +
        fn from(builder: Builder) -> Self {
        5132  +
            builder.build()
        5133  +
        }
        5134  +
    }
        5135  +
    /// A builder for [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
 3586   5136   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3587   5137   
    pub struct Builder {
 3588         -
        pub(crate) default_string: ::std::option::Option<::std::string::String>,
 3589         -
        pub(crate) default_boolean: ::std::option::Option<bool>,
 3590         -
        pub(crate) default_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
 3591         -
        pub(crate) default_document_map:
 3592         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3593         -
        pub(crate) default_document_string:
 3594         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3595         -
        pub(crate) default_document_boolean:
 3596         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3597         -
        pub(crate) default_document_list:
 3598         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3599         -
        pub(crate) default_null_document:
 3600         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
 3601         -
        pub(crate) default_timestamp:
 3602         -
            ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 3603         -
        pub(crate) default_blob:
 3604         -
            ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 3605         -
        pub(crate) default_byte: ::std::option::Option<i8>,
 3606         -
        pub(crate) default_short: ::std::option::Option<i16>,
 3607         -
        pub(crate) default_integer: ::std::option::Option<i32>,
 3608         -
        pub(crate) default_long: ::std::option::Option<i64>,
 3609         -
        pub(crate) default_float: ::std::option::Option<f32>,
 3610         -
        pub(crate) default_double: ::std::option::Option<f64>,
 3611         -
        pub(crate) default_map: ::std::option::Option<
 3612         -
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        5138  +
        pub(crate) member: ::std::option::Option<i32>,
        5139  +
    }
        5140  +
    impl Builder {
        5141  +
        #[allow(missing_docs)] // documentation missing in model
        5142  +
        pub fn member(mut self, input: i32) -> Self {
        5143  +
            self.member = Some(input);
        5144  +
            self
        5145  +
        }
        5146  +
        /// Consumes the builder and constructs a [`ClientOptionalDefaults`](crate::model::ClientOptionalDefaults).
        5147  +
        pub fn build(self) -> crate::model::ClientOptionalDefaults {
        5148  +
            self.build_enforcing_required_and_enum_traits()
        5149  +
        }
        5150  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ClientOptionalDefaults {
        5151  +
            crate::model::ClientOptionalDefaults {
        5152  +
                member: self.member.unwrap_or(0i32),
        5153  +
            }
        5154  +
        }
        5155  +
    }
        5156  +
}
        5157  +
/// See [`TopLevel`](crate::model::TopLevel).
        5158  +
pub(crate) mod top_level_internal {
        5159  +
        5160  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        5161  +
    /// Holds one variant for each of the ways the builder can fail.
        5162  +
    #[non_exhaustive]
        5163  +
    #[allow(clippy::enum_variant_names)]
        5164  +
    pub(crate) enum ConstraintViolation {
        5165  +
        /// `dialog` was not provided but it is required when building `TopLevel`.
        5166  +
        MissingDialog,
        5167  +
    }
        5168  +
    impl ::std::fmt::Display for ConstraintViolation {
        5169  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5170  +
            match self {
        5171  +
                ConstraintViolation::MissingDialog => write!(
        5172  +
                    f,
        5173  +
                    "`dialog` was not provided but it is required when building `TopLevel`"
        5174  +
                ),
        5175  +
            }
        5176  +
        }
        5177  +
    }
        5178  +
    impl ::std::error::Error for ConstraintViolation {}
        5179  +
    impl ConstraintViolation {
        5180  +
        pub(crate) fn as_validation_exception_field(
        5181  +
            self,
        5182  +
            path: ::std::string::String,
        5183  +
        ) -> crate::model::ValidationExceptionField {
        5184  +
            match self {
        5185  +
            ConstraintViolation::MissingDialog => crate::model::ValidationExceptionField {
        5186  +
                                                message: format!("Value at '{}/dialog' failed to satisfy constraint: Member must not be null", path),
        5187  +
                                                path: path + "/dialog",
        5188  +
                                            },
        5189  +
        }
        5190  +
        }
        5191  +
    }
        5192  +
    impl ::std::convert::From<Builder>
        5193  +
        for crate::constrained::MaybeConstrained<crate::model::TopLevel>
        5194  +
    {
        5195  +
        fn from(builder: Builder) -> Self {
        5196  +
            Self::Unconstrained(builder)
        5197  +
        }
        5198  +
    }
        5199  +
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
        5200  +
        type Error = ConstraintViolation;
        5201  +
        5202  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        5203  +
            builder.build()
        5204  +
        }
        5205  +
    }
        5206  +
    /// A builder for [`TopLevel`](crate::model::TopLevel).
        5207  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5208  +
    pub(crate) struct Builder {
        5209  +
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
        5210  +
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
        5211  +
        pub(crate) dialog_map: ::std::option::Option<
        5212  +
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 3613   5213   
        >,
 3614         -
        pub(crate) default_enum: ::std::option::Option<crate::model::TestEnum>,
 3615         -
        pub(crate) default_int_enum: ::std::option::Option<i32>,
 3616         -
        pub(crate) empty_string: ::std::option::Option<::std::string::String>,
 3617         -
        pub(crate) false_boolean: ::std::option::Option<bool>,
 3618         -
        pub(crate) empty_blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 3619         -
        pub(crate) zero_byte: ::std::option::Option<i8>,
 3620         -
        pub(crate) zero_short: ::std::option::Option<i16>,
 3621         -
        pub(crate) zero_integer: ::std::option::Option<i32>,
 3622         -
        pub(crate) zero_long: ::std::option::Option<i64>,
 3623         -
        pub(crate) zero_float: ::std::option::Option<f32>,
 3624         -
        pub(crate) zero_double: ::std::option::Option<f64>,
 3625   5214   
    }
 3626   5215   
    impl Builder {
 3627   5216   
        #[allow(missing_docs)] // documentation missing in model
 3628         -
        pub fn default_string(mut self, input: ::std::string::String) -> Self {
 3629         -
            self.default_string = Some(input);
        5217  +
        pub(crate) fn set_dialog(
        5218  +
            mut self,
        5219  +
            input: impl ::std::convert::Into<crate::model::Dialog>,
        5220  +
        ) -> Self {
        5221  +
            self.dialog = Some(input.into());
 3630   5222   
            self
 3631   5223   
        }
 3632   5224   
        #[allow(missing_docs)] // documentation missing in model
 3633         -
        pub fn default_boolean(mut self, input: bool) -> Self {
 3634         -
            self.default_boolean = Some(input);
        5225  +
        pub(crate) fn set_dialog_list(
        5226  +
            mut self,
        5227  +
            input: impl ::std::convert::Into<::std::vec::Vec<crate::model::Dialog>>,
        5228  +
        ) -> Self {
        5229  +
            self.dialog_list = Some(input.into());
        5230  +
            self
        5231  +
        }
        5232  +
        #[allow(missing_docs)] // documentation missing in model
        5233  +
        pub(crate) fn set_dialog_map(
        5234  +
            mut self,
        5235  +
            input: impl ::std::convert::Into<
        5236  +
                ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        5237  +
            >,
        5238  +
        ) -> Self {
        5239  +
            self.dialog_map = Some(input.into());
 3635   5240   
            self
 3636   5241   
        }
        5242  +
        /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
        5243  +
        ///
        5244  +
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if a [`ConstraintViolation`] occurs.
        5245  +
        ///
        5246  +
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
        5247  +
            self.build_enforcing_all_constraints()
        5248  +
        }
        5249  +
        fn build_enforcing_all_constraints(
        5250  +
            self,
        5251  +
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
        5252  +
            Ok(crate::model::TopLevel {
        5253  +
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
        5254  +
                dialog_list: self.dialog_list.unwrap_or_default(),
        5255  +
                dialog_map: self.dialog_map.unwrap_or_default(),
        5256  +
            })
        5257  +
        }
        5258  +
    }
        5259  +
}
        5260  +
/// See [`TopLevel`](crate::model::TopLevel).
        5261  +
pub mod top_level {
        5262  +
        5263  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        5264  +
    /// Holds one variant for each of the ways the builder can fail.
        5265  +
    #[allow(clippy::enum_variant_names)]
        5266  +
    pub enum ConstraintViolation {
        5267  +
        /// `dialog` was not provided but it is required when building `TopLevel`.
        5268  +
        MissingDialog,
        5269  +
    }
        5270  +
    impl ::std::fmt::Display for ConstraintViolation {
        5271  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5272  +
            match self {
        5273  +
                ConstraintViolation::MissingDialog => write!(
        5274  +
                    f,
        5275  +
                    "`dialog` was not provided but it is required when building `TopLevel`"
        5276  +
                ),
        5277  +
            }
        5278  +
        }
        5279  +
    }
        5280  +
    impl ::std::error::Error for ConstraintViolation {}
        5281  +
    impl ::std::convert::TryFrom<Builder> for crate::model::TopLevel {
        5282  +
        type Error = ConstraintViolation;
        5283  +
        5284  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        5285  +
            builder.build()
        5286  +
        }
        5287  +
    }
        5288  +
    /// A builder for [`TopLevel`](crate::model::TopLevel).
        5289  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5290  +
    pub struct Builder {
        5291  +
        pub(crate) dialog: ::std::option::Option<crate::model::Dialog>,
        5292  +
        pub(crate) dialog_list: ::std::option::Option<::std::vec::Vec<crate::model::Dialog>>,
        5293  +
        pub(crate) dialog_map: ::std::option::Option<
        5294  +
            ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
        5295  +
        >,
        5296  +
    }
        5297  +
    impl Builder {
 3637   5298   
        #[allow(missing_docs)] // documentation missing in model
 3638         -
        pub fn default_list(mut self, input: ::std::vec::Vec<::std::string::String>) -> Self {
 3639         -
            self.default_list = Some(input);
        5299  +
        pub fn dialog(mut self, input: crate::model::Dialog) -> Self {
        5300  +
            self.dialog = Some(input);
 3640   5301   
            self
 3641   5302   
        }
 3642   5303   
        #[allow(missing_docs)] // documentation missing in model
 3643         -
        pub fn default_document_map(
 3644         -
            mut self,
 3645         -
            input: ::aws_smithy_http_server_python::types::Document,
 3646         -
        ) -> Self {
 3647         -
            self.default_document_map = Some(input);
        5304  +
        pub fn dialog_list(mut self, input: ::std::vec::Vec<crate::model::Dialog>) -> Self {
        5305  +
            self.dialog_list = Some(input);
 3648   5306   
            self
 3649   5307   
        }
 3650   5308   
        #[allow(missing_docs)] // documentation missing in model
 3651         -
        pub fn default_document_string(
        5309  +
        pub fn dialog_map(
 3652   5310   
            mut self,
 3653         -
            input: ::aws_smithy_http_server_python::types::Document,
        5311  +
            input: ::std::collections::HashMap<::std::string::String, crate::model::Dialog>,
 3654   5312   
        ) -> Self {
 3655         -
            self.default_document_string = Some(input);
        5313  +
            self.dialog_map = Some(input);
 3656   5314   
            self
 3657   5315   
        }
        5316  +
        /// Consumes the builder and constructs a [`TopLevel`](crate::model::TopLevel).
        5317  +
        ///
        5318  +
        /// The builder fails to construct a [`TopLevel`](crate::model::TopLevel) if you do not provide a value for all non-`Option`al members.
        5319  +
        ///
        5320  +
        pub fn build(self) -> Result<crate::model::TopLevel, ConstraintViolation> {
        5321  +
            self.build_enforcing_required_and_enum_traits()
        5322  +
        }
        5323  +
        fn build_enforcing_required_and_enum_traits(
        5324  +
            self,
        5325  +
        ) -> Result<crate::model::TopLevel, ConstraintViolation> {
        5326  +
            Ok(crate::model::TopLevel {
        5327  +
                dialog: self.dialog.ok_or(ConstraintViolation::MissingDialog)?,
        5328  +
                dialog_list: self.dialog_list.unwrap_or_default(),
        5329  +
                dialog_map: self.dialog_map.unwrap_or_default(),
        5330  +
            })
        5331  +
        }
        5332  +
    }
        5333  +
}
        5334  +
/// See [`Dialog`](crate::model::Dialog).
        5335  +
pub(crate) mod dialog_internal {
        5336  +
        5337  +
    impl ::std::convert::From<Builder> for crate::model::Dialog {
        5338  +
        fn from(builder: Builder) -> Self {
        5339  +
            builder.build()
        5340  +
        }
        5341  +
    }
        5342  +
    /// A builder for [`Dialog`](crate::model::Dialog).
        5343  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5344  +
    pub(crate) struct Builder {
        5345  +
        pub(crate) language: ::std::option::Option<::std::string::String>,
        5346  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        5347  +
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
        5348  +
    }
        5349  +
    impl Builder {
 3658   5350   
        #[allow(missing_docs)] // documentation missing in model
 3659         -
        pub fn default_document_boolean(
        5351  +
        pub(crate) fn set_language(
 3660   5352   
            mut self,
 3661         -
            input: ::aws_smithy_http_server_python::types::Document,
        5353  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 3662   5354   
        ) -> Self {
 3663         -
            self.default_document_boolean = Some(input);
        5355  +
            self.language = input.map(|v| v.into());
 3664   5356   
            self
 3665   5357   
        }
 3666   5358   
        #[allow(missing_docs)] // documentation missing in model
 3667         -
        pub fn default_document_list(
        5359  +
        pub(crate) fn set_greeting(
 3668   5360   
            mut self,
 3669         -
            input: ::aws_smithy_http_server_python::types::Document,
        5361  +
            input: impl ::std::convert::Into<::std::string::String>,
 3670   5362   
        ) -> Self {
 3671         -
            self.default_document_list = Some(input);
        5363  +
            self.greeting = Some(input.into());
 3672   5364   
            self
 3673   5365   
        }
 3674   5366   
        #[allow(missing_docs)] // documentation missing in model
 3675         -
        pub fn default_null_document(
        5367  +
        pub(crate) fn set_farewell(
 3676   5368   
            mut self,
 3677         -
            input: ::std::option::Option<::aws_smithy_http_server_python::types::Document>,
        5369  +
            input: Option<impl ::std::convert::Into<crate::model::Farewell>>,
 3678   5370   
        ) -> Self {
 3679         -
            self.default_null_document = input;
        5371  +
            self.farewell = input.map(|v| v.into());
 3680   5372   
            self
 3681   5373   
        }
        5374  +
        /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
        5375  +
        pub fn build(self) -> crate::model::Dialog {
        5376  +
            self.build_enforcing_all_constraints()
        5377  +
        }
        5378  +
        fn build_enforcing_all_constraints(self) -> crate::model::Dialog {
        5379  +
            crate::model::Dialog {
        5380  +
                language: self.language,
        5381  +
                greeting: self.greeting.unwrap_or_else(|| String::from("hi")),
        5382  +
                farewell: self.farewell,
        5383  +
            }
        5384  +
        }
        5385  +
    }
        5386  +
}
        5387  +
/// See [`Dialog`](crate::model::Dialog).
        5388  +
pub mod dialog {
        5389  +
        5390  +
    impl ::std::convert::From<Builder> for crate::model::Dialog {
        5391  +
        fn from(builder: Builder) -> Self {
        5392  +
            builder.build()
        5393  +
        }
        5394  +
    }
        5395  +
    /// A builder for [`Dialog`](crate::model::Dialog).
        5396  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5397  +
    pub struct Builder {
        5398  +
        pub(crate) language: ::std::option::Option<::std::string::String>,
        5399  +
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
        5400  +
        pub(crate) farewell: ::std::option::Option<crate::model::Farewell>,
        5401  +
    }
        5402  +
    impl Builder {
 3682   5403   
        #[allow(missing_docs)] // documentation missing in model
 3683         -
        pub fn default_timestamp(
 3684         -
            mut self,
 3685         -
            input: ::aws_smithy_http_server_python::types::DateTime,
 3686         -
        ) -> Self {
 3687         -
            self.default_timestamp = Some(input);
        5404  +
        pub fn language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5405  +
            self.language = input;
 3688   5406   
            self
 3689   5407   
        }
 3690   5408   
        #[allow(missing_docs)] // documentation missing in model
 3691         -
        pub fn default_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
 3692         -
            self.default_blob = Some(input);
        5409  +
        pub fn greeting(mut self, input: ::std::string::String) -> Self {
        5410  +
            self.greeting = Some(input);
 3693   5411   
            self
 3694   5412   
        }
 3695   5413   
        #[allow(missing_docs)] // documentation missing in model
 3696         -
        pub fn default_byte(mut self, input: i8) -> Self {
 3697         -
            self.default_byte = Some(input);
        5414  +
        pub fn farewell(mut self, input: ::std::option::Option<crate::model::Farewell>) -> Self {
        5415  +
            self.farewell = input;
 3698   5416   
            self
 3699   5417   
        }
 3700         -
        #[allow(missing_docs)] // documentation missing in model
 3701         -
        pub fn default_short(mut self, input: i16) -> Self {
 3702         -
            self.default_short = Some(input);
        5418  +
        /// Consumes the builder and constructs a [`Dialog`](crate::model::Dialog).
        5419  +
        pub fn build(self) -> crate::model::Dialog {
        5420  +
            self.build_enforcing_required_and_enum_traits()
        5421  +
        }
        5422  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Dialog {
        5423  +
            crate::model::Dialog {
        5424  +
                language: self.language,
        5425  +
                greeting: self.greeting.unwrap_or_else(|| String::from("hi")),
        5426  +
                farewell: self.farewell,
        5427  +
            }
        5428  +
        }
        5429  +
    }
        5430  +
}
        5431  +
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        5432  +
pub mod validation_exception_field {
        5433  +
        5434  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        5435  +
    /// Holds one variant for each of the ways the builder can fail.
        5436  +
    #[allow(clippy::enum_variant_names)]
        5437  +
    pub enum ConstraintViolation {
        5438  +
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
        5439  +
        MissingPath,
        5440  +
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
        5441  +
        MissingMessage,
        5442  +
    }
        5443  +
    impl ::std::fmt::Display for ConstraintViolation {
        5444  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        5445  +
            match self {
        5446  +
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
        5447  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
        5448  +
            }
        5449  +
        }
        5450  +
    }
        5451  +
    impl ::std::error::Error for ConstraintViolation {}
        5452  +
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
        5453  +
        type Error = ConstraintViolation;
        5454  +
        5455  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
        5456  +
            builder.build()
        5457  +
        }
        5458  +
    }
        5459  +
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        5460  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5461  +
    pub struct Builder {
        5462  +
        pub(crate) path: ::std::option::Option<::std::string::String>,
        5463  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
        5464  +
    }
        5465  +
    impl Builder {
        5466  +
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        5467  +
        pub fn path(mut self, input: ::std::string::String) -> Self {
        5468  +
            self.path = Some(input);
 3703   5469   
            self
 3704   5470   
        }
 3705         -
        #[allow(missing_docs)] // documentation missing in model
 3706         -
        pub fn default_integer(mut self, input: i32) -> Self {
 3707         -
            self.default_integer = Some(input);
        5471  +
        /// A detailed description of the validation failure.
        5472  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
        5473  +
            self.message = Some(input);
 3708   5474   
            self
 3709   5475   
        }
        5476  +
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        5477  +
        ///
        5478  +
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
        5479  +
        ///
        5480  +
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
        5481  +
            self.build_enforcing_required_and_enum_traits()
        5482  +
        }
        5483  +
        fn build_enforcing_required_and_enum_traits(
        5484  +
            self,
        5485  +
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
        5486  +
            Ok(crate::model::ValidationExceptionField {
        5487  +
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
        5488  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
        5489  +
            })
        5490  +
        }
        5491  +
    }
        5492  +
}
        5493  +
/// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5494  +
pub(crate) mod recursive_shapes_input_output_nested2_internal {
        5495  +
        5496  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
        5497  +
        fn from(builder: Builder) -> Self {
        5498  +
            builder.build()
        5499  +
        }
        5500  +
    }
        5501  +
    /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5502  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5503  +
    pub(crate) struct Builder {
        5504  +
        pub(crate) bar: ::std::option::Option<::std::string::String>,
        5505  +
        pub(crate) recursive_member:
        5506  +
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        5507  +
    }
        5508  +
    impl Builder {
 3710   5509   
        #[allow(missing_docs)] // documentation missing in model
 3711         -
        pub fn default_long(mut self, input: i64) -> Self {
 3712         -
            self.default_long = Some(input);
        5510  +
        pub(crate) fn set_bar(
        5511  +
            mut self,
        5512  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5513  +
        ) -> Self {
        5514  +
            self.bar = input.map(|v| v.into());
 3713   5515   
            self
 3714   5516   
        }
 3715   5517   
        #[allow(missing_docs)] // documentation missing in model
 3716         -
        pub fn default_float(mut self, input: f32) -> Self {
 3717         -
            self.default_float = Some(input);
        5518  +
        pub(crate) fn set_recursive_member(
        5519  +
            mut self,
        5520  +
            input: Option<
        5521  +
                impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
        5522  +
            >,
        5523  +
        ) -> Self {
        5524  +
            self.recursive_member = input.map(|v| v.into());
 3718   5525   
            self
 3719   5526   
        }
 3720         -
        #[allow(missing_docs)] // documentation missing in model
 3721         -
        pub fn default_double(mut self, input: f64) -> Self {
 3722         -
            self.default_double = Some(input);
        5527  +
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5528  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
        5529  +
            self.build_enforcing_all_constraints()
        5530  +
        }
        5531  +
        fn build_enforcing_all_constraints(
        5532  +
            self,
        5533  +
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
        5534  +
            crate::model::RecursiveShapesInputOutputNested2 {
        5535  +
                bar: self.bar,
        5536  +
                recursive_member: self.recursive_member,
        5537  +
            }
        5538  +
        }
        5539  +
    }
        5540  +
}
        5541  +
/// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5542  +
pub mod recursive_shapes_input_output_nested2 {
        5543  +
        5544  +
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
        5545  +
        fn from(builder: Builder) -> Self {
        5546  +
            builder.build()
        5547  +
        }
        5548  +
    }
        5549  +
    /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5550  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5551  +
    pub struct Builder {
        5552  +
        pub(crate) bar: ::std::option::Option<::std::string::String>,
        5553  +
        pub(crate) recursive_member:
        5554  +
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        5555  +
    }
        5556  +
    impl Builder {
        5557  +
        #[allow(missing_docs)] // documentation missing in model
        5558  +
        pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5559  +
            self.bar = input;
 3723   5560   
            self
 3724   5561   
        }
 3725   5562   
        #[allow(missing_docs)] // documentation missing in model
 3726         -
        pub fn default_map(
        5563  +
        pub fn recursive_member(
 3727   5564   
            mut self,
 3728         -
            input: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        5565  +
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
 3729   5566   
        ) -> Self {
 3730         -
            self.default_map = Some(input);
 3731         -
            self
 3732         -
        }
 3733         -
        #[allow(missing_docs)] // documentation missing in model
 3734         -
        pub fn default_enum(mut self, input: crate::model::TestEnum) -> Self {
 3735         -
            self.default_enum = Some(input);
        5567  +
            self.recursive_member = input;
 3736   5568   
            self
 3737   5569   
        }
 3738         -
        #[allow(missing_docs)] // documentation missing in model
 3739         -
        pub fn default_int_enum(mut self, input: i32) -> Self {
 3740         -
            self.default_int_enum = Some(input);
 3741         -
            self
        5570  +
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        5571  +
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
        5572  +
            self.build_enforcing_required_and_enum_traits()
 3742   5573   
        }
 3743         -
        #[allow(missing_docs)] // documentation missing in model
 3744         -
        pub fn empty_string(mut self, input: ::std::string::String) -> Self {
 3745         -
            self.empty_string = Some(input);
 3746         -
            self
        5574  +
        fn build_enforcing_required_and_enum_traits(
        5575  +
            self,
        5576  +
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
        5577  +
            crate::model::RecursiveShapesInputOutputNested2 {
        5578  +
                bar: self.bar,
        5579  +
                recursive_member: self.recursive_member,
        5580  +
            }
 3747   5581   
        }
 3748         -
        #[allow(missing_docs)] // documentation missing in model
 3749         -
        pub fn false_boolean(mut self, input: bool) -> Self {
 3750         -
            self.false_boolean = Some(input);
 3751         -
            self
        5582  +
    }
        5583  +
}
        5584  +
/// See [`StructureListMember`](crate::model::StructureListMember).
        5585  +
pub(crate) mod structure_list_member_internal {
        5586  +
        5587  +
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
        5588  +
        fn from(builder: Builder) -> Self {
        5589  +
            builder.build()
 3752   5590   
        }
        5591  +
    }
        5592  +
    /// A builder for [`StructureListMember`](crate::model::StructureListMember).
        5593  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5594  +
    pub(crate) struct Builder {
        5595  +
        pub(crate) a: ::std::option::Option<::std::string::String>,
        5596  +
        pub(crate) b: ::std::option::Option<::std::string::String>,
        5597  +
    }
        5598  +
    impl Builder {
 3753   5599   
        #[allow(missing_docs)] // documentation missing in model
 3754         -
        pub fn empty_blob(mut self, input: ::aws_smithy_http_server_python::types::Blob) -> Self {
 3755         -
            self.empty_blob = Some(input);
        5600  +
        pub(crate) fn set_a(
        5601  +
            mut self,
        5602  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5603  +
        ) -> Self {
        5604  +
            self.a = input.map(|v| v.into());
 3756   5605   
            self
 3757   5606   
        }
 3758   5607   
        #[allow(missing_docs)] // documentation missing in model
 3759         -
        pub fn zero_byte(mut self, input: i8) -> Self {
 3760         -
            self.zero_byte = Some(input);
        5608  +
        pub(crate) fn set_b(
        5609  +
            mut self,
        5610  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5611  +
        ) -> Self {
        5612  +
            self.b = input.map(|v| v.into());
 3761   5613   
            self
 3762   5614   
        }
 3763         -
        #[allow(missing_docs)] // documentation missing in model
 3764         -
        pub fn zero_short(mut self, input: i16) -> Self {
 3765         -
            self.zero_short = Some(input);
 3766         -
            self
        5615  +
        /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
        5616  +
        pub fn build(self) -> crate::model::StructureListMember {
        5617  +
            self.build_enforcing_all_constraints()
 3767   5618   
        }
 3768         -
        #[allow(missing_docs)] // documentation missing in model
 3769         -
        pub fn zero_integer(mut self, input: i32) -> Self {
 3770         -
            self.zero_integer = Some(input);
 3771         -
            self
        5619  +
        fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
        5620  +
            crate::model::StructureListMember {
        5621  +
                a: self.a,
        5622  +
                b: self.b,
        5623  +
            }
 3772   5624   
        }
 3773         -
        #[allow(missing_docs)] // documentation missing in model
 3774         -
        pub fn zero_long(mut self, input: i64) -> Self {
 3775         -
            self.zero_long = Some(input);
 3776         -
            self
        5625  +
    }
        5626  +
}
        5627  +
/// See [`StructureListMember`](crate::model::StructureListMember).
        5628  +
pub mod structure_list_member {
        5629  +
        5630  +
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
        5631  +
        fn from(builder: Builder) -> Self {
        5632  +
            builder.build()
 3777   5633   
        }
        5634  +
    }
        5635  +
    /// A builder for [`StructureListMember`](crate::model::StructureListMember).
        5636  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        5637  +
    pub struct Builder {
        5638  +
        pub(crate) a: ::std::option::Option<::std::string::String>,
        5639  +
        pub(crate) b: ::std::option::Option<::std::string::String>,
        5640  +
    }
        5641  +
    impl Builder {
 3778   5642   
        #[allow(missing_docs)] // documentation missing in model
 3779         -
        pub fn zero_float(mut self, input: f32) -> Self {
 3780         -
            self.zero_float = Some(input);
        5643  +
        pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5644  +
            self.a = input;
 3781   5645   
            self
 3782   5646   
        }
 3783   5647   
        #[allow(missing_docs)] // documentation missing in model
 3784         -
        pub fn zero_double(mut self, input: f64) -> Self {
 3785         -
            self.zero_double = Some(input);
        5648  +
        pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5649  +
            self.b = input;
 3786   5650   
            self
 3787   5651   
        }
 3788         -
        /// Consumes the builder and constructs a [`Defaults`](crate::model::Defaults).
 3789         -
        pub fn build(self) -> crate::model::Defaults {
        5652  +
        /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
        5653  +
        pub fn build(self) -> crate::model::StructureListMember {
 3790   5654   
            self.build_enforcing_required_and_enum_traits()
 3791   5655   
        }
 3792         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Defaults {
 3793         -
            crate::model::Defaults {
 3794         -
                default_string: self.default_string.unwrap_or_else(|| String::from("hi")),
 3795         -
                default_boolean: self.default_boolean.unwrap_or(true),
 3796         -
                default_list: self.default_list.unwrap_or_default(),
 3797         -
                default_document_map: self.default_document_map.unwrap_or_else(|| {
 3798         -
                    ::aws_smithy_types::Document::Object(::std::collections::HashMap::new()).into()
 3799         -
                }),
 3800         -
                default_document_string: self.default_document_string.unwrap_or_else(|| {
 3801         -
                    ::aws_smithy_types::Document::String(::std::string::String::from("hi")).into()
 3802         -
                }),
 3803         -
                default_document_boolean: self
 3804         -
                    .default_document_boolean
 3805         -
                    .unwrap_or(::aws_smithy_types::Document::Bool(true).into()),
 3806         -
                default_document_list: self.default_document_list.unwrap_or_else(|| {
 3807         -
                    ::aws_smithy_types::Document::Array(::std::vec::Vec::new()).into()
 3808         -
                }),
 3809         -
                default_null_document: self.default_null_document,
 3810         -
                default_timestamp: self.default_timestamp.unwrap_or_else(|| {
 3811         -
                    ::aws_smithy_types::DateTime::from_fractional_secs(0, 0_f64).into()
 3812         -
                }),
 3813         -
                default_blob: self
 3814         -
                    .default_blob
 3815         -
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("YWJj").into()),
 3816         -
                default_byte: self.default_byte.unwrap_or(1i8),
 3817         -
                default_short: self.default_short.unwrap_or(1i16),
 3818         -
                default_integer: self.default_integer.unwrap_or(10i32),
 3819         -
                default_long: self.default_long.unwrap_or(100i64),
 3820         -
                default_float: self.default_float.unwrap_or(1.0f32),
 3821         -
                default_double: self.default_double.unwrap_or(1.0f64),
 3822         -
                default_map: self.default_map.unwrap_or_default(),
 3823         -
                default_enum: self.default_enum.unwrap_or(
 3824         -
                    "FOO"
 3825         -
                        .parse::<crate::model::TestEnum>()
 3826         -
                        .expect("static value validated to member"),
 3827         -
                ),
 3828         -
                default_int_enum: self.default_int_enum.unwrap_or(1i32),
 3829         -
                empty_string: self.empty_string.unwrap_or_else(|| String::from("")),
 3830         -
                false_boolean: self.false_boolean.unwrap_or(false),
 3831         -
                empty_blob: self
 3832         -
                    .empty_blob
 3833         -
                    .unwrap_or_else(|| ::aws_smithy_types::Blob::new("").into()),
 3834         -
                zero_byte: self.zero_byte.unwrap_or(0i8),
 3835         -
                zero_short: self.zero_short.unwrap_or(0i16),
 3836         -
                zero_integer: self.zero_integer.unwrap_or(0i32),
 3837         -
                zero_long: self.zero_long.unwrap_or(0i64),
 3838         -
                zero_float: self.zero_float.unwrap_or(0.0f32),
 3839         -
                zero_double: self.zero_double.unwrap_or(0.0f64),
        5656  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructureListMember {
        5657  +
            crate::model::StructureListMember {
        5658  +
                a: self.a,
        5659  +
                b: self.b,
 3840   5660   
            }
 3841   5661   
        }
 3842   5662   
    }
 3843   5663   
}
 3844         -
/// See [`PayloadConfig`](crate::model::PayloadConfig).
 3845         -
pub(crate) mod payload_config_internal {
        5664  +
/// See [`GreetingStruct`](crate::model::GreetingStruct).
        5665  +
pub(crate) mod greeting_struct_internal {
 3846   5666   
 3847         -
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
        5667  +
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 3848   5668   
        fn from(builder: Builder) -> Self {
 3849   5669   
            builder.build()
 3850   5670   
        }
 3851   5671   
    }
 3852         -
    /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
        5672  +
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 3853   5673   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3854   5674   
    pub(crate) struct Builder {
 3855         -
        pub(crate) data: ::std::option::Option<i32>,
        5675  +
        pub(crate) hi: ::std::option::Option<::std::string::String>,
 3856   5676   
    }
 3857   5677   
    impl Builder {
 3858   5678   
        #[allow(missing_docs)] // documentation missing in model
 3859         -
        pub(crate) fn set_data(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
 3860         -
            self.data = input.map(|v| v.into());
        5679  +
        pub(crate) fn set_hi(
        5680  +
            mut self,
        5681  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5682  +
        ) -> Self {
        5683  +
            self.hi = input.map(|v| v.into());
 3861   5684   
            self
 3862   5685   
        }
 3863         -
        /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
 3864         -
        pub fn build(self) -> crate::model::PayloadConfig {
        5686  +
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
        5687  +
        pub fn build(self) -> crate::model::GreetingStruct {
 3865   5688   
            self.build_enforcing_all_constraints()
 3866   5689   
        }
 3867         -
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadConfig {
 3868         -
            crate::model::PayloadConfig { data: self.data }
        5690  +
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
        5691  +
            crate::model::GreetingStruct { hi: self.hi }
 3869   5692   
        }
 3870   5693   
    }
 3871   5694   
}
 3872         -
/// See [`PayloadConfig`](crate::model::PayloadConfig).
 3873         -
pub mod payload_config {
        5695  +
/// See [`GreetingStruct`](crate::model::GreetingStruct).
        5696  +
pub mod greeting_struct {
 3874   5697   
 3875         -
    impl ::std::convert::From<Builder> for crate::model::PayloadConfig {
        5698  +
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 3876   5699   
        fn from(builder: Builder) -> Self {
 3877   5700   
            builder.build()
 3878   5701   
        }
 3879   5702   
    }
 3880         -
    /// A builder for [`PayloadConfig`](crate::model::PayloadConfig).
        5703  +
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 3881   5704   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3882   5705   
    pub struct Builder {
 3883         -
        pub(crate) data: ::std::option::Option<i32>,
        5706  +
        pub(crate) hi: ::std::option::Option<::std::string::String>,
 3884   5707   
    }
 3885   5708   
    impl Builder {
 3886   5709   
        #[allow(missing_docs)] // documentation missing in model
 3887         -
        pub fn data(mut self, input: ::std::option::Option<i32>) -> Self {
 3888         -
            self.data = input;
        5710  +
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5711  +
            self.hi = input;
 3889   5712   
            self
 3890   5713   
        }
 3891         -
        /// Consumes the builder and constructs a [`PayloadConfig`](crate::model::PayloadConfig).
 3892         -
        pub fn build(self) -> crate::model::PayloadConfig {
        5714  +
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
        5715  +
        pub fn build(self) -> crate::model::GreetingStruct {
 3893   5716   
            self.build_enforcing_required_and_enum_traits()
 3894   5717   
        }
 3895         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::PayloadConfig {
 3896         -
            crate::model::PayloadConfig { data: self.data }
        5718  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
        5719  +
            crate::model::GreetingStruct { hi: self.hi }
 3897   5720   
        }
 3898   5721   
    }
 3899   5722   
}
 3900         -
/// See [`TestConfig`](crate::model::TestConfig).
 3901         -
pub(crate) mod test_config_internal {
        5723  +
/// See [`RenamedGreeting`](crate::model::RenamedGreeting).
        5724  +
pub(crate) mod renamed_greeting_internal {
 3902   5725   
 3903         -
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
        5726  +
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
 3904   5727   
        fn from(builder: Builder) -> Self {
 3905   5728   
            builder.build()
 3906   5729   
        }
 3907   5730   
    }
 3908         -
    /// A builder for [`TestConfig`](crate::model::TestConfig).
        5731  +
    /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
 3909   5732   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3910   5733   
    pub(crate) struct Builder {
 3911         -
        pub(crate) timeout: ::std::option::Option<i32>,
        5734  +
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
 3912   5735   
    }
 3913   5736   
    impl Builder {
 3914   5737   
        #[allow(missing_docs)] // documentation missing in model
 3915         -
        pub(crate) fn set_timeout(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
 3916         -
            self.timeout = input.map(|v| v.into());
        5738  +
        pub(crate) fn set_salutation(
        5739  +
            mut self,
        5740  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5741  +
        ) -> Self {
        5742  +
            self.salutation = input.map(|v| v.into());
 3917   5743   
            self
 3918   5744   
        }
 3919         -
        /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
 3920         -
        pub fn build(self) -> crate::model::TestConfig {
        5745  +
        /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
        5746  +
        pub fn build(self) -> crate::model::RenamedGreeting {
 3921   5747   
            self.build_enforcing_all_constraints()
 3922   5748   
        }
 3923         -
        fn build_enforcing_all_constraints(self) -> crate::model::TestConfig {
 3924         -
            crate::model::TestConfig {
 3925         -
                timeout: self.timeout,
        5749  +
        fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
        5750  +
            crate::model::RenamedGreeting {
        5751  +
                salutation: self.salutation,
 3926   5752   
            }
 3927   5753   
        }
 3928   5754   
    }
 3929   5755   
}
 3930         -
/// See [`TestConfig`](crate::model::TestConfig).
 3931         -
pub mod test_config {
        5756  +
/// See [`RenamedGreeting`](crate::model::RenamedGreeting).
        5757  +
pub mod renamed_greeting {
 3932   5758   
 3933         -
    impl ::std::convert::From<Builder> for crate::model::TestConfig {
        5759  +
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
 3934   5760   
        fn from(builder: Builder) -> Self {
 3935   5761   
            builder.build()
 3936   5762   
        }
 3937   5763   
    }
 3938         -
    /// A builder for [`TestConfig`](crate::model::TestConfig).
        5764  +
    /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
 3939   5765   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3940   5766   
    pub struct Builder {
 3941         -
        pub(crate) timeout: ::std::option::Option<i32>,
        5767  +
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
 3942   5768   
    }
 3943   5769   
    impl Builder {
 3944   5770   
        #[allow(missing_docs)] // documentation missing in model
 3945         -
        pub fn timeout(mut self, input: ::std::option::Option<i32>) -> Self {
 3946         -
            self.timeout = input;
        5771  +
        pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        5772  +
            self.salutation = input;
 3947   5773   
            self
 3948   5774   
        }
 3949         -
        /// Consumes the builder and constructs a [`TestConfig`](crate::model::TestConfig).
 3950         -
        pub fn build(self) -> crate::model::TestConfig {
        5775  +
        /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
        5776  +
        pub fn build(self) -> crate::model::RenamedGreeting {
 3951   5777   
            self.build_enforcing_required_and_enum_traits()
 3952   5778   
        }
 3953         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::TestConfig {
 3954         -
            crate::model::TestConfig {
 3955         -
                timeout: self.timeout,
        5779  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::RenamedGreeting {
        5780  +
            crate::model::RenamedGreeting {
        5781  +
                salutation: self.salutation,
 3956   5782   
            }
 3957   5783   
        }
 3958   5784   
    }
 3959   5785   
}
 3960   5786   
/// See [`Unit`](crate::model::Unit).
 3961   5787   
pub(crate) mod unit_internal {
 3962   5788   
 3963   5789   
    impl ::std::convert::From<Builder> for crate::model::Unit {
 3964   5790   
        fn from(builder: Builder) -> Self {
 3965   5791   
            builder.build()
 3966   5792   
        }
 3967   5793   
    }
 3968   5794   
    /// A builder for [`Unit`](crate::model::Unit).
 3969   5795   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3970   5796   
    pub(crate) struct Builder {}
 3971   5797   
    impl Builder {
 3972   5798   
        /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
 3973   5799   
        pub fn build(self) -> crate::model::Unit {
 3974   5800   
            self.build_enforcing_all_constraints()
 3975   5801   
        }
 3976   5802   
        fn build_enforcing_all_constraints(self) -> crate::model::Unit {
 3977   5803   
            crate::model::Unit {}
 3978   5804   
        }
 3979   5805   
    }
 3980   5806   
}
 3981   5807   
/// See [`Unit`](crate::model::Unit).
 3982   5808   
pub mod unit {
 3983   5809   
 3984   5810   
    impl ::std::convert::From<Builder> for crate::model::Unit {
 3985   5811   
        fn from(builder: Builder) -> Self {
 3986   5812   
            builder.build()
 3987   5813   
        }
 3988   5814   
    }
 3989   5815   
    /// A builder for [`Unit`](crate::model::Unit).
 3990   5816   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 3991   5817   
    pub struct Builder {}
 3992   5818   
    impl Builder {
 3993   5819   
        /// Consumes the builder and constructs a [`Unit`](crate::model::Unit).
 3994   5820   
        pub fn build(self) -> crate::model::Unit {
 3995   5821   
            self.build_enforcing_required_and_enum_traits()
 3996   5822   
        }
 3997   5823   
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Unit {
 3998   5824   
            crate::model::Unit {}
 3999   5825   
        }
 4000   5826   
    }
 4001   5827   
}
 4002         -
pub(crate) mod my_union_internal {
 4003         -
 4004         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 4005         -
    #[allow(clippy::enum_variant_names)]
 4006         -
    pub(crate) enum ConstraintViolation {
 4007         -
        EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
 4008         -
    }
 4009         -
    impl ::std::fmt::Display for ConstraintViolation {
 4010         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4011         -
            match self {
 4012         -
                Self::EnumValue(inner) => write!(f, "{inner}"),
 4013         -
            }
 4014         -
        }
 4015         -
    }
 4016         -
 4017         -
    impl ::std::error::Error for ConstraintViolation {}
 4018         -
    impl ConstraintViolation {
 4019         -
        pub(crate) fn as_validation_exception_field(
 4020         -
            self,
 4021         -
            path: ::std::string::String,
 4022         -
        ) -> crate::model::ValidationExceptionField {
 4023         -
            match self {
 4024         -
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
 4025         -
            }
 4026         -
        }
 4027         -
    }
 4028         -
}
 4029         -
/// See [`RenamedGreeting`](crate::model::RenamedGreeting).
 4030         -
pub(crate) mod renamed_greeting_internal {
        5828  +
/// See [`Farewell`](crate::model::Farewell).
        5829  +
pub(crate) mod farewell_internal {
 4031   5830   
 4032         -
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
        5831  +
    impl ::std::convert::From<Builder> for crate::model::Farewell {
 4033   5832   
        fn from(builder: Builder) -> Self {
 4034   5833   
            builder.build()
 4035   5834   
        }
 4036   5835   
    }
 4037         -
    /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
        5836  +
    /// A builder for [`Farewell`](crate::model::Farewell).
 4038   5837   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4039   5838   
    pub(crate) struct Builder {
 4040         -
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
        5839  +
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
 4041   5840   
    }
 4042   5841   
    impl Builder {
 4043   5842   
        #[allow(missing_docs)] // documentation missing in model
 4044         -
        pub(crate) fn set_salutation(
        5843  +
        pub(crate) fn set_phrase(
 4045   5844   
            mut self,
 4046         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        5845  +
            input: impl ::std::convert::Into<::std::string::String>,
 4047   5846   
        ) -> Self {
 4048         -
            self.salutation = input.map(|v| v.into());
        5847  +
            self.phrase = Some(input.into());
 4049   5848   
            self
 4050   5849   
        }
 4051         -
        /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
 4052         -
        pub fn build(self) -> crate::model::RenamedGreeting {
        5850  +
        /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
        5851  +
        pub fn build(self) -> crate::model::Farewell {
 4053   5852   
            self.build_enforcing_all_constraints()
 4054   5853   
        }
 4055         -
        fn build_enforcing_all_constraints(self) -> crate::model::RenamedGreeting {
 4056         -
            crate::model::RenamedGreeting {
 4057         -
                salutation: self.salutation,
        5854  +
        fn build_enforcing_all_constraints(self) -> crate::model::Farewell {
        5855  +
            crate::model::Farewell {
        5856  +
                phrase: self.phrase.unwrap_or_else(|| String::from("bye")),
 4058   5857   
            }
 4059   5858   
        }
 4060   5859   
    }
 4061   5860   
}
 4062         -
/// See [`RenamedGreeting`](crate::model::RenamedGreeting).
 4063         -
pub mod renamed_greeting {
        5861  +
/// See [`Farewell`](crate::model::Farewell).
        5862  +
pub mod farewell {
 4064   5863   
 4065         -
    impl ::std::convert::From<Builder> for crate::model::RenamedGreeting {
        5864  +
    impl ::std::convert::From<Builder> for crate::model::Farewell {
 4066   5865   
        fn from(builder: Builder) -> Self {
 4067   5866   
            builder.build()
 4068   5867   
        }
 4069   5868   
    }
 4070         -
    /// A builder for [`RenamedGreeting`](crate::model::RenamedGreeting).
        5869  +
    /// A builder for [`Farewell`](crate::model::Farewell).
 4071   5870   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4072   5871   
    pub struct Builder {
 4073         -
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
        5872  +
        pub(crate) phrase: ::std::option::Option<::std::string::String>,
 4074   5873   
    }
 4075   5874   
    impl Builder {
 4076   5875   
        #[allow(missing_docs)] // documentation missing in model
 4077         -
        pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4078         -
            self.salutation = input;
        5876  +
        pub fn phrase(mut self, input: ::std::string::String) -> Self {
        5877  +
            self.phrase = Some(input);
 4079   5878   
            self
 4080   5879   
        }
 4081         -
        /// Consumes the builder and constructs a [`RenamedGreeting`](crate::model::RenamedGreeting).
 4082         -
        pub fn build(self) -> crate::model::RenamedGreeting {
        5880  +
        /// Consumes the builder and constructs a [`Farewell`](crate::model::Farewell).
        5881  +
        pub fn build(self) -> crate::model::Farewell {
 4083   5882   
            self.build_enforcing_required_and_enum_traits()
 4084   5883   
        }
 4085         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::RenamedGreeting {
 4086         -
            crate::model::RenamedGreeting {
 4087         -
                salutation: self.salutation,
        5884  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::Farewell {
        5885  +
            crate::model::Farewell {
        5886  +
                phrase: self.phrase.unwrap_or_else(|| String::from("bye")),
 4088   5887   
            }
 4089   5888   
        }
 4090   5889   
    }
 4091   5890   
}
 4092         -
/// See [`GreetingStruct`](crate::model::GreetingStruct).
 4093         -
pub(crate) mod greeting_struct_internal {
        5891  +
/// See [`HeadersEvent`](crate::model::HeadersEvent).
        5892  +
pub(crate) mod headers_event_internal {
 4094   5893   
 4095         -
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
        5894  +
    impl ::std::convert::From<Builder> for crate::model::HeadersEvent {
 4096   5895   
        fn from(builder: Builder) -> Self {
 4097   5896   
            builder.build()
 4098   5897   
        }
 4099   5898   
    }
 4100         -
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
        5899  +
    /// A builder for [`HeadersEvent`](crate::model::HeadersEvent).
 4101   5900   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4102   5901   
    pub(crate) struct Builder {
 4103         -
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        5902  +
        pub(crate) boolean_header: ::std::option::Option<bool>,
        5903  +
        pub(crate) byte_header: ::std::option::Option<i8>,
        5904  +
        pub(crate) short_header: ::std::option::Option<i16>,
        5905  +
        pub(crate) int_header: ::std::option::Option<i32>,
        5906  +
        pub(crate) long_header: ::std::option::Option<i64>,
        5907  +
        pub(crate) blob_header: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        5908  +
        pub(crate) string_header: ::std::option::Option<::std::string::String>,
        5909  +
        pub(crate) timestamp_header:
        5910  +
            ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 4104   5911   
    }
 4105   5912   
    impl Builder {
 4106   5913   
        #[allow(missing_docs)] // documentation missing in model
 4107         -
        pub(crate) fn set_hi(
        5914  +
        pub(crate) fn set_boolean_header(
        5915  +
            mut self,
        5916  +
            input: Option<impl ::std::convert::Into<bool>>,
        5917  +
        ) -> Self {
        5918  +
            self.boolean_header = input.map(|v| v.into());
        5919  +
            self
        5920  +
        }
        5921  +
        #[allow(missing_docs)] // documentation missing in model
        5922  +
        pub(crate) fn set_byte_header(
        5923  +
            mut self,
        5924  +
            input: Option<impl ::std::convert::Into<i8>>,
        5925  +
        ) -> Self {
        5926  +
            self.byte_header = input.map(|v| v.into());
        5927  +
            self
        5928  +
        }
        5929  +
        #[allow(missing_docs)] // documentation missing in model
        5930  +
        pub(crate) fn set_short_header(
        5931  +
            mut self,
        5932  +
            input: Option<impl ::std::convert::Into<i16>>,
        5933  +
        ) -> Self {
        5934  +
            self.short_header = input.map(|v| v.into());
        5935  +
            self
        5936  +
        }
        5937  +
        #[allow(missing_docs)] // documentation missing in model
        5938  +
        pub(crate) fn set_int_header(
        5939  +
            mut self,
        5940  +
            input: Option<impl ::std::convert::Into<i32>>,
        5941  +
        ) -> Self {
        5942  +
            self.int_header = input.map(|v| v.into());
        5943  +
            self
        5944  +
        }
        5945  +
        #[allow(missing_docs)] // documentation missing in model
        5946  +
        pub(crate) fn set_long_header(
        5947  +
            mut self,
        5948  +
            input: Option<impl ::std::convert::Into<i64>>,
        5949  +
        ) -> Self {
        5950  +
            self.long_header = input.map(|v| v.into());
        5951  +
            self
        5952  +
        }
        5953  +
        #[allow(missing_docs)] // documentation missing in model
        5954  +
        pub(crate) fn set_blob_header(
        5955  +
            mut self,
        5956  +
            input: Option<impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>>,
        5957  +
        ) -> Self {
        5958  +
            self.blob_header = input.map(|v| v.into());
        5959  +
            self
        5960  +
        }
        5961  +
        #[allow(missing_docs)] // documentation missing in model
        5962  +
        pub(crate) fn set_string_header(
 4108   5963   
            mut self,
 4109   5964   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4110   5965   
        ) -> Self {
 4111         -
            self.hi = input.map(|v| v.into());
        5966  +
            self.string_header = input.map(|v| v.into());
 4112   5967   
            self
 4113   5968   
        }
 4114         -
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
 4115         -
        pub fn build(self) -> crate::model::GreetingStruct {
        5969  +
        #[allow(missing_docs)] // documentation missing in model
        5970  +
        pub(crate) fn set_timestamp_header(
        5971  +
            mut self,
        5972  +
            input: Option<
        5973  +
                impl ::std::convert::Into<::aws_smithy_http_server_python::types::DateTime>,
        5974  +
            >,
        5975  +
        ) -> Self {
        5976  +
            self.timestamp_header = input.map(|v| v.into());
        5977  +
            self
        5978  +
        }
        5979  +
        /// Consumes the builder and constructs a [`HeadersEvent`](crate::model::HeadersEvent).
        5980  +
        pub fn build(self) -> crate::model::HeadersEvent {
 4116   5981   
            self.build_enforcing_all_constraints()
 4117   5982   
        }
 4118         -
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
 4119         -
            crate::model::GreetingStruct { hi: self.hi }
        5983  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersEvent {
        5984  +
            crate::model::HeadersEvent {
        5985  +
                boolean_header: self.boolean_header,
        5986  +
                byte_header: self.byte_header,
        5987  +
                short_header: self.short_header,
        5988  +
                int_header: self.int_header,
        5989  +
                long_header: self.long_header,
        5990  +
                blob_header: self.blob_header,
        5991  +
                string_header: self.string_header,
        5992  +
                timestamp_header: self.timestamp_header,
        5993  +
            }
 4120   5994   
        }
 4121   5995   
    }
 4122   5996   
}
 4123         -
/// See [`GreetingStruct`](crate::model::GreetingStruct).
 4124         -
pub mod greeting_struct {
        5997  +
/// See [`HeadersEvent`](crate::model::HeadersEvent).
        5998  +
pub mod headers_event {
 4125   5999   
 4126         -
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
        6000  +
    impl ::std::convert::From<Builder> for crate::model::HeadersEvent {
 4127   6001   
        fn from(builder: Builder) -> Self {
 4128   6002   
            builder.build()
 4129   6003   
        }
 4130   6004   
    }
 4131         -
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
        6005  +
    /// A builder for [`HeadersEvent`](crate::model::HeadersEvent).
 4132   6006   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4133   6007   
    pub struct Builder {
 4134         -
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        6008  +
        pub(crate) boolean_header: ::std::option::Option<bool>,
        6009  +
        pub(crate) byte_header: ::std::option::Option<i8>,
        6010  +
        pub(crate) short_header: ::std::option::Option<i16>,
        6011  +
        pub(crate) int_header: ::std::option::Option<i32>,
        6012  +
        pub(crate) long_header: ::std::option::Option<i64>,
        6013  +
        pub(crate) blob_header: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        6014  +
        pub(crate) string_header: ::std::option::Option<::std::string::String>,
        6015  +
        pub(crate) timestamp_header:
        6016  +
            ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 4135   6017   
    }
 4136   6018   
    impl Builder {
 4137   6019   
        #[allow(missing_docs)] // documentation missing in model
 4138         -
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4139         -
            self.hi = input;
        6020  +
        pub fn boolean_header(mut self, input: ::std::option::Option<bool>) -> Self {
        6021  +
            self.boolean_header = input;
 4140   6022   
            self
 4141   6023   
        }
 4142         -
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
 4143         -
        pub fn build(self) -> crate::model::GreetingStruct {
 4144         -
            self.build_enforcing_required_and_enum_traits()
 4145         -
        }
 4146         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
 4147         -
            crate::model::GreetingStruct { hi: self.hi }
 4148         -
        }
 4149         -
    }
 4150         -
}
 4151         -
pub(crate) mod sparse_set_map_internal {
 4152         -
 4153         -
    #[allow(clippy::enum_variant_names)]
 4154         -
    #[derive(Debug, PartialEq)]
 4155         -
    pub(crate) enum ConstraintViolation {
 4156         -
        #[doc(hidden)]
 4157         -
        Value(
 4158         -
            ::std::string::String,
 4159         -
            crate::model::string_set_internal::ConstraintViolation,
 4160         -
        ),
 4161         -
    }
 4162         -
 4163         -
    impl ::std::fmt::Display for ConstraintViolation {
 4164         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4165         -
            match self {
 4166         -
                Self::Value(_, value_constraint_violation) => {
 4167         -
                    write!(f, "{}", value_constraint_violation)
 4168         -
                }
 4169         -
            }
        6024  +
        #[allow(missing_docs)] // documentation missing in model
        6025  +
        pub fn byte_header(mut self, input: ::std::option::Option<i8>) -> Self {
        6026  +
            self.byte_header = input;
        6027  +
            self
 4170   6028   
        }
 4171         -
    }
 4172         -
 4173         -
    impl ::std::error::Error for ConstraintViolation {}
 4174         -
    impl ConstraintViolation {
 4175         -
        pub(crate) fn as_validation_exception_field(
 4176         -
            self,
 4177         -
            path: ::std::string::String,
 4178         -
        ) -> crate::model::ValidationExceptionField {
 4179         -
            match self {
 4180         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4181         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
 4182         -
            }
        6029  +
        #[allow(missing_docs)] // documentation missing in model
        6030  +
        pub fn short_header(mut self, input: ::std::option::Option<i16>) -> Self {
        6031  +
            self.short_header = input;
        6032  +
            self
 4183   6033   
        }
 4184         -
    }
 4185         -
}
 4186         -
pub(crate) mod string_set_internal {
 4187         -
 4188         -
    #[allow(clippy::enum_variant_names)]
 4189         -
    #[derive(Debug, PartialEq)]
 4190         -
    pub(crate) enum ConstraintViolation {
 4191         -
        /// Constraint violation error when the list does not contain unique items
 4192         -
        UniqueItems {
 4193         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4194         -
            /// at least two elements.
 4195         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4196         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4197         -
            /// Nothing is guaranteed about the order of the indices.
 4198         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4199         -
            /// The original vector, that contains duplicate items.
 4200         -
            original: ::std::vec::Vec<::std::string::String>,
 4201         -
        },
 4202         -
    }
 4203         -
 4204         -
    impl ::std::fmt::Display for ConstraintViolation {
 4205         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4206         -
            let message = match self {
 4207         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4208         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#StringSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4209         -
                            };
 4210         -
            write!(f, "{message}")
        6034  +
        #[allow(missing_docs)] // documentation missing in model
        6035  +
        pub fn int_header(mut self, input: ::std::option::Option<i32>) -> Self {
        6036  +
            self.int_header = input;
        6037  +
            self
 4211   6038   
        }
 4212         -
    }
 4213         -
 4214         -
    impl ::std::error::Error for ConstraintViolation {}
 4215         -
    impl ConstraintViolation {
 4216         -
        pub(crate) fn as_validation_exception_field(
 4217         -
            self,
 4218         -
            path: ::std::string::String,
 4219         -
        ) -> crate::model::ValidationExceptionField {
 4220         -
            match self {
 4221         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4222         -
                                crate::model::ValidationExceptionField {
 4223         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4224         -
                                    path,
 4225         -
                                },
 4226         -
                    }
        6039  +
        #[allow(missing_docs)] // documentation missing in model
        6040  +
        pub fn long_header(mut self, input: ::std::option::Option<i64>) -> Self {
        6041  +
            self.long_header = input;
        6042  +
            self
 4227   6043   
        }
 4228         -
    }
 4229         -
}
 4230         -
pub(crate) mod dense_set_map_internal {
 4231         -
 4232         -
    #[allow(clippy::enum_variant_names)]
 4233         -
    #[derive(Debug, PartialEq)]
 4234         -
    pub(crate) enum ConstraintViolation {
 4235         -
        #[doc(hidden)]
 4236         -
        Value(
 4237         -
            ::std::string::String,
 4238         -
            crate::model::string_set_internal::ConstraintViolation,
 4239         -
        ),
 4240         -
    }
 4241         -
 4242         -
    impl ::std::fmt::Display for ConstraintViolation {
 4243         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4244         -
            match self {
 4245         -
                Self::Value(_, value_constraint_violation) => {
 4246         -
                    write!(f, "{}", value_constraint_violation)
 4247         -
                }
 4248         -
            }
        6044  +
        #[allow(missing_docs)] // documentation missing in model
        6045  +
        pub fn blob_header(
        6046  +
            mut self,
        6047  +
            input: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        6048  +
        ) -> Self {
        6049  +
            self.blob_header = input;
        6050  +
            self
 4249   6051   
        }
 4250         -
    }
 4251         -
 4252         -
    impl ::std::error::Error for ConstraintViolation {}
 4253         -
    impl ConstraintViolation {
 4254         -
        pub(crate) fn as_validation_exception_field(
 4255         -
            self,
 4256         -
            path: ::std::string::String,
 4257         -
        ) -> crate::model::ValidationExceptionField {
 4258         -
            match self {
 4259         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4260         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
        6052  +
        #[allow(missing_docs)] // documentation missing in model
        6053  +
        pub fn string_header(
        6054  +
            mut self,
        6055  +
            input: ::std::option::Option<::std::string::String>,
        6056  +
        ) -> Self {
        6057  +
            self.string_header = input;
        6058  +
            self
        6059  +
        }
        6060  +
        #[allow(missing_docs)] // documentation missing in model
        6061  +
        pub fn timestamp_header(
        6062  +
            mut self,
        6063  +
            input: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
        6064  +
        ) -> Self {
        6065  +
            self.timestamp_header = input;
        6066  +
            self
        6067  +
        }
        6068  +
        /// Consumes the builder and constructs a [`HeadersEvent`](crate::model::HeadersEvent).
        6069  +
        pub fn build(self) -> crate::model::HeadersEvent {
        6070  +
            self.build_enforcing_required_and_enum_traits()
        6071  +
        }
        6072  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::HeadersEvent {
        6073  +
            crate::model::HeadersEvent {
        6074  +
                boolean_header: self.boolean_header,
        6075  +
                byte_header: self.byte_header,
        6076  +
                short_header: self.short_header,
        6077  +
                int_header: self.int_header,
        6078  +
                long_header: self.long_header,
        6079  +
                blob_header: self.blob_header,
        6080  +
                string_header: self.string_header,
        6081  +
                timestamp_header: self.timestamp_header,
 4261   6082   
            }
 4262   6083   
        }
 4263   6084   
    }
 4264   6085   
}
 4265         -
/// See [`StructureListMember`](crate::model::StructureListMember).
 4266         -
pub(crate) mod structure_list_member_internal {
        6086  +
/// See [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        6087  +
pub(crate) mod blob_payload_event_internal {
 4267   6088   
 4268         -
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
        6089  +
    impl ::std::convert::From<Builder> for crate::model::BlobPayloadEvent {
 4269   6090   
        fn from(builder: Builder) -> Self {
 4270   6091   
            builder.build()
 4271   6092   
        }
 4272   6093   
    }
 4273         -
    /// A builder for [`StructureListMember`](crate::model::StructureListMember).
        6094  +
    /// A builder for [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
 4274   6095   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4275   6096   
    pub(crate) struct Builder {
 4276         -
        pub(crate) a: ::std::option::Option<::std::string::String>,
 4277         -
        pub(crate) b: ::std::option::Option<::std::string::String>,
        6097  +
        pub(crate) payload: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 4278   6098   
    }
 4279   6099   
    impl Builder {
 4280   6100   
        #[allow(missing_docs)] // documentation missing in model
 4281         -
        pub(crate) fn set_a(
 4282         -
            mut self,
 4283         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4284         -
        ) -> Self {
 4285         -
            self.a = input.map(|v| v.into());
 4286         -
            self
 4287         -
        }
 4288         -
        #[allow(missing_docs)] // documentation missing in model
 4289         -
        pub(crate) fn set_b(
        6101  +
        pub(crate) fn set_payload(
 4290   6102   
            mut self,
 4291         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        6103  +
            input: Option<impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>>,
 4292   6104   
        ) -> Self {
 4293         -
            self.b = input.map(|v| v.into());
        6105  +
            self.payload = input.map(|v| v.into());
 4294   6106   
            self
 4295   6107   
        }
 4296         -
        /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
 4297         -
        pub fn build(self) -> crate::model::StructureListMember {
        6108  +
        /// Consumes the builder and constructs a [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        6109  +
        pub fn build(self) -> crate::model::BlobPayloadEvent {
 4298   6110   
            self.build_enforcing_all_constraints()
 4299   6111   
        }
 4300         -
        fn build_enforcing_all_constraints(self) -> crate::model::StructureListMember {
 4301         -
            crate::model::StructureListMember {
 4302         -
                a: self.a,
 4303         -
                b: self.b,
        6112  +
        fn build_enforcing_all_constraints(self) -> crate::model::BlobPayloadEvent {
        6113  +
            crate::model::BlobPayloadEvent {
        6114  +
                payload: self.payload,
 4304   6115   
            }
 4305   6116   
        }
 4306   6117   
    }
 4307   6118   
}
 4308         -
/// See [`StructureListMember`](crate::model::StructureListMember).
 4309         -
pub mod structure_list_member {
        6119  +
/// See [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        6120  +
pub mod blob_payload_event {
 4310   6121   
 4311         -
    impl ::std::convert::From<Builder> for crate::model::StructureListMember {
        6122  +
    impl ::std::convert::From<Builder> for crate::model::BlobPayloadEvent {
 4312   6123   
        fn from(builder: Builder) -> Self {
 4313   6124   
            builder.build()
 4314   6125   
        }
 4315   6126   
    }
 4316         -
    /// A builder for [`StructureListMember`](crate::model::StructureListMember).
        6127  +
    /// A builder for [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
 4317   6128   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4318   6129   
    pub struct Builder {
 4319         -
        pub(crate) a: ::std::option::Option<::std::string::String>,
 4320         -
        pub(crate) b: ::std::option::Option<::std::string::String>,
        6130  +
        pub(crate) payload: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 4321   6131   
    }
 4322   6132   
    impl Builder {
 4323   6133   
        #[allow(missing_docs)] // documentation missing in model
 4324         -
        pub fn a(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4325         -
            self.a = input;
 4326         -
            self
 4327         -
        }
 4328         -
        #[allow(missing_docs)] // documentation missing in model
 4329         -
        pub fn b(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4330         -
            self.b = input;
        6134  +
        pub fn payload(
        6135  +
            mut self,
        6136  +
            input: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
        6137  +
        ) -> Self {
        6138  +
            self.payload = input;
 4331   6139   
            self
 4332   6140   
        }
 4333         -
        /// Consumes the builder and constructs a [`StructureListMember`](crate::model::StructureListMember).
 4334         -
        pub fn build(self) -> crate::model::StructureListMember {
        6141  +
        /// Consumes the builder and constructs a [`BlobPayloadEvent`](crate::model::BlobPayloadEvent).
        6142  +
        pub fn build(self) -> crate::model::BlobPayloadEvent {
 4335   6143   
            self.build_enforcing_required_and_enum_traits()
 4336   6144   
        }
 4337         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructureListMember {
 4338         -
            crate::model::StructureListMember {
 4339         -
                a: self.a,
 4340         -
                b: self.b,
 4341         -
            }
 4342         -
        }
 4343         -
    }
 4344         -
}
 4345         -
pub(crate) mod foo_enum_list_internal {
 4346         -
 4347         -
    #[allow(clippy::enum_variant_names)]
 4348         -
    #[derive(Debug, PartialEq)]
 4349         -
    pub(crate) enum ConstraintViolation {
 4350         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 4351         -
        /// The first component of the tuple is the index in the collection where the
 4352         -
        /// first constraint violation was found.
 4353         -
        #[doc(hidden)]
 4354         -
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
 4355         -
    }
 4356         -
 4357         -
    impl ::std::fmt::Display for ConstraintViolation {
 4358         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4359         -
            let message = match self {
 4360         -
                Self::Member(index, failing_member) => format!(
 4361         -
                    "Value at index {index} failed to satisfy constraint. {}",
 4362         -
                    failing_member
 4363         -
                ),
 4364         -
            };
 4365         -
            write!(f, "{message}")
 4366         -
        }
 4367         -
    }
 4368         -
 4369         -
    impl ::std::error::Error for ConstraintViolation {}
 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()),
        6145  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::BlobPayloadEvent {
        6146  +
            crate::model::BlobPayloadEvent {
        6147  +
                payload: self.payload,
 4378   6148   
            }
 4379   6149   
        }
 4380   6150   
    }
 4381   6151   
}
 4382         -
/// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4383         -
pub(crate) mod recursive_shapes_input_output_nested1_internal {
        6152  +
/// See [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        6153  +
pub(crate) mod string_payload_event_internal {
 4384   6154   
 4385         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
        6155  +
    impl ::std::convert::From<Builder> for crate::model::StringPayloadEvent {
 4386   6156   
        fn from(builder: Builder) -> Self {
 4387   6157   
            builder.build()
 4388   6158   
        }
 4389   6159   
    }
 4390         -
    /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        6160  +
    /// A builder for [`StringPayloadEvent`](crate::model::StringPayloadEvent).
 4391   6161   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4392   6162   
    pub(crate) struct Builder {
 4393         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 4394         -
        pub(crate) nested: ::std::option::Option<
 4395         -
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4396         -
        >,
        6163  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
 4397   6164   
    }
 4398   6165   
    impl Builder {
 4399   6166   
        #[allow(missing_docs)] // documentation missing in model
 4400         -
        pub(crate) fn set_foo(
        6167  +
        pub(crate) fn set_payload(
 4401   6168   
            mut self,
 4402   6169   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4403   6170   
        ) -> Self {
 4404         -
            self.foo = input.map(|v| v.into());
 4405         -
            self
 4406         -
        }
 4407         -
        #[allow(missing_docs)] // documentation missing in model
 4408         -
        pub(crate) fn set_nested(
 4409         -
            mut self,
 4410         -
            input: Option<
 4411         -
                impl ::std::convert::Into<
 4412         -
                    ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4413         -
                >,
 4414         -
            >,
 4415         -
        ) -> Self {
 4416         -
            self.nested = input.map(|v| v.into());
        6171  +
            self.payload = input.map(|v| v.into());
 4417   6172   
            self
 4418   6173   
        }
 4419         -
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4420         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        6174  +
        /// Consumes the builder and constructs a [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        6175  +
        pub fn build(self) -> crate::model::StringPayloadEvent {
 4421   6176   
            self.build_enforcing_all_constraints()
 4422   6177   
        }
 4423         -
        fn build_enforcing_all_constraints(
 4424         -
            self,
 4425         -
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
 4426         -
            crate::model::RecursiveShapesInputOutputNested1 {
 4427         -
                foo: self.foo,
 4428         -
                nested: self.nested,
        6178  +
        fn build_enforcing_all_constraints(self) -> crate::model::StringPayloadEvent {
        6179  +
            crate::model::StringPayloadEvent {
        6180  +
                payload: self.payload,
 4429   6181   
            }
 4430   6182   
        }
 4431   6183   
    }
 4432   6184   
}
 4433         -
/// See [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4434         -
pub mod recursive_shapes_input_output_nested1 {
        6185  +
/// See [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        6186  +
pub mod string_payload_event {
 4435   6187   
 4436         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested1 {
        6188  +
    impl ::std::convert::From<Builder> for crate::model::StringPayloadEvent {
 4437   6189   
        fn from(builder: Builder) -> Self {
 4438   6190   
            builder.build()
 4439   6191   
        }
 4440   6192   
    }
 4441         -
    /// A builder for [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
        6193  +
    /// A builder for [`StringPayloadEvent`](crate::model::StringPayloadEvent).
 4442   6194   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4443   6195   
    pub struct Builder {
 4444         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 4445         -
        pub(crate) nested: ::std::option::Option<
 4446         -
            ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4447         -
        >,
        6196  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
 4448   6197   
    }
 4449   6198   
    impl Builder {
 4450   6199   
        #[allow(missing_docs)] // documentation missing in model
 4451         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4452         -
            self.foo = input;
 4453         -
            self
 4454         -
        }
 4455         -
        #[allow(missing_docs)] // documentation missing in model
 4456         -
        pub fn nested(
 4457         -
            mut self,
 4458         -
            input: ::std::option::Option<
 4459         -
                ::std::boxed::Box<crate::model::RecursiveShapesInputOutputNested2>,
 4460         -
            >,
 4461         -
        ) -> Self {
 4462         -
            self.nested = input;
        6200  +
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6201  +
            self.payload = input;
 4463   6202   
            self
 4464   6203   
        }
 4465         -
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested1`](crate::model::RecursiveShapesInputOutputNested1).
 4466         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested1 {
        6204  +
        /// Consumes the builder and constructs a [`StringPayloadEvent`](crate::model::StringPayloadEvent).
        6205  +
        pub fn build(self) -> crate::model::StringPayloadEvent {
 4467   6206   
            self.build_enforcing_required_and_enum_traits()
 4468   6207   
        }
 4469         -
        fn build_enforcing_required_and_enum_traits(
 4470         -
            self,
 4471         -
        ) -> crate::model::RecursiveShapesInputOutputNested1 {
 4472         -
            crate::model::RecursiveShapesInputOutputNested1 {
 4473         -
                foo: self.foo,
 4474         -
                nested: self.nested,
        6208  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StringPayloadEvent {
        6209  +
            crate::model::StringPayloadEvent {
        6210  +
                payload: self.payload,
 4475   6211   
            }
 4476   6212   
        }
 4477   6213   
    }
 4478   6214   
}
 4479         -
/// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 4480         -
pub(crate) mod recursive_shapes_input_output_nested2_internal {
        6215  +
/// See [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6216  +
pub(crate) mod structure_payload_event_internal {
 4481   6217   
 4482         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
        6218  +
    impl ::std::convert::From<Builder> for crate::model::StructurePayloadEvent {
 4483   6219   
        fn from(builder: Builder) -> Self {
 4484   6220   
            builder.build()
 4485   6221   
        }
 4486   6222   
    }
 4487         -
    /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        6223  +
    /// A builder for [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
 4488   6224   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4489   6225   
    pub(crate) struct Builder {
 4490         -
        pub(crate) bar: ::std::option::Option<::std::string::String>,
 4491         -
        pub(crate) recursive_member:
 4492         -
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        6226  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
 4493   6227   
    }
 4494   6228   
    impl Builder {
 4495   6229   
        #[allow(missing_docs)] // documentation missing in model
 4496         -
        pub(crate) fn set_bar(
 4497         -
            mut self,
 4498         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4499         -
        ) -> Self {
 4500         -
            self.bar = input.map(|v| v.into());
 4501         -
            self
 4502         -
        }
 4503         -
        #[allow(missing_docs)] // documentation missing in model
 4504         -
        pub(crate) fn set_recursive_member(
        6230  +
        pub(crate) fn set_payload(
 4505   6231   
            mut self,
 4506         -
            input: Option<
 4507         -
                impl ::std::convert::Into<crate::model::RecursiveShapesInputOutputNested1>,
 4508         -
            >,
        6232  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadStructure>>,
 4509   6233   
        ) -> Self {
 4510         -
            self.recursive_member = input.map(|v| v.into());
        6234  +
            self.payload = input.map(|v| v.into());
 4511   6235   
            self
 4512   6236   
        }
 4513         -
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 4514         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
        6237  +
        /// Consumes the builder and constructs a [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6238  +
        pub fn build(self) -> crate::model::StructurePayloadEvent {
 4515   6239   
            self.build_enforcing_all_constraints()
 4516   6240   
        }
 4517         -
        fn build_enforcing_all_constraints(
 4518         -
            self,
 4519         -
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
 4520         -
            crate::model::RecursiveShapesInputOutputNested2 {
 4521         -
                bar: self.bar,
 4522         -
                recursive_member: self.recursive_member,
        6241  +
        fn build_enforcing_all_constraints(self) -> crate::model::StructurePayloadEvent {
        6242  +
            crate::model::StructurePayloadEvent {
        6243  +
                payload: self.payload,
 4523   6244   
            }
 4524   6245   
        }
 4525   6246   
    }
 4526   6247   
}
 4527         -
/// See [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 4528         -
pub mod recursive_shapes_input_output_nested2 {
        6248  +
/// See [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6249  +
pub mod structure_payload_event {
 4529   6250   
 4530         -
    impl ::std::convert::From<Builder> for crate::model::RecursiveShapesInputOutputNested2 {
        6251  +
    impl ::std::convert::From<Builder> for crate::model::StructurePayloadEvent {
 4531   6252   
        fn from(builder: Builder) -> Self {
 4532   6253   
            builder.build()
 4533   6254   
        }
 4534   6255   
    }
 4535         -
    /// A builder for [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
        6256  +
    /// A builder for [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
 4536   6257   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4537   6258   
    pub struct Builder {
 4538         -
        pub(crate) bar: ::std::option::Option<::std::string::String>,
 4539         -
        pub(crate) recursive_member:
 4540         -
            ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        6259  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
 4541   6260   
    }
 4542   6261   
    impl Builder {
 4543   6262   
        #[allow(missing_docs)] // documentation missing in model
 4544         -
        pub fn bar(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4545         -
            self.bar = input;
 4546         -
            self
 4547         -
        }
 4548         -
        #[allow(missing_docs)] // documentation missing in model
 4549         -
        pub fn recursive_member(
        6263  +
        pub fn payload(
 4550   6264   
            mut self,
 4551         -
            input: ::std::option::Option<crate::model::RecursiveShapesInputOutputNested1>,
        6265  +
            input: ::std::option::Option<crate::model::PayloadStructure>,
 4552   6266   
        ) -> Self {
 4553         -
            self.recursive_member = input;
        6267  +
            self.payload = input;
 4554   6268   
            self
 4555   6269   
        }
 4556         -
        /// Consumes the builder and constructs a [`RecursiveShapesInputOutputNested2`](crate::model::RecursiveShapesInputOutputNested2).
 4557         -
        pub fn build(self) -> crate::model::RecursiveShapesInputOutputNested2 {
        6270  +
        /// Consumes the builder and constructs a [`StructurePayloadEvent`](crate::model::StructurePayloadEvent).
        6271  +
        pub fn build(self) -> crate::model::StructurePayloadEvent {
 4558   6272   
            self.build_enforcing_required_and_enum_traits()
 4559   6273   
        }
 4560         -
        fn build_enforcing_required_and_enum_traits(
 4561         -
            self,
 4562         -
        ) -> crate::model::RecursiveShapesInputOutputNested2 {
 4563         -
            crate::model::RecursiveShapesInputOutputNested2 {
 4564         -
                bar: self.bar,
 4565         -
                recursive_member: self.recursive_member,
        6274  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructurePayloadEvent {
        6275  +
            crate::model::StructurePayloadEvent {
        6276  +
                payload: self.payload,
 4566   6277   
            }
 4567   6278   
        }
 4568   6279   
    }
 4569   6280   
}
 4570         -
pub(crate) mod integer_enum_set_internal {
 4571         -
 4572         -
    #[allow(clippy::enum_variant_names)]
 4573         -
    #[derive(Debug, PartialEq)]
 4574         -
    pub(crate) enum ConstraintViolation {
 4575         -
        /// Constraint violation error when the list does not contain unique items
 4576         -
        UniqueItems {
 4577         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4578         -
            /// at least two elements.
 4579         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4580         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4581         -
            /// Nothing is guaranteed about the order of the indices.
 4582         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4583         -
            /// The original vector, that contains duplicate items.
 4584         -
            original: ::std::vec::Vec<i32>,
 4585         -
        },
 4586         -
    }
 4587         -
 4588         -
    impl ::std::fmt::Display for ConstraintViolation {
 4589         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4590         -
            let message = match self {
 4591         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4592         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4593         -
                            };
 4594         -
            write!(f, "{message}")
 4595         -
        }
 4596         -
    }
        6281  +
/// See [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6282  +
pub(crate) mod union_payload_event_internal {
 4597   6283   
 4598         -
    impl ::std::error::Error for ConstraintViolation {}
 4599         -
    impl ConstraintViolation {
 4600         -
        pub(crate) fn as_validation_exception_field(
 4601         -
            self,
 4602         -
            path: ::std::string::String,
 4603         -
        ) -> crate::model::ValidationExceptionField {
 4604         -
            match self {
 4605         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4606         -
                                crate::model::ValidationExceptionField {
 4607         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4608         -
                                    path,
 4609         -
                                },
 4610         -
                    }
        6284  +
    impl ::std::convert::From<Builder> for crate::model::UnionPayloadEvent {
        6285  +
        fn from(builder: Builder) -> Self {
        6286  +
            builder.build()
 4611   6287   
        }
 4612   6288   
    }
 4613         -
}
 4614         -
pub(crate) mod foo_enum_map_internal {
 4615         -
 4616         -
    #[allow(clippy::enum_variant_names)]
 4617         -
    #[derive(Debug, PartialEq)]
 4618         -
    pub(crate) enum ConstraintViolation {
 4619         -
        #[doc(hidden)]
 4620         -
        Value(
 4621         -
            ::std::string::String,
 4622         -
            crate::model::foo_enum_internal::ConstraintViolation,
 4623         -
        ),
        6289  +
    /// A builder for [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6290  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6291  +
    pub(crate) struct Builder {
        6292  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadUnion>,
 4624   6293   
    }
 4625         -
 4626         -
    impl ::std::fmt::Display for ConstraintViolation {
 4627         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4628         -
            match self {
 4629         -
                Self::Value(_, value_constraint_violation) => {
 4630         -
                    write!(f, "{}", value_constraint_violation)
 4631         -
                }
        6294  +
    impl Builder {
        6295  +
        #[allow(missing_docs)] // documentation missing in model
        6296  +
        pub(crate) fn set_payload(
        6297  +
            mut self,
        6298  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadUnion>>,
        6299  +
        ) -> Self {
        6300  +
            self.payload = input.map(|v| v.into());
        6301  +
            self
        6302  +
        }
        6303  +
        /// Consumes the builder and constructs a [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6304  +
        pub fn build(self) -> crate::model::UnionPayloadEvent {
        6305  +
            self.build_enforcing_all_constraints()
        6306  +
        }
        6307  +
        fn build_enforcing_all_constraints(self) -> crate::model::UnionPayloadEvent {
        6308  +
            crate::model::UnionPayloadEvent {
        6309  +
                payload: self.payload,
 4632   6310   
            }
 4633   6311   
        }
 4634   6312   
    }
        6313  +
}
        6314  +
/// See [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6315  +
pub mod union_payload_event {
 4635   6316   
 4636         -
    impl ::std::error::Error for ConstraintViolation {}
 4637         -
    impl ConstraintViolation {
 4638         -
        pub(crate) fn as_validation_exception_field(
 4639         -
            self,
 4640         -
            path: ::std::string::String,
 4641         -
        ) -> crate::model::ValidationExceptionField {
 4642         -
            match self {
 4643         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 4644         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
        6317  +
    impl ::std::convert::From<Builder> for crate::model::UnionPayloadEvent {
        6318  +
        fn from(builder: Builder) -> Self {
        6319  +
            builder.build()
        6320  +
        }
        6321  +
    }
        6322  +
    /// A builder for [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6323  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6324  +
    pub struct Builder {
        6325  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadUnion>,
        6326  +
    }
        6327  +
    impl Builder {
        6328  +
        #[allow(missing_docs)] // documentation missing in model
        6329  +
        pub fn payload(mut self, input: ::std::option::Option<crate::model::PayloadUnion>) -> Self {
        6330  +
            self.payload = input;
        6331  +
            self
        6332  +
        }
        6333  +
        /// Consumes the builder and constructs a [`UnionPayloadEvent`](crate::model::UnionPayloadEvent).
        6334  +
        pub fn build(self) -> crate::model::UnionPayloadEvent {
        6335  +
            self.build_enforcing_required_and_enum_traits()
        6336  +
        }
        6337  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::UnionPayloadEvent {
        6338  +
            crate::model::UnionPayloadEvent {
        6339  +
                payload: self.payload,
 4645   6340   
            }
 4646   6341   
        }
 4647   6342   
    }
 4648   6343   
}
 4649         -
pub(crate) mod foo_enum_set_internal {
 4650         -
 4651         -
    #[allow(clippy::enum_variant_names)]
 4652         -
    #[derive(Debug, PartialEq)]
 4653         -
    pub(crate) enum ConstraintViolation {
 4654         -
        /// Constraint violation error when the list does not contain unique items
 4655         -
        UniqueItems {
 4656         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4657         -
            /// at least two elements.
 4658         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4659         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4660         -
            /// Nothing is guaranteed about the order of the indices.
 4661         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4662         -
            /// The original vector, that contains duplicate items.
 4663         -
            original: ::std::vec::Vec<crate::model::FooEnum>,
 4664         -
        },
 4665         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 4666         -
        /// The first component of the tuple is the index in the collection where the
 4667         -
        /// first constraint violation was found.
 4668         -
        #[doc(hidden)]
 4669         -
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
 4670         -
    }
        6344  +
/// See [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6345  +
pub(crate) mod headers_and_explicit_payload_event_internal {
 4671   6346   
 4672         -
    impl ::std::fmt::Display for ConstraintViolation {
 4673         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4674         -
            let message = match self {
 4675         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4676         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4677         -
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
 4678         -
                           failing_member)
 4679         -
                            };
 4680         -
            write!(f, "{message}")
        6347  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndExplicitPayloadEvent {
        6348  +
        fn from(builder: Builder) -> Self {
        6349  +
            builder.build()
 4681   6350   
        }
 4682   6351   
    }
 4683         -
 4684         -
    impl ::std::error::Error for ConstraintViolation {}
 4685         -
    impl ConstraintViolation {
 4686         -
        pub(crate) fn as_validation_exception_field(
 4687         -
            self,
 4688         -
            path: ::std::string::String,
 4689         -
        ) -> crate::model::ValidationExceptionField {
 4690         -
            match self {
 4691         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4692         -
                                crate::model::ValidationExceptionField {
 4693         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4694         -
                                    path,
 4695         -
                                },
 4696         -
    Self::Member(index, member_constraint_violation) =>
 4697         -
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
 4698         -
                    }
        6352  +
    /// A builder for [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6353  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6354  +
    pub(crate) struct Builder {
        6355  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
        6356  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
        6357  +
    }
        6358  +
    impl Builder {
        6359  +
        #[allow(missing_docs)] // documentation missing in model
        6360  +
        pub(crate) fn set_header(
        6361  +
            mut self,
        6362  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        6363  +
        ) -> Self {
        6364  +
            self.header = input.map(|v| v.into());
        6365  +
            self
        6366  +
        }
        6367  +
        #[allow(missing_docs)] // documentation missing in model
        6368  +
        pub(crate) fn set_payload(
        6369  +
            mut self,
        6370  +
            input: Option<impl ::std::convert::Into<crate::model::PayloadStructure>>,
        6371  +
        ) -> Self {
        6372  +
            self.payload = input.map(|v| v.into());
        6373  +
            self
        6374  +
        }
        6375  +
        /// Consumes the builder and constructs a [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6376  +
        pub fn build(self) -> crate::model::HeadersAndExplicitPayloadEvent {
        6377  +
            self.build_enforcing_all_constraints()
        6378  +
        }
        6379  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersAndExplicitPayloadEvent {
        6380  +
            crate::model::HeadersAndExplicitPayloadEvent {
        6381  +
                header: self.header,
        6382  +
                payload: self.payload,
        6383  +
            }
 4699   6384   
        }
 4700   6385   
    }
 4701   6386   
}
 4702         -
/// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 4703         -
pub mod complex_nested_error_data {
        6387  +
/// See [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6388  +
pub mod headers_and_explicit_payload_event {
 4704   6389   
 4705         -
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
        6390  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndExplicitPayloadEvent {
 4706   6391   
        fn from(builder: Builder) -> Self {
 4707   6392   
            builder.build()
 4708   6393   
        }
 4709   6394   
    }
 4710         -
    /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        6395  +
    /// A builder for [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
 4711   6396   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4712   6397   
    pub struct Builder {
 4713         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        6398  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
        6399  +
        pub(crate) payload: ::std::option::Option<crate::model::PayloadStructure>,
 4714   6400   
    }
 4715   6401   
    impl Builder {
 4716   6402   
        #[allow(missing_docs)] // documentation missing in model
 4717         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4718         -
            self.foo = input;
        6403  +
        pub fn header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6404  +
            self.header = input;
 4719   6405   
            self
 4720   6406   
        }
 4721         -
        /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 4722         -
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
        6407  +
        #[allow(missing_docs)] // documentation missing in model
        6408  +
        pub fn payload(
        6409  +
            mut self,
        6410  +
            input: ::std::option::Option<crate::model::PayloadStructure>,
        6411  +
        ) -> Self {
        6412  +
            self.payload = input;
        6413  +
            self
        6414  +
        }
        6415  +
        /// Consumes the builder and constructs a [`HeadersAndExplicitPayloadEvent`](crate::model::HeadersAndExplicitPayloadEvent).
        6416  +
        pub fn build(self) -> crate::model::HeadersAndExplicitPayloadEvent {
 4723   6417   
            self.build_enforcing_required_and_enum_traits()
 4724   6418   
        }
 4725         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
 4726         -
            crate::model::ComplexNestedErrorData { foo: self.foo }
        6419  +
        fn build_enforcing_required_and_enum_traits(
        6420  +
            self,
        6421  +
        ) -> crate::model::HeadersAndExplicitPayloadEvent {
        6422  +
            crate::model::HeadersAndExplicitPayloadEvent {
        6423  +
                header: self.header,
        6424  +
                payload: self.payload,
        6425  +
            }
 4727   6426   
        }
 4728   6427   
    }
 4729   6428   
}
 4730         -
/// See [`NestedPayload`](crate::model::NestedPayload).
 4731         -
pub(crate) mod nested_payload_internal {
        6429  +
/// See [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        6430  +
pub(crate) mod headers_and_implicit_payload_event_internal {
 4732   6431   
 4733         -
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        6432  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndImplicitPayloadEvent {
 4734   6433   
        fn from(builder: Builder) -> Self {
 4735   6434   
            builder.build()
 4736   6435   
        }
 4737   6436   
    }
 4738         -
    /// A builder for [`NestedPayload`](crate::model::NestedPayload).
        6437  +
    /// A builder for [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
 4739   6438   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4740   6439   
    pub(crate) struct Builder {
 4741         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
 4742         -
        pub(crate) name: ::std::option::Option<::std::string::String>,
        6440  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
        6441  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
 4743   6442   
    }
 4744   6443   
    impl Builder {
 4745   6444   
        #[allow(missing_docs)] // documentation missing in model
 4746         -
        pub(crate) fn set_greeting(
        6445  +
        pub(crate) fn set_header(
 4747   6446   
            mut self,
 4748   6447   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4749   6448   
        ) -> Self {
 4750         -
            self.greeting = input.map(|v| v.into());
        6449  +
            self.header = input.map(|v| v.into());
 4751   6450   
            self
 4752   6451   
        }
 4753   6452   
        #[allow(missing_docs)] // documentation missing in model
 4754         -
        pub(crate) fn set_name(
        6453  +
        pub(crate) fn set_payload(
 4755   6454   
            mut self,
 4756   6455   
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 4757   6456   
        ) -> Self {
 4758         -
            self.name = input.map(|v| v.into());
        6457  +
            self.payload = input.map(|v| v.into());
 4759   6458   
            self
 4760   6459   
        }
 4761         -
        /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
 4762         -
        pub fn build(self) -> crate::model::NestedPayload {
        6460  +
        /// Consumes the builder and constructs a [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        6461  +
        pub fn build(self) -> crate::model::HeadersAndImplicitPayloadEvent {
 4763   6462   
            self.build_enforcing_all_constraints()
 4764   6463   
        }
 4765         -
        fn build_enforcing_all_constraints(self) -> crate::model::NestedPayload {
 4766         -
            crate::model::NestedPayload {
 4767         -
                greeting: self.greeting,
 4768         -
                name: self.name,
        6464  +
        fn build_enforcing_all_constraints(self) -> crate::model::HeadersAndImplicitPayloadEvent {
        6465  +
            crate::model::HeadersAndImplicitPayloadEvent {
        6466  +
                header: self.header,
        6467  +
                payload: self.payload,
 4769   6468   
            }
 4770   6469   
        }
 4771   6470   
    }
 4772   6471   
}
 4773         -
/// See [`NestedPayload`](crate::model::NestedPayload).
 4774         -
pub mod nested_payload {
        6472  +
/// See [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        6473  +
pub mod headers_and_implicit_payload_event {
 4775   6474   
 4776         -
    impl ::std::convert::From<Builder> for crate::model::NestedPayload {
        6475  +
    impl ::std::convert::From<Builder> for crate::model::HeadersAndImplicitPayloadEvent {
 4777   6476   
        fn from(builder: Builder) -> Self {
 4778   6477   
            builder.build()
 4779   6478   
        }
 4780   6479   
    }
 4781         -
    /// A builder for [`NestedPayload`](crate::model::NestedPayload).
        6480  +
    /// A builder for [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
 4782   6481   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 4783   6482   
    pub struct Builder {
 4784         -
        pub(crate) greeting: ::std::option::Option<::std::string::String>,
 4785         -
        pub(crate) name: ::std::option::Option<::std::string::String>,
        6483  +
        pub(crate) header: ::std::option::Option<::std::string::String>,
        6484  +
        pub(crate) payload: ::std::option::Option<::std::string::String>,
 4786   6485   
    }
 4787   6486   
    impl Builder {
 4788   6487   
        #[allow(missing_docs)] // documentation missing in model
 4789         -
        pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4790         -
            self.greeting = input;
        6488  +
        pub fn header(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6489  +
            self.header = input;
 4791   6490   
            self
 4792   6491   
        }
 4793   6492   
        #[allow(missing_docs)] // documentation missing in model
 4794         -
        pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 4795         -
            self.name = input;
        6493  +
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6494  +
            self.payload = input;
 4796   6495   
            self
 4797   6496   
        }
 4798         -
        /// Consumes the builder and constructs a [`NestedPayload`](crate::model::NestedPayload).
 4799         -
        pub fn build(self) -> crate::model::NestedPayload {
        6497  +
        /// Consumes the builder and constructs a [`HeadersAndImplicitPayloadEvent`](crate::model::HeadersAndImplicitPayloadEvent).
        6498  +
        pub fn build(self) -> crate::model::HeadersAndImplicitPayloadEvent {
 4800   6499   
            self.build_enforcing_required_and_enum_traits()
 4801   6500   
        }
 4802         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::NestedPayload {
 4803         -
            crate::model::NestedPayload {
 4804         -
                greeting: self.greeting,
 4805         -
                name: self.name,
        6501  +
        fn build_enforcing_required_and_enum_traits(
        6502  +
            self,
        6503  +
        ) -> crate::model::HeadersAndImplicitPayloadEvent {
        6504  +
            crate::model::HeadersAndImplicitPayloadEvent {
        6505  +
                header: self.header,
        6506  +
                payload: self.payload,
 4806   6507   
            }
 4807   6508   
        }
 4808   6509   
    }
 4809   6510   
}
 4810         -
pub(crate) mod integer_set_internal {
        6511  +
/// See [`SingletonEvent`](crate::model::SingletonEvent).
        6512  +
pub mod singleton_event {
 4811   6513   
 4812         -
    #[allow(clippy::enum_variant_names)]
 4813         -
    #[derive(Debug, PartialEq)]
 4814         -
    pub(crate) enum ConstraintViolation {
 4815         -
        /// Constraint violation error when the list does not contain unique items
 4816         -
        UniqueItems {
 4817         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 4818         -
            /// at least two elements.
 4819         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 4820         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 4821         -
            /// Nothing is guaranteed about the order of the indices.
 4822         -
            duplicate_indices: ::std::vec::Vec<usize>,
 4823         -
            /// The original vector, that contains duplicate items.
 4824         -
            original: ::std::vec::Vec<i32>,
 4825         -
        },
        6514  +
    impl ::std::convert::From<Builder> for crate::model::SingletonEvent {
        6515  +
        fn from(builder: Builder) -> Self {
        6516  +
            builder.build()
        6517  +
        }
        6518  +
    }
        6519  +
    /// A builder for [`SingletonEvent`](crate::model::SingletonEvent).
        6520  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6521  +
    pub struct Builder {
        6522  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        6523  +
    }
        6524  +
    impl Builder {
        6525  +
        #[allow(missing_docs)] // documentation missing in model
        6526  +
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        6527  +
            self.value = input;
        6528  +
            self
        6529  +
        }
        6530  +
        /// Consumes the builder and constructs a [`SingletonEvent`](crate::model::SingletonEvent).
        6531  +
        pub fn build(self) -> crate::model::SingletonEvent {
        6532  +
            self.build_enforcing_required_and_enum_traits()
        6533  +
        }
        6534  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::SingletonEvent {
        6535  +
            crate::model::SingletonEvent { value: self.value }
        6536  +
        }
 4826   6537   
    }
        6538  +
}
        6539  +
/// See [`PayloadStructure`](crate::model::PayloadStructure).
        6540  +
pub(crate) mod payload_structure_internal {
 4827   6541   
 4828         -
    impl ::std::fmt::Display for ConstraintViolation {
 4829         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 4830         -
            let message = match self {
 4831         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 4832         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 4833         -
                            };
 4834         -
            write!(f, "{message}")
        6542  +
    impl ::std::convert::From<Builder> for crate::model::PayloadStructure {
        6543  +
        fn from(builder: Builder) -> Self {
        6544  +
            builder.build()
        6545  +
        }
        6546  +
    }
        6547  +
    /// A builder for [`PayloadStructure`](crate::model::PayloadStructure).
        6548  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6549  +
    pub(crate) struct Builder {
        6550  +
        pub(crate) structure_member: ::std::option::Option<::std::string::String>,
        6551  +
    }
        6552  +
    impl Builder {
        6553  +
        #[allow(missing_docs)] // documentation missing in model
        6554  +
        pub(crate) fn set_structure_member(
        6555  +
            mut self,
        6556  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        6557  +
        ) -> Self {
        6558  +
            self.structure_member = input.map(|v| v.into());
        6559  +
            self
        6560  +
        }
        6561  +
        /// Consumes the builder and constructs a [`PayloadStructure`](crate::model::PayloadStructure).
        6562  +
        pub fn build(self) -> crate::model::PayloadStructure {
        6563  +
            self.build_enforcing_all_constraints()
        6564  +
        }
        6565  +
        fn build_enforcing_all_constraints(self) -> crate::model::PayloadStructure {
        6566  +
            crate::model::PayloadStructure {
        6567  +
                structure_member: self.structure_member,
        6568  +
            }
 4835   6569   
        }
 4836   6570   
    }
        6571  +
}
        6572  +
/// See [`PayloadStructure`](crate::model::PayloadStructure).
        6573  +
pub mod payload_structure {
 4837   6574   
 4838         -
    impl ::std::error::Error for ConstraintViolation {}
 4839         -
    impl ConstraintViolation {
 4840         -
        pub(crate) fn as_validation_exception_field(
 4841         -
            self,
 4842         -
            path: ::std::string::String,
 4843         -
        ) -> crate::model::ValidationExceptionField {
 4844         -
            match self {
 4845         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 4846         -
                                crate::model::ValidationExceptionField {
 4847         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 4848         -
                                    path,
 4849         -
                                },
 4850         -
                    }
        6575  +
    impl ::std::convert::From<Builder> for crate::model::PayloadStructure {
        6576  +
        fn from(builder: Builder) -> Self {
        6577  +
            builder.build()
        6578  +
        }
        6579  +
    }
        6580  +
    /// A builder for [`PayloadStructure`](crate::model::PayloadStructure).
        6581  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        6582  +
    pub struct Builder {
        6583  +
        pub(crate) structure_member: ::std::option::Option<::std::string::String>,
        6584  +
    }
        6585  +
    impl Builder {
        6586  +
        #[allow(missing_docs)] // documentation missing in model
        6587  +
        pub fn structure_member(
        6588  +
            mut self,
        6589  +
            input: ::std::option::Option<::std::string::String>,
        6590  +
        ) -> Self {
        6591  +
            self.structure_member = input;
        6592  +
            self
        6593  +
        }
        6594  +
        /// Consumes the builder and constructs a [`PayloadStructure`](crate::model::PayloadStructure).
        6595  +
        pub fn build(self) -> crate::model::PayloadStructure {
        6596  +
            self.build_enforcing_required_and_enum_traits()
        6597  +
        }
        6598  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::PayloadStructure {
        6599  +
            crate::model::PayloadStructure {
        6600  +
                structure_member: self.structure_member,
        6601  +
            }
 4851   6602   
        }
 4852   6603   
    }
 4853   6604   
}