Server Test Python

Server Test Python

rev. dfb5149b65b7bcc09edd15b8e071ad43b5ac5943

Files changed:

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

@@ -1,1 +31,32 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
    2      3   
const CONTENT_TYPE_RESPONSECODEDEFAULTOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
    3      4   
::pin_project_lite::pin_project! {
    4      5   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    5      6   
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
    6      7   
    pub struct ResponseCodeDefaultOperationInputFuture {
    7      8   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    8      9   
    }
    9     10   
}
   10     11   
   11     12   
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
@@ -38,39 +131,135 @@
   58     59   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
   59     60   
                    e,
   60     61   
                )
   61     62   
            },
   62     63   
        );
   63     64   
        ResponseCodeDefaultOperationInputFuture {
   64     65   
            inner: Box::pin(fut),
   65     66   
        }
   66     67   
    }
   67     68   
}
          69  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
   68     70   
impl
   69     71   
    ::aws_smithy_http_server::response::IntoResponse<
   70     72   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   71     73   
    > for crate::output::ResponseCodeDefaultOperationOutput
   72     74   
{
   73     75   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   74     76   
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
   75     77   
                        Ok(response) => response,
   76     78   
                        Err(e) => {
   77     79   
                            ::tracing::error!(error = %e, "failed to serialize response");
   78     80   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   79     81   
                        }
   80     82   
                    }
   81     83   
    }
   82     84   
}
          85  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
   83     86   
impl
   84     87   
    ::aws_smithy_http_server::response::IntoResponse<
   85     88   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
   86     89   
    > for crate::error::ResponseCodeDefaultOperationError
   87     90   
{
   88     91   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
   89     92   
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_error(&self) {
   90     93   
            Ok(mut response) => {
   91     94   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
   92     95   
                response
   93     96   
            },
   94     97   
            Err(e) => {
   95     98   
                ::tracing::error!(error = %e, "failed to serialize response");
   96     99   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   97    100   
            }
   98    101   
        }
   99    102   
    }
  100    103   
}
  101    104   
         105  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  102    106   
const CONTENT_TYPE_RESPONSECODEHTTPFALLBACKOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  103    107   
::pin_project_lite::pin_project! {
  104    108   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  105    109   
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
  106    110   
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
  107    111   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  108    112   
    }
  109    113   
}
  110    114   
  111    115   
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
@@ -138,142 +231,238 @@
  158    162   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  159    163   
                    e,
  160    164   
                )
  161    165   
            },
  162    166   
        );
  163    167   
        ResponseCodeHttpFallbackOperationInputFuture {
  164    168   
            inner: Box::pin(fut),
  165    169   
        }
  166    170   
    }
  167    171   
}
         172  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  168    173   
impl
  169    174   
    ::aws_smithy_http_server::response::IntoResponse<
  170    175   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  171    176   
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
  172    177   
{
  173    178   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  174    179   
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
  175    180   
                        Ok(response) => response,
  176    181   
                        Err(e) => {
  177    182   
                            ::tracing::error!(error = %e, "failed to serialize response");
  178    183   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  179    184   
                        }
  180    185   
                    }
  181    186   
    }
  182    187   
}
         188  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  183    189   
impl
  184    190   
    ::aws_smithy_http_server::response::IntoResponse<
  185    191   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  186    192   
    > for crate::error::ResponseCodeHttpFallbackOperationError
  187    193   
{
  188    194   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  189    195   
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_error(&self) {
  190    196   
            Ok(mut response) => {
  191    197   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  192    198   
                response
  193    199   
            },
  194    200   
            Err(e) => {
  195    201   
                ::tracing::error!(error = %e, "failed to serialize response");
  196    202   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  197    203   
            }
  198    204   
        }
  199    205   
    }
  200    206   
}
  201    207   
         208  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  202    209   
const CONTENT_TYPE_RESPONSECODEREQUIREDOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  203    210   
::pin_project_lite::pin_project! {
  204    211   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  205    212   
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
  206    213   
    pub struct ResponseCodeRequiredOperationInputFuture {
  207    214   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  208    215   
    }
  209    216   
}
  210    217   
  211    218   
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
@@ -238,245 +331,341 @@
  258    265   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  259    266   
                    e,
  260    267   
                )
  261    268   
            },
  262    269   
        );
  263    270   
        ResponseCodeRequiredOperationInputFuture {
  264    271   
            inner: Box::pin(fut),
  265    272   
        }
  266    273   
    }
  267    274   
}
         275  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  268    276   
impl
  269    277   
    ::aws_smithy_http_server::response::IntoResponse<
  270    278   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  271    279   
    > for crate::output::ResponseCodeRequiredOperationOutput
  272    280   
{
  273    281   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  274    282   
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
  275    283   
                        Ok(response) => response,
  276    284   
                        Err(e) => {
  277    285   
                            ::tracing::error!(error = %e, "failed to serialize response");
  278    286   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  279    287   
                        }
  280    288   
                    }
  281    289   
    }
  282    290   
}
         291  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  283    292   
impl
  284    293   
    ::aws_smithy_http_server::response::IntoResponse<
  285    294   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  286    295   
    > for crate::error::ResponseCodeRequiredOperationError
  287    296   
{
  288    297   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  289    298   
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_error(&self) {
  290    299   
            Ok(mut response) => {
  291    300   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  292    301   
                response
  293    302   
            },
  294    303   
            Err(e) => {
  295    304   
                ::tracing::error!(error = %e, "failed to serialize response");
  296    305   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  297    306   
            }
  298    307   
        }
  299    308   
    }
  300    309   
}
  301    310   
         311  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  302    312   
const CONTENT_TYPE_REQUIREDHEADERCOLLECTIONOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  303    313   
::pin_project_lite::pin_project! {
  304    314   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  305    315   
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
  306    316   
    pub struct RequiredHeaderCollectionOperationInputFuture {
  307    317   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  308    318   
    }
  309    319   
}
  310    320   
  311    321   
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
@@ -338,348 +431,444 @@
  358    368   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  359    369   
                    e,
  360    370   
                )
  361    371   
            },
  362    372   
        );
  363    373   
        RequiredHeaderCollectionOperationInputFuture {
  364    374   
            inner: Box::pin(fut),
  365    375   
        }
  366    376   
    }
  367    377   
}
         378  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  368    379   
impl
  369    380   
    ::aws_smithy_http_server::response::IntoResponse<
  370    381   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  371    382   
    > for crate::output::RequiredHeaderCollectionOperationOutput
  372    383   
{
  373    384   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  374    385   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
  375    386   
                        Ok(response) => response,
  376    387   
                        Err(e) => {
  377    388   
                            ::tracing::error!(error = %e, "failed to serialize response");
  378    389   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  379    390   
                        }
  380    391   
                    }
  381    392   
    }
  382    393   
}
         394  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  383    395   
impl
  384    396   
    ::aws_smithy_http_server::response::IntoResponse<
  385    397   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  386    398   
    > for crate::error::RequiredHeaderCollectionOperationError
  387    399   
{
  388    400   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  389    401   
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
  390    402   
            Ok(mut response) => {
  391    403   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  392    404   
                response
  393    405   
            },
  394    406   
            Err(e) => {
  395    407   
                ::tracing::error!(error = %e, "failed to serialize response");
  396    408   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  397    409   
            }
  398    410   
        }
  399    411   
    }
  400    412   
}
  401    413   
         414  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  402    415   
const CONTENT_TYPE_REQUIREDINNERSHAPEOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  403    416   
::pin_project_lite::pin_project! {
  404    417   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  405    418   
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
  406    419   
    pub struct RequiredInnerShapeOperationInputFuture {
  407    420   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  408    421   
    }
  409    422   
}
  410    423   
  411    424   
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
@@ -438,451 +531,547 @@
  458    471   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  459    472   
                    e,
  460    473   
                )
  461    474   
            },
  462    475   
        );
  463    476   
        RequiredInnerShapeOperationInputFuture {
  464    477   
            inner: Box::pin(fut),
  465    478   
        }
  466    479   
    }
  467    480   
}
         481  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  468    482   
impl
  469    483   
    ::aws_smithy_http_server::response::IntoResponse<
  470    484   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  471    485   
    > for crate::output::RequiredInnerShapeOperationOutput
  472    486   
{
  473    487   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  474    488   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
  475    489   
                        Ok(response) => response,
  476    490   
                        Err(e) => {
  477    491   
                            ::tracing::error!(error = %e, "failed to serialize response");
  478    492   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  479    493   
                        }
  480    494   
                    }
  481    495   
    }
  482    496   
}
         497  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  483    498   
impl
  484    499   
    ::aws_smithy_http_server::response::IntoResponse<
  485    500   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  486    501   
    > for crate::error::RequiredInnerShapeOperationError
  487    502   
{
  488    503   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  489    504   
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
  490    505   
            Ok(mut response) => {
  491    506   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  492    507   
                response
  493    508   
            },
  494    509   
            Err(e) => {
  495    510   
                ::tracing::error!(error = %e, "failed to serialize response");
  496    511   
                ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  497    512   
            }
  498    513   
        }
  499    514   
    }
  500    515   
}
  501    516   
         517  +
/* ServerHttpBoundProtocolGenerator.kt:266 */
  502    518   
const CONTENT_TYPE_TYPECOMPLEXITYOPERATION: ::mime::Mime = ::mime::APPLICATION_JSON;
  503    519   
::pin_project_lite::pin_project! {
  504    520   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  505    521   
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
  506    522   
    pub struct TypeComplexityOperationInputFuture {
  507    523   
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  508    524   
    }
  509    525   
}
  510    526   
  511    527   
impl std::future::Future for TypeComplexityOperationInputFuture {
@@ -538,554 +600,618 @@
  558    574   
                ::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(
  559    575   
                    e,
  560    576   
                )
  561    577   
            },
  562    578   
        );
  563    579   
        TypeComplexityOperationInputFuture {
  564    580   
            inner: Box::pin(fut),
  565    581   
        }
  566    582   
    }
  567    583   
}
         584  +
/* ServerHttpBoundProtocolGenerator.kt:329 */
  568    585   
impl
  569    586   
    ::aws_smithy_http_server::response::IntoResponse<
  570    587   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  571    588   
    > for crate::output::TypeComplexityOperationOutput
  572    589   
{
  573    590   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  574    591   
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
  575    592   
                        Ok(response) => response,
  576    593   
                        Err(e) => {
  577    594   
                            ::tracing::error!(error = %e, "failed to serialize response");
  578    595   
                            ::aws_smithy_http_server::response::IntoResponse::<::aws_smithy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  579    596   
                        }
  580    597   
                    }
  581    598   
    }
  582    599   
}
         600  +
/* ServerHttpBoundProtocolGenerator.kt:350 */
  583    601   
