Server Test Python

Server Test Python

rev. d838bf488731ae5e751cce0fe13f339a5b9be858

Files changed:

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

@@ -1,1 +44,45 @@
    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     24   
//! json_rpc11
   24     25   

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

@@ -1,1 +523,590 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pyclass]
    3         -
/// :param path str:
    4         -
/// :param message str:
    5      3   
/// :rtype None:
    6         -
/// Describes one specific validation failure for an input member.
           4  +
#[allow(missing_docs)] // documentation missing in model
    7      5   
#[derive(
    8      6   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    9      7   
)]
   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         -
}
           8  +
pub struct EmptyStruct {}
   32      9   
#[allow(clippy::new_without_default)]
   33     10   
#[allow(clippy::too_many_arguments)]
   34     11   
#[::pyo3::pymethods]
   35         -
impl ValidationExceptionField {
          12  +
impl EmptyStruct {
   36     13   
    #[new]
   37         -
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38         -
        Self { path, message }
          14  +
    pub fn new() -> Self {
          15  +
        Self {}
   39     16   
    }
   40     17   
    fn __repr__(&self) -> String {
   41     18   
        format!("{self:?}")
   42     19   
    }
   43     20   
    fn __str__(&self) -> String {
   44     21   
        format!("{self:?}")
   45     22   
    }
   46     23   
}
   47         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
          24  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EmptyStruct> {
   48     25   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   49         -
        ob.extract::<ValidationExceptionField>().map(Box::new)
          26  +
        ob.extract::<EmptyStruct>().map(Box::new)
   50     27   
    }
   51     28   
}
   52     29   
   53         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
          30  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EmptyStruct> {
   54     31   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   55     32   
        (*self).into_py(py)
   56     33   
    }
   57     34   
}
   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()
          35  +
impl crate::constrained::Constrained for crate::model::EmptyStruct {
          36  +
    type Unconstrained = crate::model::empty_struct_internal::Builder;
          37  +
}
          38  +
impl EmptyStruct {
          39  +
    /// Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
          40  +
    pub fn builder() -> crate::model::empty_struct::Builder {
          41  +
        crate::model::empty_struct::Builder::default()
   62     42   
    }
   63     43   
}
   64     44   
   65         -
/// A union with a representative set of types for members.
   66         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
   67         -