impl
  584    602   
    ::aws_smithy_http_server::response::IntoResponse<
  585    603   
        ::aws_smithy_http_server::protocol::rest_json_1::RestJson1,
  586    604   
    > for crate::error::TypeComplexityOperationError
  587    605   
{
  588    606   
    fn into_response(self) -> ::aws_smithy_http_server::response::Response {
  589    607   
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_error(&self) {
  590    608   
            Ok(mut response) => {
  591    609   
                response.extensions_mut().insert(::aws_smithy_http_server::extension::ModeledErrorExtension::new(self.name()));
  592    610   
                response

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

@@ -1,1 +0,254 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
    3         -
/// This operation tests that the response code defaults to 200 when no other code is set.
           2  +
/* ServerOperationGenerator.kt:48 */
           3  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that the response code defaults to 200 when no other code is set.
           4  +
/* ServerOperationGenerator.kt:55 */
    4      5   
pub struct ResponseCodeDefaultOperation;
    5      6   
    6      7   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeDefaultOperation {
    7      8   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
    8      9   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
    9     10   
            "aws.protocoltests.misc#ResponseCodeDefaultOperation",
   10     11   
            "aws.protocoltests.misc",
   11     12   
            "ResponseCodeDefaultOperation",
   12     13   
        );
   13     14   
   14     15   
    type Input = crate::input::ResponseCodeDefaultOperationInput;
   15     16   
    type Output = crate::output::ResponseCodeDefaultOperationOutput;
   16     17   
    type Error = crate::error::ResponseCodeDefaultOperationError;
   17     18   
}
   18     19   
   19     20   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   20     21   
    for ResponseCodeDefaultOperation
   21     22   
{
   22     23   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   23     24   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   24     25   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   25     26   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   26     27   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   27     28   
        >,
   28     29   
    >;
   29     30   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   30     31   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   31     32   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   32     33   
    >;
   33     34   
   34     35   
    fn request_fmt() -> Self::RequestFmt {
   35     36   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   36     37   
    }
   37     38   
   38     39   
    fn response_fmt() -> Self::ResponseFmt {
   39     40   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   40     41   
    }
   41     42   
}
          43  +
/* ServerOperationGenerator.kt:88 */
   42     44   
   43         -
/// This operation tests that the response code defaults to `@http`'s code.
          45  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that the response code defaults to `@http`'s code.
          46  +
/* ServerOperationGenerator.kt:55 */
   44     47   
pub struct ResponseCodeHttpFallbackOperation;
   45     48   
   46     49   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeHttpFallbackOperation {
   47     50   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   48     51   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   49     52   
            "aws.protocoltests.misc#ResponseCodeHttpFallbackOperation",
   50     53   
            "aws.protocoltests.misc",
   51     54   
            "ResponseCodeHttpFallbackOperation",
   52     55   
        );
   53     56   
   54     57   
    type Input = crate::input::ResponseCodeHttpFallbackOperationInput;
   55     58   
    type Output = crate::output::ResponseCodeHttpFallbackOperationOutput;
   56     59   
    type Error = crate::error::ResponseCodeHttpFallbackOperationError;
   57     60   
}
   58     61   
   59     62   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
   60     63   
    for ResponseCodeHttpFallbackOperation
   61     64   
{
   62     65   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
   63     66   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   64     67   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
   65     68   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   66     69   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
   67     70   
        >,
   68     71   
    >;
   69     72   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
   70     73   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   71     74   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
   72     75   
    >;
   73     76   
   74     77   
    fn request_fmt() -> Self::RequestFmt {
   75     78   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
   76     79   
    }
   77     80   
   78     81   
    fn response_fmt() -> Self::ResponseFmt {
   79     82   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
   80     83   
    }
   81     84   
}
          85  +
/* ServerOperationGenerator.kt:88 */
   82     86   
   83         -
/// This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          87  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that `@httpResponseCode` is `@required` and is used over `@http's` code.
          88  +
/* ServerOperationGenerator.kt:55 */
   84     89   
pub struct ResponseCodeRequiredOperation;
   85     90   
   86     91   
impl ::aws_smithy_http_server::operation::OperationShape for ResponseCodeRequiredOperation {
   87     92   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
   88     93   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
   89     94   
            "aws.protocoltests.misc#ResponseCodeRequiredOperation",
   90     95   
            "aws.protocoltests.misc",
   91     96   
            "ResponseCodeRequiredOperation",
   92     97   
        );
   93     98   
   94     99   
    type Input = crate::input::ResponseCodeRequiredOperationInput;
   95    100   
    type Output = crate::output::ResponseCodeRequiredOperationOutput;
   96    101   
    type Error = crate::error::ResponseCodeRequiredOperationError;
   97    102   
}
   98    103   
   99    104   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  100    105   
    for ResponseCodeRequiredOperation
  101    106   
{
  102    107   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  103    108   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  104    109   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  105    110   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  106    111   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  107    112   
        >,
  108    113   
    >;
  109    114   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  110    115   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  111    116   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  112    117   
    >;
  113    118   
  114    119   
    fn request_fmt() -> Self::RequestFmt {
  115    120   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  116    121   
    }
  117    122   
  118    123   
    fn response_fmt() -> Self::ResponseFmt {
  119    124   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  120    125   
    }
  121    126   
}
         127  +
/* ServerOperationGenerator.kt:88 */
  122    128   
         129  +
/* ServerOperationGenerator.kt:48 */
  123    130   
#[allow(missing_docs)] // documentation missing in model
         131  +
                       /* ServerOperationGenerator.kt:55 */
  124    132   
pub struct RequiredHeaderCollectionOperation;
  125    133   
  126    134   
impl ::aws_smithy_http_server::operation::OperationShape for RequiredHeaderCollectionOperation {
  127    135   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  128    136   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  129    137   
            "aws.protocoltests.misc#RequiredHeaderCollectionOperation",
  130    138   
            "aws.protocoltests.misc",
  131    139   
            "RequiredHeaderCollectionOperation",
  132    140   
        );
  133    141   
  134    142   
    type Input = crate::input::RequiredHeaderCollectionOperationInput;
  135    143   
    type Output = crate::output::RequiredHeaderCollectionOperationOutput;
  136    144   
    type Error = crate::error::RequiredHeaderCollectionOperationError;
  137    145   
}
  138    146   
  139    147   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  140    148   
    for RequiredHeaderCollectionOperation
  141    149   
{
  142    150   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  143    151   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  144    152   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  145    153   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  146    154   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  147    155   
        >,
  148    156   
    >;
  149    157   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  150    158   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  151    159   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  152    160   
    >;
  153    161   
  154    162   
    fn request_fmt() -> Self::RequestFmt {
  155    163   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  156    164   
    }
  157    165   
  158    166   
    fn response_fmt() -> Self::ResponseFmt {
  159    167   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  160    168   
    }
  161    169   
}
         170  +
/* ServerOperationGenerator.kt:88 */
  162    171   
  163         -
/// This operation tests that (de)serializing required values from a nested shape works correctly.
         172  +
/// /* ServerOperationGenerator.kt:48 */This operation tests that (de)serializing required values from a nested shape works correctly.
         173  +
/* ServerOperationGenerator.kt:55 */
  164    174   
pub struct RequiredInnerShapeOperation;
  165    175   
  166    176   
impl ::aws_smithy_http_server::operation::OperationShape for RequiredInnerShapeOperation {
  167    177   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  168    178   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  169    179   
            "aws.protocoltests.misc#RequiredInnerShapeOperation",
  170    180   
            "aws.protocoltests.misc",
  171    181   
            "RequiredInnerShapeOperation",
  172    182   
        );
  173    183   
  174    184   
    type Input = crate::input::RequiredInnerShapeOperationInput;
  175    185   
    type Output = crate::output::RequiredInnerShapeOperationOutput;
  176    186   
    type Error = crate::error::RequiredInnerShapeOperationError;
  177    187   
}
  178    188   
  179    189   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  180    190   
    for RequiredInnerShapeOperation
  181    191   
{
  182    192   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  183    193   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  184    194   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  185    195   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  186    196   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  187    197   
        >,
  188    198   
    >;
  189    199   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  190    200   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  191    201   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  192    202   
    >;
  193    203   
  194    204   
    fn request_fmt() -> Self::RequestFmt {
  195    205   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  196    206   
    }
  197    207   
  198    208   
    fn response_fmt() -> Self::ResponseFmt {
  199    209   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  200    210   
    }
  201    211   
}
         212  +
/* ServerOperationGenerator.kt:88 */
  202    213   
  203         -
/// An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
         214  +
/// /* ServerOperationGenerator.kt:48 */An operation whose shapes generate complex Rust types. See https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity.
         215  +
/* ServerOperationGenerator.kt:55 */
  204    216   
pub struct TypeComplexityOperation;
  205    217   
  206    218   
impl ::aws_smithy_http_server::operation::OperationShape for TypeComplexityOperation {
  207    219   
    const ID: ::aws_smithy_http_server::shape_id::ShapeId =
  208    220   
        ::aws_smithy_http_server::shape_id::ShapeId::new(
  209    221   
            "aws.protocoltests.misc#TypeComplexityOperation",
  210    222   
            "aws.protocoltests.misc",
  211    223   
            "TypeComplexityOperation",
  212    224   
        );
  213    225   
  214    226   
    type Input = crate::input::TypeComplexityOperationInput;
  215    227   
    type Output = crate::output::TypeComplexityOperationOutput;
  216    228   
    type Error = crate::error::TypeComplexityOperationError;
  217    229   
}
  218    230   
  219    231   
impl ::aws_smithy_http_server::instrumentation::sensitivity::Sensitivity
  220    232   
    for TypeComplexityOperation
  221    233   
{
  222    234   
    type RequestFmt = ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt<
  223    235   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  224    236   
        ::aws_smithy_http_server::instrumentation::sensitivity::uri::MakeUri<
  225    237   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  226    238   
            ::aws_smithy_http_server::instrumentation::MakeIdentity,
  227    239   
        >,
  228    240   
    >;
  229    241   
    type ResponseFmt = ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt<
  230    242   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  231    243   
        ::aws_smithy_http_server::instrumentation::MakeIdentity,
  232    244   
    >;
  233    245   
  234    246   
    fn request_fmt() -> Self::RequestFmt {
  235    247   
        ::aws_smithy_http_server::instrumentation::sensitivity::RequestFmt::new()
  236    248   
    }
  237    249   
  238    250   
    fn response_fmt() -> Self::ResponseFmt {
  239    251   
        ::aws_smithy_http_server::instrumentation::sensitivity::ResponseFmt::new()
  240    252   
    }
  241    253   
}
         254  +
/* ServerOperationGenerator.kt:88 */

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

@@ -1,1 +615,900 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* RustType.kt:516 */
    2      3   
#[::pyo3::pyclass]
           4  +
/* PythonServerStructureGenerator.kt:63 */
    3      5   
/// :rtype None:
           6  +
/* StructureGenerator.kt:197 */
    4      7   
#[allow(missing_docs)] // documentation missing in model
           8  +
/* RustType.kt:516 */
    5      9   
#[derive(
    6     10   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    7     11   
)]
    8         -
pub struct ResponseCodeDefaultOperationOutput {}
          12  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeDefaultOperationOutput {/* StructureGenerator.kt:201 */}
          13  +
/* RustType.kt:516 */
    9     14   
#[allow(clippy::new_without_default)]
          15  +
/* RustType.kt:516 */
   10     16   
#[allow(clippy::too_many_arguments)]
          17  +
/* RustType.kt:516 */
   11     18   
#[::pyo3::pymethods]
          19  +
/* PythonServerStructureGenerator.kt:88 */
   12     20   
impl ResponseCodeDefaultOperationOutput {
   13     21   
    #[new]
   14     22   
    pub fn new() -> Self {
   15     23   
        Self {}
   16     24   
    }
   17     25   
    fn __repr__(&self) -> String {
   18     26   
        format!("{self:?}")
   19     27   
    }
   20     28   
    fn __str__(&self) -> String {
   21     29   
        format!("{self:?}")
   22     30   
    }
   23     31   
}
          32  +
/* PythonServerStructureGenerator.kt:111 */
   24     33   
impl<'source> ::pyo3::FromPyObject<'source>
   25     34   
    for std::boxed::Box<ResponseCodeDefaultOperationOutput>
   26     35   
{
   27     36   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   28     37   
        ob.extract::<ResponseCodeDefaultOperationOutput>()
   29     38   
            .map(Box::new)
   30     39   
    }
   31     40   
}
   32     41   
   33     42   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeDefaultOperationOutput> {
   34     43   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   35     44   
        (*self).into_py(py)
   36     45   
    }
   37     46   
}
          47  +
/* ServerCodegenVisitor.kt:370 */
   38     48   
impl ResponseCodeDefaultOperationOutput {
   39         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
          49  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
          50  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   40     51   
    pub fn builder() -> crate::output::response_code_default_operation_output::Builder {
          52  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   41     53   
        crate::output::response_code_default_operation_output::Builder::default()
          54  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   42     55   
    }
          56  +
    /* ServerCodegenVisitor.kt:370 */
   43     57   
}
   44     58   
          59  +
/* RustType.kt:516 */
   45     60   
#[::pyo3::pyclass]
          61  +
/* PythonServerStructureGenerator.kt:63 */
   46     62   
/// :rtype None:
          63  +
/* StructureGenerator.kt:197 */
   47     64   
#[allow(missing_docs)] // documentation missing in model
          65  +
/* RustType.kt:516 */
   48     66   
#[derive(
   49     67   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50     68   
)]
   51         -
pub struct ResponseCodeHttpFallbackOperationOutput {}
          69  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeHttpFallbackOperationOutput {/* StructureGenerator.kt:201 */}
          70  +
/* RustType.kt:516 */
   52     71   
#[allow(clippy::new_without_default)]
          72  +
/* RustType.kt:516 */
   53     73   
#[allow(clippy::too_many_arguments)]
          74  +
/* RustType.kt:516 */
   54     75   
#[::pyo3::pymethods]
          76  +
/* PythonServerStructureGenerator.kt:88 */
   55     77   
impl ResponseCodeHttpFallbackOperationOutput {
   56     78   
    #[new]
   57     79   
    pub fn new() -> Self {
   58     80   
        Self {}
   59     81   
    }
   60     82   
    fn __repr__(&self) -> String {
   61     83   
        format!("{self:?}")
   62     84   
    }
   63     85   
    fn __str__(&self) -> String {
   64     86   
        format!("{self:?}")
   65     87   
    }
   66     88   
}
          89  +
/* PythonServerStructureGenerator.kt:111 */
   67     90   
impl<'source> ::pyo3::FromPyObject<'source>
   68     91   
    for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput>
   69     92   
{
   70     93   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   71     94   
        ob.extract::<ResponseCodeHttpFallbackOperationOutput>()
   72     95   
            .map(Box::new)
   73     96   
    }
   74     97   
}
   75     98   
   76     99   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput> {
   77    100   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   78    101   
        (*self).into_py(py)
   79    102   
    }
   80    103   
}
         104  +
/* ServerCodegenVisitor.kt:370 */
   81    105   
impl ResponseCodeHttpFallbackOperationOutput {
   82         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         106  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         107  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   83    108   
    pub fn builder() -> crate::output::response_code_http_fallback_operation_output::Builder {
         109  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
   84    110   
        crate::output::response_code_http_fallback_operation_output::Builder::default()
         111  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
   85    112   
    }
         113  +
    /* ServerCodegenVisitor.kt:370 */
   86    114   
}
   87    115   
         116  +
/* RustType.kt:516 */
   88    117   
#[::pyo3::pyclass]
         118  +
/* PythonServerStructureGenerator.kt:63 */
   89    119   
/// :param response_code int:
   90    120   
/// :rtype None:
         121  +
/* StructureGenerator.kt:197 */
   91    122   
#[allow(missing_docs)] // documentation missing in model
         123  +
/* RustType.kt:516 */
   92    124   
#[derive(
   93    125   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   94    126   
)]
   95         -
pub struct ResponseCodeRequiredOperationOutput {
         127  +
pub /* StructureGenerator.kt:201 */ struct ResponseCodeRequiredOperationOutput {
         128  +
    /* RustType.kt:516 */
   96    129   
    #[pyo3(get, set)]
         130  +
    /* PythonServerStructureGenerator.kt:80 */
   97    131   
    /// :type int:
         132  +
    /* StructureGenerator.kt:231 */
   98    133   
    #[allow(missing_docs)] // documentation missing in model
   99    134   
    pub response_code: i32,
         135  +
    /* StructureGenerator.kt:201 */
  100    136   
}
         137  +
/* StructureGenerator.kt:135 */
  101    138   
impl ResponseCodeRequiredOperationOutput {
         139  +
    /* StructureGenerator.kt:231 */
  102    140   
    #[allow(missing_docs)] // documentation missing in model
         141  +
                           /* StructureGenerator.kt:166 */
  103    142   
    pub fn response_code(&self) -> i32 {
         143  +
        /* StructureGenerator.kt:168 */
  104    144   
        self.response_code
         145  +
        /* StructureGenerator.kt:166 */
  105    146   
    }
         147  +
    /* StructureGenerator.kt:135 */
  106    148   
}
         149  +
/* RustType.kt:516 */
  107    150   
#[allow(clippy::new_without_default)]
         151  +
/* RustType.kt:516 */
  108    152   
#[allow(clippy::too_many_arguments)]
         153  +
/* RustType.kt:516 */
  109    154   
#[::pyo3::pymethods]
         155  +
/* PythonServerStructureGenerator.kt:88 */
  110    156   
impl ResponseCodeRequiredOperationOutput {
  111    157   
    #[new]
  112    158   
    pub fn new(response_code: i32) -> Self {
  113    159   
        Self { response_code }
  114    160   
    }
  115    161   
    fn __repr__(&self) -> String {
  116    162   
        format!("{self:?}")
  117    163   
    }
  118    164   
    fn __str__(&self) -> String {
  119    165   
        format!("{self:?}")
  120    166   
    }
  121    167   
}
         168  +
/* PythonServerStructureGenerator.kt:111 */
  122    169   
impl<'source> ::pyo3::FromPyObject<'source>
  123    170   
    for std::boxed::Box<ResponseCodeRequiredOperationOutput>
  124    171   
{
  125    172   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  126    173   
        ob.extract::<ResponseCodeRequiredOperationOutput>()
  127    174   
            .map(Box::new)
  128    175   
    }
  129    176   
}
  130    177   
  131    178   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeRequiredOperationOutput> {
  132    179   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  133    180   
        (*self).into_py(py)
  134    181   
    }
  135    182   
}
         183  +
/* ServerCodegenVisitor.kt:370 */
  136    184   
impl ResponseCodeRequiredOperationOutput {
  137         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         185  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         186  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  138    187   
    pub fn builder() -> crate::output::response_code_required_operation_output::Builder {
         188  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  139    189   
        crate::output::response_code_required_operation_output::Builder::default()
         190  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  140    191   
    }
         192  +
    /* ServerCodegenVisitor.kt:370 */
  141    193   
}
  142    194   
         195  +
/* RustType.kt:516 */
  143    196   
#[::pyo3::pyclass]
         197  +
/* PythonServerStructureGenerator.kt:63 */
  144    198   
/// :param required_header_list typing.List\[str\]:
  145    199   
/// :param required_header_set typing.List\[str\]:
  146    200   
/// :rtype None:
         201  +
/* StructureGenerator.kt:197 */
  147    202   
#[allow(missing_docs)] // documentation missing in model
         203  +
/* RustType.kt:516 */
  148    204   
#[derive(
  149    205   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  150    206   
)]
  151         -
pub struct RequiredHeaderCollectionOperationOutput {
         207  +
pub /* StructureGenerator.kt:201 */ struct RequiredHeaderCollectionOperationOutput {
         208  +
    /* RustType.kt:516 */
  152    209   
    #[pyo3(get, set)]
         210  +
    /* PythonServerStructureGenerator.kt:80 */
  153    211   
    /// :type typing.List\[str\]:
         212  +
    /* StructureGenerator.kt:231 */
  154    213   
    #[allow(missing_docs)] // documentation missing in model
  155    214   
    pub required_header_list: ::std::vec::Vec<::std::string::String>,
         215  +
    /* RustType.kt:516 */
  156    216   
    #[pyo3(get, set)]
         217  +
    /* PythonServerStructureGenerator.kt:80 */
  157    218   
    /// :type typing.List\[str\]:
         219  +
    /* StructureGenerator.kt:231 */
  158    220   
    #[allow(missing_docs)] // documentation missing in model
  159    221   
    pub required_header_set: ::std::vec::Vec<::std::string::String>,
         222  +
    /* StructureGenerator.kt:201 */
  160    223   
}
         224  +
/* StructureGenerator.kt:135 */
  161    225   
impl RequiredHeaderCollectionOperationOutput {
         226  +
    /* StructureGenerator.kt:231 */
  162    227   
    #[allow(missing_docs)] // documentation missing in model
         228  +
                           /* StructureGenerator.kt:166 */
  163    229   
    pub fn required_header_list(&self) -> &[::std::string::String] {
         230  +
        /* StructureGenerator.kt:171 */
  164    231   
        use std::ops::Deref;
  165    232   
        self.required_header_list.deref()
         233  +
        /* StructureGenerator.kt:166 */
  166    234   
    }
         235  +
    /* StructureGenerator.kt:231 */
  167    236   
    #[allow(missing_docs)] // documentation missing in model
         237  +
                           /* StructureGenerator.kt:166 */
  168    238   
    pub fn required_header_set(&self) -> &[::std::string::String] {
         239  +
        /* StructureGenerator.kt:171 */
  169    240   
        use std::ops::Deref;
  170    241   
        self.required_header_set.deref()
         242  +
        /* StructureGenerator.kt:166 */
  171    243   
    }
         244  +
    /* StructureGenerator.kt:135 */
  172    245   
}
         246  +
/* RustType.kt:516 */
  173    247   
#[allow(clippy::new_without_default)]
         248  +
/* RustType.kt:516 */
  174    249   
#[allow(clippy::too_many_arguments)]
         250  +
/* RustType.kt:516 */
  175    251   
#[::pyo3::pymethods]
         252  +
/* PythonServerStructureGenerator.kt:88 */
  176    253   
impl RequiredHeaderCollectionOperationOutput {
  177    254   
    #[new]
  178    255   
    pub fn new(
  179    256   
        required_header_list: ::std::vec::Vec<::std::string::String>,
  180    257   
        required_header_set: ::std::vec::Vec<::std::string::String>,
  181    258   
    ) -> Self {
  182    259   
        Self {
  183    260   
            required_header_list,
  184    261   
            required_header_set,
  185    262   
        }
  186    263   
    }
  187    264   
    fn __repr__(&self) -> String {
  188    265   
        format!("{self:?}")
  189    266   
    }
  190    267   
    fn __str__(&self) -> String {
  191    268   
        format!("{self:?}")
  192    269   
    }
  193    270   
}
         271  +
/* PythonServerStructureGenerator.kt:111 */
  194    272   
impl<'source> ::pyo3::FromPyObject<'source>
  195    273   
    for std::boxed::Box<RequiredHeaderCollectionOperationOutput>
  196    274   
{
  197    275   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  198    276   
        ob.extract::<RequiredHeaderCollectionOperationOutput>()
  199    277   
            .map(Box::new)
  200    278   
    }
  201    279   
}
  202    280   
  203    281   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredHeaderCollectionOperationOutput> {
  204    282   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  205    283   
        (*self).into_py(py)
  206    284   
    }
  207    285   
}
         286  +
/* ServerCodegenVisitor.kt:370 */
  208    287   
impl RequiredHeaderCollectionOperationOutput {
  209         -
    /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         288  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         289  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  210    290   
    pub fn builder() -> crate::output::required_header_collection_operation_output::Builder {
         291  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  211    292   
        crate::output::required_header_collection_operation_output::Builder::default()
         293  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  212    294   
    }
         295  +
    /* ServerCodegenVisitor.kt:370 */
  213    296   
}
  214    297   
         298  +
/* RustType.kt:516 */
  215    299   
#[::pyo3::pyclass]
         300  +
/* PythonServerStructureGenerator.kt:63 */
  216    301   
/// :param inner typing.Optional\[misc.model.InnerShape\]:
  217    302   
/// :rtype None:
         303  +
/* StructureGenerator.kt:197 */
  218    304   
#[allow(missing_docs)] // documentation missing in model
         305  +
/* RustType.kt:516 */
  219    306   
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  220         -
pub struct RequiredInnerShapeOperationOutput {
         307  +
pub /* StructureGenerator.kt:201 */ struct RequiredInnerShapeOperationOutput {
         308  +
    /* RustType.kt:516 */
  221    309   
    #[pyo3(get, set)]
         310  +
    /* PythonServerStructureGenerator.kt:80 */
  222    311   
    /// :type typing.Optional\[misc.model.InnerShape\]:
         312  +
    /* StructureGenerator.kt:231 */
  223    313   
    #[allow(missing_docs)] // documentation missing in model
  224    314   
    pub inner: ::std::option::Option<crate::model::InnerShape>,
         315  +
    /* StructureGenerator.kt:201 */
  225    316   
}
         317  +
/* StructureGenerator.kt:135 */
  226    318   
impl RequiredInnerShapeOperationOutput {
         319  +
    /* StructureGenerator.kt:231 */
  227    320   
    #[allow(missing_docs)] // documentation missing in model
         321  +
                           /* StructureGenerator.kt:166 */
  228    322   
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
         323  +
        /* StructureGenerator.kt:170 */
  229    324   
        self.inner.as_ref()
         325  +
        /* StructureGenerator.kt:166 */
  230    326   
    }
         327  +
    /* StructureGenerator.kt:135 */
  231    328   
}
         329  +
/* RustType.kt:516 */
  232    330   
#[allow(clippy::new_without_default)]
         331  +
/* RustType.kt:516 */
  233    332   
#[allow(clippy::too_many_arguments)]
         333  +
/* RustType.kt:516 */
  234    334   
#[::pyo3::pymethods]
         335  +
/* PythonServerStructureGenerator.kt:88 */
  235    336   
impl RequiredInnerShapeOperationOutput {
  236    337   
    #[new]
  237    338   
    pub fn new(inner: ::std::option::Option<crate::model::InnerShape>) -> Self {
  238    339   
        Self { inner }
  239    340   
    }
  240    341   
    fn __repr__(&self) -> String {
  241    342   
        format!("{self:?}")
  242    343   
    }
  243    344   
    fn __str__(&self) -> String {
  244    345   
        format!("{self:?}")
  245    346   
    }
  246    347   
}
         348  +
/* PythonServerStructureGenerator.kt:111 */
  247    349   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
  248    350   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  249    351   
        ob.extract::<RequiredInnerShapeOperationOutput>()
  250    352   
            .map(Box::new)
  251    353   
    }
  252    354   
}
  253    355   
  254    356   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
  255    357   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  256    358   
        (*self).into_py(py)
  257    359   
    }
  258    360   
}
         361  +
/* ServerCodegenVisitor.kt:370 */
  259    362   
impl RequiredInnerShapeOperationOutput {
  260         -
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         363  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         364  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  261    365   
    pub fn builder() -> crate::output::required_inner_shape_operation_output::Builder {
         366  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  262    367   
        crate::output::required_inner_shape_operation_output::Builder::default()
         368  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  263    369   
    }
         370  +
    /* ServerCodegenVisitor.kt:370 */
  264    371   
}
  265    372   
         373  +
/* RustType.kt:516 */
  266    374   
#[::pyo3::pyclass]
         375  +
/* PythonServerStructureGenerator.kt:63 */
  267    376   
/// :param list typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
  268    377   
/// :rtype None:
         378  +
/* StructureGenerator.kt:197 */
  269    379   
#[allow(missing_docs)] // documentation missing in model
         380  +
/* RustType.kt:516 */
  270    381   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  271         -
pub struct TypeComplexityOperationOutput {
         382  +
pub /* StructureGenerator.kt:201 */ struct TypeComplexityOperationOutput {
         383  +
    /* RustType.kt:516 */
  272    384   
    #[pyo3(get, set)]
         385  +
    /* PythonServerStructureGenerator.kt:80 */
  273    386   
    /// :type typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
         387  +
    /* StructureGenerator.kt:231 */
  274    388   
    #[allow(missing_docs)] // documentation missing in model
  275    389   
    pub list: ::std::option::Option<
  276    390   
        ::std::vec::Vec<
  277    391   
            ::std::vec::Vec<
  278    392   
                ::std::vec::Vec<
  279    393   
                    ::std::collections::HashMap<
  280    394   
                        ::std::string::String,
  281    395   
                        crate::model::EmptyStructure,
  282    396   
                    >,
  283    397   
                >,
  284    398   
            >,
  285    399   
        >,
  286    400   
    >,
         401  +
    /* StructureGenerator.kt:201 */
  287    402   
}
         403  +
/* StructureGenerator.kt:135 */
  288    404   
impl TypeComplexityOperationOutput {
         405  +
    /* StructureGenerator.kt:231 */
  289    406   
    #[allow(missing_docs)] // documentation missing in model
         407  +
                           /* StructureGenerator.kt:166 */
  290    408   
    pub fn list(
  291    409   
        &self,
  292    410   
    ) -> ::std::option::Option<
  293    411   
        &[::std::vec::Vec<
  294    412   
            ::std::vec::Vec<
  295    413   
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
  296    414   
            >,
  297    415   
        >],
  298    416   
    > {
         417  +
        /* StructureGenerator.kt:169 */
  299    418   
        self.list.as_deref()
         419  +
        /* StructureGenerator.kt:166 */
  300    420   
    }
         421  +
    /* StructureGenerator.kt:135 */
  301    422   
}
         423  +
/* RustType.kt:516 */
  302    424   
#[allow(clippy::new_without_default)]
         425  +
/* RustType.kt:516 */
  303    426   
#[allow(clippy::too_many_arguments)]
         427  +
/* RustType.kt:516 */
  304    428   
#[::pyo3::pymethods]
         429  +
/* PythonServerStructureGenerator.kt:88 */
  305    430   
impl TypeComplexityOperationOutput {
  306    431   
    #[new]
  307    432   
    pub fn new(
  308    433   
        list: ::std::option::Option<
  309    434   
            ::std::vec::Vec<
  310    435   
                ::std::vec::Vec<
  311    436   
                    ::std::vec::Vec<
  312    437   
                        ::std::collections::HashMap<
  313    438   
                            ::std::string::String,
  314    439   
                            crate::model::EmptyStructure,
  315    440   
                        >,
  316    441   
                    >,
  317    442   
                >,
  318    443   
            >,
  319    444   
        >,
  320    445   
    ) -> Self {
  321    446   
        Self { list }
  322    447   
    }
  323    448   
    fn __repr__(&self) -> String {
  324    449   
        format!("{self:?}")
  325    450   
    }
  326    451   
    fn __str__(&self) -> String {
  327    452   
        format!("{self:?}")
  328    453   
    }
  329    454   
}
         455  +
/* PythonServerStructureGenerator.kt:111 */
  330    456   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TypeComplexityOperationOutput> {
  331    457   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  332    458   
        ob.extract::<TypeComplexityOperationOutput>().map(Box::new)
  333    459   
    }
  334    460   
}
  335    461   
  336    462   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TypeComplexityOperationOutput> {
  337    463   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  338    464   
        (*self).into_py(py)
  339    465   
    }
  340    466   
}
         467  +