pub enum MyUnion {
          45  +
#[::pyo3::pyclass]
          46  +
/// :param blob typing.Optional\[json_rpc11.types.Blob\]:
          47  +
/// :param boolean typing.Optional\[bool\]:
          48  +
/// :param double typing.Optional\[float\]:
          49  +
/// :param empty_struct typing.Optional\[json_rpc11.model.EmptyStruct\]:
          50  +
/// :param float typing.Optional\[float\]:
          51  +
/// :param httpdate_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
          52  +
/// :param integer typing.Optional\[int\]:
          53  +
/// :param iso8601_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
          54  +
/// :param json_value typing.Optional\[str\]:
          55  +
/// :param list_of_lists typing.Optional\[typing.List\[typing.List\[str\]\]\]:
          56  +
/// :param list_of_maps_of_strings typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
          57  +
/// :param list_of_strings typing.Optional\[typing.List\[str\]\]:
          58  +
/// :param list_of_structs typing.Optional\[typing.List\[json_rpc11.model.SimpleStruct\]\]:
          59  +
/// :param long typing.Optional\[int\]:
          60  +
/// :param map_of_lists_of_strings typing.Optional\[typing.Dict\[str, typing.List\[str\]\]\]:
          61  +
/// :param map_of_maps typing.Optional\[typing.Dict\[str, typing.Dict\[str, str\]\]\]:
          62  +
/// :param map_of_strings typing.Optional\[typing.Dict\[str, str\]\]:
          63  +
/// :param map_of_structs typing.Optional\[typing.Dict\[str, json_rpc11.model.SimpleStruct\]\]:
          64  +
/// :param recursive_list typing.Optional\[typing.List\[json_rpc11.model.KitchenSink\]\]:
          65  +
/// :param recursive_map typing.Optional\[typing.Dict\[str, json_rpc11.model.KitchenSink\]\]:
          66  +
/// :param recursive_struct typing.Optional\[json_rpc11.model.KitchenSink\]:
          67  +
/// :param simple_struct typing.Optional\[json_rpc11.model.SimpleStruct\]:
          68  +
/// :param string typing.Optional\[str\]:
          69  +
/// :param struct_with_json_name typing.Optional\[json_rpc11.model.StructWithJsonName\]:
          70  +
/// :param timestamp typing.Optional\[json_rpc11.types.DateTime\]:
          71  +
/// :param unix_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
          72  +
/// :rtype None:
          73  +
#[allow(missing_docs)] // documentation missing in model
          74  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          75  +
pub struct KitchenSink {
          76  +
    #[pyo3(get, set)]
          77  +
    /// :type typing.Optional\[json_rpc11.types.Blob\]:
   68     78   
    #[allow(missing_docs)] // documentation missing in model
   69         -
    BlobValue(::aws_smithy_http_server_python::types::Blob),
          79  +
    pub blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
          80  +
    #[pyo3(get, set)]
          81  +
    /// :type typing.Optional\[bool\]:
   70     82   
    #[allow(missing_docs)] // documentation missing in model
   71         -
    BooleanValue(bool),
          83  +
    pub boolean: ::std::option::Option<bool>,
          84  +
    #[pyo3(get, set)]
          85  +
    /// :type typing.Optional\[float\]:
   72     86   
    #[allow(missing_docs)] // documentation missing in model
   73         -
    EnumValue(crate::model::FooEnum),
          87  +
    pub double: ::std::option::Option<f64>,
          88  +
    #[pyo3(get, set)]
          89  +
    /// :type typing.Optional\[json_rpc11.model.EmptyStruct\]:
   74     90   
    #[allow(missing_docs)] // documentation missing in model
   75         -
    ListValue(::std::vec::Vec<::std::string::String>),
          91  +
    pub empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
          92  +
    #[pyo3(get, set)]
          93  +
    /// :type typing.Optional\[float\]:
   76     94   
    #[allow(missing_docs)] // documentation missing in model
   77         -
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
          95  +
    pub float: ::std::option::Option<f32>,
          96  +
    #[pyo3(get, set)]
          97  +
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
   78     98   
    #[allow(missing_docs)] // documentation missing in model
   79         -
    NumberValue(i32),
          99  +
    pub httpdate_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         100  +
    #[pyo3(get, set)]
         101  +
    /// :type typing.Optional\[int\]:
   80    102   
    #[allow(missing_docs)] // documentation missing in model
   81         -
    StringValue(::std::string::String),
         103  +
    pub integer: ::std::option::Option<i32>,
         104  +
    #[pyo3(get, set)]
         105  +
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
   82    106   
    #[allow(missing_docs)] // documentation missing in model
   83         -
    StructureValue(crate::model::GreetingStruct),
         107  +
    pub iso8601_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         108  +
    #[pyo3(get, set)]
         109  +
    /// :type typing.Optional\[str\]:
   84    110   
    #[allow(missing_docs)] // documentation missing in model
   85         -
    TimestampValue(::aws_smithy_http_server_python::types::DateTime),
         111  +
    pub json_value: ::std::option::Option<::std::string::String>,
         112  +
    #[pyo3(get, set)]
         113  +
    /// :type typing.Optional\[typing.List\[typing.List\[str\]\]\]:
         114  +
    #[allow(missing_docs)] // documentation missing in model
         115  +
    pub list_of_lists:
         116  +
        ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
         117  +
    #[pyo3(get, set)]
         118  +
    /// :type typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
         119  +
    #[allow(missing_docs)] // documentation missing in model
         120  +
    pub list_of_maps_of_strings: ::std::option::Option<
         121  +
        ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
         122  +
    >,
         123  +
    #[pyo3(get, set)]
         124  +
    /// :type typing.Optional\[typing.List\[str\]\]:
         125  +
    #[allow(missing_docs)] // documentation missing in model
         126  +
    pub list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         127  +
    #[pyo3(get, set)]
         128  +
    /// :type typing.Optional\[typing.List\[json_rpc11.model.SimpleStruct\]\]:
         129  +
    #[allow(missing_docs)] // documentation missing in model
         130  +
    pub list_of_structs: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
         131  +
    #[pyo3(get, set)]
         132  +
    /// :type typing.Optional\[int\]:
         133  +
    #[allow(missing_docs)] // documentation missing in model
         134  +
    pub long: ::std::option::Option<i64>,
         135  +
    #[pyo3(get, set)]
         136  +
    /// :type typing.Optional\[typing.Dict\[str, typing.List\[str\]\]\]:
         137  +
    #[allow(missing_docs)] // documentation missing in model
         138  +
    pub map_of_lists_of_strings: ::std::option::Option<
         139  +
        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
         140  +
    >,
         141  +
    #[pyo3(get, set)]
         142  +
    /// :type typing.Optional\[typing.Dict\[str, typing.Dict\[str, str\]\]\]:
         143  +
    #[allow(missing_docs)] // documentation missing in model
         144  +
    pub map_of_maps: ::std::option::Option<
         145  +
        ::std::collections::HashMap<
         146  +
            ::std::string::String,
         147  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         148  +
        >,
         149  +
    >,
         150  +
    #[pyo3(get, set)]
         151  +
    /// :type typing.Optional\[typing.Dict\[str, str\]\]:
         152  +
    #[allow(missing_docs)] // documentation missing in model
         153  +
    pub map_of_strings: ::std::option::Option<
         154  +
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         155  +
    >,
         156  +
    #[pyo3(get, set)]
         157  +
    /// :type typing.Optional\[typing.Dict\[str, json_rpc11.model.SimpleStruct\]\]:
         158  +
    #[allow(missing_docs)] // documentation missing in model
         159  +
    pub map_of_structs: ::std::option::Option<
         160  +
        ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
         161  +
    >,
         162  +
    #[pyo3(get, set)]
         163  +
    /// :type typing.Optional\[typing.List\[json_rpc11.model.KitchenSink\]\]:
         164  +
    #[allow(missing_docs)] // documentation missing in model
         165  +
    pub recursive_list: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
         166  +
    #[pyo3(get, set)]
         167  +
    /// :type typing.Optional\[typing.Dict\[str, json_rpc11.model.KitchenSink\]\]:
         168  +
    #[allow(missing_docs)] // documentation missing in model
         169  +
    pub recursive_map: ::std::option::Option<
         170  +
        ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
         171  +
    >,
         172  +
    #[pyo3(get, set)]
         173  +
    /// :type typing.Optional\[json_rpc11.model.KitchenSink\]:
         174  +
    #[allow(missing_docs)] // documentation missing in model
         175  +
    pub recursive_struct: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
         176  +
    #[pyo3(get, set)]
         177  +
    /// :type typing.Optional\[json_rpc11.model.SimpleStruct\]:
         178  +
    #[allow(missing_docs)] // documentation missing in model
         179  +
    pub simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
         180  +
    #[pyo3(get, set)]
         181  +
    /// :type typing.Optional\[str\]:
         182  +
    #[allow(missing_docs)] // documentation missing in model
         183  +
    pub string: ::std::option::Option<::std::string::String>,
         184  +
    #[pyo3(get, set)]
         185  +
    /// :type typing.Optional\[json_rpc11.model.StructWithJsonName\]:
         186  +
    #[allow(missing_docs)] // documentation missing in model
         187  +
    pub struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
         188  +
    #[pyo3(get, set)]
         189  +
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
         190  +
    #[allow(missing_docs)] // documentation missing in model
         191  +
    pub timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         192  +
    #[pyo3(get, set)]
         193  +
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
         194  +
    #[allow(missing_docs)] // documentation missing in model
         195  +
    pub unix_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
   86    196   
}
   87         -
impl MyUnion {
   88         -
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
   89         -
    /// Returns `Err(&Self)` if it can't be converted.
   90         -
    pub fn as_blob_value(
   91         -
        &self,
   92         -
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
   93         -
        if let MyUnion::BlobValue(val) = &self {
   94         -
            ::std::result::Result::Ok(val)
   95         -
        } else {
   96         -
            ::std::result::Result::Err(self)
   97         -
        }
         197  +
impl KitchenSink {
         198  +
    #[allow(missing_docs)] // documentation missing in model
         199  +
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
         200  +
        self.blob.as_ref()
   98    201   
    }
   99         -
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
  100         -
    pub fn is_blob_value(&self) -> bool {
  101         -
        self.as_blob_value().is_ok()
         202  +
    #[allow(missing_docs)] // documentation missing in model
         203  +
    pub fn boolean(&self) -> ::std::option::Option<bool> {
         204  +
        self.boolean
  102    205   
    }
  103         -
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
  104         -
    /// Returns `Err(&Self)` if it can't be converted.
  105         -
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
  106         -
        if let MyUnion::BooleanValue(val) = &self {
  107         -
            ::std::result::Result::Ok(val)
  108         -
        } else {
  109         -
            ::std::result::Result::Err(self)
  110         -
        }
         206  +
    #[allow(missing_docs)] // documentation missing in model
         207  +
    pub fn double(&self) -> ::std::option::Option<f64> {
         208  +
        self.double
  111    209   
    }
  112         -
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
  113         -
    pub fn is_boolean_value(&self) -> bool {
  114         -
        self.as_boolean_value().is_ok()
         210  +
    #[allow(missing_docs)] // documentation missing in model
         211  +
    pub fn empty_struct(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
         212  +
        self.empty_struct.as_ref()
  115    213   
    }
  116         -
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
  117         -
    /// Returns `Err(&Self)` if it can't be converted.
  118         -
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
  119         -
        if let MyUnion::EnumValue(val) = &self {
  120         -
            ::std::result::Result::Ok(val)
  121         -
        } else {
  122         -
            ::std::result::Result::Err(self)
  123         -
        }
         214  +
    #[allow(missing_docs)] // documentation missing in model
         215  +
    pub fn float(&self) -> ::std::option::Option<f32> {
         216  +
        self.float
  124    217   
    }
  125         -
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
  126         -
    pub fn is_enum_value(&self) -> bool {
  127         -
        self.as_enum_value().is_ok()
  128         -
    }
  129         -
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
  130         -
    /// Returns `Err(&Self)` if it can't be converted.
  131         -
    pub fn as_list_value(
         218  +
    #[allow(missing_docs)] // documentation missing in model
         219  +
    pub fn httpdate_timestamp(
  132    220   
        &self,
  133         -
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
  134         -
        if let MyUnion::ListValue(val) = &self {
  135         -
            ::std::result::Result::Ok(val)
  136         -
        } else {
  137         -
            ::std::result::Result::Err(self)
  138         -
        }
         221  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
         222  +
        self.httpdate_timestamp.as_ref()
  139    223   
    }
  140         -
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
  141         -
    pub fn is_list_value(&self) -> bool {
  142         -
        self.as_list_value().is_ok()
         224  +
    #[allow(missing_docs)] // documentation missing in model
         225  +
    pub fn integer(&self) -> ::std::option::Option<i32> {
         226  +
        self.integer
  143    227   
    }
  144         -
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
  145         -
    /// Returns `Err(&Self)` if it can't be converted.
  146         -
    pub fn as_map_value(
         228  +
    #[allow(missing_docs)] // documentation missing in model
         229  +
    pub fn iso8601_timestamp(
  147    230   
        &self,
  148         -
    ) -> ::std::result::Result<
  149         -
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
  150         -
        &Self,
  151         -
    > {
  152         -
        if let MyUnion::MapValue(val) = &self {
  153         -
            ::std::result::Result::Ok(val)
  154         -
        } else {
  155         -
            ::std::result::Result::Err(self)
  156         -
        }
  157         -
    }
  158         -
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
  159         -
    pub fn is_map_value(&self) -> bool {
  160         -
        self.as_map_value().is_ok()
         231  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
         232  +
        self.iso8601_timestamp.as_ref()
  161    233   
    }
  162         -
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
  163         -
    /// Returns `Err(&Self)` if it can't be converted.
  164         -
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
  165         -
        if let MyUnion::NumberValue(val) = &self {
  166         -
            ::std::result::Result::Ok(val)
  167         -
        } else {
  168         -
            ::std::result::Result::Err(self)
  169         -
        }
         234  +
    #[allow(missing_docs)] // documentation missing in model
         235  +
    pub fn json_value(&self) -> ::std::option::Option<&str> {
         236  +
        self.json_value.as_deref()
  170    237   
    }
  171         -
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
  172         -
    pub fn is_number_value(&self) -> bool {
  173         -
        self.as_number_value().is_ok()
         238  +
    #[allow(missing_docs)] // documentation missing in model
         239  +
    pub fn list_of_lists(
         240  +
        &self,
         241  +
    ) -> ::std::option::Option<&[::std::vec::Vec<::std::string::String>]> {
         242  +
        self.list_of_lists.as_deref()
  174    243   
    }
  175         -
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
  176         -
    /// Returns `Err(&Self)` if it can't be converted.
  177         -
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
  178         -
        if let MyUnion::StringValue(val) = &self {
  179         -
            ::std::result::Result::Ok(val)
  180         -
        } else {
  181         -
            ::std::result::Result::Err(self)
  182         -
        }
         244  +
    #[allow(missing_docs)] // documentation missing in model
         245  +
    pub fn list_of_maps_of_strings(
         246  +
        &self,
         247  +
    ) -> ::std::option::Option<
         248  +
        &[::std::collections::HashMap<::std::string::String, ::std::string::String>],
         249  +
    > {
         250  +
        self.list_of_maps_of_strings.as_deref()
  183    251   
    }
  184         -
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
  185         -
    pub fn is_string_value(&self) -> bool {
  186         -
        self.as_string_value().is_ok()
         252  +
    #[allow(missing_docs)] // documentation missing in model
         253  +
    pub fn list_of_strings(&self) -> ::std::option::Option<&[::std::string::String]> {
         254  +
        self.list_of_strings.as_deref()
  187    255   
    }
  188         -
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
  189         -
    /// Returns `Err(&Self)` if it can't be converted.
  190         -
    pub fn as_structure_value(
  191         -
        &self,
  192         -
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
  193         -
        if let MyUnion::StructureValue(val) = &self {
  194         -
            ::std::result::Result::Ok(val)
  195         -
        } else {
  196         -
            ::std::result::Result::Err(self)
  197         -
        }
         256  +
    #[allow(missing_docs)] // documentation missing in model
         257  +
    pub fn list_of_structs(&self) -> ::std::option::Option<&[crate::model::SimpleStruct]> {
         258  +
        self.list_of_structs.as_deref()
  198    259   
    }
  199         -
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
  200         -
    pub fn is_structure_value(&self) -> bool {
  201         -
        self.as_structure_value().is_ok()
         260  +
    #[allow(missing_docs)] // documentation missing in model
         261  +
    pub fn long(&self) -> ::std::option::Option<i64> {
         262  +
        self.long
  202    263   
    }
  203         -
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
  204         -
    /// Returns `Err(&Self)` if it can't be converted.
  205         -
    pub fn as_timestamp_value(
         264  +
    #[allow(missing_docs)] // documentation missing in model
         265  +
    pub fn map_of_lists_of_strings(
  206    266   
        &self,
  207         -
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
  208         -
        if let MyUnion::TimestampValue(val) = &self {
  209         -
            ::std::result::Result::Ok(val)
  210         -
        } else {
  211         -
            ::std::result::Result::Err(self)
  212         -
        }
  213         -
    }
  214         -
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
  215         -
    pub fn is_timestamp_value(&self) -> bool {
  216         -
        self.as_timestamp_value().is_ok()
         267  +
    ) -> ::std::option::Option<
         268  +
        &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
         269  +
    > {
         270  +
        self.map_of_lists_of_strings.as_ref()
  217    271   
    }
  218         -
}
  219         -
#[pyo3::pyclass(name = "MyUnion")]
  220         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  221         -
pub struct PyUnionMarkerMyUnion(pub MyUnion);
  222         -
#[::pyo3::pymethods]
  223         -
impl PyUnionMarkerMyUnion {
  224         -
    #[staticmethod]
  225         -
    /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
  226         -
    /// :param data json_rpc11.types.Blob:
  227         -
    /// :rtype MyUnion:
  228         -
    pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
  229         -
        Self(MyUnion::BlobValue(data))
         272  +
    #[allow(missing_docs)] // documentation missing in model
         273  +
    pub fn map_of_maps(
         274  +
        &self,
         275  +
    ) -> ::std::option::Option<
         276  +
        &::std::collections::HashMap<
         277  +
            ::std::string::String,
         278  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         279  +
        >,
         280  +
    > {
         281  +
        self.map_of_maps.as_ref()
  230    282   
    }
  231         -
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
  232         -
    /// :rtype json_rpc11.types.Blob:
  233         -
    pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
  234         -
        match self.0.as_blob_value() {
  235         -
            Ok(variant) => Ok(variant.clone()),
  236         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  237         -
                r"MyUnion variant is not of type json_rpc11.types.Blob",
  238         -
            )),
  239         -
        }
         283  +
    #[allow(missing_docs)] // documentation missing in model
         284  +
    pub fn map_of_strings(
         285  +
        &self,
         286  +
    ) -> ::std::option::Option<
         287  +
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
         288  +
    > {
         289  +
        self.map_of_strings.as_ref()
  240    290   
    }
  241         -
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
  242         -
    /// :rtype bool:
  243         -
    pub fn is_blob_value(&self) -> bool {
  244         -
        self.0.is_blob_value()
         291  +
    #[allow(missing_docs)] // documentation missing in model
         292  +
    pub fn map_of_structs(
         293  +
        &self,
         294  +
    ) -> ::std::option::Option<
         295  +
        &::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
         296  +
    > {
         297  +
        self.map_of_structs.as_ref()
  245    298   
    }
  246         -
    #[staticmethod]
  247         -
    /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
  248         -
    /// :param data bool:
  249         -
    /// :rtype MyUnion:
  250         -
    pub fn boolean_value(data: bool) -> Self {
  251         -
        Self(MyUnion::BooleanValue(data))
         299  +
    #[allow(missing_docs)] // documentation missing in model
         300  +
    pub fn recursive_list(&self) -> ::std::option::Option<&[crate::model::KitchenSink]> {
         301  +
        self.recursive_list.as_deref()
  252    302   
    }
  253         -
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
  254         -
    /// :rtype bool:
  255         -
    pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
  256         -
        match self.0.as_boolean_value() {
  257         -
            Ok(variant) => Ok(*variant),
  258         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  259         -
                r"MyUnion variant is not of type bool",
  260         -
            )),
  261         -
        }
         303  +
    #[allow(missing_docs)] // documentation missing in model
         304  +
    pub fn recursive_map(
         305  +
        &self,
         306  +
    ) -> ::std::option::Option<
         307  +
        &::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
         308  +
    > {
         309  +
        self.recursive_map.as_ref()
  262    310   
    }
  263         -
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
  264         -
    /// :rtype bool:
  265         -
    pub fn is_boolean_value(&self) -> bool {
  266         -
        self.0.is_boolean_value()
         311  +
    #[allow(missing_docs)] // documentation missing in model
         312  +
    pub fn recursive_struct(&self) -> ::std::option::Option<&crate::model::KitchenSink> {
         313  +
        self.recursive_struct.as_deref()
  267    314   
    }
  268         -
    #[staticmethod]
  269         -
    /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
  270         -
    /// :param data json_rpc11.model.FooEnum:
  271         -
    /// :rtype MyUnion:
  272         -
    pub fn enum_value(data: crate::model::FooEnum) -> Self {
  273         -
        Self(MyUnion::EnumValue(data))
         315  +
    #[allow(missing_docs)] // documentation missing in model
         316  +
    pub fn simple_struct(&self) -> ::std::option::Option<&crate::model::SimpleStruct> {
         317  +
        self.simple_struct.as_ref()
  274    318   
    }
  275         -
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
  276         -
    /// :rtype json_rpc11.model.FooEnum:
  277         -
    pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
  278         -
        match self.0.as_enum_value() {
  279         -
            Ok(variant) => Ok(variant.clone()),
  280         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  281         -
                r"MyUnion variant is not of type json_rpc11.model.FooEnum",
  282         -
            )),
  283         -
        }
         319  +
    #[allow(missing_docs)] // documentation missing in model
         320  +
    pub fn string(&self) -> ::std::option::Option<&str> {
         321  +
        self.string.as_deref()
  284    322   
    }
  285         -
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
  286         -
    /// :rtype bool:
  287         -
    pub fn is_enum_value(&self) -> bool {
  288         -
        self.0.is_enum_value()
         323  +
    #[allow(missing_docs)] // documentation missing in model
         324  +
    pub fn struct_with_json_name(
         325  +
        &self,
         326  +
    ) -> ::std::option::Option<&crate::model::StructWithJsonName> {
         327  +
        self.struct_with_json_name.as_ref()
  289    328   
    }
  290         -
    #[staticmethod]
  291         -
    /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
  292         -
    /// :param data typing.List\[str\]:
  293         -
    /// :rtype MyUnion:
  294         -
    pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
  295         -
        Self(MyUnion::ListValue(data))
         329  +
    #[allow(missing_docs)] // documentation missing in model
         330  +
    pub fn timestamp(
         331  +
        &self,
         332  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
         333  +
        self.timestamp.as_ref()
  296    334   
    }
  297         -
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
  298         -
    /// :rtype typing.List\[str\]:
  299         -
    pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
  300         -
        match self.0.as_list_value() {
  301         -
            Ok(variant) => Ok(variant.clone()),
  302         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  303         -
                r"MyUnion variant is not of type typing.List\[str\]",
  304         -
            )),
  305         -
        }
         335  +
    #[allow(missing_docs)] // documentation missing in model
         336  +
    pub fn unix_timestamp(
         337  +
        &self,
         338  +
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
         339  +
        self.unix_timestamp.as_ref()
  306    340   
    }
  307         -
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
  308         -
    /// :rtype bool:
  309         -
    pub fn is_list_value(&self) -> bool {
  310         -
        self.0.is_list_value()
  311         -
    }
  312         -
    #[staticmethod]
  313         -
    /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
  314         -
    /// :param data typing.Dict\[str, str\]:
  315         -
    /// :rtype MyUnion:
  316         -
    pub fn map_value(
  317         -
        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         341  +
}
         342  +
#[allow(clippy::new_without_default)]
         343  +
#[allow(clippy::too_many_arguments)]
         344  +
#[::pyo3::pymethods]
         345  +
impl KitchenSink {
         346  +
    #[new]
         347  +
    pub fn new(
         348  +
        blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
         349  +
        boolean: ::std::option::Option<bool>,
         350  +
        double: ::std::option::Option<f64>,
         351  +
        empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
         352  +
        float: ::std::option::Option<f32>,
         353  +
        httpdate_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         354  +
        integer: ::std::option::Option<i32>,
         355  +
        iso8601_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         356  +
        json_value: ::std::option::Option<::std::string::String>,
         357  +
        list_of_lists: ::std::option::Option<
         358  +
            ::std::vec::Vec<::std::vec::Vec<::std::string::String>>,
         359  +
        >,
         360  +
        list_of_maps_of_strings: ::std::option::Option<
         361  +
            ::std::vec::Vec<
         362  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         363  +
            >,
         364  +
        >,
         365  +
        list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         366  +
        list_of_structs: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
         367  +
        long: ::std::option::Option<i64>,
         368  +
        map_of_lists_of_strings: ::std::option::Option<
         369  +
            ::std::collections::HashMap<
         370  +
                ::std::string::String,
         371  +
                ::std::vec::Vec<::std::string::String>,
         372  +
            >,
         373  +
        >,
         374  +
        map_of_maps: ::std::option::Option<
         375  +
            ::std::collections::HashMap<
         376  +
                ::std::string::String,
         377  +
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         378  +
            >,
         379  +
        >,
         380  +
        map_of_strings: ::std::option::Option<
         381  +
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
         382  +
        >,
         383  +
        map_of_structs: ::std::option::Option<
         384  +
            ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
         385  +
        >,
         386  +
        recursive_list: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
         387  +
        recursive_map: ::std::option::Option<
         388  +
            ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
         389  +
        >,
         390  +
        recursive_struct: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
         391  +
        simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
         392  +
        string: ::std::option::Option<::std::string::String>,
         393  +
        struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
         394  +
        timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         395  +
        unix_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
  318    396   
    ) -> Self {
  319         -
        Self(MyUnion::MapValue(data))
  320         -
    }
  321         -
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
  322         -
    /// :rtype typing.Dict\[str, str\]:
  323         -
    pub fn as_map_value(
  324         -
        &self,
  325         -
    ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
  326         -
    {
  327         -
        match self.0.as_map_value() {
  328         -
            Ok(variant) => Ok(variant.clone()),
  329         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  330         -
                r"MyUnion variant is not of type typing.Dict\[str, str\]",
  331         -
            )),
  332         -
        }
  333         -
    }
  334         -
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
  335         -
    /// :rtype bool:
  336         -
    pub fn is_map_value(&self) -> bool {
  337         -
        self.0.is_map_value()
  338         -
    }
  339         -
    #[staticmethod]
  340         -
    /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
  341         -
    /// :param data int:
  342         -
    /// :rtype MyUnion:
  343         -
    pub fn number_value(data: i32) -> Self {
  344         -
        Self(MyUnion::NumberValue(data))
  345         -
    }
  346         -
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
  347         -
    /// :rtype int:
  348         -
    pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
  349         -
        match self.0.as_number_value() {
  350         -
            Ok(variant) => Ok(*variant),
  351         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  352         -
                r"MyUnion variant is not of type int",
  353         -
            )),
  354         -
        }
  355         -
    }
  356         -
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
  357         -
    /// :rtype bool:
  358         -
    pub fn is_number_value(&self) -> bool {
  359         -
        self.0.is_number_value()
  360         -
    }
  361         -
    #[staticmethod]
  362         -
    /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
  363         -
    /// :param data str:
  364         -
    /// :rtype MyUnion:
  365         -
    pub fn string_value(data: ::std::string::String) -> Self {
  366         -
        Self(MyUnion::StringValue(data))
  367         -
    }
  368         -
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
  369         -
    /// :rtype str:
  370         -
    pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
  371         -
        match self.0.as_string_value() {
  372         -
            Ok(variant) => Ok(variant.clone()),
  373         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  374         -
                r"MyUnion variant is not of type str",
  375         -
            )),
  376         -
        }
  377         -
    }
  378         -
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
  379         -
    /// :rtype bool:
  380         -
    pub fn is_string_value(&self) -> bool {
  381         -
        self.0.is_string_value()
  382         -
    }
  383         -
    #[staticmethod]
  384         -
    /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
  385         -
    /// :param data json_rpc11.model.GreetingStruct:
  386         -
    /// :rtype MyUnion:
  387         -
    pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
  388         -
        Self(MyUnion::StructureValue(data))
  389         -
    }
  390         -
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
  391         -
    /// :rtype json_rpc11.model.GreetingStruct:
  392         -
    pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
  393         -
        match self.0.as_structure_value() {
  394         -
            Ok(variant) => Ok(variant.clone()),
  395         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  396         -
                r"MyUnion variant is not of type json_rpc11.model.GreetingStruct",
  397         -
            )),
         397  +
        Self {
         398  +
            blob,
         399  +
            boolean,
         400  +
            double,
         401  +
            empty_struct,
         402  +
            float,
         403  +
            httpdate_timestamp,
         404  +
            integer,
         405  +
            iso8601_timestamp,
         406  +
            json_value,
         407  +
            list_of_lists,
         408  +
            list_of_maps_of_strings,
         409  +
            list_of_strings,
         410  +
            list_of_structs,
         411  +
            long,
         412  +
            map_of_lists_of_strings,
         413  +
            map_of_maps,
         414  +
            map_of_strings,
         415  +
            map_of_structs,
         416  +
            recursive_list,
         417  +
            recursive_map,
         418  +
            recursive_struct,
         419  +
            simple_struct,
         420  +
            string,
         421  +
            struct_with_json_name,
         422  +
            timestamp,
         423  +
            unix_timestamp,
  398    424   
        }
  399    425   
    }
  400         -
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
  401         -
    /// :rtype bool:
  402         -
    pub fn is_structure_value(&self) -> bool {
  403         -
        self.0.is_structure_value()
  404         -
    }
  405         -
    #[staticmethod]
  406         -
    /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
  407         -
    /// :param data json_rpc11.types.DateTime:
  408         -
    /// :rtype MyUnion:
  409         -
    pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
  410         -
        Self(MyUnion::TimestampValue(data))
         426  +
    fn __repr__(&self) -> String {
         427  +
        format!("{self:?}")
  411    428   
    }
  412         -
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
  413         -
    /// :rtype json_rpc11.types.DateTime:
  414         -
    pub fn as_timestamp_value(
  415         -
        &self,
  416         -
    ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
  417         -
        match self.0.as_timestamp_value() {
  418         -
            Ok(variant) => Ok(variant.clone()),
  419         -
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
  420         -
                r"MyUnion variant is not of type json_rpc11.types.DateTime",
  421         -
            )),
  422         -
        }
         429  +
    fn __str__(&self) -> String {
         430  +
        format!("{self:?}")
  423    431   
    }
  424         -
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
  425         -
    /// :rtype bool:
  426         -
    pub fn is_timestamp_value(&self) -> bool {
  427         -
        self.0.is_timestamp_value()
         432  +
}
         433  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<KitchenSink> {
         434  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         435  +
        ob.extract::<KitchenSink>().map(Box::new)
  428    436   
    }
  429    437   
}
  430         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
         438  +
         439  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<KitchenSink> {
  431    440   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  432         -
        PyUnionMarkerMyUnion(self).into_py(py)
         441  +
        (*self).into_py(py)
  433    442   
    }
  434    443   
}
  435         -
impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
  436         -
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  437         -
        let data: PyUnionMarkerMyUnion = obj.extract()?;
  438         -
        Ok(data.0)
         444  +
impl crate::constrained::Constrained for crate::model::KitchenSink {
         445  +
    type Unconstrained = crate::model::kitchen_sink_internal::Builder;
         446  +
}
         447  +
impl KitchenSink {
         448  +
    /// Creates a new builder-style object to manufacture [`KitchenSink`](crate::model::KitchenSink).
         449  +
    pub fn builder() -> crate::model::kitchen_sink::Builder {
         450  +
        crate::model::kitchen_sink::Builder::default()
  439    451   
    }
  440    452   
}
  441    453   
  442    454   
#[::pyo3::pyclass]
  443         -
/// :param hi typing.Optional\[str\]:
         455  +
/// :param value typing.Optional\[str\]:
  444    456   
/// :rtype None:
  445    457   
#[allow(missing_docs)] // documentation missing in model
  446    458   
#[derive(
  447    459   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  448    460   
)]
  449         -