/* ServerCodegenVisitor.kt:370 */
  341    468   
impl TypeComplexityOperationOutput {
  342         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         469  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:211 */Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         470  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  343    471   
    pub fn builder() -> crate::output::type_complexity_operation_output::Builder {
         472  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:213 */
  344    473   
        crate::output::type_complexity_operation_output::Builder::default()
         474  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:212 */
  345    475   
    }
         476  +
    /* ServerCodegenVisitor.kt:370 */
  346    477   
}
  347         -
/// See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         478  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  348    479   
pub mod response_code_default_operation_output {
  349    480   
         481  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  350    482   
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeDefaultOperationOutput {
  351    483   
        fn from(builder: Builder) -> Self {
  352    484   
            builder.build()
  353    485   
        }
  354    486   
    }
  355         -
    /// A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         487  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         488  +
    /* RustType.kt:516 */
  356    489   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  357         -
    pub struct Builder {}
         490  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         491  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         492  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  358    493   
    impl Builder {
  359         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         494  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         495  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  360    496   
        pub fn build(self) -> crate::output::ResponseCodeDefaultOperationOutput {
  361    497   
            self.build_enforcing_required_and_enum_traits()
  362    498   
        }
         499  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  363    500   
        fn build_enforcing_required_and_enum_traits(
  364    501   
            self,
  365    502   
        ) -> crate::output::ResponseCodeDefaultOperationOutput {
  366         -
            crate::output::ResponseCodeDefaultOperationOutput {}
         503  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         504  +
            crate::output::ResponseCodeDefaultOperationOutput {
         505  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         506  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  367    507   
        }
         508  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  368    509   
    }
         510  +
         511  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  369    512   
}
  370         -
/// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         513  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  371    514   
pub mod response_code_http_fallback_operation_output {
  372    515   
         516  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  373    517   
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
  374    518   
        fn from(builder: Builder) -> Self {
  375    519   
            builder.build()
  376    520   
        }
  377    521   
    }
  378         -
    /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         522  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         523  +
    /* RustType.kt:516 */
  379    524   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  380         -
    pub struct Builder {}
         525  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
         526  +
    pub struct Builder {/* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */}
         527  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  381    528   
    impl Builder {
  382         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         529  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         530  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  383    531   
        pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
  384    532   
            self.build_enforcing_required_and_enum_traits()
  385    533   
        }
         534  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  386    535   
        fn build_enforcing_required_and_enum_traits(
  387    536   
            self,
  388    537   
        ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
  389         -
            crate::output::ResponseCodeHttpFallbackOperationOutput {}
         538  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         539  +
            crate::output::ResponseCodeHttpFallbackOperationOutput {
         540  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */}
         541  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  390    542   
        }
         543  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  391    544   
    }
         545  +
         546  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  392    547   
}
  393         -
/// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         548  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  394    549   
pub mod response_code_required_operation_output {
  395    550   
         551  +
    /* RustType.kt:516 */
  396    552   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  397         -
    /// Holds one variant for each of the ways the builder can fail.
  398         -
         553  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         554  +
    /* ServerBuilderConstraintViolations.kt:75 */
  399    555   
    #[allow(clippy::enum_variant_names)]
  400    556   
    pub enum ConstraintViolation {
  401         -
        /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
         557  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
         558  +
        /* ServerBuilderConstraintViolations.kt:143 */
  402    559   
        MissingResponseCode,
         560  +
        /* ServerBuilderConstraintViolations.kt:75 */
  403    561   
    }
         562  +
    /* ServerBuilderConstraintViolations.kt:117 */
  404    563   
    impl ::std::fmt::Display for ConstraintViolation {
         564  +
        /* ServerBuilderConstraintViolations.kt:118 */
  405    565   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         566  +
            /* ServerBuilderConstraintViolations.kt:119 */
  406    567   
            match self {
  407         -
                ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
  408         -
            }
         568  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
         569  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         570  +
            /* ServerBuilderConstraintViolations.kt:118 */
  409    571   
        }
         572  +
        /* ServerBuilderConstraintViolations.kt:117 */
  410    573   
    }
         574  +
    /* ServerBuilderConstraintViolations.kt:84 */
  411    575   
    impl ::std::error::Error for ConstraintViolation {}
         576  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  412    577   
    impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
  413    578   
        type Error = ConstraintViolation;
  414    579   
  415    580   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  416    581   
            builder.build()
  417    582   
        }
  418    583   
    }
  419         -
    /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         584  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         585  +
    /* RustType.kt:516 */
  420    586   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         587  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  421    588   
    pub struct Builder {
         589  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  422    590   
        pub(crate) response_code: ::std::option::Option<i32>,
         591  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  423    592   
    }
         593  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  424    594   
    impl Builder {
         595  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  425    596   
        #[allow(missing_docs)] // documentation missing in model
         597  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  426    598   
        pub fn response_code(mut self, input: i32) -> Self {
  427         -
            self.response_code = Some(input);
         599  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         600  +
            self.response_code =
         601  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         602  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         603  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         604  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  428    605   
            self
         606  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  429    607   
        }
  430         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  431         -
        ///
         608  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         609  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  432    610   
        /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if you do not provide a value for all non-`Option`al members.
  433    611   
        ///
         612  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  434    613   
        pub fn build(
  435    614   
            self,
  436    615   
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  437    616   
        {
  438    617   
            self.build_enforcing_required_and_enum_traits()
  439    618   
        }
         619  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  440    620   
        fn build_enforcing_required_and_enum_traits(
  441    621   
            self,
  442    622   
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  443    623   
        {
  444         -
            Ok(crate::output::ResponseCodeRequiredOperationOutput {
  445         -
                response_code: self
  446         -
                    .response_code
  447         -
                    .ok_or(ConstraintViolation::MissingResponseCode)?,
  448         -
            })
         624  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         625  +
            Ok(
         626  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         627  +
                crate::output::ResponseCodeRequiredOperationOutput {
         628  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         629  +
                    response_code: self
         630  +
                        .response_code
         631  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         632  +
                        .ok_or(ConstraintViolation::MissingResponseCode)?,
         633  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         634  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         635  +
            )
         636  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  449    637   
        }
         638  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  450    639   
    }
         640  +
         641  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  451    642   
}
  452         -
/// See [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         643  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
  453    644   
pub mod required_header_collection_operation_output {
  454    645   
         646  +
    /* RustType.kt:516 */
  455    647   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  456         -
    /// Holds one variant for each of the ways the builder can fail.
  457         -
         648  +
    /// /* ServerBuilderConstraintViolations.kt:72 */Holds one variant for each of the ways the builder can fail.
         649  +
    /* ServerBuilderConstraintViolations.kt:75 */
  458    650   
    #[allow(clippy::enum_variant_names)]
  459    651   
    pub enum ConstraintViolation {
  460         -
        /// `required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
         652  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
         653  +
        /* ServerBuilderConstraintViolations.kt:143 */
  461    654   
        MissingRequiredHeaderList,
  462         -
        /// `required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
         655  +
        /// /* ServerBuilderConstraintViolations.kt:138 */`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`.
         656  +
        /* ServerBuilderConstraintViolations.kt:143 */
  463    657   
        MissingRequiredHeaderSet,
         658  +
        /* ServerBuilderConstraintViolations.kt:75 */
  464    659   
    }
         660  +
    /* ServerBuilderConstraintViolations.kt:117 */
  465    661   
    impl ::std::fmt::Display for ConstraintViolation {
         662  +
        /* ServerBuilderConstraintViolations.kt:118 */
  466    663   
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         664  +
            /* ServerBuilderConstraintViolations.kt:119 */
  467    665   
            match self {
  468         -
                ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
  469         -
                ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
  470         -
            }
         666  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderList => write!(f, "`required_header_list` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
         667  +
                /* ServerBuilderConstraintViolations.kt:127 */ConstraintViolation::MissingRequiredHeaderSet => write!(f, "`required_header_set` was not provided but it is required when building `RequiredHeaderCollectionOperationOutput`"),
         668  +
            /* ServerBuilderConstraintViolations.kt:119 */}
         669  +
            /* ServerBuilderConstraintViolations.kt:118 */
  471    670   
        }
         671  +
        /* ServerBuilderConstraintViolations.kt:117 */
  472    672   
    }
         673  +
    /* ServerBuilderConstraintViolations.kt:84 */
  473    674   
    impl ::std::error::Error for ConstraintViolation {}
         675  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:254 */
  474    676   
    impl ::std::convert::TryFrom<Builder> for crate::output::RequiredHeaderCollectionOperationOutput {
  475    677   
        type Error = ConstraintViolation;
  476    678   
  477    679   
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  478    680   
            builder.build()
  479    681   
        }
  480    682   
    }
  481         -
    /// A builder for [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         683  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         684  +
    /* RustType.kt:516 */
  482    685   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         686  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  483    687   
    pub struct Builder {
         688  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  484    689   
        pub(crate) required_header_list:
  485    690   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         691  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  486    692   
        pub(crate) required_header_set:
  487    693   
            ::std::option::Option<::std::vec::Vec<::std::string::String>>,
         694  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  488    695   
    }
         696  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  489    697   
    impl Builder {
         698  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  490    699   
        #[allow(missing_docs)] // documentation missing in model
         700  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  491    701   
        pub fn required_header_list(
  492    702   
            mut self,
  493    703   
            input: ::std::vec::Vec<::std::string::String>,
  494    704   
        ) -> Self {
  495         -
            self.required_header_list = Some(input);
         705  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         706  +
            self.required_header_list =
         707  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         708  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         709  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         710  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  496    711   
            self
         712  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  497    713   
        }
         714  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  498    715   
        #[allow(missing_docs)] // documentation missing in model
         716  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  499    717   
        pub fn required_header_set(
  500    718   
            mut self,
  501    719   
            input: ::std::vec::Vec<::std::string::String>,
  502    720   
        ) -> Self {
  503         -
            self.required_header_set = Some(input);
         721  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         722  +
            self.required_header_set =
         723  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */Some(
         724  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         725  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:246 */)
         726  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  504    727   
            self
         728  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  505    729   
        }
  506         -
        /// Consumes the builder and constructs a [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
  507         -
        ///
         730  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
         731  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:152 */
  508    732   
        /// The builder fails to construct a [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput) if you do not provide a value for all non-`Option`al members.
  509    733   
        ///
         734  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  510    735   
        pub fn build(
  511    736   
            self,
  512    737   
        ) -> Result<crate::output::RequiredHeaderCollectionOperationOutput, ConstraintViolation>
  513    738   
        {
  514    739   
            self.build_enforcing_required_and_enum_traits()
  515    740   
        }
         741  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  516    742   
        fn build_enforcing_required_and_enum_traits(
  517    743   
            self,
  518    744   
        ) -> Result<crate::output::RequiredHeaderCollectionOperationOutput, ConstraintViolation>
  519    745   
        {
  520         -
            Ok(crate::output::RequiredHeaderCollectionOperationOutput {
  521         -
                required_header_list: self
  522         -
                    .required_header_list
  523         -
                    .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
  524         -
                required_header_set: self
  525         -
                    .required_header_set
  526         -
                    .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  527         -
            })
         746  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         747  +
            Ok(
         748  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         749  +
                crate::output::RequiredHeaderCollectionOperationOutput {
         750  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         751  +
                    required_header_list: self
         752  +
                        .required_header_list
         753  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         754  +
                        .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
         755  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         756  +
                    required_header_set: self
         757  +
                        .required_header_set
         758  +
                        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:202 */
         759  +
                        .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
         760  +
                    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         761  +
                }, /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:175 */
         762  +
            )
         763  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  528    764   
        }
         765  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  529    766   
    }
         767  +
         768  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  530    769   
}
  531         -
/// See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         770  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  532    771   
pub mod required_inner_shape_operation_output {
  533    772   
         773  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  534    774   
    impl ::std::convert::From<Builder> for crate::output::RequiredInnerShapeOperationOutput {
  535    775   
        fn from(builder: Builder) -> Self {
  536    776   
            builder.build()
  537    777   
        }
  538    778   
    }
  539         -
    /// A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         779  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         780  +
    /* RustType.kt:516 */
  540    781   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         782  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  541    783   
    pub struct Builder {
         784  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  542    785   
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
         786  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  543    787   
    }
         788  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  544    789   
    impl Builder {
         790  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  545    791   
        #[allow(missing_docs)] // documentation missing in model
         792  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  546    793   
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  547         -
            self.inner = input;
         794  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         795  +
            self.inner =
         796  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         797  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  548    798   
            self
         799  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  549    800   
        }
  550         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         801  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         802  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  551    803   
        pub fn build(self) -> crate::output::RequiredInnerShapeOperationOutput {
  552    804   
            self.build_enforcing_required_and_enum_traits()
  553    805   
        }
         806  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  554    807   
        fn build_enforcing_required_and_enum_traits(
  555    808   
            self,
  556    809   
        ) -> crate::output::RequiredInnerShapeOperationOutput {
  557         -
            crate::output::RequiredInnerShapeOperationOutput { inner: self.inner }
         810  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         811  +
            crate::output::RequiredInnerShapeOperationOutput {
         812  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         813  +
                inner: self.inner,
         814  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         815  +
            }
         816  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  558    817   
        }
         818  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  559    819   
    }
         820  +
         821  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  560    822   
}
  561         -
/// See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         823  +
/// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:110 */See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  562    824   
pub mod type_complexity_operation_output {
  563    825   
         826  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:269 */
  564    827   
    impl ::std::convert::From<Builder> for crate::output::TypeComplexityOperationOutput {
  565    828   
        fn from(builder: Builder) -> Self {
  566    829   
            builder.build()
  567    830   
        }
  568    831   
    }
  569         -
    /// A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         832  +
    /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:130 */A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         833  +
    /* RustType.kt:516 */
  570    834   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         835  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  571    836   
    pub struct Builder {
         837  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:225 */
  572    838   
        pub(crate) list: ::std::option::Option<
  573    839   
            ::std::vec::Vec<
  574    840   
                ::std::vec::Vec<
  575    841   
                    ::std::vec::Vec<
  576    842   
                        ::std::collections::HashMap<
  577    843   
                            ::std::string::String,
  578    844   
                            crate::model::EmptyStructure,
  579    845   
                        >,
  580    846   
                    >,
  581    847   
                >,
  582    848   
            >,
  583    849   
        >,
         850  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:137 */
  584    851   
    }
         852  +
    /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  585    853   
    impl Builder {
         854  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:241 */
  586    855   
        #[allow(missing_docs)] // documentation missing in model
         856  +
                               /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  587    857   
        pub fn list(
  588    858   
            mut self,
  589    859   
            input: ::std::option::Option<
  590    860   
                ::std::vec::Vec<
  591    861   
                    ::std::vec::Vec<
  592    862   
                        ::std::vec::Vec<
  593    863   
                            ::std::collections::HashMap<
  594    864   
                                ::std::string::String,
  595    865   
                                crate::model::EmptyStructure,
  596    866   
                            >,
  597    867   
                        >,
  598    868   
                    >,
  599    869   
                >,
  600    870   
            >,
  601    871   
        ) -> Self {
  602         -
            self.list = input;
         872  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */
         873  +
            self.list =
         874  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:247 */input
         875  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:245 */;
  603    876   
            self
         877  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:244 */
  604    878   
        }
  605         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         879  +
        /// /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:150 */Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         880  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:159 */
  606    881   
        pub fn build(self) -> crate::output::TypeComplexityOperationOutput {
  607    882   
            self.build_enforcing_required_and_enum_traits()
  608    883   
        }
         884  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  609    885   
        fn build_enforcing_required_and_enum_traits(
  610    886   
            self,
  611    887   
        ) -> crate::output::TypeComplexityOperationOutput {
  612         -
            crate::output::TypeComplexityOperationOutput { list: self.list }
         888  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         889  +
            crate::output::TypeComplexityOperationOutput {
         890  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:186 */
         891  +
                list: self.list,
         892  +
                /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:182 */
         893  +
            }
         894  +
            /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:171 */
  613    895   
        }
         896  +
        /* ServerBuilderGeneratorWithoutPublicConstrainedTypes.kt:141 */
  614    897   
    }
         898  +
         899  +
    /* RustCrateInlineModuleComposingWriter.kt:299 */
  615    900   
}

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

@@ -1,1 +49,50 @@
   10     10   
pub(crate) mod shape_response_code_required_operation;
   11     11   
   12     12   
pub(crate) mod shape_type_complexity_operation;
   13     13   
   14     14   
pub(crate) mod shape_internal_server_error;
   15     15   
   16     16   
pub(crate) mod shape_required_header_collection_operation_input;
   17     17   
   18     18   
pub(crate) mod shape_required_header_collection_operation_output;
   19     19   
          20  +
/* JsonParserGenerator.kt:227 */
   20     21   
pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
   21     22   
    if data.is_empty() {
   22     23   
        b"{}"
   23     24   
    } else {
   24     25   
        data
   25     26   
    }
   26     27   
}
   27     28   
   28     29   
pub(crate) mod shape_required_inner_shape_operation_output;
   29     30   

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_a_map.rs

@@ -1,1 +66,89 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:460 */
    2      3   
pub(crate) fn de_a_map<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<
    6      7   
        ::std::collections::HashMap<
    7      8   
            ::std::string::String,
    8      9   
            ::aws_smithy_http_server_python::types::DateTime,
    9     10   
        >,
   10     11   
    >,
   11     12   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   12     13   
>
   13     14   
where
   14     15   
    I: Iterator<
   15     16   
        Item = Result<
   16     17   
            ::aws_smithy_json::deserialize::Token<'a>,
   17     18   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   18     19   
        >,
   19     20   
    >,
   20     21   
{
          22  +
    /* JsonParserGenerator.kt:712 */
   21     23   
    match tokens.next().transpose()? {
          24  +
        /* JsonParserGenerator.kt:713 */
   22     25   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   23     26   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          27  +
            /* JsonParserGenerator.kt:469 */
   24     28   
            let mut map = ::std::collections::HashMap::new();
          29  +
            /* JsonParserGenerator.kt:684 */
   25     30   
            loop {
          31  +
                /* JsonParserGenerator.kt:685 */
   26     32   
                match tokens.next().transpose()? {
          33  +
                    /* JsonParserGenerator.kt:686 */
   27     34   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   28     35   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   29         -
                        let key = key.to_unescaped().map(|u| u.into_owned())?;
          36  +
                        /* JsonParserGenerator.kt:471 */
          37  +
                        let key =
          38  +
                            /* JsonParserGenerator.kt:339 */key.to_unescaped().map(|u|
          39  +
                                /* JsonParserGenerator.kt:348 */u.into_owned()
          40  +
                            /* JsonParserGenerator.kt:339 */)
          41  +
                        /* JsonParserGenerator.kt:471 */?;
          42  +
                        /* JsonParserGenerator.kt:474 */
   30     43   
                        let value =
   31         -
                            ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   32         -
                                tokens.next(),
   33         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   34         -
                            )?
   35         -
                            .map(::aws_smithy_http_server_python::types::DateTime::from);
          44  +
                            /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          45  +
                            /* PythonServerProtocolLoader.kt:44 */.map(::aws_smithy_http_server_python::types::DateTime::from)
          46  +
                        /* JsonParserGenerator.kt:474 */;
          47  +
                        /* JsonParserGenerator.kt:481 */
   36     48   
                        match value {
   37     49   
                            Some(value) => {
   38     50   
                                map.insert(key, value);
   39     51   
                            }
   40     52   
                            None => {
   41     53   
                                return Err(
   42     54   
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   43     55   
                                        "dense map cannot contain null values",
   44     56   
                                    ),
   45     57   
                                )
   46     58   
                            }
   47     59   
                        }
          60  +
                        /* JsonParserGenerator.kt:686 */
   48     61   
                    }
          62  +
                    /* JsonParserGenerator.kt:695 */
   49     63   
                    other => {
   50     64   
                        return Err(
   51     65   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   52     66   
                                format!("expected object key or end object, found: {:?}", other),
   53     67   
                            ),
   54     68   
                        )
   55         -
                    }
          69  +
                    } /* JsonParserGenerator.kt:685 */
   56     70   
                }
          71  +
                /* JsonParserGenerator.kt:684 */
   57     72   
            }
          73  +
            /* JsonParserGenerator.kt:504 */
   58     74   
            Ok(Some(map))
          75  +
            /* JsonParserGenerator.kt:713 */
   59     76   
        }
   60         -
        _ => Err(
   61         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   62         -
                "expected start object or null",
   63         -
            ),
   64         -
        ),
          77  +
        /* JsonParserGenerator.kt:722 */
          78  +
        _ => {
          79  +
            /* JsonParserGenerator.kt:723 */
          80  +
            Err(
          81  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          82  +
                    "expected start object or null",
          83  +
                ),
          84  +
            )
          85  +
            /* JsonParserGenerator.kt:722 */
          86  +
        } /* JsonParserGenerator.kt:712 */
   65     87   
    }
          88  +
    /* JsonParserGenerator.kt:460 */
   66     89   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_a_string_list.rs

@@ -1,1 +52,78 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_list<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::string::String>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          22  +
            /* JsonParserGenerator.kt:407 */
   19     23   
            let mut items = Vec::new();
          24  +
            /* JsonParserGenerator.kt:408 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:409 */
   21     27   
                match tokens.peek() {
          28  +
                    /* JsonParserGenerator.kt:410 */
   22     29   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          30  +
                        /* JsonParserGenerator.kt:411 */
   23     31   
                        tokens.next().transpose().unwrap();
   24     32   
                        break;
          33  +
                        /* JsonParserGenerator.kt:410 */
   25     34   
                    }
          35  +
                    /* JsonParserGenerator.kt:413 */
   26     36   
                    _ => {
   27         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?
   30         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   31         -
                        .transpose()?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */)
          43  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                        /* JsonParserGenerator.kt:419 */;
          45  +
                        /* JsonParserGenerator.kt:422 */
   32     46   
                        if let Some(value) = value {
   33     47   
                            items.push(value);
   34         -
                        } else {
          48  +
                        }
          49  +
                        /* JsonParserGenerator.kt:430 */
          50  +
                        else {
   35     51   
                            return Err(
   36     52   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                    "dense list cannot contain null values",
   38     54   
                                ),
   39     55   
                            );
   40     56   
                        }
   41         -
                    }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   42     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   43     61   
            }
          62  +
            /* JsonParserGenerator.kt:446 */
   44     63   
            Ok(Some(items))
          64  +
            /* JsonParserGenerator.kt:713 */
   45     65   
        }
   46         -
        _ => Err(
   47         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
                "expected start array or null",
   49         -
            ),
   50         -
        ),
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
          70  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          71  +
                    "expected start array or null",
          72  +
                ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   51     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   52     78   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_a_string_set.rs

@@ -1,1 +52,78 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:398 */
    2      3   
pub(crate) fn de_a_string_set<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<::std::vec::Vec<::std::string::String>>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartArray { .. }) => {
          22  +
            /* JsonParserGenerator.kt:407 */
   19     23   
            let mut items = Vec::new();
          24  +
            /* JsonParserGenerator.kt:408 */
   20     25   
            loop {
          26  +
                /* JsonParserGenerator.kt:409 */
   21     27   
                match tokens.peek() {
          28  +
                    /* JsonParserGenerator.kt:410 */
   22     29   
                    Some(Ok(::aws_smithy_json::deserialize::Token::EndArray { .. })) => {
          30  +
                        /* JsonParserGenerator.kt:411 */
   23     31   
                        tokens.next().transpose().unwrap();
   24     32   
                        break;
          33  +
                        /* JsonParserGenerator.kt:410 */
   25     34   
                    }
          35  +
                    /* JsonParserGenerator.kt:413 */
   26     36   
                    _ => {
   27         -
                        let value = ::aws_smithy_json::deserialize::token::expect_string_or_null(
   28         -
                            tokens.next(),
   29         -
                        )?
   30         -
                        .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   31         -
                        .transpose()?;
          37  +
                        /* JsonParserGenerator.kt:419 */
          38  +
                        let value =
          39  +
                            /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                    /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                /* JsonParserGenerator.kt:339 */)
          43  +
                            /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                        /* JsonParserGenerator.kt:419 */;
          45  +
                        /* JsonParserGenerator.kt:422 */
   32     46   
                        if let Some(value) = value {
   33     47   
                            items.push(value);
   34         -
                        } else {
          48  +
                        }
          49  +
                        /* JsonParserGenerator.kt:430 */
          50  +
                        else {
   35     51   
                            return Err(
   36     52   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   37     53   
                                    "dense list cannot contain null values",
   38     54   
                                ),
   39     55   
                            );
   40     56   
                        }
   41         -
                    }
          57  +
                        /* JsonParserGenerator.kt:413 */
          58  +
                    } /* JsonParserGenerator.kt:409 */
   42     59   
                }
          60  +
                /* JsonParserGenerator.kt:408 */
   43     61   
            }
          62  +
            /* JsonParserGenerator.kt:446 */
   44     63   
            Ok(Some(items))
          64  +
            /* JsonParserGenerator.kt:713 */
   45     65   
        }
   46         -
        _ => Err(
   47         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   48         -
                "expected start array or null",
   49         -
            ),
   50         -
        ),
          66  +
        /* JsonParserGenerator.kt:722 */
          67  +
        _ => {
          68  +
            /* JsonParserGenerator.kt:723 */
          69  +
            Err(
          70  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          71  +
                    "expected start array or null",
          72  +
                ),
          73  +
            )
          74  +
            /* JsonParserGenerator.kt:722 */
          75  +
        } /* JsonParserGenerator.kt:712 */
   51     76   
    }
          77  +
    /* JsonParserGenerator.kt:398 */
   52     78   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_a_union.rs

@@ -1,1 +137,181 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:551 */
    2      3   