pub struct GreetingStruct {
         461  +
pub struct SimpleStruct {
  450    462   
    #[pyo3(get, set)]
  451    463   
    /// :type typing.Optional\[str\]:
  452    464   
    #[allow(missing_docs)] // documentation missing in model
  453         -
    pub hi: ::std::option::Option<::std::string::String>,
         465  +
    pub value: ::std::option::Option<::std::string::String>,
  454    466   
}
  455         -
impl GreetingStruct {
         467  +
impl SimpleStruct {
  456    468   
    #[allow(missing_docs)] // documentation missing in model
  457         -
    pub fn hi(&self) -> ::std::option::Option<&str> {
  458         -
        self.hi.as_deref()
         469  +
    pub fn value(&self) -> ::std::option::Option<&str> {
         470  +
        self.value.as_deref()
  459    471   
    }
  460    472   
}
  461    473   
#[allow(clippy::new_without_default)]
  462    474   
#[allow(clippy::too_many_arguments)]
  463    475   
#[::pyo3::pymethods]
  464         -
impl GreetingStruct {
         476  +
impl SimpleStruct {
  465    477   
    #[new]
  466         -
    pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
  467         -
        Self { hi }
         478  +
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
         479  +
        Self { value }
  468    480   
    }
  469    481   
    fn __repr__(&self) -> String {
  470    482   
        format!("{self:?}")
  471    483   
    }
  472    484   
    fn __str__(&self) -> String {
  473    485   
        format!("{self:?}")
  474    486   
    }
  475    487   
}
  476         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
         488  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<SimpleStruct> {
  477    489   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  478         -
        ob.extract::<GreetingStruct>().map(Box::new)
         490  +
        ob.extract::<SimpleStruct>().map(Box::new)
  479    491   
    }
  480    492   
}
  481    493   
  482         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
         494  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<SimpleStruct> {
  483    495   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  484    496   
        (*self).into_py(py)
  485    497   
    }
  486    498   
}
  487         -
impl crate::constrained::Constrained for crate::model::GreetingStruct {
  488         -
    type Unconstrained = crate::model::greeting_struct_internal::Builder;
         499  +
impl crate::constrained::Constrained for crate::model::SimpleStruct {
         500  +
    type Unconstrained = crate::model::simple_struct_internal::Builder;
  489    501   
}
  490         -
impl GreetingStruct {
  491         -
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
  492         -
    pub fn builder() -> crate::model::greeting_struct::Builder {
  493         -
        crate::model::greeting_struct::Builder::default()
         502  +
impl SimpleStruct {
         503  +
    /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
         504  +
    pub fn builder() -> crate::model::simple_struct::Builder {
         505  +
        crate::model::simple_struct::Builder::default()
         506  +
    }
         507  +
}
         508  +
         509  +
#[::pyo3::pyclass]
         510  +
/// :param value typing.Optional\[str\]:
         511  +
/// :rtype None:
         512  +
#[allow(missing_docs)] // documentation missing in model
         513  +
#[derive(
         514  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         515  +
)]
         516  +
pub struct StructWithJsonName {
         517  +
    #[pyo3(get, set)]
         518  +
    /// :type typing.Optional\[str\]:
         519  +
    #[allow(missing_docs)] // documentation missing in model
         520  +
    pub value: ::std::option::Option<::std::string::String>,
         521  +
}
         522  +
impl StructWithJsonName {
         523  +
    #[allow(missing_docs)] // documentation missing in model
         524  +
    pub fn value(&self) -> ::std::option::Option<&str> {
         525  +
        self.value.as_deref()
         526  +
    }
         527  +
}
         528  +
#[allow(clippy::new_without_default)]
         529  +
#[allow(clippy::too_many_arguments)]
         530  +
#[::pyo3::pymethods]
         531  +
impl StructWithJsonName {
         532  +
    #[new]
         533  +
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
         534  +
        Self { value }
         535  +
    }
         536  +
    fn __repr__(&self) -> String {
         537  +
        format!("{self:?}")
         538  +
    }
         539  +
    fn __str__(&self) -> String {
         540  +
        format!("{self:?}")
         541  +
    }
         542  +
}
         543  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructWithJsonName> {
         544  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         545  +
        ob.extract::<StructWithJsonName>().map(Box::new)
         546  +
    }
         547  +
}
         548  +
         549  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructWithJsonName> {
         550  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
         551  +
        (*self).into_py(py)
         552  +
    }
         553  +
}
         554  +
impl crate::constrained::Constrained for crate::model::StructWithJsonName {
         555  +
    type Unconstrained = crate::model::struct_with_json_name_internal::Builder;
         556  +
}
         557  +
impl StructWithJsonName {
         558  +
    /// Creates a new builder-style object to manufacture [`StructWithJsonName`](crate::model::StructWithJsonName).
         559  +
    pub fn builder() -> crate::model::struct_with_json_name::Builder {
         560  +
        crate::model::struct_with_json_name::Builder::default()
  494    561   
    }
  495    562   
}
  496    563   
  497    564   
#[::pyo3::pyclass]
  498    565   
#[allow(missing_docs)] // documentation missing in model
  499    566   
#[derive(
  500    567   
    ::std::clone::Clone,
  501    568   
    ::std::cmp::Eq,
  502    569   
    ::std::cmp::Ord,
  503    570   
    ::std::cmp::PartialEq,
@@ -607,674 +1768,1465 @@
  627    694   
}
  628    695   
  629    696   
impl ::std::convert::From<::std::string::String>
  630    697   
    for crate::constrained::MaybeConstrained<crate::model::FooEnum>
  631    698   
{
  632    699   
    fn from(value: ::std::string::String) -> Self {
  633    700   
        Self::Unconstrained(value)
  634    701   
    }
  635    702   
}
  636    703   
  637         -
#[::pyo3::pyclass]
  638         -
/// :param foo typing.Optional\[str\]:
  639         -
/// :rtype None:
  640         -
#[allow(missing_docs)] // documentation missing in model
  641         -
#[derive(
  642         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  643         -
)]
  644         -
pub struct ComplexNestedErrorData {
  645         -
    #[pyo3(get, set)]
  646         -
    /// :type typing.Optional\[str\]:
  647         -
    #[allow(missing_docs)] // documentation missing in model
  648         -
    pub foo: ::std::option::Option<::std::string::String>,
  649         -
}
  650         -
impl ComplexNestedErrorData {
  651         -
    #[allow(missing_docs)] // documentation missing in model
  652         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
  653         -
        self.foo.as_deref()
  654         -
    }
  655         -
}
  656         -
#[allow(clippy::new_without_default)]
  657         -
#[allow(clippy::too_many_arguments)]
  658         -
#[::pyo3::pymethods]
  659         -
impl ComplexNestedErrorData {
  660         -
    #[new]
  661         -
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
  662         -
        Self { foo }
  663         -
    }
  664         -
    fn __repr__(&self) -> String {
  665         -
        format!("{self:?}")
  666         -
    }
  667         -
    fn __str__(&self) -> String {
  668         -
        format!("{self:?}")
  669         -
    }
  670         -
}
  671         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
  672         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  673         -
        ob.extract::<ComplexNestedErrorData>().map(Box::new)
  674         -
    }
  675         -
}
  676         -
  677         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
  678         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  679         -
        (*self).into_py(py)
  680         -
    }
  681         -
}
  682         -
impl ComplexNestedErrorData {
  683         -
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
  684         -
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
  685         -
        crate::model::complex_nested_error_data::Builder::default()
  686         -
    }
  687         -
}
  688         -
  689    704   
#[allow(missing_docs)] // documentation missing in model
  690    705   
///
  691    706   
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
  692         -
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
         707  +
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
  693    708   
///
  694    709   
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
  695    710   
///
  696    711   
#[derive(
  697    712   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  698    713   
)]
  699         -
pub(crate) struct IntegerEnumSet(pub(crate) ::std::vec::Vec<i32>);
  700         -
impl IntegerEnumSet {
  701         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
  702         -
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
         714  +
pub(crate) struct FooEnumSet(pub(crate) ::std::vec::Vec<crate::model::FooEnum>);
         715  +
impl FooEnumSet {
         716  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
         717  +
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
  703    718   
        self.0
  704    719   
    }
  705    720   
  706    721   
    fn check_unique_items(
  707         -
        items: ::std::vec::Vec<i32>,
         722  +
        items: ::std::vec::Vec<crate::model::FooEnum>,
  708    723   
    ) -> ::std::result::Result<
  709         -
        ::std::vec::Vec<i32>,
  710         -
        crate::model::integer_enum_set_internal::ConstraintViolation,
         724  +
        ::std::vec::Vec<crate::model::FooEnum>,
         725  +
        crate::model::foo_enum_set_internal::ConstraintViolation,
  711    726   
    > {
  712    727   
        let mut seen = ::std::collections::HashMap::new();
  713    728   
        let mut duplicate_indices = ::std::vec::Vec::new();
  714    729   
        for (idx, item) in items.iter().enumerate() {
  715    730   
            if let Some(prev_idx) = seen.insert(item, idx) {
  716    731   
                duplicate_indices.push(prev_idx);
  717    732   
            }
  718    733   
        }
  719    734   
  720    735   
        let mut last_duplicate_indices = ::std::vec::Vec::new();
  721    736   
        for idx in &duplicate_indices {
  722    737   
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
  723    738   
                last_duplicate_indices.push(prev_idx);
  724    739   
            }
  725    740   
        }
  726    741   
        duplicate_indices.extend(last_duplicate_indices);
  727    742   
  728    743   
        if !duplicate_indices.is_empty() {
  729    744   
            debug_assert!(duplicate_indices.len() >= 2);
  730    745   
            Err(
  731         -
                crate::model::integer_enum_set_internal::ConstraintViolation::UniqueItems {
         746  +
                crate::model::foo_enum_set_internal::ConstraintViolation::UniqueItems {
  732    747   
                    duplicate_indices,
  733    748   
                    original: items,
  734    749   
                },
  735    750   
            )
  736    751   
        } else {
  737    752   
            Ok(items)
  738    753   
        }
  739    754   
    }
  740    755   
}
  741         -
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
  742         -
    type Error = crate::model::integer_enum_set_internal::ConstraintViolation;
         756  +
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
         757  +
    type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
  743    758   
  744         -
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
  745         -
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
         759  +
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
         760  +
    fn try_from(
         761  +
        value: ::std::vec::Vec<crate::model::FooEnum>,
         762  +
    ) -> ::std::result::Result<Self, Self::Error> {
  746    763   
        let value = Self::check_unique_items(value)?;
  747    764   
  748    765   
        Ok(Self(value))
  749    766   
    }
  750    767   
}
  751    768   
  752         -
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
  753         -
    fn from(value: IntegerEnumSet) -> Self {
         769  +
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
         770  +
    fn from(value: FooEnumSet) -> Self {
  754    771   
        value.into_inner()
  755    772   
    }
  756    773   
}
  757         -
impl crate::constrained::Constrained for IntegerEnumSet {
  758         -
    type Unconstrained =
  759         -
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
         774  +
impl crate::constrained::Constrained for FooEnumSet {
         775  +
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
  760    776   
}
  761    777   
  762    778   
#[allow(missing_docs)] // documentation missing in model
  763    779   
///
  764    780   
/// This is a constrained type because its corresponding modeled Smithy shape has one or more
  765         -
/// [constraint traits]. Use [`FooEnumSet::try_from`] to construct values of this type.
         781  +
/// [constraint traits]. Use [`IntegerEnumSet::try_from`] to construct values of this type.
  766    782   
///
  767    783   
/// [constraint traits]: https://smithy.io/2.0/spec/constraint-traits.html
  768    784   
///
  769    785   
#[derive(
  770    786   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  771    787   
)]
  772         -
pub(crate) struct FooEnumSet(pub(crate) ::std::vec::Vec<crate::model::FooEnum>);
  773         -