pub(crate) fn de_a_union<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::AUnion>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:565 */
   16     18   
    let mut variant = None;
          19  +
    /* JsonParserGenerator.kt:567 */
   17     20   
    match tokens.next().transpose()? {
          21  +
        /* JsonParserGenerator.kt:568 */
   18     22   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => return Ok(None),
   19         -
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => loop {
   20         -
            match tokens.next().transpose()? {
   21         -
                Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   22         -
                Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
   23         -
                    if let ::std::option::Option::Some(::std::result::Result::Ok(
   24         -
                        ::aws_smithy_json::deserialize::Token::ValueNull { .. },
   25         -
                    )) = tokens.peek()
   26         -
                    {
   27         -
                        let _ = tokens.next().expect("peek returned a token")?;
   28         -
                        continue;
   29         -
                    }
   30         -
                    let key = key.to_unescaped()?;
   31         -
                    if key == "__type" {
   32         -
                        ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
   33         -
                        continue;
   34         -
                    }
   35         -
                    if variant.is_some() {
   36         -
                        return Err(
   37         -
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   38         -
                                "encountered mixed variants in union",
   39         -
                            ),
   40         -
                        );
   41         -
                    }
   42         -
                    variant = match key.as_ref() {
   43         -
                        "i32" => Some(crate::model::AUnion::I32(
   44         -
                            ::aws_smithy_json::deserialize::token::expect_number_or_null(
   45         -
                                tokens.next(),
   46         -
                            )?
   47         -
                            .map(i32::try_from)
   48         -
                            .transpose()?
   49         -
                            .ok_or_else(|| {
   50         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   51         -
                                    "value for 'i32' cannot be null",
   52         -
                                )
   53         -
                            })?,
   54         -
                        )),
   55         -
                        "string" => Some(crate::model::AUnion::String(
   56         -
                            ::aws_smithy_json::deserialize::token::expect_string_or_null(
   57         -
                                tokens.next(),
   58         -
                            )?
   59         -
                            .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   60         -
                            .transpose()?
   61         -
                            .ok_or_else(|| {
   62         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   63         -
                                    "value for 'string' cannot be null",
   64         -
                                )
   65         -
                            })?,
   66         -
                        )),
   67         -
                        "time" => Some(crate::model::AUnion::Time(
   68         -
                            ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
   69         -
                                tokens.next(),
   70         -
                                ::aws_smithy_types::date_time::Format::EpochSeconds,
   71         -
                            )?
   72         -
                            .map(::aws_smithy_http_server_python::types::DateTime::from)
   73         -
                            .ok_or_else(|| {
   74         -
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   75         -
                                    "value for 'time' cannot be null",
   76         -
                                )
   77         -
                            })?,
   78         -
                        )),
   79         -
                        variant => {
          23  +
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          24  +
            /* JsonParserGenerator.kt:684 */
          25  +
            loop {
          26  +
                /* JsonParserGenerator.kt:685 */
          27  +
                match tokens.next().transpose()? {
          28  +
                    /* JsonParserGenerator.kt:686 */
          29  +
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
          30  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          31  +
                        /* JsonParserGenerator.kt:576 */
          32  +
                        if let ::std::option::Option::Some(::std::result::Result::Ok(
          33  +
                            ::aws_smithy_json::deserialize::Token::ValueNull { .. },
          34  +
                        )) = tokens.peek()
          35  +
                        {
          36  +
                            let _ = tokens.next().expect("peek returned a token")?;
          37  +
                            continue;
          38  +
                        }
          39  +
                        /* JsonParserGenerator.kt:585 */
          40  +
                        let key = key.to_unescaped()?;
          41  +
                        if key == "__type" {
          42  +
                            ::aws_smithy_json::deserialize::token::skip_value(tokens)?;
          43  +
                            continue;
          44  +
                        }
          45  +
                        if variant.is_some() {
   80     46   
                            return Err(
   81     47   
                                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   82         -
                                    format!("unexpected union variant: {}", variant),
          48  +
                                    "encountered mixed variants in union",
   83     49   
                                ),
   84         -
                            )
          50  +
                            );
   85     51   
                        }
   86         -
                    };
   87         -
                }
   88         -
                other => {
   89         -
                    return Err(
   90         -
                        ::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
   91         -
                            "expected object key or end object, found: {:?}",
   92         -
                            other
   93         -
                        )),
   94         -
                    )
          52  +
                        /* JsonParserGenerator.kt:598 */
          53  +
                        variant = match key.as_ref() {
          54  +
                            /* JsonParserGenerator.kt:601 */
          55  +
                            "i32" => {
          56  +
                                /* JsonParserGenerator.kt:611 */
          57  +
                                Some(crate::model::AUnion::I32(
          58  +
                                    /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          59  +
                                                        .map(i32::try_from)
          60  +
                                                        .transpose()?
          61  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'i32' cannot be null"))?
          62  +
                                /* JsonParserGenerator.kt:611 */))
          63  +
                                /* JsonParserGenerator.kt:601 */
          64  +
                            }
          65  +
                            /* JsonParserGenerator.kt:601 */
          66  +
                            "string" => {
          67  +
                                /* JsonParserGenerator.kt:611 */
          68  +
                                Some(crate::model::AUnion::String(
          69  +
                                    /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          70  +
                                        /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          71  +
                                            /* JsonParserGenerator.kt:348 */u.into_owned()
          72  +
                                        /* JsonParserGenerator.kt:339 */)
          73  +
                                    /* JsonParserGenerator.kt:354 */).transpose()?
          74  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'string' cannot be null"))?
          75  +
                                /* JsonParserGenerator.kt:611 */))
          76  +
                                /* JsonParserGenerator.kt:601 */
          77  +
                            }
          78  +
                            /* JsonParserGenerator.kt:601 */
          79  +
                            "time" => {
          80  +
                                /* JsonParserGenerator.kt:611 */
          81  +
                                Some(crate::model::AUnion::Time(
          82  +
                                    /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
          83  +
                                    /* PythonServerProtocolLoader.kt:44 */.map(::aws_smithy_http_server_python::types::DateTime::from)
          84  +
                                    /* JsonParserGenerator.kt:670 */.ok_or_else(|| ::aws_smithy_json::deserialize::error::DeserializeError::custom("value for 'time' cannot be null"))?
          85  +
                                /* JsonParserGenerator.kt:611 */))
          86  +
                                /* JsonParserGenerator.kt:601 */
          87  +
                            }
          88  +
                            /* JsonParserGenerator.kt:634 */
          89  +
                            variant => {
          90  +
                                return Err(
          91  +
                                    ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          92  +
                                        format!("unexpected union variant: {}", variant),
          93  +
                                    ),
          94  +
                                )
          95  +
                            } /* JsonParserGenerator.kt:598 */
          96  +
                        };
          97  +
                        /* JsonParserGenerator.kt:686 */
          98  +
                    }
          99  +
                    /* JsonParserGenerator.kt:695 */
         100  +
                    other => {
         101  +
                        return Err(
         102  +
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         103  +
                                format!("expected object key or end object, found: {:?}", other),
         104  +
                            ),
         105  +
                        )
         106  +
                    } /* JsonParserGenerator.kt:685 */
   95    107   
                }
         108  +
                /* JsonParserGenerator.kt:684 */
   96    109   
            }
   97         -
        },
         110  +
            /* JsonParserGenerator.kt:568 */
         111  +
        }
         112  +
        /* JsonParserGenerator.kt:642 */
   98    113   
        _ => {
   99    114   
            return Err(
  100    115   
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  101    116   
                    "expected start object or null",
  102    117   
                ),
  103    118   
            )
  104         -
        }
         119  +
        } /* JsonParserGenerator.kt:567 */
  105    120   
    }
         121  +
    /* JsonParserGenerator.kt:649 */
  106    122   
    if variant.is_none() {
  107    123   
        return Err(
  108    124   
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  109    125   
                "Union did not contain a valid variant.",
  110    126   
            ),
  111    127   
        );
  112    128   
    }
         129  +
    /* JsonParserGenerator.kt:657 */
  113    130   
    Ok(variant)
         131  +
    /* JsonParserGenerator.kt:551 */
  114    132   
}
  115    133   
         134  +
/* JsonSerializerGenerator.kt:547 */
  116    135   
pub fn ser_a_union(
  117    136   
    object_8: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  118    137   
    input: &crate::model::AUnion,
  119    138   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         139  +
    /* JsonSerializerGenerator.kt:556 */
  120    140   
    match input {
         141  +
        /* JsonSerializerGenerator.kt:564 */
  121    142   
        crate::model::AUnion::I32(inner) => {
  122         -
            object_8.key("i32").number(
  123         -
                #[allow(clippy::useless_conversion)]
  124         -
                ::aws_smithy_types::Number::NegInt((*inner).into()),
  125         -
            );
         143  +
            /* SerializerUtil.kt:42 */
         144  +
            {
         145  +
                /* JsonSerializerGenerator.kt:432 */
         146  +
                object_8.key("i32").number(
         147  +
                    #[allow(clippy::useless_conversion)]
         148  +
                    ::aws_smithy_types::Number::NegInt((*inner).into()),
         149  +
                );
         150  +
                /* SerializerUtil.kt:42 */
         151  +
            }
         152  +
            /* JsonSerializerGenerator.kt:564 */
  126    153   
        }
         154  +
        /* JsonSerializerGenerator.kt:564 */
  127    155   
        crate::model::AUnion::String(inner) => {
  128         -
            object_8.key("string").string(inner.as_str());
         156  +
            /* SerializerUtil.kt:42 */
         157  +
            {
         158  +
                /* JsonSerializerGenerator.kt:423 */
         159  +
                object_8.key("string").string(inner.as_str());
         160  +
                /* SerializerUtil.kt:42 */
         161  +
            }
         162  +
            /* JsonSerializerGenerator.kt:564 */
  129    163   
        }
         164  +
        /* JsonSerializerGenerator.kt:564 */
  130    165   
        crate::model::AUnion::Time(inner) => {
  131         -
            object_8
  132         -
                .key("time")
  133         -
                .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         166  +
            /* SerializerUtil.kt:42 */
         167  +
            {
         168  +
                /* JsonSerializerGenerator.kt:448 */
         169  +
                object_8
         170  +
                    .key("time")
         171  +
                    .date_time(inner, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         172  +
                /* SerializerUtil.kt:42 */
         173  +
            }
         174  +
            /* JsonSerializerGenerator.kt:564 */
  134    175   
        }
         176  +
        /* JsonSerializerGenerator.kt:556 */
  135    177   
    }
         178  +
    /* JsonSerializerGenerator.kt:576 */
  136    179   
    Ok(())
         180  +
    /* JsonSerializerGenerator.kt:547 */
  137    181   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_empty_structure.rs

@@ -1,1 +37,54 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonSerializerGenerator.kt:358 */
    2      3   
pub fn ser_empty_structure(
    3      4   
    #[allow(unused_variables)] object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
    4      5   
    #[allow(unused_variables)] input: &crate::model::EmptyStructure,
    5      6   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
           7  +
    /* JsonSerializerGenerator.kt:372 */
    6      8   
    Ok(())
           9  +
    /* JsonSerializerGenerator.kt:358 */
    7     10   
}
    8     11   
          12  +
/* JsonParserGenerator.kt:516 */
    9     13   
pub(crate) fn de_empty_structure<'a, I>(
   10     14   
    tokens: &mut ::std::iter::Peekable<I>,
   11     15   
) -> ::std::result::Result<
   12     16   
    Option<crate::model::EmptyStructure>,
   13     17   
    ::aws_smithy_json::deserialize::error::DeserializeError,
   14     18   
>
   15     19   
where
   16     20   
    I: Iterator<
   17     21   
        Item = Result<
   18     22   
            ::aws_smithy_json::deserialize::Token<'a>,
   19     23   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   20     24   
        >,
   21     25   
    >,
   22     26   
{
          27  +
    /* JsonParserGenerator.kt:712 */
   23     28   
    match tokens.next().transpose()? {
          29  +
        /* JsonParserGenerator.kt:713 */
   24     30   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   25     31   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          32  +
            /* RustType.kt:516 */
   26     33   
            #[allow(unused_mut)]
          34  +
            /* JsonParserGenerator.kt:526 */
   27     35   
            let mut builder = crate::model::empty_structure_internal::Builder::default();
          36  +
            /* JsonParserGenerator.kt:682 */
   28     37   
            ::aws_smithy_json::deserialize::token::skip_to_end(tokens)?;
          38  +
            /* JsonParserGenerator.kt:540 */
   29     39   
            Ok(Some(builder.build()))
          40  +
            /* JsonParserGenerator.kt:713 */
   30     41   
        }
   31         -
        _ => Err(
   32         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   33         -
                "expected start object or null",
   34         -
            ),
   35         -
        ),
          42  +
        /* JsonParserGenerator.kt:722 */
          43  +
        _ => {
          44  +
            /* JsonParserGenerator.kt:723 */
          45  +
            Err(
          46  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          47  +
                    "expected start object or null",
          48  +
                ),
          49  +
            )
          50  +
            /* JsonParserGenerator.kt:722 */
          51  +
        } /* JsonParserGenerator.kt:712 */
   36     52   
    }
          53  +
    /* JsonParserGenerator.kt:516 */
   37     54   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_inner_shape.rs

@@ -1,1 +69,102 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_inner_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::inner_shape_internal::Builder>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::inner_shape_internal::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24     32   
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
   25     34   
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
   26     36   
                            "requiredInnerMostShape" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
   27     38   
                                if let Some(v) =
   28         -
                                crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?
   29         -
                                {
          39  +
                                /* JsonParserGenerator.kt:544 */crate::protocol_serde::shape_innermost_shape::de_innermost_shape(tokens)?
          40  +
                                /* JsonParserGenerator.kt:278 */{
   30     41   
                                                                            builder = builder.set_required_inner_most_shape(v);
   31     42   
                                                                        }
          43  +
                                /* JsonParserGenerator.kt:262 */
   32     44   
                            }
   33         -
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
          45  +
                            /* JsonParserGenerator.kt:290 */
          46  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
   34     47   
                        }
          48  +
                        /* JsonParserGenerator.kt:686 */
   35     49   
                    }
          50  +
                    /* JsonParserGenerator.kt:695 */
   36     51   
                    other => {
   37     52   
                        return Err(
   38     53   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   39     54   
                                format!("expected object key or end object, found: {:?}", other),
   40     55   
                            ),
   41     56   
                        )
   42         -
                    }
          57  +
                    } /* JsonParserGenerator.kt:685 */
   43     58   
                }
          59  +
                /* JsonParserGenerator.kt:684 */
   44     60   
            }
          61  +
            /* JsonParserGenerator.kt:540 */
   45     62   
            Ok(Some(builder))
          63  +
            /* JsonParserGenerator.kt:713 */
   46     64   
        }
   47         -
        _ => Err(
   48         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
   49         -
                "expected start object or null",
   50         -
            ),
   51         -
        ),
          65  +
        /* JsonParserGenerator.kt:722 */
          66  +
        _ => {
          67  +
            /* JsonParserGenerator.kt:723 */
          68  +
            Err(
          69  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
          70  +
                    "expected start object or null",
          71  +
                ),
          72  +
            )
          73  +
            /* JsonParserGenerator.kt:722 */
          74  +
        } /* JsonParserGenerator.kt:712 */
   52     75   
    }
          76  +
    /* JsonParserGenerator.kt:516 */
   53     77   
}
   54     78   
          79  +
/* JsonSerializerGenerator.kt:358 */
   55     80   
pub fn ser_inner_shape(
   56     81   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
   57     82   
    input: &crate::model::InnerShape,
   58     83   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
          84  +
    /* SerializerUtil.kt:42 */
   59     85   
    {
          86  +
        /* JsonSerializerGenerator.kt:495 */
   60     87   
        #[allow(unused_mut)]
          88  +
        /* JsonSerializerGenerator.kt:496 */
   61     89   
        let mut object_1 = object.key("requiredInnerMostShape").start_object();
          90  +
        /* JsonSerializerGenerator.kt:375 */
   62     91   
        crate::protocol_serde::shape_innermost_shape::ser_innermost_shape(
   63     92   
            &mut object_1,
   64     93   
            &input.required_inner_most_shape,
   65     94   
        )?;
          95  +
        /* JsonSerializerGenerator.kt:515 */
   66     96   
        object_1.finish();
          97  +
        /* SerializerUtil.kt:42 */
   67     98   
    }
          99  +
    /* JsonSerializerGenerator.kt:372 */
   68    100   
    Ok(())
         101  +
    /* JsonSerializerGenerator.kt:358 */
   69    102   
}

tmp-codegen-diff/codegen-server-test-python/misc/rust-server-codegen-python/src/protocol_serde/shape_innermost_shape.rs

@@ -1,1 +293,408 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/* JsonParserGenerator.kt:516 */
    2      3   
pub(crate) fn de_innermost_shape<'a, I>(
    3      4   
    tokens: &mut ::std::iter::Peekable<I>,
    4      5   
) -> ::std::result::Result<
    5      6   
    Option<crate::model::innermost_shape_internal::Builder>,
    6      7   
    ::aws_smithy_json::deserialize::error::DeserializeError,
    7      8   
>
    8      9   