impl FooEnumSet {
  774         -
    /// Consumes the value, returning the underlying [`::std::vec::Vec<crate::model::FooEnum>`].
  775         -
    pub fn into_inner(self) -> ::std::vec::Vec<crate::model::FooEnum> {
         788  +
pub(crate) struct IntegerEnumSet(pub(crate) ::std::vec::Vec<i32>);
         789  +
impl IntegerEnumSet {
         790  +
    /// Consumes the value, returning the underlying [`::std::vec::Vec<i32>`].
         791  +
    pub fn into_inner(self) -> ::std::vec::Vec<i32> {
  776    792   
        self.0
  777    793   
    }
  778    794   
  779    795   
    fn check_unique_items(
  780         -
        items: ::std::vec::Vec<crate::model::FooEnum>,
         796  +
        items: ::std::vec::Vec<i32>,
  781    797   
    ) -> ::std::result::Result<
  782         -
        ::std::vec::Vec<crate::model::FooEnum>,
  783         -
        crate::model::foo_enum_set_internal::ConstraintViolation,
         798  +
        ::std::vec::Vec<i32>,
         799  +
        crate::model::integer_enum_set_internal::ConstraintViolation,
  784    800   
    > {
  785    801   
        let mut seen = ::std::collections::HashMap::new();
  786    802   
        let mut duplicate_indices = ::std::vec::Vec::new();
  787    803   
        for (idx, item) in items.iter().enumerate() {
  788    804   
            if let Some(prev_idx) = seen.insert(item, idx) {
  789    805   
                duplicate_indices.push(prev_idx);
  790    806   
            }
  791    807   
        }
  792    808   
  793    809   
        let mut last_duplicate_indices = ::std::vec::Vec::new();
  794    810   
        for idx in &duplicate_indices {
  795    811   
            if let Some(prev_idx) = seen.remove(&items[*idx]) {
  796    812   
                last_duplicate_indices.push(prev_idx);
  797    813   
            }
  798    814   
        }
  799    815   
        duplicate_indices.extend(last_duplicate_indices);
  800    816   
  801    817   
        if !duplicate_indices.is_empty() {
  802    818   
            debug_assert!(duplicate_indices.len() >= 2);
  803    819   
            Err(
  804         -
                crate::model::foo_enum_set_internal::ConstraintViolation::UniqueItems {
         820  +
                crate::model::integer_enum_set_internal::ConstraintViolation::UniqueItems {
  805    821   
                    duplicate_indices,
  806    822   
                    original: items,
  807    823   
                },
  808    824   
            )
  809    825   
        } else {
  810    826   
            Ok(items)
  811    827   
        }
  812    828   
    }
  813    829   
}
  814         -
impl ::std::convert::TryFrom<::std::vec::Vec<crate::model::FooEnum>> for FooEnumSet {
  815         -
    type Error = crate::model::foo_enum_set_internal::ConstraintViolation;
         830  +
impl ::std::convert::TryFrom<::std::vec::Vec<i32>> for IntegerEnumSet {
         831  +
    type Error = crate::model::integer_enum_set_internal::ConstraintViolation;
  816    832   
  817         -
    /// Constructs a `FooEnumSet` from an [`::std::vec::Vec<crate::model::FooEnum>`], failing when the provided value does not satisfy the modeled constraints.
  818         -
    fn try_from(
  819         -
        value: ::std::vec::Vec<crate::model::FooEnum>,
  820         -
    ) -> ::std::result::Result<Self, Self::Error> {
         833  +
    /// Constructs a `IntegerEnumSet` from an [`::std::vec::Vec<i32>`], failing when the provided value does not satisfy the modeled constraints.
         834  +
    fn try_from(value: ::std::vec::Vec<i32>) -> ::std::result::Result<Self, Self::Error> {
  821    835   
        let value = Self::check_unique_items(value)?;
  822    836   
  823    837   
        Ok(Self(value))
  824    838   
    }
  825    839   
}
  826    840   
  827         -
impl ::std::convert::From<FooEnumSet> for ::std::vec::Vec<crate::model::FooEnum> {
  828         -
    fn from(value: FooEnumSet) -> Self {
         841  +
impl ::std::convert::From<IntegerEnumSet> for ::std::vec::Vec<i32> {
         842  +
    fn from(value: IntegerEnumSet) -> Self {
  829    843   
        value.into_inner()
  830    844   
    }
  831    845   
}
  832         -
impl crate::constrained::Constrained for FooEnumSet {
  833         -
    type Unconstrained = crate::unconstrained::foo_enum_set_unconstrained::FooEnumSetUnconstrained;
         846  +
impl crate::constrained::Constrained for IntegerEnumSet {
         847  +
    type Unconstrained =
         848  +
        crate::unconstrained::integer_enum_set_unconstrained::IntegerEnumSetUnconstrained;
  834    849   
}
  835    850   
  836    851   
#[::pyo3::pyclass]
  837         -
/// :param blob typing.Optional\[json_rpc11.types.Blob\]:
  838         -
/// :param boolean typing.Optional\[bool\]:
  839         -
/// :param double typing.Optional\[float\]:
  840         -
/// :param empty_struct typing.Optional\[json_rpc11.model.EmptyStruct\]:
  841         -
/// :param float typing.Optional\[float\]:
  842         -
/// :param httpdate_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
  843         -
/// :param integer typing.Optional\[int\]:
  844         -
/// :param iso8601_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
  845         -
/// :param json_value typing.Optional\[str\]:
  846         -
/// :param list_of_lists typing.Optional\[typing.List\[typing.List\[str\]\]\]:
  847         -
/// :param list_of_maps_of_strings typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
  848         -
/// :param list_of_strings typing.Optional\[typing.List\[str\]\]:
  849         -
/// :param list_of_structs typing.Optional\[typing.List\[json_rpc11.model.SimpleStruct\]\]:
  850         -
/// :param long typing.Optional\[int\]:
  851         -
/// :param map_of_lists_of_strings typing.Optional\[typing.Dict\[str, typing.List\[str\]\]\]:
  852         -
/// :param map_of_maps typing.Optional\[typing.Dict\[str, typing.Dict\[str, str\]\]\]:
  853         -
/// :param map_of_strings typing.Optional\[typing.Dict\[str, str\]\]:
  854         -
/// :param map_of_structs typing.Optional\[typing.Dict\[str, json_rpc11.model.SimpleStruct\]\]:
  855         -
/// :param recursive_list typing.Optional\[typing.List\[json_rpc11.model.KitchenSink\]\]:
  856         -
/// :param recursive_map typing.Optional\[typing.Dict\[str, json_rpc11.model.KitchenSink\]\]:
  857         -
/// :param recursive_struct typing.Optional\[json_rpc11.model.KitchenSink\]:
  858         -
/// :param simple_struct typing.Optional\[json_rpc11.model.SimpleStruct\]:
  859         -
/// :param string typing.Optional\[str\]:
  860         -
/// :param struct_with_json_name typing.Optional\[json_rpc11.model.StructWithJsonName\]:
  861         -
/// :param timestamp typing.Optional\[json_rpc11.types.DateTime\]:
  862         -
/// :param unix_timestamp typing.Optional\[json_rpc11.types.DateTime\]:
         852  +
/// :param foo typing.Optional\[str\]:
  863    853   
/// :rtype None:
  864    854   
#[allow(missing_docs)] // documentation missing in model
  865         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  866         -
pub struct KitchenSink {
  867         -
    #[pyo3(get, set)]
  868         -
    /// :type typing.Optional\[json_rpc11.types.Blob\]:
  869         -
    #[allow(missing_docs)] // documentation missing in model
  870         -
    pub blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
  871         -
    #[pyo3(get, set)]
  872         -
    /// :type typing.Optional\[bool\]:
  873         -
    #[allow(missing_docs)] // documentation missing in model
  874         -
    pub boolean: ::std::option::Option<bool>,
  875         -
    #[pyo3(get, set)]
  876         -
    /// :type typing.Optional\[float\]:
  877         -
    #[allow(missing_docs)] // documentation missing in model
  878         -
    pub double: ::std::option::Option<f64>,
  879         -
    #[pyo3(get, set)]
  880         -
    /// :type typing.Optional\[json_rpc11.model.EmptyStruct\]:
  881         -
    #[allow(missing_docs)] // documentation missing in model
  882         -
    pub empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
  883         -
    #[pyo3(get, set)]
  884         -
    /// :type typing.Optional\[float\]:
  885         -
    #[allow(missing_docs)] // documentation missing in model
  886         -
    pub float: ::std::option::Option<f32>,
  887         -
    #[pyo3(get, set)]
  888         -
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
  889         -
    #[allow(missing_docs)] // documentation missing in model
  890         -
    pub httpdate_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
  891         -
    #[pyo3(get, set)]
  892         -
    /// :type typing.Optional\[int\]:
  893         -
    #[allow(missing_docs)] // documentation missing in model
  894         -
    pub integer: ::std::option::Option<i32>,
  895         -
    #[pyo3(get, set)]
  896         -
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
  897         -
    #[allow(missing_docs)] // documentation missing in model
  898         -
    pub iso8601_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         855  +
#[derive(
         856  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         857  +
)]
         858  +
pub struct ComplexNestedErrorData {
  899    859   
    #[pyo3(get, set)]
  900    860   
    /// :type typing.Optional\[str\]:
  901    861   
    #[allow(missing_docs)] // documentation missing in model
  902         -
    pub json_value: ::std::option::Option<::std::string::String>,
  903         -
    #[pyo3(get, set)]
  904         -
    /// :type typing.Optional\[typing.List\[typing.List\[str\]\]\]:
         862  +
    pub foo: ::std::option::Option<::std::string::String>,
         863  +
}
         864  +
impl ComplexNestedErrorData {
  905    865   
    #[allow(missing_docs)] // documentation missing in model
  906         -
    pub list_of_lists:
  907         -
        ::std::option::Option<::std::vec::Vec<::std::vec::Vec<::std::string::String>>>,
  908         -
    #[pyo3(get, set)]
  909         -
    /// :type typing.Optional\[typing.List\[typing.Dict\[str, str\]\]\]:
  910         -
    #[allow(missing_docs)] // documentation missing in model
  911         -
    pub list_of_maps_of_strings: ::std::option::Option<
  912         -
        ::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
  913         -
    >,
  914         -
    #[pyo3(get, set)]
  915         -
    /// :type typing.Optional\[typing.List\[str\]\]:
  916         -
    #[allow(missing_docs)] // documentation missing in model
  917         -
    pub list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
  918         -
    #[pyo3(get, set)]
  919         -
    /// :type typing.Optional\[typing.List\[json_rpc11.model.SimpleStruct\]\]:
  920         -
    #[allow(missing_docs)] // documentation missing in model
  921         -
    pub list_of_structs: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
  922         -
    #[pyo3(get, set)]
  923         -
    /// :type typing.Optional\[int\]:
  924         -
    #[allow(missing_docs)] // documentation missing in model
  925         -
    pub long: ::std::option::Option<i64>,
  926         -
    #[pyo3(get, set)]
  927         -
    /// :type typing.Optional\[typing.Dict\[str, typing.List\[str\]\]\]:
  928         -
    #[allow(missing_docs)] // documentation missing in model
  929         -
    pub map_of_lists_of_strings: ::std::option::Option<
  930         -
        ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
  931         -
    >,
  932         -
    #[pyo3(get, set)]
  933         -
    /// :type typing.Optional\[typing.Dict\[str, typing.Dict\[str, str\]\]\]:
  934         -
    #[allow(missing_docs)] // documentation missing in model
  935         -
    pub map_of_maps: ::std::option::Option<
  936         -
        ::std::collections::HashMap<
  937         -
            ::std::string::String,
  938         -
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  939         -
        >,
  940         -
    >,
  941         -
    #[pyo3(get, set)]
  942         -
    /// :type typing.Optional\[typing.Dict\[str, str\]\]:
  943         -
    #[allow(missing_docs)] // documentation missing in model
  944         -
    pub map_of_strings: ::std::option::Option<
  945         -
        ::std::collections::HashMap<::std::string::String, ::std::string::String>,
  946         -
    >,
  947         -
    #[pyo3(get, set)]
  948         -
    /// :type typing.Optional\[typing.Dict\[str, json_rpc11.model.SimpleStruct\]\]:
         866  +
    pub fn foo(&self) -> ::std::option::Option<&str> {
         867  +
        self.foo.as_deref()
         868  +
    }
         869  +
}
         870  +
#[allow(clippy::new_without_default)]
         871  +
#[allow(clippy::too_many_arguments)]
         872  +
#[::pyo3::pymethods]
         873  +
impl ComplexNestedErrorData {
         874  +
    #[new]
         875  +
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
         876  +
        Self { foo }
         877  +
    }
         878  +
    fn __repr__(&self) -> String {
         879  +
        format!("{self:?}")
         880  +
    }
         881  +
    fn __str__(&self) -> String {
         882  +
        format!("{self:?}")
         883  +
    }
         884  +
}
         885  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ComplexNestedErrorData> {
         886  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         887  +
        ob.extract::<ComplexNestedErrorData>().map(Box::new)
         888  +
    }
         889  +
}
         890  +
         891  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ComplexNestedErrorData> {
         892  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
         893  +
        (*self).into_py(py)
         894  +
    }
         895  +
}
         896  +
impl ComplexNestedErrorData {
         897  +
    /// Creates a new builder-style object to manufacture [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
         898  +
    pub fn builder() -> crate::model::complex_nested_error_data::Builder {
         899  +
        crate::model::complex_nested_error_data::Builder::default()
         900  +
    }
         901  +
}
         902  +
         903  +
/// A union with a representative set of types for members.
         904  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
         905  +
pub enum MyUnion {
  949    906   
    #[allow(missing_docs)] // documentation missing in model
  950         -
    pub map_of_structs: ::std::option::Option<
  951         -
        ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
  952         -
    >,
  953         -
    #[pyo3(get, set)]
  954         -
    /// :type typing.Optional\[typing.List\[json_rpc11.model.KitchenSink\]\]:
         907  +
    BlobValue(::aws_smithy_http_server_python::types::Blob),
  955    908   
    #[allow(missing_docs)] // documentation missing in model
  956         -
    pub recursive_list: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
  957         -
    #[pyo3(get, set)]
  958         -
    /// :type typing.Optional\[typing.Dict\[str, json_rpc11.model.KitchenSink\]\]:
         909  +
    BooleanValue(bool),
  959    910   
    #[allow(missing_docs)] // documentation missing in model
  960         -
    pub recursive_map: ::std::option::Option<
  961         -
        ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
  962         -
    >,
  963         -
    #[pyo3(get, set)]
  964         -
    /// :type typing.Optional\[json_rpc11.model.KitchenSink\]:
         911  +
    EnumValue(crate::model::FooEnum),
  965    912   
    #[allow(missing_docs)] // documentation missing in model
  966         -
    pub recursive_struct: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
  967         -
    #[pyo3(get, set)]
  968         -
    /// :type typing.Optional\[json_rpc11.model.SimpleStruct\]:
         913  +
    ListValue(::std::vec::Vec<::std::string::String>),
  969    914   
    #[allow(missing_docs)] // documentation missing in model
  970         -
    pub simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
  971         -
    #[pyo3(get, set)]
  972         -
    /// :type typing.Optional\[str\]:
         915  +
    MapValue(::std::collections::HashMap<::std::string::String, ::std::string::String>),
  973    916   
    #[allow(missing_docs)] // documentation missing in model
  974         -
    pub string: ::std::option::Option<::std::string::String>,
  975         -
    #[pyo3(get, set)]
  976         -
    /// :type typing.Optional\[json_rpc11.model.StructWithJsonName\]:
         917  +
    NumberValue(i32),
  977    918   
    #[allow(missing_docs)] // documentation missing in model
  978         -
    pub struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
  979         -
    #[pyo3(get, set)]
  980         -
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
         919  +
    StringValue(::std::string::String),
  981    920   
    #[allow(missing_docs)] // documentation missing in model
  982         -
    pub timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
  983         -
    #[pyo3(get, set)]
  984         -
    /// :type typing.Optional\[json_rpc11.types.DateTime\]:
         921  +
    StructureValue(crate::model::GreetingStruct),
  985    922   
    #[allow(missing_docs)] // documentation missing in model
  986         -
    pub unix_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
         923  +
    TimestampValue(::aws_smithy_http_server_python::types::DateTime),
  987    924   
}
  988         -
impl KitchenSink {
  989         -
    #[allow(missing_docs)] // documentation missing in model
  990         -
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
  991         -
        self.blob.as_ref()
  992         -
    }
  993         -
    #[allow(missing_docs)] // documentation missing in model
  994         -
    pub fn boolean(&self) -> ::std::option::Option<bool> {
  995         -
        self.boolean
         925  +
impl MyUnion {
         926  +
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
         927  +
    /// Returns `Err(&Self)` if it can't be converted.
         928  +
    pub fn as_blob_value(
         929  +
        &self,
         930  +
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::Blob, &Self> {
         931  +
        if let MyUnion::BlobValue(val) = &self {
         932  +
            ::std::result::Result::Ok(val)
         933  +
        } else {
         934  +
            ::std::result::Result::Err(self)
         935  +
        }
  996    936   
    }
  997         -
    #[allow(missing_docs)] // documentation missing in model
  998         -
    pub fn double(&self) -> ::std::option::Option<f64> {
  999         -
        self.double
         937  +
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
         938  +
    pub fn is_blob_value(&self) -> bool {
         939  +
        self.as_blob_value().is_ok()
 1000    940   
    }
 1001         -
    #[allow(missing_docs)] // documentation missing in model
 1002         -
    pub fn empty_struct(&self) -> ::std::option::Option<&crate::model::EmptyStruct> {
 1003         -
        self.empty_struct.as_ref()
         941  +
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
         942  +
    /// Returns `Err(&Self)` if it can't be converted.
         943  +
    pub fn as_boolean_value(&self) -> ::std::result::Result<&bool, &Self> {
         944  +
        if let MyUnion::BooleanValue(val) = &self {
         945  +
            ::std::result::Result::Ok(val)
         946  +
        } else {
         947  +
            ::std::result::Result::Err(self)
         948  +
        }
 1004    949   
    }
 1005         -
    #[allow(missing_docs)] // documentation missing in model
 1006         -
    pub fn float(&self) -> ::std::option::Option<f32> {
 1007         -
        self.float
         950  +
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
         951  +
    pub fn is_boolean_value(&self) -> bool {
         952  +
        self.as_boolean_value().is_ok()
 1008    953   
    }
 1009         -
    #[allow(missing_docs)] // documentation missing in model
 1010         -
    pub fn httpdate_timestamp(
 1011         -
        &self,
 1012         -
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1013         -
        self.httpdate_timestamp.as_ref()
         954  +
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
         955  +
    /// Returns `Err(&Self)` if it can't be converted.
         956  +
    pub fn as_enum_value(&self) -> ::std::result::Result<&crate::model::FooEnum, &Self> {
         957  +
        if let MyUnion::EnumValue(val) = &self {
         958  +
            ::std::result::Result::Ok(val)
         959  +
        } else {
         960  +
            ::std::result::Result::Err(self)
         961  +
        }
 1014    962   
    }
 1015         -
    #[allow(missing_docs)] // documentation missing in model
 1016         -
    pub fn integer(&self) -> ::std::option::Option<i32> {
 1017         -
        self.integer
         963  +
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
         964  +
    pub fn is_enum_value(&self) -> bool {
         965  +
        self.as_enum_value().is_ok()
 1018    966   
    }
 1019         -
    #[allow(missing_docs)] // documentation missing in model
 1020         -
    pub fn iso8601_timestamp(
         967  +
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
         968  +
    /// Returns `Err(&Self)` if it can't be converted.
         969  +
    pub fn as_list_value(
 1021    970   
        &self,
 1022         -
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1023         -
        self.iso8601_timestamp.as_ref()
 1024         -
    }
 1025         -
    #[allow(missing_docs)] // documentation missing in model
 1026         -
    pub fn json_value(&self) -> ::std::option::Option<&str> {
 1027         -
        self.json_value.as_deref()
         971  +
    ) -> ::std::result::Result<&::std::vec::Vec<::std::string::String>, &Self> {
         972  +
        if let MyUnion::ListValue(val) = &self {
         973  +
            ::std::result::Result::Ok(val)
         974  +
        } else {
         975  +
            ::std::result::Result::Err(self)
         976  +
        }
 1028    977   
    }
 1029         -
    #[allow(missing_docs)] // documentation missing in model
 1030         -
    pub fn list_of_lists(
 1031         -
        &self,
 1032         -
    ) -> ::std::option::Option<&[::std::vec::Vec<::std::string::String>]> {
 1033         -
        self.list_of_lists.as_deref()
         978  +
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
         979  +
    pub fn is_list_value(&self) -> bool {
         980  +
        self.as_list_value().is_ok()
 1034    981   
    }
 1035         -
    #[allow(missing_docs)] // documentation missing in model
 1036         -
    pub fn list_of_maps_of_strings(
         982  +
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
         983  +
    /// Returns `Err(&Self)` if it can't be converted.
         984  +
    pub fn as_map_value(
 1037    985   
        &self,
 1038         -
    ) -> ::std::option::Option<
 1039         -
        &[::std::collections::HashMap<::std::string::String, ::std::string::String>],
         986  +
    ) -> ::std::result::Result<
         987  +
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
         988  +
        &Self,
 1040    989   
    > {
 1041         -
        self.list_of_maps_of_strings.as_deref()
 1042         -
    }
 1043         -
    #[allow(missing_docs)] // documentation missing in model
 1044         -
    pub fn list_of_strings(&self) -> ::std::option::Option<&[::std::string::String]> {
 1045         -
        self.list_of_strings.as_deref()
         990  +
        if let MyUnion::MapValue(val) = &self {
         991  +
            ::std::result::Result::Ok(val)
         992  +
        } else {
         993  +
            ::std::result::Result::Err(self)
         994  +
        }
 1046    995   
    }
 1047         -
    #[allow(missing_docs)] // documentation missing in model
 1048         -
    pub fn list_of_structs(&self) -> ::std::option::Option<&[crate::model::SimpleStruct]> {
 1049         -
        self.list_of_structs.as_deref()
         996  +
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
         997  +
    pub fn is_map_value(&self) -> bool {
         998  +
        self.as_map_value().is_ok()
 1050    999   
    }
 1051         -
    #[allow(missing_docs)] // documentation missing in model
 1052         -
    pub fn long(&self) -> ::std::option::Option<i64> {
 1053         -
        self.long
        1000  +
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
        1001  +
    /// Returns `Err(&Self)` if it can't be converted.
        1002  +
    pub fn as_number_value(&self) -> ::std::result::Result<&i32, &Self> {
        1003  +
        if let MyUnion::NumberValue(val) = &self {
        1004  +
            ::std::result::Result::Ok(val)
        1005  +
        } else {
        1006  +
            ::std::result::Result::Err(self)
        1007  +
        }
 1054   1008   
    }
 1055         -
    #[allow(missing_docs)] // documentation missing in model
 1056         -
    pub fn map_of_lists_of_strings(
 1057         -
        &self,
 1058         -
    ) -> ::std::option::Option<
 1059         -
        &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
 1060         -
    > {
 1061         -
        self.map_of_lists_of_strings.as_ref()
        1009  +
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
        1010  +
    pub fn is_number_value(&self) -> bool {
        1011  +
        self.as_number_value().is_ok()
 1062   1012   
    }
 1063         -
    #[allow(missing_docs)] // documentation missing in model
 1064         -
    pub fn map_of_maps(
 1065         -
        &self,
 1066         -
    ) -> ::std::option::Option<
 1067         -
        &::std::collections::HashMap<
 1068         -
            ::std::string::String,
 1069         -
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1070         -
        >,
 1071         -
    > {
 1072         -
        self.map_of_maps.as_ref()
 1073         -
    }
 1074         -
    #[allow(missing_docs)] // documentation missing in model
 1075         -
    pub fn map_of_strings(
 1076         -
        &self,
 1077         -
    ) -> ::std::option::Option<
 1078         -
        &::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1079         -
    > {
 1080         -
        self.map_of_strings.as_ref()
 1081         -
    }
 1082         -
    #[allow(missing_docs)] // documentation missing in model
 1083         -
    pub fn map_of_structs(
 1084         -
        &self,
 1085         -
    ) -> ::std::option::Option<
 1086         -
        &::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
 1087         -
    > {
 1088         -
        self.map_of_structs.as_ref()
 1089         -
    }
 1090         -
    #[allow(missing_docs)] // documentation missing in model
 1091         -
    pub fn recursive_list(&self) -> ::std::option::Option<&[crate::model::KitchenSink]> {
 1092         -
        self.recursive_list.as_deref()
 1093         -
    }
 1094         -
    #[allow(missing_docs)] // documentation missing in model
 1095         -
    pub fn recursive_map(
 1096         -
        &self,
 1097         -
    ) -> ::std::option::Option<
 1098         -
        &::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
 1099         -
    > {
 1100         -
        self.recursive_map.as_ref()
 1101         -
    }
 1102         -
    #[allow(missing_docs)] // documentation missing in model
 1103         -
    pub fn recursive_struct(&self) -> ::std::option::Option<&crate::model::KitchenSink> {
 1104         -
        self.recursive_struct.as_deref()
 1105         -
    }
 1106         -
    #[allow(missing_docs)] // documentation missing in model
 1107         -
    pub fn simple_struct(&self) -> ::std::option::Option<&crate::model::SimpleStruct> {
 1108         -
        self.simple_struct.as_ref()
        1013  +
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
        1014  +
    /// Returns `Err(&Self)` if it can't be converted.
        1015  +
    pub fn as_string_value(&self) -> ::std::result::Result<&::std::string::String, &Self> {
        1016  +
        if let MyUnion::StringValue(val) = &self {
        1017  +
            ::std::result::Result::Ok(val)
        1018  +
        } else {
        1019  +
            ::std::result::Result::Err(self)
        1020  +
        }
 1109   1021   
    }
 1110         -
    #[allow(missing_docs)] // documentation missing in model
 1111         -
    pub fn string(&self) -> ::std::option::Option<&str> {
 1112         -
        self.string.as_deref()
        1022  +
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
        1023  +
    pub fn is_string_value(&self) -> bool {
        1024  +
        self.as_string_value().is_ok()
 1113   1025   
    }
 1114         -
    #[allow(missing_docs)] // documentation missing in model
 1115         -
    pub fn struct_with_json_name(
        1026  +
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
        1027  +
    /// Returns `Err(&Self)` if it can't be converted.
        1028  +
    pub fn as_structure_value(
 1116   1029   
        &self,
 1117         -
    ) -> ::std::option::Option<&crate::model::StructWithJsonName> {
 1118         -
        self.struct_with_json_name.as_ref()
        1030  +
    ) -> ::std::result::Result<&crate::model::GreetingStruct, &Self> {
        1031  +
        if let MyUnion::StructureValue(val) = &self {
        1032  +
            ::std::result::Result::Ok(val)
        1033  +
        } else {
        1034  +
            ::std::result::Result::Err(self)
        1035  +
        }
 1119   1036   
    }
 1120         -
    #[allow(missing_docs)] // documentation missing in model
 1121         -
    pub fn timestamp(
 1122         -
        &self,
 1123         -
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1124         -
        self.timestamp.as_ref()
        1037  +
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
        1038  +
    pub fn is_structure_value(&self) -> bool {
        1039  +
        self.as_structure_value().is_ok()
 1125   1040   
    }
 1126         -
    #[allow(missing_docs)] // documentation missing in model
 1127         -
    pub fn unix_timestamp(
        1041  +
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
        1042  +
    /// Returns `Err(&Self)` if it can't be converted.
        1043  +
    pub fn as_timestamp_value(
 1128   1044   
        &self,
 1129         -
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1130         -
        self.unix_timestamp.as_ref()
 1131         -
    }
 1132         -
}
 1133         -
#[allow(clippy::new_without_default)]
 1134         -
#[allow(clippy::too_many_arguments)]
 1135         -
#[::pyo3::pymethods]
 1136         -
impl KitchenSink {
 1137         -
    #[new]
 1138         -
    pub fn new(
 1139         -
        blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1140         -
        boolean: ::std::option::Option<bool>,
 1141         -
        double: ::std::option::Option<f64>,
 1142         -
        empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
 1143         -
        float: ::std::option::Option<f32>,
 1144         -
        httpdate_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 1145         -
        integer: ::std::option::Option<i32>,
 1146         -
        iso8601_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 1147         -
        json_value: ::std::option::Option<::std::string::String>,
 1148         -
        list_of_lists: ::std::option::Option<
 1149         -
            ::std::vec::Vec<::std::vec::Vec<::std::string::String>>,
 1150         -
        >,
 1151         -
        list_of_maps_of_strings: ::std::option::Option<
 1152         -
            ::std::vec::Vec<
 1153         -
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1154         -
            >,
 1155         -
        >,
 1156         -
        list_of_strings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
 1157         -
        list_of_structs: ::std::option::Option<::std::vec::Vec<crate::model::SimpleStruct>>,
 1158         -
        long: ::std::option::Option<i64>,
 1159         -
        map_of_lists_of_strings: ::std::option::Option<
 1160         -
            ::std::collections::HashMap<
 1161         -
                ::std::string::String,
 1162         -
                ::std::vec::Vec<::std::string::String>,
 1163         -
            >,
 1164         -
        >,
 1165         -
        map_of_maps: ::std::option::Option<
 1166         -
            ::std::collections::HashMap<
 1167         -
                ::std::string::String,
 1168         -
                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1169         -
            >,
 1170         -
        >,
 1171         -
        map_of_strings: ::std::option::Option<
 1172         -
            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
 1173         -
        >,
 1174         -
        map_of_structs: ::std::option::Option<
 1175         -
            ::std::collections::HashMap<::std::string::String, crate::model::SimpleStruct>,
 1176         -
        >,
 1177         -
        recursive_list: ::std::option::Option<::std::vec::Vec<crate::model::KitchenSink>>,
 1178         -
        recursive_map: ::std::option::Option<
 1179         -
            ::std::collections::HashMap<::std::string::String, crate::model::KitchenSink>,
 1180         -
        >,
 1181         -
        recursive_struct: ::std::option::Option<::std::boxed::Box<crate::model::KitchenSink>>,
 1182         -
        simple_struct: ::std::option::Option<crate::model::SimpleStruct>,
 1183         -
        string: ::std::option::Option<::std::string::String>,
 1184         -
        struct_with_json_name: ::std::option::Option<crate::model::StructWithJsonName>,
 1185         -
        timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 1186         -
        unix_timestamp: ::std::option::Option<::aws_smithy_http_server_python::types::DateTime>,
 1187         -
    ) -> Self {
 1188         -
        Self {
 1189         -
            blob,
 1190         -
            boolean,
 1191         -
            double,
 1192         -
            empty_struct,
 1193         -
            float,
 1194         -
            httpdate_timestamp,
 1195         -
            integer,
 1196         -
            iso8601_timestamp,
 1197         -
            json_value,
 1198         -
            list_of_lists,
 1199         -
            list_of_maps_of_strings,
 1200         -
            list_of_strings,
 1201         -
            list_of_structs,
 1202         -
            long,
 1203         -
            map_of_lists_of_strings,
 1204         -
            map_of_maps,
 1205         -
            map_of_strings,
 1206         -
            map_of_structs,
 1207         -
            recursive_list,
 1208         -
            recursive_map,
 1209         -
            recursive_struct,
 1210         -
            simple_struct,
 1211         -
            string,
 1212         -
            struct_with_json_name,
 1213         -
            timestamp,
 1214         -
            unix_timestamp,
        1045  +
    ) -> ::std::result::Result<&::aws_smithy_http_server_python::types::DateTime, &Self> {
        1046  +
        if let MyUnion::TimestampValue(val) = &self {
        1047  +
            ::std::result::Result::Ok(val)
        1048  +
        } else {
        1049  +
            ::std::result::Result::Err(self)
 1215   1050   
        }
 1216   1051   
    }
 1217         -
    fn __repr__(&self) -> String {
 1218         -
        format!("{self:?}")
 1219         -
    }
 1220         -
    fn __str__(&self) -> String {
 1221         -
        format!("{self:?}")
 1222         -
    }
 1223         -
}
 1224         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<KitchenSink> {
 1225         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1226         -
        ob.extract::<KitchenSink>().map(Box::new)
 1227         -
    }
 1228         -
}
 1229         -
 1230         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<KitchenSink> {
 1231         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1232         -
        (*self).into_py(py)
 1233         -
    }
 1234         -
}
 1235         -
impl crate::constrained::Constrained for crate::model::KitchenSink {
 1236         -
    type Unconstrained = crate::model::kitchen_sink_internal::Builder;
 1237         -
}
 1238         -
impl KitchenSink {
 1239         -
    /// Creates a new builder-style object to manufacture [`KitchenSink`](crate::model::KitchenSink).
 1240         -
    pub fn builder() -> crate::model::kitchen_sink::Builder {
 1241         -
        crate::model::kitchen_sink::Builder::default()
 1242         -
    }
 1243         -
}
 1244         -
 1245         -
#[::pyo3::pyclass]
 1246         -
/// :param value typing.Optional\[str\]:
 1247         -
/// :rtype None:
 1248         -
#[allow(missing_docs)] // documentation missing in model
 1249         -
#[derive(
 1250         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1251         -
)]
 1252         -
pub struct StructWithJsonName {
 1253         -
    #[pyo3(get, set)]
 1254         -
    /// :type typing.Optional\[str\]:
 1255         -
    #[allow(missing_docs)] // documentation missing in model
 1256         -
    pub value: ::std::option::Option<::std::string::String>,
 1257         -
}
 1258         -
impl StructWithJsonName {
 1259         -
    #[allow(missing_docs)] // documentation missing in model
 1260         -
    pub fn value(&self) -> ::std::option::Option<&str> {
 1261         -
        self.value.as_deref()
        1052  +
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
        1053  +
    pub fn is_timestamp_value(&self) -> bool {
        1054  +
        self.as_timestamp_value().is_ok()
 1262   1055   
    }
 1263   1056   
}
 1264         -
#[allow(clippy::new_without_default)]
 1265         -
#[allow(clippy::too_many_arguments)]
        1057  +
#[pyo3::pyclass(name = "MyUnion")]
        1058  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
        1059  +
pub struct PyUnionMarkerMyUnion(pub MyUnion);
 1266   1060   
#[::pyo3::pymethods]
 1267         -
impl StructWithJsonName {
 1268         -
    #[new]
 1269         -
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
 1270         -
        Self { value }
 1271         -
    }
 1272         -
    fn __repr__(&self) -> String {
 1273         -
        format!("{self:?}")
        1061  +
impl PyUnionMarkerMyUnion {
        1062  +
    #[staticmethod]
        1063  +
    /// Creates a new union instance of [`BlobValue`](crate::model::MyUnion::BlobValue)
        1064  +
    /// :param data json_rpc11.types.Blob:
        1065  +
    /// :rtype MyUnion:
        1066  +
    pub fn blob_value(data: ::aws_smithy_http_server_python::types::Blob) -> Self {
        1067  +
        Self(MyUnion::BlobValue(data))
 1274   1068   
    }
 1275         -
    fn __str__(&self) -> String {
 1276         -
        format!("{self:?}")
        1069  +
    /// Tries to convert the enum instance into [`BlobValue`](crate::model::MyUnion::BlobValue), extracting the inner [`Blob`](::aws_smithy_http_server_python::types::Blob).
        1070  +
    /// :rtype json_rpc11.types.Blob:
        1071  +
    pub fn as_blob_value(&self) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::Blob> {
        1072  +
        match self.0.as_blob_value() {
        1073  +
            Ok(variant) => Ok(variant.clone()),
        1074  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1075  +
                r"MyUnion variant is not of type json_rpc11.types.Blob",
        1076  +
            )),
        1077  +
        }
 1277   1078   
    }
 1278         -
}
 1279         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructWithJsonName> {
 1280         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1281         -
        ob.extract::<StructWithJsonName>().map(Box::new)
        1079  +
    /// Returns true if this is a [`BlobValue`](crate::model::MyUnion::BlobValue).
        1080  +
    /// :rtype bool:
        1081  +
    pub fn is_blob_value(&self) -> bool {
        1082  +
        self.0.is_blob_value()
 1282   1083   
    }
 1283         -
}
 1284         -
 1285         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructWithJsonName> {
 1286         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1287         -
        (*self).into_py(py)
        1084  +
    #[staticmethod]
        1085  +
    /// Creates a new union instance of [`BooleanValue`](crate::model::MyUnion::BooleanValue)
        1086  +
    /// :param data bool:
        1087  +
    /// :rtype MyUnion:
        1088  +
    pub fn boolean_value(data: bool) -> Self {
        1089  +
        Self(MyUnion::BooleanValue(data))
 1288   1090   
    }
 1289         -
}
 1290         -
impl crate::constrained::Constrained for crate::model::StructWithJsonName {
 1291         -
    type Unconstrained = crate::model::struct_with_json_name_internal::Builder;
 1292         -
}
 1293         -
impl StructWithJsonName {
 1294         -
    /// Creates a new builder-style object to manufacture [`StructWithJsonName`](crate::model::StructWithJsonName).
 1295         -
    pub fn builder() -> crate::model::struct_with_json_name::Builder {
 1296         -
        crate::model::struct_with_json_name::Builder::default()
        1091  +
    /// Tries to convert the enum instance into [`BooleanValue`](crate::model::MyUnion::BooleanValue), extracting the inner [`bool`](bool).
        1092  +
    /// :rtype bool:
        1093  +
    pub fn as_boolean_value(&self) -> ::pyo3::PyResult<bool> {
        1094  +
        match self.0.as_boolean_value() {
        1095  +
            Ok(variant) => Ok(*variant),
        1096  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1097  +
                r"MyUnion variant is not of type bool",
        1098  +
            )),
        1099  +
        }
 1297   1100   
    }
 1298         -
}
 1299         -
 1300         -
#[::pyo3::pyclass]
 1301         -
/// :param value typing.Optional\[str\]:
 1302         -
/// :rtype None:
 1303         -
#[allow(missing_docs)] // documentation missing in model
 1304         -
#[derive(
 1305         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1306         -
)]
 1307         -
pub struct SimpleStruct {
 1308         -
    #[pyo3(get, set)]
 1309         -
    /// :type typing.Optional\[str\]:
 1310         -
    #[allow(missing_docs)] // documentation missing in model
 1311         -
    pub value: ::std::option::Option<::std::string::String>,
 1312         -
}
 1313         -
impl SimpleStruct {
 1314         -
    #[allow(missing_docs)] // documentation missing in model
 1315         -
    pub fn value(&self) -> ::std::option::Option<&str> {
 1316         -
        self.value.as_deref()
        1101  +
    /// Returns true if this is a [`BooleanValue`](crate::model::MyUnion::BooleanValue).
        1102  +
    /// :rtype bool:
        1103  +
    pub fn is_boolean_value(&self) -> bool {
        1104  +
        self.0.is_boolean_value()
 1317   1105   
    }
 1318         -
}
 1319         -
#[allow(clippy::new_without_default)]
 1320         -
#[allow(clippy::too_many_arguments)]
 1321         -
#[::pyo3::pymethods]
 1322         -
impl SimpleStruct {
 1323         -
    #[new]
 1324         -
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
 1325         -
        Self { value }
        1106  +
    #[staticmethod]
        1107  +
    /// Creates a new union instance of [`EnumValue`](crate::model::MyUnion::EnumValue)
        1108  +
    /// :param data json_rpc11.model.FooEnum:
        1109  +
    /// :rtype MyUnion:
        1110  +
    pub fn enum_value(data: crate::model::FooEnum) -> Self {
        1111  +
        Self(MyUnion::EnumValue(data))
 1326   1112   
    }
 1327         -
    fn __repr__(&self) -> String {
 1328         -
        format!("{self:?}")
        1113  +
    /// Tries to convert the enum instance into [`EnumValue`](crate::model::MyUnion::EnumValue), extracting the inner [`FooEnum`](crate::model::FooEnum).
        1114  +
    /// :rtype json_rpc11.model.FooEnum:
        1115  +
    pub fn as_enum_value(&self) -> ::pyo3::PyResult<crate::model::FooEnum> {
        1116  +
        match self.0.as_enum_value() {
        1117  +
            Ok(variant) => Ok(variant.clone()),
        1118  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1119  +
                r"MyUnion variant is not of type json_rpc11.model.FooEnum",
        1120  +
            )),
        1121  +
        }
 1329   1122   
    }
 1330         -
    fn __str__(&self) -> String {
 1331         -
        format!("{self:?}")
        1123  +
    /// Returns true if this is a [`EnumValue`](crate::model::MyUnion::EnumValue).
        1124  +
    /// :rtype bool:
        1125  +
    pub fn is_enum_value(&self) -> bool {
        1126  +
        self.0.is_enum_value()
 1332   1127   
    }
 1333         -
}
 1334         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<SimpleStruct> {
 1335         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1336         -
        ob.extract::<SimpleStruct>().map(Box::new)
        1128  +
    #[staticmethod]
        1129  +
    /// Creates a new union instance of [`ListValue`](crate::model::MyUnion::ListValue)
        1130  +
    /// :param data typing.List\[str\]:
        1131  +
    /// :rtype MyUnion:
        1132  +
    pub fn list_value(data: ::std::vec::Vec<::std::string::String>) -> Self {
        1133  +
        Self(MyUnion::ListValue(data))
 1337   1134   
    }
 1338         -
}
 1339         -
 1340         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<SimpleStruct> {
 1341         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1342         -
        (*self).into_py(py)
        1135  +
    /// Tries to convert the enum instance into [`ListValue`](crate::model::MyUnion::ListValue), extracting the inner [`Vec`](::std::vec::Vec).
        1136  +
    /// :rtype typing.List\[str\]:
        1137  +
    pub fn as_list_value(&self) -> ::pyo3::PyResult<::std::vec::Vec<::std::string::String>> {
        1138  +
        match self.0.as_list_value() {
        1139  +
            Ok(variant) => Ok(variant.clone()),
        1140  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1141  +
                r"MyUnion variant is not of type typing.List\[str\]",
        1142  +
            )),
        1143  +
        }
 1343   1144   
    }
 1344         -
}
 1345         -
impl crate::constrained::Constrained for crate::model::SimpleStruct {
 1346         -
    type Unconstrained = crate::model::simple_struct_internal::Builder;
 1347         -
}
 1348         -
impl SimpleStruct {
 1349         -
    /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
 1350         -
    pub fn builder() -> crate::model::simple_struct::Builder {
 1351         -
        crate::model::simple_struct::Builder::default()
        1145  +
    /// Returns true if this is a [`ListValue`](crate::model::MyUnion::ListValue).
        1146  +
    /// :rtype bool:
        1147  +
    pub fn is_list_value(&self) -> bool {
        1148  +
        self.0.is_list_value()
 1352   1149   
    }
 1353         -
}
 1354         -
 1355         -
#[::pyo3::pyclass]
 1356         -
/// :rtype None:
 1357         -
#[allow(missing_docs)] // documentation missing in model
 1358         -
#[derive(
 1359         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1360         -
)]
 1361         -
pub struct EmptyStruct {}
 1362         -
#[allow(clippy::new_without_default)]
 1363         -
#[allow(clippy::too_many_arguments)]
 1364         -
#[::pyo3::pymethods]
 1365         -
impl EmptyStruct {
 1366         -
    #[new]
 1367         -
    pub fn new() -> Self {
 1368         -
        Self {}
        1150  +
    #[staticmethod]
        1151  +
    /// Creates a new union instance of [`MapValue`](crate::model::MyUnion::MapValue)
        1152  +
    /// :param data typing.Dict\[str, str\]:
        1153  +
    /// :rtype MyUnion:
        1154  +
    pub fn map_value(
        1155  +
        data: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
        1156  +
    ) -> Self {
        1157  +
        Self(MyUnion::MapValue(data))
 1369   1158   
    }
 1370         -
    fn __repr__(&self) -> String {
 1371         -
        format!("{self:?}")
        1159  +
    /// Tries to convert the enum instance into [`MapValue`](crate::model::MyUnion::MapValue), extracting the inner [`HashMap`](::std::collections::HashMap).
        1160  +
    /// :rtype typing.Dict\[str, str\]:
        1161  +
    pub fn as_map_value(
        1162  +
        &self,
        1163  +
    ) -> ::pyo3::PyResult<::std::collections::HashMap<::std::string::String, ::std::string::String>>
        1164  +
    {
        1165  +
        match self.0.as_map_value() {
        1166  +
            Ok(variant) => Ok(variant.clone()),
        1167  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1168  +
                r"MyUnion variant is not of type typing.Dict\[str, str\]",
        1169  +
            )),
        1170  +
        }
 1372   1171   
    }
 1373         -
    fn __str__(&self) -> String {
 1374         -
        format!("{self:?}")
        1172  +
    /// Returns true if this is a [`MapValue`](crate::model::MyUnion::MapValue).
        1173  +
    /// :rtype bool:
        1174  +
    pub fn is_map_value(&self) -> bool {
        1175  +
        self.0.is_map_value()
 1375   1176   
    }
 1376         -
}
 1377         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<EmptyStruct> {
 1378         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1379         -
        ob.extract::<EmptyStruct>().map(Box::new)
        1177  +
    #[staticmethod]
        1178  +
    /// Creates a new union instance of [`NumberValue`](crate::model::MyUnion::NumberValue)
        1179  +
    /// :param data int:
        1180  +
    /// :rtype MyUnion:
        1181  +
    pub fn number_value(data: i32) -> Self {
        1182  +
        Self(MyUnion::NumberValue(data))
 1380   1183   
    }
 1381         -
}
 1382         -
 1383         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<EmptyStruct> {
 1384         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1385         -
        (*self).into_py(py)
        1184  +
    /// Tries to convert the enum instance into [`NumberValue`](crate::model::MyUnion::NumberValue), extracting the inner [`i32`](i32).
        1185  +
    /// :rtype int:
        1186  +
    pub fn as_number_value(&self) -> ::pyo3::PyResult<i32> {
        1187  +
        match self.0.as_number_value() {
        1188  +
            Ok(variant) => Ok(*variant),
        1189  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1190  +
                r"MyUnion variant is not of type int",
        1191  +
            )),
        1192  +
        }
 1386   1193   
    }
 1387         -
}
 1388         -
impl crate::constrained::Constrained for crate::model::EmptyStruct {
 1389         -
    type Unconstrained = crate::model::empty_struct_internal::Builder;
 1390         -
}
 1391         -
impl EmptyStruct {
 1392         -
    /// Creates a new builder-style object to manufacture [`EmptyStruct`](crate::model::EmptyStruct).
 1393         -
    pub fn builder() -> crate::model::empty_struct::Builder {
 1394         -
        crate::model::empty_struct::Builder::default()
        1194  +
    /// Returns true if this is a [`NumberValue`](crate::model::MyUnion::NumberValue).
        1195  +
    /// :rtype bool:
        1196  +
    pub fn is_number_value(&self) -> bool {
        1197  +
        self.0.is_number_value()
 1395   1198   
    }
 1396         -
}
 1397         -
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 1398         -
pub mod validation_exception_field {
 1399         -
 1400         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1401         -
    /// Holds one variant for each of the ways the builder can fail.
 1402         -
    #[allow(clippy::enum_variant_names)]
 1403         -
    pub enum ConstraintViolation {
 1404         -
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
 1405         -
        MissingPath,
 1406         -
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
 1407         -
        MissingMessage,
        1199  +
    #[staticmethod]
        1200  +
    /// Creates a new union instance of [`StringValue`](crate::model::MyUnion::StringValue)
        1201  +
    /// :param data str:
        1202  +
    /// :rtype MyUnion:
        1203  +
    pub fn string_value(data: ::std::string::String) -> Self {
        1204  +
        Self(MyUnion::StringValue(data))
 1408   1205   
    }
 1409         -
    impl ::std::fmt::Display for ConstraintViolation {
 1410         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1411         -
            match self {
 1412         -
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
 1413         -
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
 1414         -
            }
        1206  +
    /// Tries to convert the enum instance into [`StringValue`](crate::model::MyUnion::StringValue), extracting the inner [`String`](::std::string::String).
        1207  +
    /// :rtype str:
        1208  +
    pub fn as_string_value(&self) -> ::pyo3::PyResult<::std::string::String> {
        1209  +
        match self.0.as_string_value() {
        1210  +
            Ok(variant) => Ok(variant.clone()),
        1211  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1212  +
                r"MyUnion variant is not of type str",
        1213  +
            )),
 1415   1214   
        }
 1416   1215   
    }
 1417         -
    impl ::std::error::Error for ConstraintViolation {}
 1418         -
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
 1419         -
        type Error = ConstraintViolation;
 1420         -
 1421         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 1422         -
            builder.build()
 1423         -
        }
        1216  +
    /// Returns true if this is a [`StringValue`](crate::model::MyUnion::StringValue).
        1217  +
    /// :rtype bool:
        1218  +
    pub fn is_string_value(&self) -> bool {
        1219  +
        self.0.is_string_value()
 1424   1220   
    }
 1425         -
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 1426         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1427         -
    pub struct Builder {
 1428         -
        pub(crate) path: ::std::option::Option<::std::string::String>,
 1429         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
        1221  +
    #[staticmethod]
        1222  +
    /// Creates a new union instance of [`StructureValue`](crate::model::MyUnion::StructureValue)
        1223  +
    /// :param data json_rpc11.model.GreetingStruct:
        1224  +
    /// :rtype MyUnion:
        1225  +
    pub fn structure_value(data: crate::model::GreetingStruct) -> Self {
        1226  +
        Self(MyUnion::StructureValue(data))
 1430   1227   
    }
 1431         -
    impl Builder {
 1432         -
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
 1433         -
        pub fn path(mut self, input: ::std::string::String) -> Self {
 1434         -
            self.path = Some(input);
 1435         -
            self
 1436         -
        }
 1437         -
        /// A detailed description of the validation failure.
 1438         -
        pub fn message(mut self, input: ::std::string::String) -> Self {
 1439         -
            self.message = Some(input);
 1440         -
            self
 1441         -
        }
 1442         -
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 1443         -
        ///
 1444         -
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
 1445         -
        ///
 1446         -
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 1447         -
            self.build_enforcing_required_and_enum_traits()
 1448         -
        }
 1449         -
        fn build_enforcing_required_and_enum_traits(
 1450         -
            self,
 1451         -
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 1452         -
            Ok(crate::model::ValidationExceptionField {
 1453         -
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
 1454         -
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1455         -
            })
        1228  +
    /// Tries to convert the enum instance into [`StructureValue`](crate::model::MyUnion::StructureValue), extracting the inner [`GreetingStruct`](crate::model::GreetingStruct).
        1229  +
    /// :rtype json_rpc11.model.GreetingStruct:
        1230  +
    pub fn as_structure_value(&self) -> ::pyo3::PyResult<crate::model::GreetingStruct> {
        1231  +
        match self.0.as_structure_value() {
        1232  +
            Ok(variant) => Ok(variant.clone()),
        1233  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1234  +
                r"MyUnion variant is not of type json_rpc11.model.GreetingStruct",
        1235  +
            )),
 1456   1236   
        }
 1457   1237   
    }
 1458         -
}
 1459         -
pub(crate) mod my_union_internal {
 1460         -
 1461         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1462         -
    #[allow(clippy::enum_variant_names)]
 1463         -
    pub(crate) enum ConstraintViolation {
 1464         -
        EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
        1238  +
    /// Returns true if this is a [`StructureValue`](crate::model::MyUnion::StructureValue).
        1239  +
    /// :rtype bool:
        1240  +
    pub fn is_structure_value(&self) -> bool {
        1241  +
        self.0.is_structure_value()
 1465   1242   
    }
 1466         -
    impl ::std::fmt::Display for ConstraintViolation {
 1467         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1468         -
            match self {
 1469         -
                Self::EnumValue(inner) => write!(f, "{inner}"),
 1470         -
            }
 1471         -
        }
        1243  +
    #[staticmethod]
        1244  +
    /// Creates a new union instance of [`TimestampValue`](crate::model::MyUnion::TimestampValue)
        1245  +
    /// :param data json_rpc11.types.DateTime:
        1246  +
    /// :rtype MyUnion:
        1247  +
    pub fn timestamp_value(data: ::aws_smithy_http_server_python::types::DateTime) -> Self {
        1248  +
        Self(MyUnion::TimestampValue(data))
 1472   1249   
    }
 1473         -
 1474         -
    impl ::std::error::Error for ConstraintViolation {}
 1475         -
    impl ConstraintViolation {
 1476         -
        pub(crate) fn as_validation_exception_field(
 1477         -
            self,
 1478         -
            path: ::std::string::String,
 1479         -
        ) -> crate::model::ValidationExceptionField {
 1480         -
            match self {
 1481         -
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
 1482         -
            }
        1250  +
    /// Tries to convert the enum instance into [`TimestampValue`](crate::model::MyUnion::TimestampValue), extracting the inner [`DateTime`](::aws_smithy_http_server_python::types::DateTime).
        1251  +
    /// :rtype json_rpc11.types.DateTime:
        1252  +
    pub fn as_timestamp_value(
        1253  +
        &self,
        1254  +
    ) -> ::pyo3::PyResult<::aws_smithy_http_server_python::types::DateTime> {
        1255  +
        match self.0.as_timestamp_value() {
        1256  +
            Ok(variant) => Ok(variant.clone()),
        1257  +
            Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
        1258  +
                r"MyUnion variant is not of type json_rpc11.types.DateTime",
        1259  +
            )),
 1483   1260   
        }
 1484   1261   
    }
 1485         -
}
 1486         -
/// See [`GreetingStruct`](crate::model::GreetingStruct).
 1487         -
pub(crate) mod greeting_struct_internal {
 1488         -
 1489         -
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 1490         -
        fn from(builder: Builder) -> Self {
 1491         -
            builder.build()
 1492         -
        }
        1262  +
    /// Returns true if this is a [`TimestampValue`](crate::model::MyUnion::TimestampValue).
        1263  +
    /// :rtype bool:
        1264  +
    pub fn is_timestamp_value(&self) -> bool {
        1265  +
        self.0.is_timestamp_value()
 1493   1266   
    }
 1494         -
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 1495         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1496         -
    pub(crate) struct Builder {
 1497         -
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        1267  +
}
        1268  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for MyUnion {
        1269  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1270  +
        PyUnionMarkerMyUnion(self).into_py(py)
 1498   1271   
    }
 1499         -
    impl Builder {
 1500         -
        #[allow(missing_docs)] // documentation missing in model
 1501         -
        pub(crate) fn set_hi(
 1502         -
            mut self,
 1503         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 1504         -
        ) -> Self {
 1505         -
            self.hi = input.map(|v| v.into());
 1506         -
            self
 1507         -
        }
 1508         -
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
 1509         -
        pub fn build(self) -> crate::model::GreetingStruct {
 1510         -
            self.build_enforcing_all_constraints()
 1511         -
        }
 1512         -
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
 1513         -
            crate::model::GreetingStruct { hi: self.hi }
 1514         -
        }
        1272  +
}
        1273  +
impl<'source> ::pyo3::FromPyObject<'source> for MyUnion {
        1274  +
    fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1275  +
        let data: PyUnionMarkerMyUnion = obj.extract()?;
        1276  +
        Ok(data.0)
 1515   1277   
    }
 1516   1278   
}
 1517         -
/// See [`GreetingStruct`](crate::model::GreetingStruct).
 1518         -
pub mod greeting_struct {
 1519   1279   
 1520         -
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 1521         -
        fn from(builder: Builder) -> Self {
 1522         -
            builder.build()
 1523         -
        }
 1524         -
    }
 1525         -
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 1526         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1527         -
    pub struct Builder {
 1528         -
        pub(crate) hi: ::std::option::Option<::std::string::String>,
 1529         -
    }
 1530         -
    impl Builder {
 1531         -
        #[allow(missing_docs)] // documentation missing in model
 1532         -
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1533         -
            self.hi = input;
 1534         -
            self
 1535         -
        }
 1536         -
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
 1537         -
        pub fn build(self) -> crate::model::GreetingStruct {
 1538         -
            self.build_enforcing_required_and_enum_traits()
 1539         -
        }
 1540         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
 1541         -
            crate::model::GreetingStruct { hi: self.hi }
 1542         -
        }
        1280  +
#[::pyo3::pyclass]
        1281  +
/// :param path str:
        1282  +
/// :param message str:
        1283  +
/// :rtype None:
        1284  +
/// Describes one specific validation failure for an input member.
        1285  +
#[derive(
        1286  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1287  +
)]
        1288  +
pub struct ValidationExceptionField {
        1289  +
    #[pyo3(get, set)]
        1290  +
    /// :type str:
        1291  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        1292  +
    pub path: ::std::string::String,
        1293  +
    #[pyo3(get, set)]
        1294  +
    /// :type str:
        1295  +
    /// A detailed description of the validation failure.
        1296  +
    pub message: ::std::string::String,
        1297  +
}
        1298  +
impl ValidationExceptionField {
        1299  +
    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        1300  +
    pub fn path(&self) -> &str {
        1301  +
        use std::ops::Deref;
        1302  +
        self.path.deref()
        1303  +
    }
        1304  +
    /// A detailed description of the validation failure.
        1305  +
    pub fn message(&self) -> &str {
        1306  +
        use std::ops::Deref;
        1307  +
        self.message.deref()
 1543   1308   
    }
 1544   1309   
}
 1545         -
/// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 1546         -
pub mod complex_nested_error_data {
 1547         -
 1548         -
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
 1549         -
        fn from(builder: Builder) -> Self {
 1550         -
            builder.build()
 1551         -
        }
        1310  +
#[allow(clippy::new_without_default)]
        1311  +
#[allow(clippy::too_many_arguments)]
        1312  +
#[::pyo3::pymethods]
        1313  +
impl ValidationExceptionField {
        1314  +
    #[new]
        1315  +
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
        1316  +
        Self { path, message }
 1552   1317   
    }
 1553         -
    /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 1554         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1555         -
    pub struct Builder {
 1556         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
        1318  +
    fn __repr__(&self) -> String {
        1319  +
        format!("{self:?}")
 1557   1320   
    }
 1558         -
    impl Builder {
 1559         -
        #[allow(missing_docs)] // documentation missing in model
 1560         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1561         -
            self.foo = input;
 1562         -
            self
 1563         -
        }
 1564         -
        /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 1565         -
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
 1566         -
            self.build_enforcing_required_and_enum_traits()
 1567         -
        }
 1568         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
 1569         -
            crate::model::ComplexNestedErrorData { foo: self.foo }
 1570         -
        }
        1321  +
    fn __str__(&self) -> String {
        1322  +
        format!("{self:?}")
 1571   1323   
    }
 1572   1324   
}
 1573         -
pub(crate) mod integer_enum_set_internal {
 1574         -
 1575         -
    #[allow(clippy::enum_variant_names)]
 1576         -
    #[derive(Debug, PartialEq)]
 1577         -
    pub(crate) enum ConstraintViolation {
 1578         -
        /// Constraint violation error when the list does not contain unique items
 1579         -
        UniqueItems {
 1580         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 1581         -
            /// at least two elements.
 1582         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 1583         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 1584         -
            /// Nothing is guaranteed about the order of the indices.
 1585         -
            duplicate_indices: ::std::vec::Vec<usize>,
 1586         -
            /// The original vector, that contains duplicate items.
 1587         -
            original: ::std::vec::Vec<i32>,
 1588         -
        },
        1325  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
        1326  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1327  +
        ob.extract::<ValidationExceptionField>().map(Box::new)
 1589   1328   
    }
        1329  +
}
 1590   1330   
 1591         -
    impl ::std::fmt::Display for ConstraintViolation {
 1592         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1593         -
            let message = match self {
 1594         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 1595         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 1596         -
                            };
 1597         -
            write!(f, "{message}")
 1598         -
        }
        1331  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
        1332  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1333  +
        (*self).into_py(py)
 1599   1334   
    }
 1600         -
 1601         -
    impl ::std::error::Error for ConstraintViolation {}
 1602         -
    impl ConstraintViolation {
 1603         -
        pub(crate) fn as_validation_exception_field(
 1604         -
            self,
 1605         -
            path: ::std::string::String,
 1606         -
        ) -> crate::model::ValidationExceptionField {
 1607         -
            match self {
 1608         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 1609         -
                                crate::model::ValidationExceptionField {
 1610         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 1611         -
                                    path,
 1612         -
                                },
 1613         -
                    }
 1614         -
        }
        1335  +
}
        1336  +
impl ValidationExceptionField {
        1337  +
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        1338  +
    pub fn builder() -> crate::model::validation_exception_field::Builder {
        1339  +
        crate::model::validation_exception_field::Builder::default()
 1615   1340   
    }
 1616   1341   
}
 1617         -
pub(crate) mod foo_enum_map_internal {
 1618   1342   
 1619         -
    #[allow(clippy::enum_variant_names)]
 1620         -
    #[derive(Debug, PartialEq)]
 1621         -
    pub(crate) enum ConstraintViolation {
 1622         -
        #[doc(hidden)]
 1623         -
        Value(
 1624         -
            ::std::string::String,
 1625         -
            crate::model::foo_enum_internal::ConstraintViolation,
 1626         -
        ),
        1343  +
#[::pyo3::pyclass]
        1344  +
/// :param hi typing.Optional\[str\]:
        1345  +
/// :rtype None:
        1346  +
#[allow(missing_docs)] // documentation missing in model
        1347  +
#[derive(
        1348  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
        1349  +
)]
        1350  +
pub struct GreetingStruct {
        1351  +
    #[pyo3(get, set)]
        1352  +
    /// :type typing.Optional\[str\]:
        1353  +
    #[allow(missing_docs)] // documentation missing in model
        1354  +
    pub hi: ::std::option::Option<::std::string::String>,
        1355  +
}
        1356  +
impl GreetingStruct {
        1357  +
    #[allow(missing_docs)] // documentation missing in model
        1358  +
    pub fn hi(&self) -> ::std::option::Option<&str> {
        1359  +
        self.hi.as_deref()
 1627   1360   
    }
 1628         -
 1629         -
    impl ::std::fmt::Display for ConstraintViolation {
 1630         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1631         -
            match self {
 1632         -
                Self::Value(_, value_constraint_violation) => {
 1633         -
                    write!(f, "{}", value_constraint_violation)
 1634         -
                }
 1635         -
            }
 1636         -
        }
        1361  +
}
        1362  +
#[allow(clippy::new_without_default)]
        1363  +
#[allow(clippy::too_many_arguments)]
        1364  +
#[::pyo3::pymethods]
        1365  +
impl GreetingStruct {
        1366  +
    #[new]
        1367  +
    pub fn new(hi: ::std::option::Option<::std::string::String>) -> Self {
        1368  +
        Self { hi }
 1637   1369   
    }
 1638         -
 1639         -
    impl ::std::error::Error for ConstraintViolation {}
 1640         -
    impl ConstraintViolation {
 1641         -
        pub(crate) fn as_validation_exception_field(
 1642         -
            self,
 1643         -
            path: ::std::string::String,
 1644         -
        ) -> crate::model::ValidationExceptionField {
 1645         -
            match self {
 1646         -
                Self::Value(key, value_constraint_violation) => value_constraint_violation
 1647         -
                    .as_validation_exception_field(path + "/" + key.as_str()),
 1648         -
            }
 1649         -
        }
        1370  +
    fn __repr__(&self) -> String {
        1371  +
        format!("{self:?}")
        1372  +
    }
        1373  +
    fn __str__(&self) -> String {
        1374  +
        format!("{self:?}")
        1375  +
    }
        1376  +
}
        1377  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<GreetingStruct> {
        1378  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
        1379  +
        ob.extract::<GreetingStruct>().map(Box::new)
 1650   1380   
    }
 1651   1381   
}
 1652         -
pub(crate) mod foo_enum_set_internal {
 1653   1382   
 1654         -
    #[allow(clippy::enum_variant_names)]
 1655         -
    #[derive(Debug, PartialEq)]
 1656         -
    pub(crate) enum ConstraintViolation {
 1657         -
        /// Constraint violation error when the list does not contain unique items
 1658         -
        UniqueItems {
 1659         -
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
 1660         -
            /// at least two elements.
 1661         -
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
 1662         -
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
 1663         -
            /// Nothing is guaranteed about the order of the indices.
 1664         -
            duplicate_indices: ::std::vec::Vec<usize>,
 1665         -
            /// The original vector, that contains duplicate items.
 1666         -
            original: ::std::vec::Vec<crate::model::FooEnum>,
 1667         -
        },
 1668         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 1669         -
        /// The first component of the tuple is the index in the collection where the
 1670         -
        /// first constraint violation was found.
 1671         -
        #[doc(hidden)]
 1672         -
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
        1383  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<GreetingStruct> {
        1384  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
        1385  +
        (*self).into_py(py)
        1386  +
    }
        1387  +
}
        1388  +
impl crate::constrained::Constrained for crate::model::GreetingStruct {
        1389  +
    type Unconstrained = crate::model::greeting_struct_internal::Builder;
        1390  +
}
        1391  +
impl GreetingStruct {
        1392  +
    /// Creates a new builder-style object to manufacture [`GreetingStruct`](crate::model::GreetingStruct).
        1393  +
    pub fn builder() -> crate::model::greeting_struct::Builder {
        1394  +
        crate::model::greeting_struct::Builder::default()
 1673   1395   
    }
        1396  +
}
        1397  +
/// See [`EmptyStruct`](crate::model::EmptyStruct).
        1398  +
pub(crate) mod empty_struct_internal {
 1674   1399   
 1675         -
    impl ::std::fmt::Display for ConstraintViolation {
 1676         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1677         -
            let message = match self {
 1678         -
                                Self::UniqueItems { duplicate_indices, .. } =>
 1679         -
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
 1680         -
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
 1681         -
                           failing_member)
 1682         -
                            };
 1683         -
            write!(f, "{message}")
        1400  +
    impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
        1401  +
        fn from(builder: Builder) -> Self {
        1402  +
            builder.build()
 1684   1403   
        }
 1685   1404   
    }
 1686         -
 1687         -
    impl ::std::error::Error for ConstraintViolation {}
 1688         -
    impl ConstraintViolation {
 1689         -
        pub(crate) fn as_validation_exception_field(
 1690         -
            self,
 1691         -
            path: ::std::string::String,
 1692         -
        ) -> crate::model::ValidationExceptionField {
 1693         -
            match self {
 1694         -
                        Self::UniqueItems { duplicate_indices, .. } =>
 1695         -
                                crate::model::ValidationExceptionField {
 1696         -
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
 1697         -
                                    path,
 1698         -
                                },
 1699         -
    Self::Member(index, member_constraint_violation) =>
 1700         -
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
 1701         -
                    }
        1405  +
    /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
        1406  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1407  +
    pub(crate) struct Builder {}
        1408  +
    impl Builder {
        1409  +
        /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
        1410  +
        pub fn build(self) -> crate::model::EmptyStruct {
        1411  +
            self.build_enforcing_all_constraints()
        1412  +
        }
        1413  +
        fn build_enforcing_all_constraints(self) -> crate::model::EmptyStruct {
        1414  +
            crate::model::EmptyStruct {}
 1702   1415   
        }
 1703   1416   
    }
 1704   1417   
}
 1705         -
pub(crate) mod foo_enum_list_internal {
 1706         -
 1707         -
    #[allow(clippy::enum_variant_names)]
 1708         -
    #[derive(Debug, PartialEq)]
 1709         -
    pub(crate) enum ConstraintViolation {
 1710         -
        /// Constraint violation error when an element doesn't satisfy its own constraints.
 1711         -
        /// The first component of the tuple is the index in the collection where the
 1712         -
        /// first constraint violation was found.
 1713         -
        #[doc(hidden)]
 1714         -
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
 1715         -
    }
 1716         -
 1717         -
    impl ::std::fmt::Display for ConstraintViolation {
 1718         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
 1719         -
            let message = match self {
 1720         -
                Self::Member(index, failing_member) => format!(
 1721         -
                    "Value at index {index} failed to satisfy constraint. {}",
 1722         -
                    failing_member
 1723         -
                ),
 1724         -
            };
 1725         -
            write!(f, "{message}")
        1418  +
/// See [`EmptyStruct`](crate::model::EmptyStruct).
        1419  +
pub mod empty_struct {
        1420  +
        1421  +
    impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
        1422  +
        fn from(builder: Builder) -> Self {
        1423  +
            builder.build()
 1726   1424   
        }
 1727   1425   
    }
 1728         -
 1729         -
    impl ::std::error::Error for ConstraintViolation {}
 1730         -
    impl ConstraintViolation {
 1731         -
        pub(crate) fn as_validation_exception_field(
 1732         -
            self,
 1733         -
            path: ::std::string::String,
 1734         -
        ) -> crate::model::ValidationExceptionField {
 1735         -
            match self {
 1736         -
                Self::Member(index, member_constraint_violation) => member_constraint_violation
 1737         -
                    .as_validation_exception_field(path + "/" + &index.to_string()),
 1738         -
            }
        1426  +
    /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
        1427  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1428  +
    pub struct Builder {}
        1429  +
    impl Builder {
        1430  +
        /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
        1431  +
        pub fn build(self) -> crate::model::EmptyStruct {
        1432  +
            self.build_enforcing_required_and_enum_traits()
        1433  +
        }
        1434  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::EmptyStruct {
        1435  +
            crate::model::EmptyStruct {}
 1739   1436   
        }
 1740   1437   
    }
 1741   1438   
}
 1742   1439   
/// See [`KitchenSink`](crate::model::KitchenSink).
 1743   1440   
pub(crate) mod kitchen_sink_internal {
 1744   1441   
 1745   1442   
    impl ::std::convert::From<Builder> for crate::model::KitchenSink {
 1746   1443   
        fn from(builder: Builder) -> Self {
 1747   1444   
            builder.build()
 1748   1445   
        }
@@ -2362,2059 +2552,2552 @@
 2382   2079   
                recursive_map: self.recursive_map,
 2383   2080   
                recursive_struct: self.recursive_struct,
 2384   2081   
                simple_struct: self.simple_struct,
 2385   2082   
                string: self.string,
 2386   2083   
                struct_with_json_name: self.struct_with_json_name,
 2387   2084   
                timestamp: self.timestamp,
 2388   2085   
                unix_timestamp: self.unix_timestamp,
 2389   2086   
            }
 2390   2087   
        }
 2391   2088   
    }
 2392         -
}
 2393         -
/// See [`StructWithJsonName`](crate::model::StructWithJsonName).
 2394         -
pub(crate) mod struct_with_json_name_internal {
        2089  +
}
        2090  +
/// See [`SimpleStruct`](crate::model::SimpleStruct).
        2091  +
pub(crate) mod simple_struct_internal {
        2092  +
        2093  +
    impl ::std::convert::From<Builder> for crate::model::SimpleStruct {
        2094  +
        fn from(builder: Builder) -> Self {
        2095  +
            builder.build()
        2096  +
        }
        2097  +
    }
        2098  +
    /// A builder for [`SimpleStruct`](crate::model::SimpleStruct).
        2099  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2100  +
    pub(crate) struct Builder {
        2101  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2102  +
    }
        2103  +
    impl Builder {
        2104  +
        #[allow(missing_docs)] // documentation missing in model
        2105  +
        pub(crate) fn set_value(
        2106  +
            mut self,
        2107  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        2108  +
        ) -> Self {
        2109  +
            self.value = input.map(|v| v.into());
        2110  +
            self
        2111  +
        }
        2112  +
        /// Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
        2113  +
        pub fn build(self) -> crate::model::SimpleStruct {
        2114  +
            self.build_enforcing_all_constraints()
        2115  +
        }
        2116  +
        fn build_enforcing_all_constraints(self) -> crate::model::SimpleStruct {
        2117  +
            crate::model::SimpleStruct { value: self.value }
        2118  +
        }
        2119  +
    }
        2120  +
}
        2121  +
/// See [`SimpleStruct`](crate::model::SimpleStruct).
        2122  +
pub mod simple_struct {
        2123  +
        2124  +
    impl ::std::convert::From<Builder> for crate::model::SimpleStruct {
        2125  +
        fn from(builder: Builder) -> Self {
        2126  +
            builder.build()
        2127  +
        }
        2128  +
    }
        2129  +
    /// A builder for [`SimpleStruct`](crate::model::SimpleStruct).
        2130  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2131  +
    pub struct Builder {
        2132  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2133  +
    }
        2134  +
    impl Builder {
        2135  +
        #[allow(missing_docs)] // documentation missing in model
        2136  +
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2137  +
            self.value = input;
        2138  +
            self
        2139  +
        }
        2140  +
        /// Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
        2141  +
        pub fn build(self) -> crate::model::SimpleStruct {
        2142  +
            self.build_enforcing_required_and_enum_traits()
        2143  +
        }
        2144  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::SimpleStruct {
        2145  +
            crate::model::SimpleStruct { value: self.value }
        2146  +
        }
        2147  +
    }
        2148  +
}
        2149  +
/// See [`StructWithJsonName`](crate::model::StructWithJsonName).
        2150  +
pub(crate) mod struct_with_json_name_internal {
        2151  +
        2152  +
    impl ::std::convert::From<Builder> for crate::model::StructWithJsonName {
        2153  +
        fn from(builder: Builder) -> Self {
        2154  +
            builder.build()
        2155  +
        }
        2156  +
    }
        2157  +
    /// A builder for [`StructWithJsonName`](crate::model::StructWithJsonName).
        2158  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2159  +
    pub(crate) struct Builder {
        2160  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2161  +
    }
        2162  +
    impl Builder {
        2163  +
        #[allow(missing_docs)] // documentation missing in model
        2164  +
        pub(crate) fn set_value(
        2165  +
            mut self,
        2166  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        2167  +
        ) -> Self {
        2168  +
            self.value = input.map(|v| v.into());
        2169  +
            self
        2170  +
        }
        2171  +
        /// Consumes the builder and constructs a [`StructWithJsonName`](crate::model::StructWithJsonName).
        2172  +
        pub fn build(self) -> crate::model::StructWithJsonName {
        2173  +
            self.build_enforcing_all_constraints()
        2174  +
        }
        2175  +
        fn build_enforcing_all_constraints(self) -> crate::model::StructWithJsonName {
        2176  +
            crate::model::StructWithJsonName { value: self.value }
        2177  +
        }
        2178  +
    }
        2179  +
}
        2180  +
/// See [`StructWithJsonName`](crate::model::StructWithJsonName).
        2181  +
pub mod struct_with_json_name {
        2182  +
        2183  +
    impl ::std::convert::From<Builder> for crate::model::StructWithJsonName {
        2184  +
        fn from(builder: Builder) -> Self {
        2185  +
            builder.build()
        2186  +
        }
        2187  +
    }
        2188  +
    /// A builder for [`StructWithJsonName`](crate::model::StructWithJsonName).
        2189  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        2190  +
    pub struct Builder {
        2191  +
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2192  +
    }
        2193  +
    impl Builder {
        2194  +
        #[allow(missing_docs)] // documentation missing in model
        2195  +
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2196  +
            self.value = input;
        2197  +
            self
        2198  +
        }
        2199  +
        /// Consumes the builder and constructs a [`StructWithJsonName`](crate::model::StructWithJsonName).
        2200  +
        pub fn build(self) -> crate::model::StructWithJsonName {
        2201  +
            self.build_enforcing_required_and_enum_traits()
        2202  +
        }
        2203  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructWithJsonName {
        2204  +
            crate::model::StructWithJsonName { value: self.value }
        2205  +
        }
        2206  +
    }
        2207  +
}
        2208  +
pub(crate) mod foo_enum_list_internal {
        2209  +
        2210  +
    #[allow(clippy::enum_variant_names)]
        2211  +
    #[derive(Debug, PartialEq)]
        2212  +
    pub(crate) enum ConstraintViolation {
        2213  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        2214  +
        /// The first component of the tuple is the index in the collection where the
        2215  +
        /// first constraint violation was found.
        2216  +
        #[doc(hidden)]
        2217  +
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
        2218  +
    }
        2219  +
        2220  +
    impl ::std::fmt::Display for ConstraintViolation {
        2221  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2222  +
            let message = match self {
        2223  +
                Self::Member(index, failing_member) => format!(
        2224  +
                    "Value at index {index} failed to satisfy constraint. {}",
        2225  +
                    failing_member
        2226  +
                ),
        2227  +
            };
        2228  +
            write!(f, "{message}")
        2229  +
        }
        2230  +
    }
        2231  +
        2232  +
    impl ::std::error::Error for ConstraintViolation {}
        2233  +
    impl ConstraintViolation {
        2234  +
        pub(crate) fn as_validation_exception_field(
        2235  +
            self,
        2236  +
            path: ::std::string::String,
        2237  +
        ) -> crate::model::ValidationExceptionField {
        2238  +
            match self {
        2239  +
                Self::Member(index, member_constraint_violation) => member_constraint_violation
        2240  +
                    .as_validation_exception_field(path + "/" + &index.to_string()),
        2241  +
            }
        2242  +
        }
        2243  +
    }
        2244  +
}
        2245  +
pub(crate) mod foo_enum_set_internal {
        2246  +
        2247  +
    #[allow(clippy::enum_variant_names)]
        2248  +
    #[derive(Debug, PartialEq)]
        2249  +
    pub(crate) enum ConstraintViolation {
        2250  +
        /// Constraint violation error when the list does not contain unique items
        2251  +
        UniqueItems {
        2252  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        2253  +
            /// at least two elements.
        2254  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        2255  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        2256  +
            /// Nothing is guaranteed about the order of the indices.
        2257  +
            duplicate_indices: ::std::vec::Vec<usize>,
        2258  +
            /// The original vector, that contains duplicate items.
        2259  +
            original: ::std::vec::Vec<crate::model::FooEnum>,
        2260  +
        },
        2261  +
        /// Constraint violation error when an element doesn't satisfy its own constraints.
        2262  +
        /// The first component of the tuple is the index in the collection where the
        2263  +
        /// first constraint violation was found.
        2264  +
        #[doc(hidden)]
        2265  +
        Member(usize, crate::model::foo_enum_internal::ConstraintViolation),
        2266  +
    }
        2267  +
        2268  +
    impl ::std::fmt::Display for ConstraintViolation {
        2269  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2270  +
            let message = match self {
        2271  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        2272  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#FooEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        2273  +
    Self::Member(index, failing_member) => format!("Value at index {index} failed to satisfy constraint. {}",
        2274  +
                           failing_member)
        2275  +
                            };
        2276  +
            write!(f, "{message}")
        2277  +
        }
        2278  +
    }
        2279  +
        2280  +
    impl ::std::error::Error for ConstraintViolation {}
        2281  +
    impl ConstraintViolation {
        2282  +
        pub(crate) fn as_validation_exception_field(
        2283  +
            self,
        2284  +
            path: ::std::string::String,
        2285  +
        ) -> crate::model::ValidationExceptionField {
        2286  +
            match self {
        2287  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        2288  +
                                crate::model::ValidationExceptionField {
        2289  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        2290  +
                                    path,
        2291  +
                                },
        2292  +
    Self::Member(index, member_constraint_violation) =>
        2293  +
                        member_constraint_violation.as_validation_exception_field(path + "/" + &index.to_string())
        2294  +
                    }
        2295  +
        }
        2296  +
    }
        2297  +
}
        2298  +
pub(crate) mod foo_enum_map_internal {
        2299  +
        2300  +
    #[allow(clippy::enum_variant_names)]
        2301  +
    #[derive(Debug, PartialEq)]
        2302  +
    pub(crate) enum ConstraintViolation {
        2303  +
        #[doc(hidden)]
        2304  +
        Value(
        2305  +
            ::std::string::String,
        2306  +
            crate::model::foo_enum_internal::ConstraintViolation,
        2307  +
        ),
        2308  +
    }
        2309  +
        2310  +
    impl ::std::fmt::Display for ConstraintViolation {
        2311  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2312  +
            match self {
        2313  +
                Self::Value(_, value_constraint_violation) => {
        2314  +
                    write!(f, "{}", value_constraint_violation)
        2315  +
                }
        2316  +
            }
        2317  +
        }
        2318  +
    }
 2395   2319   
 2396         -
    impl ::std::convert::From<Builder> for crate::model::StructWithJsonName {
 2397         -
        fn from(builder: Builder) -> Self {
 2398         -
            builder.build()
        2320  +
    impl ::std::error::Error for ConstraintViolation {}
        2321  +
    impl ConstraintViolation {
        2322  +
        pub(crate) fn as_validation_exception_field(
        2323  +
            self,
        2324  +
            path: ::std::string::String,
        2325  +
        ) -> crate::model::ValidationExceptionField {
        2326  +
            match self {
        2327  +
                Self::Value(key, value_constraint_violation) => value_constraint_violation
        2328  +
                    .as_validation_exception_field(path + "/" + key.as_str()),
        2329  +
            }
 2399   2330   
        }
 2400   2331   
    }
 2401         -
    /// A builder for [`StructWithJsonName`](crate::model::StructWithJsonName).
 2402         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2403         -
    pub(crate) struct Builder {
 2404         -
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2332  +
}
        2333  +
pub(crate) mod integer_enum_set_internal {
        2334  +
        2335  +
    #[allow(clippy::enum_variant_names)]
        2336  +
    #[derive(Debug, PartialEq)]
        2337  +
    pub(crate) enum ConstraintViolation {
        2338  +
        /// Constraint violation error when the list does not contain unique items
        2339  +
        UniqueItems {
        2340  +
            /// A vector of indices into `original` pointing to all duplicate items. This vector has
        2341  +
            /// at least two elements.
        2342  +
            /// More specifically, for every element `idx_1` in `duplicate_indices`, there exists another
        2343  +
            /// distinct element `idx_2` such that `original[idx_1] == original[idx_2]` is `true`.
        2344  +
            /// Nothing is guaranteed about the order of the indices.
        2345  +
            duplicate_indices: ::std::vec::Vec<usize>,
        2346  +
            /// The original vector, that contains duplicate items.
        2347  +
            original: ::std::vec::Vec<i32>,
        2348  +
        },
 2405   2349   
    }
 2406         -
    impl Builder {
 2407         -
        #[allow(missing_docs)] // documentation missing in model
 2408         -
        pub(crate) fn set_value(
 2409         -
            mut self,
 2410         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 2411         -
        ) -> Self {
 2412         -
            self.value = input.map(|v| v.into());
 2413         -
            self
 2414         -
        }
 2415         -
        /// Consumes the builder and constructs a [`StructWithJsonName`](crate::model::StructWithJsonName).
 2416         -
        pub fn build(self) -> crate::model::StructWithJsonName {
 2417         -
            self.build_enforcing_all_constraints()
        2350  +
        2351  +
    impl ::std::fmt::Display for ConstraintViolation {
        2352  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2353  +
            let message = match self {
        2354  +
                                Self::UniqueItems { duplicate_indices, .. } =>
        2355  +
                            format!("Value with repeated values at indices {:?} provided for 'aws.protocoltests.shared#IntegerEnumSet' failed to satisfy constraint: Member must have unique values", &duplicate_indices),
        2356  +
                            };
        2357  +
            write!(f, "{message}")
 2418   2358   
        }
 2419         -
        fn build_enforcing_all_constraints(self) -> crate::model::StructWithJsonName {
 2420         -
            crate::model::StructWithJsonName { value: self.value }
        2359  +
    }
        2360  +
        2361  +
    impl ::std::error::Error for ConstraintViolation {}
        2362  +
    impl ConstraintViolation {
        2363  +
        pub(crate) fn as_validation_exception_field(
        2364  +
            self,
        2365  +
            path: ::std::string::String,
        2366  +
        ) -> crate::model::ValidationExceptionField {
        2367  +
            match self {
        2368  +
                        Self::UniqueItems { duplicate_indices, .. } =>
        2369  +
                                crate::model::ValidationExceptionField {
        2370  +
                                    message: format!("Value with repeated values at indices {:?} at '{}' failed to satisfy constraint: Member must have unique values", &duplicate_indices, &path),
        2371  +
                                    path,
        2372  +
                                },
        2373  +
                    }
 2421   2374   
        }
 2422   2375   
    }
 2423   2376   
}
 2424         -
/// See [`StructWithJsonName`](crate::model::StructWithJsonName).
 2425         -
pub mod struct_with_json_name {
        2377  +
/// See [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        2378  +
pub mod complex_nested_error_data {
 2426   2379   
 2427         -
    impl ::std::convert::From<Builder> for crate::model::StructWithJsonName {
        2380  +
    impl ::std::convert::From<Builder> for crate::model::ComplexNestedErrorData {
 2428   2381   
        fn from(builder: Builder) -> Self {
 2429   2382   
            builder.build()
 2430   2383   
        }
 2431   2384   
    }
 2432         -
    /// A builder for [`StructWithJsonName`](crate::model::StructWithJsonName).
        2385  +
    /// A builder for [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
 2433   2386   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2434   2387   
    pub struct Builder {
 2435         -
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2388  +
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 2436   2389   
    }
 2437   2390   
    impl Builder {
 2438   2391   
        #[allow(missing_docs)] // documentation missing in model
 2439         -
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 2440         -
            self.value = input;
        2392  +
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2393  +
            self.foo = input;
 2441   2394   
            self
 2442   2395   
        }
 2443         -
        /// Consumes the builder and constructs a [`StructWithJsonName`](crate::model::StructWithJsonName).
 2444         -
        pub fn build(self) -> crate::model::StructWithJsonName {
        2396  +
        /// Consumes the builder and constructs a [`ComplexNestedErrorData`](crate::model::ComplexNestedErrorData).
        2397  +
        pub fn build(self) -> crate::model::ComplexNestedErrorData {
 2445   2398   
            self.build_enforcing_required_and_enum_traits()
 2446   2399   
        }
 2447         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::StructWithJsonName {
 2448         -
            crate::model::StructWithJsonName { value: self.value }
        2400  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::ComplexNestedErrorData {
        2401  +
            crate::model::ComplexNestedErrorData { foo: self.foo }
 2449   2402   
        }
 2450   2403   
    }
 2451   2404   
}
 2452         -
/// See [`SimpleStruct`](crate::model::SimpleStruct).
 2453         -
pub(crate) mod simple_struct_internal {
        2405  +
pub(crate) mod my_union_internal {
 2454   2406   
 2455         -
    impl ::std::convert::From<Builder> for crate::model::SimpleStruct {
 2456         -
        fn from(builder: Builder) -> Self {
 2457         -
            builder.build()
 2458         -
        }
 2459         -
    }
 2460         -
    /// A builder for [`SimpleStruct`](crate::model::SimpleStruct).
 2461         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2462         -
    pub(crate) struct Builder {
 2463         -
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2407  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        2408  +
    #[allow(clippy::enum_variant_names)]
        2409  +
    pub(crate) enum ConstraintViolation {
        2410  +
        EnumValue(crate::model::foo_enum_internal::ConstraintViolation),
 2464   2411   
    }
 2465         -
    impl Builder {
 2466         -
        #[allow(missing_docs)] // documentation missing in model
 2467         -
        pub(crate) fn set_value(
 2468         -
            mut self,
 2469         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 2470         -
        ) -> Self {
 2471         -
            self.value = input.map(|v| v.into());
 2472         -
            self
 2473         -
        }
 2474         -
        /// Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
 2475         -
        pub fn build(self) -> crate::model::SimpleStruct {
 2476         -
            self.build_enforcing_all_constraints()
        2412  +
    impl ::std::fmt::Display for ConstraintViolation {
        2413  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2414  +
            match self {
        2415  +
                Self::EnumValue(inner) => write!(f, "{inner}"),
        2416  +
            }
 2477   2417   
        }
 2478         -
        fn build_enforcing_all_constraints(self) -> crate::model::SimpleStruct {
 2479         -
            crate::model::SimpleStruct { value: self.value }
        2418  +
    }
        2419  +
        2420  +
    impl ::std::error::Error for ConstraintViolation {}
        2421  +
    impl ConstraintViolation {
        2422  +
        pub(crate) fn as_validation_exception_field(
        2423  +
            self,
        2424  +
            path: ::std::string::String,
        2425  +
        ) -> crate::model::ValidationExceptionField {
        2426  +
            match self {
        2427  +
                Self::EnumValue(inner) => inner.as_validation_exception_field(path + "/enumValue"),
        2428  +
            }
 2480   2429   
        }
 2481   2430   
    }
 2482   2431   
}
 2483         -
/// See [`SimpleStruct`](crate::model::SimpleStruct).
 2484         -
pub mod simple_struct {
        2432  +
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        2433  +
pub mod validation_exception_field {
 2485   2434   
 2486         -
    impl ::std::convert::From<Builder> for crate::model::SimpleStruct {
 2487         -
        fn from(builder: Builder) -> Self {
        2435  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
        2436  +
    /// Holds one variant for each of the ways the builder can fail.
        2437  +
    #[allow(clippy::enum_variant_names)]
        2438  +
    pub enum ConstraintViolation {
        2439  +
        /// `path` was not provided but it is required when building `ValidationExceptionField`.
        2440  +
        MissingPath,
        2441  +
        /// `message` was not provided but it is required when building `ValidationExceptionField`.
        2442  +
        MissingMessage,
        2443  +
    }
        2444  +
    impl ::std::fmt::Display for ConstraintViolation {
        2445  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        2446  +
            match self {
        2447  +
                ConstraintViolation::MissingPath => write!(f, "`path` was not provided but it is required when building `ValidationExceptionField`"),
        2448  +
                ConstraintViolation::MissingMessage => write!(f, "`message` was not provided but it is required when building `ValidationExceptionField`"),
        2449  +
            }
        2450  +
        }
        2451  +
    }
        2452  +
    impl ::std::error::Error for ConstraintViolation {}
        2453  +
    impl ::std::convert::TryFrom<Builder> for crate::model::ValidationExceptionField {
        2454  +
        type Error = ConstraintViolation;
        2455  +
        2456  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
 2488   2457   
            builder.build()
 2489   2458   
        }
 2490   2459   
    }
 2491         -
    /// A builder for [`SimpleStruct`](crate::model::SimpleStruct).
        2460  +
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
 2492   2461   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2493   2462   
    pub struct Builder {
 2494         -
        pub(crate) value: ::std::option::Option<::std::string::String>,
        2463  +
        pub(crate) path: ::std::option::Option<::std::string::String>,
        2464  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
 2495   2465   
    }
 2496   2466   
    impl Builder {
 2497         -
        #[allow(missing_docs)] // documentation missing in model
 2498         -
        pub fn value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 2499         -
            self.value = input;
        2467  +
        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
        2468  +
        pub fn path(mut self, input: ::std::string::String) -> Self {
        2469  +
            self.path = Some(input);
 2500   2470   
            self
 2501   2471   
        }
 2502         -
        /// Consumes the builder and constructs a [`SimpleStruct`](crate::model::SimpleStruct).
 2503         -
        pub fn build(self) -> crate::model::SimpleStruct {
        2472  +
        /// A detailed description of the validation failure.
        2473  +
        pub fn message(mut self, input: ::std::string::String) -> Self {
        2474  +
            self.message = Some(input);
        2475  +
            self
        2476  +
        }
        2477  +
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
        2478  +
        ///
        2479  +
        /// The builder fails to construct a [`ValidationExceptionField`](crate::model::ValidationExceptionField) if you do not provide a value for all non-`Option`al members.
        2480  +
        ///
        2481  +
        pub fn build(self) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
 2504   2482   
            self.build_enforcing_required_and_enum_traits()
 2505   2483   
        }
 2506         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::SimpleStruct {
 2507         -
            crate::model::SimpleStruct { value: self.value }
        2484  +
        fn build_enforcing_required_and_enum_traits(
        2485  +
            self,
        2486  +
        ) -> Result<crate::model::ValidationExceptionField, ConstraintViolation> {
        2487  +
            Ok(crate::model::ValidationExceptionField {
        2488  +
                path: self.path.ok_or(ConstraintViolation::MissingPath)?,
        2489  +
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
        2490  +
            })
 2508   2491   
        }
 2509   2492   
    }
 2510   2493   
}
 2511         -
/// See [`EmptyStruct`](crate::model::EmptyStruct).
 2512         -
pub(crate) mod empty_struct_internal {
        2494  +
/// See [`GreetingStruct`](crate::model::GreetingStruct).
        2495  +
pub(crate) mod greeting_struct_internal {
 2513   2496   
 2514         -
    impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
        2497  +
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 2515   2498   
        fn from(builder: Builder) -> Self {
 2516   2499   
            builder.build()
 2517   2500   
        }
 2518   2501   
    }
 2519         -
    /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
        2502  +
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 2520   2503   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2521         -
    pub(crate) struct Builder {}
        2504  +
    pub(crate) struct Builder {
        2505  +
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        2506  +
    }
 2522   2507   
    impl Builder {
 2523         -
        /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
 2524         -
        pub fn build(self) -> crate::model::EmptyStruct {
        2508  +
        #[allow(missing_docs)] // documentation missing in model
        2509  +
        pub(crate) fn set_hi(
        2510  +
            mut self,
        2511  +
            input: Option<impl ::std::convert::Into<::std::string::String>>,
        2512  +
        ) -> Self {
        2513  +
            self.hi = input.map(|v| v.into());
        2514  +
            self
        2515  +
        }
        2516  +
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
        2517  +
        pub fn build(self) -> crate::model::GreetingStruct {
 2525   2518   
            self.build_enforcing_all_constraints()
 2526   2519   
        }
 2527         -
        fn build_enforcing_all_constraints(self) -> crate::model::EmptyStruct {
 2528         -
            crate::model::EmptyStruct {}
        2520  +
        fn build_enforcing_all_constraints(self) -> crate::model::GreetingStruct {
        2521  +
            crate::model::GreetingStruct { hi: self.hi }
 2529   2522   
        }
 2530   2523   
    }
 2531   2524   
}
 2532         -
/// See [`EmptyStruct`](crate::model::EmptyStruct).
 2533         -
pub mod empty_struct {
        2525  +
/// See [`GreetingStruct`](crate::model::GreetingStruct).
        2526  +
pub mod greeting_struct {
 2534   2527   
 2535         -
    impl ::std::convert::From<Builder> for crate::model::EmptyStruct {
        2528  +
    impl ::std::convert::From<Builder> for crate::model::GreetingStruct {
 2536   2529   
        fn from(builder: Builder) -> Self {
 2537   2530   
            builder.build()
 2538   2531   
        }
 2539   2532   
    }
 2540         -
    /// A builder for [`EmptyStruct`](crate::model::EmptyStruct).
        2533  +
    /// A builder for [`GreetingStruct`](crate::model::GreetingStruct).
 2541   2534   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 2542         -
    pub struct Builder {}
        2535  +
    pub struct Builder {
        2536  +
        pub(crate) hi: ::std::option::Option<::std::string::String>,
        2537  +
    }
 2543   2538   
    impl Builder {
 2544         -
        /// Consumes the builder and constructs a [`EmptyStruct`](crate::model::EmptyStruct).
 2545         -
        pub fn build(self) -> crate::model::EmptyStruct {
        2539  +
        #[allow(missing_docs)] // documentation missing in model
        2540  +
        pub fn hi(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        2541  +
            self.hi = input;
        2542  +
            self
        2543  +
        }
        2544  +
        /// Consumes the builder and constructs a [`GreetingStruct`](crate::model::GreetingStruct).
        2545  +
        pub fn build(self) -> crate::model::GreetingStruct {
 2546   2546   
            self.build_enforcing_required_and_enum_traits()
 2547   2547   
        }
 2548         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::EmptyStruct {
 2549         -
            crate::model::EmptyStruct {}
        2548  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::model::GreetingStruct {
        2549  +
            crate::model::GreetingStruct { hi: self.hi }
 2550   2550   
        }
 2551   2551   
    }
 2552   2552   
}