where
    9     10   
    I: Iterator<
   10     11   
        Item = Result<
   11     12   
            ::aws_smithy_json::deserialize::Token<'a>,
   12     13   
            ::aws_smithy_json::deserialize::error::DeserializeError,
   13     14   
        >,
   14     15   
    >,
   15     16   
{
          17  +
    /* JsonParserGenerator.kt:712 */
   16     18   
    match tokens.next().transpose()? {
          19  +
        /* JsonParserGenerator.kt:713 */
   17     20   
        Some(::aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
   18     21   
        Some(::aws_smithy_json::deserialize::Token::StartObject { .. }) => {
          22  +
            /* RustType.kt:516 */
   19     23   
            #[allow(unused_mut)]
          24  +
            /* JsonParserGenerator.kt:526 */
   20     25   
            let mut builder = crate::model::innermost_shape_internal::Builder::default();
          26  +
            /* JsonParserGenerator.kt:684 */
   21     27   
            loop {
          28  +
                /* JsonParserGenerator.kt:685 */
   22     29   
                match tokens.next().transpose()? {
          30  +
                    /* JsonParserGenerator.kt:686 */
   23     31   
                    Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
   24         -
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key
   25         -
                        .to_unescaped()?
   26         -
                        .as_ref()
   27         -
                    {
   28         -
                        "aString" => {
   29         -
                            if let Some(v) =
   30         -
                                ::aws_smithy_json::deserialize::token::expect_string_or_null(
   31         -
                                    tokens.next(),
   32         -
                                )?
   33         -
                                .map(|s| s.to_unescaped().map(|u| u.into_owned()))
   34         -
                                .transpose()?
   35         -
                            {
   36         -
                                builder = builder.set_a_string(v);
          32  +
                    Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
          33  +
                        /* JsonParserGenerator.kt:260 */
          34  +
                        match key.to_unescaped()?.as_ref() {
          35  +
                            /* JsonParserGenerator.kt:262 */
          36  +
                            "aString" => {
          37  +
                                /* JsonParserGenerator.kt:276 */
          38  +
                                if let Some(v) =
          39  +
                                /* JsonParserGenerator.kt:354 */::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?.map(|s|
          40  +
                                    /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
          41  +
                                        /* JsonParserGenerator.kt:348 */u.into_owned()
          42  +
                                    /* JsonParserGenerator.kt:339 */)
          43  +
                                /* JsonParserGenerator.kt:354 */).transpose()?
          44  +
                                /* JsonParserGenerator.kt:278 */{
          45  +
                                                                            builder = builder.set_a_string(v);
          46  +
                                                                        }
          47  +
                                /* JsonParserGenerator.kt:262 */
   37     48   
                            }
   38         -
                        }
   39         -
                        "aBoolean" => {
   40         -
                            if let Some(v) =
   41         -
                                ::aws_smithy_json::deserialize::token::expect_bool_or_null(
   42         -
                                    tokens.next(),
   43         -
                                )?
   44         -
                            {
   45         -
                                builder = builder.set_a_boolean(v);
          49  +
                            /* JsonParserGenerator.kt:262 */
          50  +
                            "aBoolean" => {
          51  +
                                /* JsonParserGenerator.kt:276 */
          52  +
                                if let Some(v) =
          53  +
                                /* JsonParserGenerator.kt:298 */::aws_smithy_json::deserialize::token::expect_bool_or_null(tokens.next())?
          54  +
                                /* JsonParserGenerator.kt:278 */{
          55  +
                                                                            builder = builder.set_a_boolean(v);
          56  +
                                                                        }
          57  +
                                /* JsonParserGenerator.kt:262 */
   46     58   
                            }
   47         -
                        }
   48         -
                        "aByte" => {
   49         -
                            if let Some(v) =
   50         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   51         -
                                    tokens.next(),
   52         -
                                )?
   53         -
                                .map(i8::try_from)
   54         -
                                .transpose()?
   55         -
                            {
   56         -
                                builder = builder.set_a_byte(v);
          59  +
                            /* JsonParserGenerator.kt:262 */
          60  +
                            "aByte" => {
          61  +
                                /* JsonParserGenerator.kt:276 */
          62  +
                                if let Some(v) =
          63  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          64  +
                                                    .map(i8::try_from)
          65  +
                                                    .transpose()?
          66  +
                                /* JsonParserGenerator.kt:278 */{
          67  +
                                                                            builder = builder.set_a_byte(v);
          68  +
                                                                        }
          69  +
                                /* JsonParserGenerator.kt:262 */
   57     70   
                            }
   58         -
                        }
   59         -
                        "aShort" => {
   60         -
                            if let Some(v) =
   61         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   62         -
                                    tokens.next(),
   63         -
                                )?
   64         -
                                .map(i16::try_from)
   65         -
                                .transpose()?
   66         -
                            {
   67         -
                                builder = builder.set_a_short(v);
          71  +
                            /* JsonParserGenerator.kt:262 */
          72  +
                            "aShort" => {
          73  +
                                /* JsonParserGenerator.kt:276 */
          74  +
                                if let Some(v) =
          75  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          76  +
                                                    .map(i16::try_from)
          77  +
                                                    .transpose()?
          78  +
                                /* JsonParserGenerator.kt:278 */{
          79  +
                                                                            builder = builder.set_a_short(v);
          80  +
                                                                        }
          81  +
                                /* JsonParserGenerator.kt:262 */
   68     82   
                            }
   69         -
                        }
   70         -
                        "anInt" => {
   71         -
                            if let Some(v) =
   72         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   73         -
                                    tokens.next(),
   74         -
                                )?
   75         -
                                .map(i32::try_from)
   76         -
                                .transpose()?
   77         -
                            {
   78         -
                                builder = builder.set_an_int(v);
          83  +
                            /* JsonParserGenerator.kt:262 */
          84  +
                            "anInt" => {
          85  +
                                /* JsonParserGenerator.kt:276 */
          86  +
                                if let Some(v) =
          87  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
          88  +
                                                    .map(i32::try_from)
          89  +
                                                    .transpose()?
          90  +
                                /* JsonParserGenerator.kt:278 */{
          91  +
                                                                            builder = builder.set_an_int(v);
          92  +
                                                                        }
          93  +
                                /* JsonParserGenerator.kt:262 */
   79     94   
                            }
   80         -
                        }
   81         -
                        "aLong" => {
   82         -
                            if let Some(v) =
   83         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   84         -
                                    tokens.next(),
   85         -
                                )?
   86         -
                                .map(i64::try_from)
   87         -
                                .transpose()?
   88         -
                            {
   89         -
                                builder = builder.set_a_long(v);
          95  +
                            /* JsonParserGenerator.kt:262 */
          96  +
                            "aLong" => {
          97  +
                                /* JsonParserGenerator.kt:276 */
          98  +
                                if let Some(v) =
          99  +
                                /* JsonParserGenerator.kt:365 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
         100  +
                                                    .map(i64::try_from)
         101  +
                                                    .transpose()?
         102  +
                                /* JsonParserGenerator.kt:278 */{
         103  +
                                                                            builder = builder.set_a_long(v);
         104  +
                                                                        }
         105  +
                                /* JsonParserGenerator.kt:262 */
   90    106   
                            }
   91         -
                        }
   92         -
                        "aFloat" => {
   93         -
                            if let Some(v) =
   94         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
   95         -
                                    tokens.next(),
   96         -
                                )?
   97         -
                                .map(|v| v.to_f32_lossy())
   98         -
                            {
   99         -
                                builder = builder.set_a_float(v);
         107  +
                            /* JsonParserGenerator.kt:262 */
         108  +
                            "aFloat" => {
         109  +
                                /* JsonParserGenerator.kt:276 */
         110  +
                                if let Some(v) =
         111  +
                                /* JsonParserGenerator.kt:361 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f32_lossy())
         112  +
                                /* JsonParserGenerator.kt:278 */{
         113  +
                                                                            builder = builder.set_a_float(v);
         114  +
                                                                        }
         115  +
                                /* JsonParserGenerator.kt:262 */
  100    116   
                            }
  101         -
                        }
  102         -
                        "aDouble" => {
  103         -
                            if let Some(v) =
  104         -
                                ::aws_smithy_json::deserialize::token::expect_number_or_null(
  105         -
                                    tokens.next(),
  106         -
                                )?
  107         -
                                .map(|v| v.to_f64_lossy())
  108         -
                            {
  109         -
                                builder = builder.set_a_double(v);
         117  +
                            /* JsonParserGenerator.kt:262 */
         118  +
                            "aDouble" => {
         119  +
                                /* JsonParserGenerator.kt:276 */
         120  +
                                if let Some(v) =
         121  +
                                /* JsonParserGenerator.kt:363 */::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?.map(|v| v.to_f64_lossy())
         122  +
                                /* JsonParserGenerator.kt:278 */{
         123  +
                                                                            builder = builder.set_a_double(v);
         124  +
                                                                        }
         125  +
                                /* JsonParserGenerator.kt:262 */
  110    126   
                            }
  111         -
                        }
  112         -
                        "aTimestamp" => {
  113         -
                            if let Some(v) =
  114         -
                                ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  115         -
                                    tokens.next(),
  116         -
                                    ::aws_smithy_types::date_time::Format::EpochSeconds,
  117         -
                                )?
  118         -
                                .map(::aws_smithy_http_server_python::types::DateTime::from)
  119         -
                            {
  120         -
                                builder = builder.set_a_timestamp(v);
         127  +
                            /* JsonParserGenerator.kt:262 */
         128  +
                            "aTimestamp" => {
         129  +
                                /* JsonParserGenerator.kt:276 */
         130  +
                                if let Some(v) =
         131  +
                                /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
         132  +
                                /* PythonServerProtocolLoader.kt:44 */.map(::aws_smithy_http_server_python::types::DateTime::from)
         133  +
                                /* JsonParserGenerator.kt:278 */{
         134  +
                                                                            builder = builder.set_a_timestamp(v);
         135  +
                                                                        }
         136  +
                                /* JsonParserGenerator.kt:262 */
  121    137   
                            }
  122         -
                        }
  123         -
                        "aDocument" => {
  124         -
                            if let Some(v) =
  125         -
                                ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
  126         -
                                    tokens.next(),
  127         -
                                    ::aws_smithy_types::date_time::Format::EpochSeconds,
  128         -
                                )?
  129         -
                                .map(::aws_smithy_http_server_python::types::DateTime::from)
  130         -
                            {
  131         -
                                builder = builder.set_a_document(v);
         138  +
                            /* JsonParserGenerator.kt:262 */
         139  +
                            "aDocument" => {
         140  +
                                /* JsonParserGenerator.kt:276 */
         141  +
                                if let Some(v) =
         142  +
                                /* JsonParserGenerator.kt:384 */::aws_smithy_json::deserialize::token::expect_timestamp_or_null(tokens.next(), ::aws_smithy_types::date_time::Format::EpochSeconds)?
         143  +
                                /* PythonServerProtocolLoader.kt:44 */.map(::aws_smithy_http_server_python::types::DateTime::from)
         144  +
                                /* JsonParserGenerator.kt:278 */{
         145  +
                                                                            builder = builder.set_a_document(v);
         146  +
                                                                        }
         147  +
                                /* JsonParserGenerator.kt:262 */
  132    148   
                            }
  133         -
                        }
  134         -
                        "aStringList" => {
  135         -
                            if let Some(v) =
  136         -
                                crate::protocol_serde::shape_a_string_list::de_a_string_list(
  137         -
                                    tokens,
  138         -
                                )?
  139         -
                            {
  140         -
                                builder = builder.set_a_string_list(v);
         149  +
                            /* JsonParserGenerator.kt:262 */
         150  +
                            "aStringList" => {
         151  +
                                /* JsonParserGenerator.kt:276 */
         152  +
                                if let Some(v) =
         153  +
                                /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_a_string_list::de_a_string_list(tokens)?
         154  +
                                /* JsonParserGenerator.kt:278 */{
         155  +
                                                                            builder = builder.set_a_string_list(v);
         156  +
                                                                        }
         157  +
                                /* JsonParserGenerator.kt:262 */
  141    158   
                            }
  142         -
                        }
  143         -
                        "aStringMap" => {
  144         -
                            if let Some(v) = crate::protocol_serde::shape_a_map::de_a_map(tokens)? {
  145         -
                                builder = builder.set_a_string_map(v);
         159  +
                            /* JsonParserGenerator.kt:262 */
         160  +
                            "aStringMap" => {
         161  +
                                /* JsonParserGenerator.kt:276 */
         162  +
                                if let Some(v) =
         163  +
                                    /* JsonParserGenerator.kt:509 */
         164  +
                                    crate::protocol_serde::shape_a_map::de_a_map(tokens)?
         165  +
                                /* JsonParserGenerator.kt:278 */
         166  +
                                {
         167  +
                                    builder = builder.set_a_string_map(v);
         168  +
                                }
         169  +
                                /* JsonParserGenerator.kt:262 */
  146    170   
                            }
  147         -
                        }
  148         -
                        "aStringSet" => {
  149         -
                            if let Some(v) =
  150         -
                                crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?
  151         -
                            {
  152         -
                                builder = builder.set_a_string_set(v);
         171  +
                            /* JsonParserGenerator.kt:262 */
         172  +
                            "aStringSet" => {
         173  +
                                /* JsonParserGenerator.kt:276 */
         174  +
                                if let Some(v) =
         175  +
                                /* JsonParserGenerator.kt:451 */crate::protocol_serde::shape_a_string_set::de_a_string_set(tokens)?
         176  +
                                /* JsonParserGenerator.kt:278 */{
         177  +
                                                                            builder = builder.set_a_string_set(v);
         178  +
                                                                        }
         179  +
                                /* JsonParserGenerator.kt:262 */
  153    180   
                            }
  154         -
                        }
  155         -
                        "aBlob" => {
  156         -
                            if let Some(v) =
  157         -
                                ::aws_smithy_json::deserialize::token::expect_blob_or_null(
  158         -
                                    tokens.next(),
  159         -
                                )?
  160         -
                                .map(::aws_smithy_http_server_python::types::Blob::from)
  161         -
                            {
  162         -
                                builder = builder.set_a_blob(v);
         181  +
                            /* JsonParserGenerator.kt:262 */
         182  +
                            "aBlob" => {
         183  +
                                /* JsonParserGenerator.kt:276 */
         184  +
                                if let Some(v) =
         185  +
                                /* JsonParserGenerator.kt:326 */::aws_smithy_json::deserialize::token::expect_blob_or_null(tokens.next())?
         186  +
                                /* PythonServerProtocolLoader.kt:48 */.map(::aws_smithy_http_server_python::types::Blob::from)
         187  +
                                /* JsonParserGenerator.kt:278 */{
         188  +
                                                                            builder = builder.set_a_blob(v);
         189  +
                                                                        }
         190  +
                                /* JsonParserGenerator.kt:262 */
  163    191   
                            }
  164         -
                        }
  165         -
                        "aUnion" => {
  166         -
                            if let Some(v) =
  167         -
                                crate::protocol_serde::shape_a_union::de_a_union(tokens)?
  168         -
                            {
  169         -
                                builder = builder.set_a_union(v);
         192  +
                            /* JsonParserGenerator.kt:262 */
         193  +
                            "aUnion" => {
         194  +
                                /* JsonParserGenerator.kt:276 */
         195  +
                                if let Some(v) =
         196  +
                                    /* JsonParserGenerator.kt:660 */
         197  +
                                    crate::protocol_serde::shape_a_union::de_a_union(tokens)?
         198  +
                                /* JsonParserGenerator.kt:278 */
         199  +
                                {
         200  +
                                    builder = builder.set_a_union(v);
         201  +
                                }
         202  +
                                /* JsonParserGenerator.kt:262 */
  170    203   
                            }
         204  +
                            /* JsonParserGenerator.kt:290 */
         205  +
                            _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
  171    206   
                        }
  172         -
                        _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
  173         -
                    },
         207  +
                        /* JsonParserGenerator.kt:686 */
         208  +
                    }
         209  +
                    /* JsonParserGenerator.kt:695 */
  174    210   
                    other => {
  175    211   
                        return Err(
  176    212   
                            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  177    213   
                                format!("expected object key or end object, found: {:?}", other),
  178    214   
                            ),
  179    215   
                        )
  180         -
                    }
         216  +
                    } /* JsonParserGenerator.kt:685 */
  181    217   
                }
         218  +
                /* JsonParserGenerator.kt:684 */
  182    219   
            }
         220  +
            /* JsonParserGenerator.kt:540 */
  183    221   
            Ok(Some(builder))
         222  +
            /* JsonParserGenerator.kt:713 */
  184    223   
        }
  185         -
        _ => Err(
  186         -
            ::aws_smithy_json::deserialize::error::DeserializeError::custom(
  187         -
                "expected start object or null",
  188         -
            ),
  189         -
        ),
         224  +
        /* JsonParserGenerator.kt:722 */
         225  +
        _ => {
         226  +
            /* JsonParserGenerator.kt:723 */
         227  +
            Err(
         228  +
                ::aws_smithy_json::deserialize::error::DeserializeError::custom(
         229  +
                    "expected start object or null",
         230  +
                ),
         231  +
            )
         232  +
            /* JsonParserGenerator.kt:722 */
         233  +
        } /* JsonParserGenerator.kt:712 */
  190    234   
    }
         235  +
    /* JsonParserGenerator.kt:516 */
  191    236   
}
  192    237   
         238  +
/* JsonSerializerGenerator.kt:358 */
  193    239   
pub fn ser_innermost_shape(
  194    240   
    object: &mut ::aws_smithy_json::serialize::JsonObjectWriter,
  195    241   
    input: &crate::model::InnermostShape,
  196    242   
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
         243  +
    /* SerializerUtil.kt:42 */
  197    244   
    {
         245  +
        /* JsonSerializerGenerator.kt:423 */
  198    246   
        object.key("aString").string(input.a_string.as_str());
         247  +
        /* SerializerUtil.kt:42 */
  199    248   
    }
         249  +
    /* SerializerUtil.kt:42 */
  200    250   
    {
         251  +
        /* JsonSerializerGenerator.kt:424 */
  201    252   
        object.key("aBoolean").boolean(input.a_boolean);
         253  +
        /* SerializerUtil.kt:42 */
  202    254   
    }
         255  +
    /* SerializerUtil.kt:42 */
  203    256   
    {
         257  +
        /* JsonSerializerGenerator.kt:432 */
  204    258   
        object.key("aByte").number(
  205    259   
            #[allow(clippy::useless_conversion)]
  206    260   
            ::aws_smithy_types::Number::NegInt((input.a_byte).into()),
  207    261   
        );
         262  +
        /* SerializerUtil.kt:42 */
  208    263   
    }
         264  +
    /* SerializerUtil.kt:42 */
  209    265   
    {
         266  +
        /* JsonSerializerGenerator.kt:432 */
  210    267   
        object.key("aShort").number(
  211    268   
            #[allow(clippy::useless_conversion)]
  212    269   
            ::aws_smithy_types::Number::NegInt((input.a_short).into()),
  213    270   
        );
         271  +
        /* SerializerUtil.kt:42 */
  214    272   
    }
         273  +
    /* SerializerUtil.kt:42 */
  215    274   
    {
         275  +
        /* JsonSerializerGenerator.kt:432 */
  216    276   
        object.key("anInt").number(
  217    277   
            #[allow(clippy::useless_conversion)]
  218    278   
            ::aws_smithy_types::Number::NegInt((input.an_int).into()),
  219    279   
        );
         280  +
        /* SerializerUtil.kt:42 */
  220    281   
    }
         282  +
    /* SerializerUtil.kt:42 */
  221    283   
    {
         284  +
        /* JsonSerializerGenerator.kt:432 */
  222    285   
        object.key("aLong").number(
  223    286   
            #[allow(clippy::useless_conversion)]
  224    287   
            ::aws_smithy_types::Number::NegInt((input.a_long).into()),
  225    288   
        );
         289  +
        /* SerializerUtil.kt:42 */
  226    290   
    }
         291  +
    /* SerializerUtil.kt:42 */
  227    292   
    {
         293  +
        /* JsonSerializerGenerator.kt:432 */
  228    294   
        object.key("aFloat").number(
  229    295   
            #[allow(clippy::useless_conversion)]
  230    296   
            ::aws_smithy_types::Number::Float((input.a_float).into()),
  231    297   
        );
         298  +
        /* SerializerUtil.kt:42 */
  232    299   
    }
         300  +
    /* SerializerUtil.kt:42 */
  233    301   
    {
         302  +
        /* JsonSerializerGenerator.kt:432 */
  234    303   
        object.key("aDouble").number(
  235    304   
            #[allow(clippy::useless_conversion)]
  236    305   
            ::aws_smithy_types::Number::Float((input.a_double).into()),
  237    306   
        );
         307  +
        /* SerializerUtil.kt:42 */
  238    308   
    }
         309  +
    /* SerializerUtil.kt:42 */
  239    310   
    {
         311  +
        /* JsonSerializerGenerator.kt:448 */
  240    312   
        object.key("aTimestamp").date_time(
  241    313   
            &input.a_timestamp,
  242    314   
            ::aws_smithy_types::date_time::Format::EpochSeconds,
  243    315   
        )?;
         316  +
        /* SerializerUtil.kt:42 */
  244    317   
    }
         318  +
    /* SerializerUtil.kt:42 */
  245    319   
    {
         320  +
        /* JsonSerializerGenerator.kt:448 */
  246    321   
        object.key("aDocument").date_time(
  247    322   
            &input.a_document,
  248    323   
            ::aws_smithy_types::date_time::Format::EpochSeconds,
  249    324   
        )?;
         325  +
        /* SerializerUtil.kt:42 */
  250    326   
    }
         327  +
    /* SerializerUtil.kt:42 */
  251    328   
    {
         329  +
        /* JsonSerializerGenerator.kt:484 */
  252    330   
        let mut array_1 = object.key("aStringList").start_array();
         331  +
        /* JsonSerializerGenerator.kt:524 */
  253    332   
        for item_2 in &input.a_string_list {
         333  +
            /* SerializerUtil.kt:42 */
  254    334   
            {
         335  +
                /* JsonSerializerGenerator.kt:423 */
  255    336   
                array_1.value().string(item_2.as_str());
         337  +
                /* SerializerUtil.kt:42 */
  256    338   
            }
         339  +
            /* JsonSerializerGenerator.kt:524 */
  257    340   
        }
         341  +
        /* JsonSerializerGenerator.kt:486 */
  258    342   
        array_1.finish();
         343  +
        /* SerializerUtil.kt:42 */
  259    344   
    }
         345  +
    /* SerializerUtil.kt:42 */
  260    346   
    {
         347  +
        /* JsonSerializerGenerator.kt:495 */
  261    348   
        #[allow(unused_mut)]
         349  +
        /* JsonSerializerGenerator.kt:496 */
  262    350   
        let mut object_3 = object.key("aStringMap").start_object();
         351  +
        /* JsonSerializerGenerator.kt:537 */
  263    352   
        for (key_4, value_5) in &input.a_string_map {
         353  +
            /* SerializerUtil.kt:42 */
  264    354   
            {
         355  +
                /* JsonSerializerGenerator.kt:448 */
  265    356   
                object_3
  266    357   
                    .key(key_4.as_str())
  267    358   
                    .date_time(value_5, ::aws_smithy_types::date_time::Format::EpochSeconds)?;
         359  +
                /* SerializerUtil.kt:42 */
  268    360   
            }
         361  +
            /* JsonSerializerGenerator.kt:537 */
  269    362   
        }
         363  +
        /* JsonSerializerGenerator.kt:515 */
  270    364   
        object_3.finish();
         365  +
        /* SerializerUtil.kt:42 */
  271    366   
    }
         367  +
    /* SerializerUtil.kt:42 */
  272    368   
    {
         369  +
        /* JsonSerializerGenerator.kt:484 */
  273    370   
        let mut array_6 = object.key("aStringSet").start_array();
         371  +
        /* JsonSerializerGenerator.kt:524 */
  274    372   
        for item_7 in &input.a_string_set {
         373  +
            /* SerializerUtil.kt:42 */
  275    374   
            {
         375  +
                /* JsonSerializerGenerator.kt:423 */
  276    376   
                array_6.value().string(item_7.as_str());
         377  +
                /* SerializerUtil.kt:42 */
  277    378   
            }
         379  +
            /* JsonSerializerGenerator.kt:524 */
  278    380   
        }
         381  +
        /* JsonSerializerGenerator.kt:486 */
  279    382   
        array_6.finish();
         383  +
        /* SerializerUtil.kt:42 */
  280    384   
    }
         385  +
    /* SerializerUtil.kt:42 */
  281    386   
    {
         387  +
        /* JsonSerializerGenerator.kt:439 */
  282    388   
        object
  283    389   
            .key("aBlob")
  284    390   
            .string_unchecked(&::aws_smithy_types::base64::encode(&input.a_blob));
         391  +
        /* SerializerUtil.kt:42 */
  285    392   
    }
         393  +
    /* SerializerUtil.kt:42 */
  286    394   
    {
         395  +
        /* JsonSerializerGenerator.kt:495 */
  287    396   
        #[allow(unused_mut)]
         397  +
        /* JsonSerializerGenerator.kt:496 */
  288    398   
        let mut object_8 = object.key("aUnion").start_object();
         399  +
        /* JsonSerializerGenerator.kt:579 */
  289    400   
        crate::protocol_serde::shape_a_union::ser_a_union(&mut object_8, &input.a_union)?;
         401  +
        /* JsonSerializerGenerator.kt:515 */
  290    402   
        object_8.finish();
         403  +
        /* SerializerUtil.kt:42 */
  291    404   
    }
         405  +
    /* JsonSerializerGenerator.kt:372 */
  292    406   
    Ok(())
         407  +
    /* JsonSerializerGenerator.kt:358 */
  293    408   
}