Server Test Python

Server Test Python

rev. d838bf488731ae5e751cce0fe13f339a5b9be858 (ignoring whitespace)

Files changed:

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

@@ -1,1 +570,570 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
::pin_project_lite::pin_project! {
    3      3   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
    4         -
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
    5         -
    pub struct ResponseCodeDefaultOperationInputFuture {
    6         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
           4  +
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
           5  +
    pub struct TypeComplexityOperationInputFuture {
           6  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
    7      7   
    }
    8      8   
}
    9      9   
   10         -
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
          10  +
impl std::future::Future for TypeComplexityOperationInputFuture {
   11     11   
    type Output = Result<
   12         -
        crate::input::ResponseCodeDefaultOperationInput,
          12  +
        crate::input::TypeComplexityOperationInput,
   13     13   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
   14     14   
    >;
   15     15   
   16     16   
    fn poll(
   17     17   
        self: std::pin::Pin<&mut Self>,
   18     18   
        cx: &mut std::task::Context<'_>,
   19     19   
    ) -> std::task::Poll<Self::Output> {
   20     20   
        let this = self.project();
   21     21   
        this.inner.as_mut().poll(cx)
   22     22   
    }
   23     23   
}
   24     24   
   25     25   
impl<B>
   26     26   
    ::aws_smithy_legacy_http_server::request::FromRequest<
   27     27   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   28     28   
        B,
   29         -
    > for crate::input::ResponseCodeDefaultOperationInput
          29  +
    > for crate::input::TypeComplexityOperationInput
   30     30   
where
   31     31   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
   32     32   
    B: 'static,
   33     33   
   34     34   
    B::Data: Send,
   35     35   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
   36     36   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
   37     37   
{
   38     38   
    type Rejection =
   39     39   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
   40         -
    type Future = ResponseCodeDefaultOperationInputFuture;
          40  +
    type Future = TypeComplexityOperationInputFuture;
   41     41   
   42     42   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
   43     43   
        let fut = async move {
   44     44   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
   45     45   
                request.headers(),
   46     46   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
   47     47   
            ) {
   48     48   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
   49     49   
            }
   50         -
            crate::protocol_serde::shape_response_code_default_operation::de_response_code_default_operation_http_request(request)
          50  +
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_request(request)
   51     51   
                            .await
   52     52   
        };
   53     53   
        use ::futures_util::future::TryFutureExt;
   54     54   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
   55     55   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
   56     56   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
   57     57   
                    });
   58         -
        ResponseCodeDefaultOperationInputFuture {
          58  +
        TypeComplexityOperationInputFuture {
   59     59   
            inner: Box::pin(fut),
   60     60   
        }
   61     61   
    }
   62     62   
}
   63     63   
impl
   64     64   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
   65     65   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   66         -
    > for crate::output::ResponseCodeDefaultOperationOutput
          66  +
    > for crate::output::TypeComplexityOperationOutput
   67     67   
{
   68     68   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   69         -
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
          69  +
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
   70     70   
                        Ok(response) => response,
   71     71   
                        Err(e) => {
   72     72   
                            ::tracing::error!(error = %e, "failed to serialize response");
   73     73   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   74     74   
                        }
   75     75   
                    }
   76     76   
    }
   77     77   
}
   78     78   
impl
   79     79   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
   80     80   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
   81         -
    > for crate::error::ResponseCodeDefaultOperationError
          81  +
    > for crate::error::TypeComplexityOperationError
   82     82   
{
   83     83   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
   84         -
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_error(&self) {
          84  +
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_error(&self) {
   85     85   
            Ok(mut response) => {
   86     86   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
   87     87   
                response
   88     88   
            },
   89     89   
            Err(e) => {
   90     90   
                ::tracing::error!(error = %e, "failed to serialize response");
   91     91   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
   92     92   
            }
   93     93   
        }
   94     94   
    }
   95     95   
}
   96     96   
   97     97   
::pin_project_lite::pin_project! {
   98     98   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
   99         -
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
  100         -
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
  101         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
          99  +
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
         100  +
    pub struct RequiredInnerShapeOperationInputFuture {
         101  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  102    102   
    }
  103    103   
}
  104    104   
  105         -
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
         105  +
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
  106    106   
    type Output = Result<
  107         -
        crate::input::ResponseCodeHttpFallbackOperationInput,
         107  +
        crate::input::RequiredInnerShapeOperationInput,
  108    108   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  109    109   
    >;
  110    110   
  111    111   
    fn poll(
  112    112   
        self: std::pin::Pin<&mut Self>,
  113    113   
        cx: &mut std::task::Context<'_>,
  114    114   
    ) -> std::task::Poll<Self::Output> {
  115    115   
        let this = self.project();
  116    116   
        this.inner.as_mut().poll(cx)
  117    117   
    }
  118    118   
}
  119    119   
  120    120   
impl<B>
  121    121   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  122    122   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  123    123   
        B,
  124         -
    > for crate::input::ResponseCodeHttpFallbackOperationInput
         124  +
    > for crate::input::RequiredInnerShapeOperationInput
  125    125   
where
  126    126   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  127    127   
    B: 'static,
  128    128   
  129    129   
    B::Data: Send,
  130    130   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  131    131   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  132    132   
{
  133    133   
    type Rejection =
  134    134   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  135         -
    type Future = ResponseCodeHttpFallbackOperationInputFuture;
         135  +
    type Future = RequiredInnerShapeOperationInputFuture;
  136    136   
  137    137   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  138    138   
        let fut = async move {
  139    139   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  140    140   
                request.headers(),
  141    141   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  142    142   
            ) {
  143    143   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  144    144   
            }
  145         -
            crate::protocol_serde::shape_response_code_http_fallback_operation::de_response_code_http_fallback_operation_http_request(request)
         145  +
            crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation_http_request(request)
  146    146   
                            .await
  147    147   
        };
  148    148   
        use ::futures_util::future::TryFutureExt;
  149    149   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  150    150   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  151    151   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  152    152   
                    });
  153         -
        ResponseCodeHttpFallbackOperationInputFuture {
         153  +
        RequiredInnerShapeOperationInputFuture {
  154    154   
            inner: Box::pin(fut),
  155    155   
        }
  156    156   
    }
  157    157   
}
  158    158   
impl
  159    159   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  160    160   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  161         -
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
         161  +
    > for crate::output::RequiredInnerShapeOperationOutput
  162    162   
{
  163    163   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  164         -
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
         164  +
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
  165    165   
                        Ok(response) => response,
  166    166   
                        Err(e) => {
  167    167   
                            ::tracing::error!(error = %e, "failed to serialize response");
  168    168   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  169    169   
                        }
  170    170   
                    }
  171    171   
    }
  172    172   
}
  173    173   
impl
  174    174   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  175    175   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  176         -
    > for crate::error::ResponseCodeHttpFallbackOperationError
         176  +
    > for crate::error::RequiredInnerShapeOperationError
  177    177   
{
  178    178   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  179         -
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_error(&self) {
         179  +
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
  180    180   
            Ok(mut response) => {
  181    181   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  182    182   
                response
  183    183   
            },
  184    184   
            Err(e) => {
  185    185   
                ::tracing::error!(error = %e, "failed to serialize response");
  186    186   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  187    187   
            }
  188    188   
        }
  189    189   
    }
  190    190   
}
  191    191   
  192    192   
::pin_project_lite::pin_project! {
  193    193   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  194         -
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
  195         -
    pub struct ResponseCodeRequiredOperationInputFuture {
  196         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         194  +
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
         195  +
    pub struct RequiredHeaderCollectionOperationInputFuture {
         196  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  197    197   
    }
  198    198   
}
  199    199   
  200         -
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
         200  +
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
  201    201   
    type Output = Result<
  202         -
        crate::input::ResponseCodeRequiredOperationInput,
         202  +
        crate::input::RequiredHeaderCollectionOperationInput,
  203    203   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  204    204   
    >;
  205    205   
  206    206   
    fn poll(
  207    207   
        self: std::pin::Pin<&mut Self>,
  208    208   
        cx: &mut std::task::Context<'_>,
  209    209   
    ) -> std::task::Poll<Self::Output> {
  210    210   
        let this = self.project();
  211    211   
        this.inner.as_mut().poll(cx)
  212    212   
    }
  213    213   
}
  214    214   
  215    215   
impl<B>
  216    216   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  217    217   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  218    218   
        B,
  219         -
    > for crate::input::ResponseCodeRequiredOperationInput
         219  +
    > for crate::input::RequiredHeaderCollectionOperationInput
  220    220   
where
  221    221   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  222    222   
    B: 'static,
  223    223   
  224    224   
    B::Data: Send,
  225    225   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  226    226   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  227    227   
{
  228    228   
    type Rejection =
  229    229   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  230         -
    type Future = ResponseCodeRequiredOperationInputFuture;
         230  +
    type Future = RequiredHeaderCollectionOperationInputFuture;
  231    231   
  232    232   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  233    233   
        let fut = async move {
  234    234   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  235    235   
                request.headers(),
  236    236   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  237    237   
            ) {
  238    238   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  239    239   
            }
  240         -
            crate::protocol_serde::shape_response_code_required_operation::de_response_code_required_operation_http_request(request)
         240  +
            crate::protocol_serde::shape_required_header_collection_operation::de_required_header_collection_operation_http_request(request)
  241    241   
                            .await
  242    242   
        };
  243    243   
        use ::futures_util::future::TryFutureExt;
  244    244   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  245    245   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  246    246   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  247    247   
                    });
  248         -
        ResponseCodeRequiredOperationInputFuture {
         248  +
        RequiredHeaderCollectionOperationInputFuture {
  249    249   
            inner: Box::pin(fut),
  250    250   
        }
  251    251   
    }
  252    252   
}
  253    253   
impl
  254    254   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  255    255   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  256         -
    > for crate::output::ResponseCodeRequiredOperationOutput
         256  +
    > for crate::output::RequiredHeaderCollectionOperationOutput
  257    257   
{
  258    258   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  259         -
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
         259  +
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
  260    260   
                        Ok(response) => response,
  261    261   
                        Err(e) => {
  262    262   
                            ::tracing::error!(error = %e, "failed to serialize response");
  263    263   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  264    264   
                        }
  265    265   
                    }
  266    266   
    }
  267    267   
}
  268    268   
impl
  269    269   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  270    270   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  271         -
    > for crate::error::ResponseCodeRequiredOperationError
         271  +
    > for crate::error::RequiredHeaderCollectionOperationError
  272    272   
{
  273    273   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  274         -
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_error(&self) {
         274  +
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
  275    275   
            Ok(mut response) => {
  276    276   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  277    277   
                response
  278    278   
            },
  279    279   
            Err(e) => {
  280    280   
                ::tracing::error!(error = %e, "failed to serialize response");
  281    281   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  282    282   
            }
  283    283   
        }
  284    284   
    }
  285    285   
}
  286    286   
  287    287   
::pin_project_lite::pin_project! {
  288    288   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  289         -
    /// [`RequiredHeaderCollectionOperationInput`](crate::input::RequiredHeaderCollectionOperationInput) using modelled bindings.
  290         -
    pub struct RequiredHeaderCollectionOperationInputFuture {
  291         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredHeaderCollectionOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         289  +
    /// [`ResponseCodeRequiredOperationInput`](crate::input::ResponseCodeRequiredOperationInput) using modelled bindings.
         290  +
    pub struct ResponseCodeRequiredOperationInputFuture {
         291  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeRequiredOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  292    292   
    }
  293    293   
}
  294    294   
  295         -
impl std::future::Future for RequiredHeaderCollectionOperationInputFuture {
         295  +
impl std::future::Future for ResponseCodeRequiredOperationInputFuture {
  296    296   
    type Output = Result<
  297         -
        crate::input::RequiredHeaderCollectionOperationInput,
         297  +
        crate::input::ResponseCodeRequiredOperationInput,
  298    298   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  299    299   
    >;
  300    300   
  301    301   
    fn poll(
  302    302   
        self: std::pin::Pin<&mut Self>,
  303    303   
        cx: &mut std::task::Context<'_>,
  304    304   
    ) -> std::task::Poll<Self::Output> {
  305    305   
        let this = self.project();
  306    306   
        this.inner.as_mut().poll(cx)
  307    307   
    }
  308    308   
}
  309    309   
  310    310   
impl<B>
  311    311   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  312    312   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  313    313   
        B,
  314         -
    > for crate::input::RequiredHeaderCollectionOperationInput
         314  +
    > for crate::input::ResponseCodeRequiredOperationInput
  315    315   
where
  316    316   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  317    317   
    B: 'static,
  318    318   
  319    319   
    B::Data: Send,
  320    320   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  321    321   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  322    322   
{
  323    323   
    type Rejection =
  324    324   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  325         -
    type Future = RequiredHeaderCollectionOperationInputFuture;
         325  +
    type Future = ResponseCodeRequiredOperationInputFuture;
  326    326   
  327    327   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  328    328   
        let fut = async move {
  329    329   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  330    330   
                request.headers(),
  331    331   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  332    332   
            ) {
  333    333   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  334    334   
            }
  335         -
            crate::protocol_serde::shape_required_header_collection_operation::de_required_header_collection_operation_http_request(request)
         335  +
            crate::protocol_serde::shape_response_code_required_operation::de_response_code_required_operation_http_request(request)
  336    336   
                            .await
  337    337   
        };
  338    338   
        use ::futures_util::future::TryFutureExt;
  339    339   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  340    340   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  341    341   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  342    342   
                    });
  343         -
        RequiredHeaderCollectionOperationInputFuture {
         343  +
        ResponseCodeRequiredOperationInputFuture {
  344    344   
            inner: Box::pin(fut),
  345    345   
        }
  346    346   
    }
  347    347   
}
  348    348   
impl
  349    349   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  350    350   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  351         -
    > for crate::output::RequiredHeaderCollectionOperationOutput
         351  +
    > for crate::output::ResponseCodeRequiredOperationOutput
  352    352   
{
  353    353   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  354         -
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_response(self) {
         354  +
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_response(self) {
  355    355   
                        Ok(response) => response,
  356    356   
                        Err(e) => {
  357    357   
                            ::tracing::error!(error = %e, "failed to serialize response");
  358    358   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  359    359   
                        }
  360    360   
                    }
  361    361   
    }
  362    362   
}
  363    363   
impl
  364    364   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  365    365   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  366         -
    > for crate::error::RequiredHeaderCollectionOperationError
         366  +
    > for crate::error::ResponseCodeRequiredOperationError
  367    367   
{
  368    368   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  369         -
        match crate::protocol_serde::shape_required_header_collection_operation::ser_required_header_collection_operation_http_error(&self) {
         369  +
        match crate::protocol_serde::shape_response_code_required_operation::ser_response_code_required_operation_http_error(&self) {
  370    370   
            Ok(mut response) => {
  371    371   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  372    372   
                response
  373    373   
            },
  374    374   
            Err(e) => {
  375    375   
                ::tracing::error!(error = %e, "failed to serialize response");
  376    376   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  377    377   
            }
  378    378   
        }
  379    379   
    }
  380    380   
}
  381    381   
  382    382   
::pin_project_lite::pin_project! {
  383    383   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  384         -
    /// [`RequiredInnerShapeOperationInput`](crate::input::RequiredInnerShapeOperationInput) using modelled bindings.
  385         -
    pub struct RequiredInnerShapeOperationInputFuture {
  386         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::RequiredInnerShapeOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         384  +
    /// [`ResponseCodeHttpFallbackOperationInput`](crate::input::ResponseCodeHttpFallbackOperationInput) using modelled bindings.
         385  +
    pub struct ResponseCodeHttpFallbackOperationInputFuture {
         386  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeHttpFallbackOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  387    387   
    }
  388    388   
}
  389    389   
  390         -
impl std::future::Future for RequiredInnerShapeOperationInputFuture {
         390  +
impl std::future::Future for ResponseCodeHttpFallbackOperationInputFuture {
  391    391   
    type Output = Result<
  392         -
        crate::input::RequiredInnerShapeOperationInput,
         392  +
        crate::input::ResponseCodeHttpFallbackOperationInput,
  393    393   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  394    394   
    >;
  395    395   
  396    396   
    fn poll(
  397    397   
        self: std::pin::Pin<&mut Self>,
  398    398   
        cx: &mut std::task::Context<'_>,
  399    399   
    ) -> std::task::Poll<Self::Output> {
  400    400   
        let this = self.project();
  401    401   
        this.inner.as_mut().poll(cx)
  402    402   
    }
  403    403   
}
  404    404   
  405    405   
impl<B>
  406    406   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  407    407   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  408    408   
        B,
  409         -
    > for crate::input::RequiredInnerShapeOperationInput
         409  +
    > for crate::input::ResponseCodeHttpFallbackOperationInput
  410    410   
where
  411    411   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  412    412   
    B: 'static,
  413    413   
  414    414   
    B::Data: Send,
  415    415   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  416    416   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  417    417   
{
  418    418   
    type Rejection =
  419    419   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  420         -
    type Future = RequiredInnerShapeOperationInputFuture;
         420  +
    type Future = ResponseCodeHttpFallbackOperationInputFuture;
  421    421   
  422    422   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  423    423   
        let fut = async move {
  424    424   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  425    425   
                request.headers(),
  426    426   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  427    427   
            ) {
  428    428   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  429    429   
            }
  430         -
            crate::protocol_serde::shape_required_inner_shape_operation::de_required_inner_shape_operation_http_request(request)
         430  +
            crate::protocol_serde::shape_response_code_http_fallback_operation::de_response_code_http_fallback_operation_http_request(request)
  431    431   
                            .await
  432    432   
        };
  433    433   
        use ::futures_util::future::TryFutureExt;
  434    434   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  435    435   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  436    436   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  437    437   
                    });
  438         -
        RequiredInnerShapeOperationInputFuture {
         438  +
        ResponseCodeHttpFallbackOperationInputFuture {
  439    439   
            inner: Box::pin(fut),
  440    440   
        }
  441    441   
    }
  442    442   
}
  443    443   
impl
  444    444   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  445    445   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  446         -
    > for crate::output::RequiredInnerShapeOperationOutput
         446  +
    > for crate::output::ResponseCodeHttpFallbackOperationOutput
  447    447   
{
  448    448   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  449         -
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_response(self) {
         449  +
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_response(self) {
  450    450   
                        Ok(response) => response,
  451    451   
                        Err(e) => {
  452    452   
                            ::tracing::error!(error = %e, "failed to serialize response");
  453    453   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  454    454   
                        }
  455    455   
                    }
  456    456   
    }
  457    457   
}
  458    458   
impl
  459    459   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  460    460   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  461         -
    > for crate::error::RequiredInnerShapeOperationError
         461  +
    > for crate::error::ResponseCodeHttpFallbackOperationError
  462    462   
{
  463    463   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  464         -
        match crate::protocol_serde::shape_required_inner_shape_operation::ser_required_inner_shape_operation_http_error(&self) {
         464  +
        match crate::protocol_serde::shape_response_code_http_fallback_operation::ser_response_code_http_fallback_operation_http_error(&self) {
  465    465   
            Ok(mut response) => {
  466    466   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  467    467   
                response
  468    468   
            },
  469    469   
            Err(e) => {
  470    470   
                ::tracing::error!(error = %e, "failed to serialize response");
  471    471   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  472    472   
            }
  473    473   
        }
  474    474   
    }
  475    475   
}
  476    476   
  477    477   
::pin_project_lite::pin_project! {
  478    478   
    /// A [`Future`](std::future::Future) aggregating the body bytes of a [`Request`] and constructing the
  479         -
    /// [`TypeComplexityOperationInput`](crate::input::TypeComplexityOperationInput) using modelled bindings.
  480         -
    pub struct TypeComplexityOperationInputFuture {
  481         -
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::TypeComplexityOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
         479  +
    /// [`ResponseCodeDefaultOperationInput`](crate::input::ResponseCodeDefaultOperationInput) using modelled bindings.
         480  +
    pub struct ResponseCodeDefaultOperationInputFuture {
         481  +
        inner: std::pin::Pin<Box<dyn std::future::Future<Output = Result<crate::input::ResponseCodeDefaultOperationInput, ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError>> + Send>>
  482    482   
    }
  483    483   
}
  484    484   
  485         -
impl std::future::Future for TypeComplexityOperationInputFuture {
         485  +
impl std::future::Future for ResponseCodeDefaultOperationInputFuture {
  486    486   
    type Output = Result<
  487         -
        crate::input::TypeComplexityOperationInput,
         487  +
        crate::input::ResponseCodeDefaultOperationInput,
  488    488   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError,
  489    489   
    >;
  490    490   
  491    491   
    fn poll(
  492    492   
        self: std::pin::Pin<&mut Self>,
  493    493   
        cx: &mut std::task::Context<'_>,
  494    494   
    ) -> std::task::Poll<Self::Output> {
  495    495   
        let this = self.project();
  496    496   
        this.inner.as_mut().poll(cx)
  497    497   
    }
  498    498   
}
  499    499   
  500    500   
impl<B>
  501    501   
    ::aws_smithy_legacy_http_server::request::FromRequest<
  502    502   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  503    503   
        B,
  504         -
    > for crate::input::TypeComplexityOperationInput
         504  +
    > for crate::input::ResponseCodeDefaultOperationInput
  505    505   
where
  506    506   
    B: ::aws_smithy_legacy_http_server::body::HttpBody + Send,
  507    507   
    B: 'static,
  508    508   
  509    509   
    B::Data: Send,
  510    510   
    ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection:
  511    511   
        From<<B as ::aws_smithy_legacy_http_server::body::HttpBody>::Error>,
  512    512   
{
  513    513   
    type Rejection =
  514    514   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError;
  515         -
    type Future = TypeComplexityOperationInputFuture;
         515  +
    type Future = ResponseCodeDefaultOperationInputFuture;
  516    516   
  517    517   
    fn from_request(request: ::http::Request<B>) -> Self::Future {
  518    518   
        let fut = async move {
  519    519   
            if !::aws_smithy_legacy_http_server::protocol::accept_header_classifier(
  520    520   
                request.headers(),
  521    521   
                &crate::mimes::CONTENT_TYPE_APPLICATION_JSON,
  522    522   
            ) {
  523    523   
                return Err(::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection::NotAcceptable);
  524    524   
            }
  525         -
            crate::protocol_serde::shape_type_complexity_operation::de_type_complexity_operation_http_request(request)
         525  +
            crate::protocol_serde::shape_response_code_default_operation::de_response_code_default_operation_http_request(request)
  526    526   
                            .await
  527    527   
        };
  528    528   
        use ::futures_util::future::TryFutureExt;
  529    529   
        let fut = fut.map_err(|e: ::aws_smithy_legacy_http_server::protocol::rest_json_1::rejection::RequestRejection| {
  530    530   
                        ::tracing::debug!(error = %e, "failed to deserialize request");
  531    531   
                        ::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e)
  532    532   
                    });
  533         -
        TypeComplexityOperationInputFuture {
         533  +
        ResponseCodeDefaultOperationInputFuture {
  534    534   
            inner: Box::pin(fut),
  535    535   
        }
  536    536   
    }
  537    537   
}
  538    538   
impl
  539    539   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  540    540   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  541         -
    > for crate::output::TypeComplexityOperationOutput
         541  +
    > for crate::output::ResponseCodeDefaultOperationOutput
  542    542   
{
  543    543   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  544         -
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_response(self) {
         544  +
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_response(self) {
  545    545   
                        Ok(response) => response,
  546    546   
                        Err(e) => {
  547    547   
                            ::tracing::error!(error = %e, "failed to serialize response");
  548    548   
                            ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  549    549   
                        }
  550    550   
                    }
  551    551   
    }
  552    552   
}
  553    553   
impl
  554    554   
    ::aws_smithy_legacy_http_server::response::IntoResponse<
  555    555   
        ::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1,
  556         -
    > for crate::error::TypeComplexityOperationError
         556  +
    > for crate::error::ResponseCodeDefaultOperationError
  557    557   
{
  558    558   
    fn into_response(self) -> ::aws_smithy_legacy_http_server::response::Response {
  559         -
        match crate::protocol_serde::shape_type_complexity_operation::ser_type_complexity_operation_http_error(&self) {
         559  +
        match crate::protocol_serde::shape_response_code_default_operation::ser_response_code_default_operation_http_error(&self) {
  560    560   
            Ok(mut response) => {
  561    561   
                response.extensions_mut().insert(::aws_smithy_legacy_http_server::extension::ModeledErrorExtension::new(self.name()));
  562    562   
                response
  563    563   
            },
  564    564   
            Err(e) => {
  565    565   
                ::tracing::error!(error = %e, "failed to serialize response");
  566    566   
                ::aws_smithy_legacy_http_server::response::IntoResponse::<::aws_smithy_legacy_http_server::protocol::rest_json_1::RestJson1>::into_response(::aws_smithy_legacy_http_server::protocol::rest_json_1::runtime_error::RuntimeError::from(e))
  567    567   
            }
  568    568   
        }
  569    569   
    }

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

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

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

@@ -1,1 +169,161 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pyclass]
           3  +
/// :param list typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
    3      4   
/// :rtype None:
    4      5   
#[allow(missing_docs)] // documentation missing in model
    5         -
#[derive(
    6         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    7         -
)]
    8         -
pub struct ResponseCodeDefaultOperationOutput {}
    9         -
#[allow(clippy::new_without_default)]
   10         -
#[allow(clippy::too_many_arguments)]
   11         -
#[::pyo3::pymethods]
   12         -
impl ResponseCodeDefaultOperationOutput {
   13         -
    #[new]
   14         -
    pub fn new() -> Self {
   15         -
        Self {}
   16         -
    }
   17         -
    fn __repr__(&self) -> String {
   18         -
        format!("{self:?}")
   19         -
    }
   20         -
    fn __str__(&self) -> String {
   21         -
        format!("{self:?}")
   22         -
    }
   23         -
}
   24         -
impl<'source> ::pyo3::FromPyObject<'source>
   25         -
    for std::boxed::Box<ResponseCodeDefaultOperationOutput>
   26         -
{
   27         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   28         -
        ob.extract::<ResponseCodeDefaultOperationOutput>()
   29         -
            .map(Box::new)
   30         -
    }
   31         -
}
   32         -
   33         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeDefaultOperationOutput> {
   34         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   35         -
        (*self).into_py(py)
   36         -
    }
           6  +
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
           7  +
pub struct TypeComplexityOperationOutput {
           8  +
    #[pyo3(get, set)]
           9  +
    /// :type typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
          10  +
    #[allow(missing_docs)] // documentation missing in model
          11  +
    pub list: ::std::option::Option<
          12  +
        ::std::vec::Vec<
          13  +
            ::std::vec::Vec<
          14  +
                ::std::vec::Vec<
          15  +
                    ::std::collections::HashMap<
          16  +
                        ::std::string::String,
          17  +
                        crate::model::EmptyStructure,
          18  +
                    >,
          19  +
                >,
          20  +
            >,
          21  +
        >,
          22  +
    >,
   37     23   
}
   38         -
impl ResponseCodeDefaultOperationOutput {
   39         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
   40         -
    pub fn builder() -> crate::output::response_code_default_operation_output::Builder {
   41         -
        crate::output::response_code_default_operation_output::Builder::default()
          24  +
impl TypeComplexityOperationOutput {
          25  +
    #[allow(missing_docs)] // documentation missing in model
          26  +
    pub fn list(
          27  +
        &self,
          28  +
    ) -> ::std::option::Option<
          29  +
        &[::std::vec::Vec<
          30  +
            ::std::vec::Vec<
          31  +
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
          32  +
            >,
          33  +
        >],
          34  +
    > {
          35  +
        self.list.as_deref()
   42     36   
    }
   43     37   
}
   44         -
   45         -
#[::pyo3::pyclass]
   46         -
/// :rtype None:
   47         -
#[allow(missing_docs)] // documentation missing in model
   48         -
#[derive(
   49         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   50         -
)]
   51         -
pub struct ResponseCodeHttpFallbackOperationOutput {}
   52     38   
#[allow(clippy::new_without_default)]
   53     39   
#[allow(clippy::too_many_arguments)]
   54     40   
#[::pyo3::pymethods]
   55         -
impl ResponseCodeHttpFallbackOperationOutput {
          41  +
impl TypeComplexityOperationOutput {
   56     42   
    #[new]
   57         -
    pub fn new() -> Self {
   58         -
        Self {}
          43  +
    pub fn new(
          44  +
        list: ::std::option::Option<
          45  +
            ::std::vec::Vec<
          46  +
                ::std::vec::Vec<
          47  +
                    ::std::vec::Vec<
          48  +
                        ::std::collections::HashMap<
          49  +
                            ::std::string::String,
          50  +
                            crate::model::EmptyStructure,
          51  +
                        >,
          52  +
                    >,
          53  +
                >,
          54  +
            >,
          55  +
        >,
          56  +
    ) -> Self {
          57  +
        Self { list }
   59     58   
    }
   60     59   
    fn __repr__(&self) -> String {
   61     60   
        format!("{self:?}")
   62     61   
    }
   63     62   
    fn __str__(&self) -> String {
   64     63   
        format!("{self:?}")
   65     64   
    }
   66     65   
}
   67         -
impl<'source> ::pyo3::FromPyObject<'source>
   68         -
    for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput>
   69         -
{
          66  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TypeComplexityOperationOutput> {
   70     67   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   71         -
        ob.extract::<ResponseCodeHttpFallbackOperationOutput>()
   72         -
            .map(Box::new)
          68  +
        ob.extract::<TypeComplexityOperationOutput>().map(Box::new)
   73     69   
    }
   74     70   
}
   75     71   
   76         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput> {
          72  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TypeComplexityOperationOutput> {
   77     73   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   78     74   
        (*self).into_py(py)
   79     75   
    }
   80     76   
}
   81         -
impl ResponseCodeHttpFallbackOperationOutput {
   82         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
   83         -
    pub fn builder() -> crate::output::response_code_http_fallback_operation_output::Builder {
   84         -
        crate::output::response_code_http_fallback_operation_output::Builder::default()
          77  +
impl TypeComplexityOperationOutput {
          78  +
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
          79  +
    pub fn builder() -> crate::output::type_complexity_operation_output::Builder {
          80  +
        crate::output::type_complexity_operation_output::Builder::default()
   85     81   
    }
   86     82   
}
   87     83   
   88     84   
#[::pyo3::pyclass]
   89         -
/// :param response_code int:
          85  +
/// :param inner typing.Optional\[misc.model.InnerShape\]:
   90     86   
/// :rtype None:
   91     87   
#[allow(missing_docs)] // documentation missing in model
   92         -
#[derive(
   93         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   94         -
)]
   95         -
pub struct ResponseCodeRequiredOperationOutput {
          88  +
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
          89  +
pub struct RequiredInnerShapeOperationOutput {
   96     90   
    #[pyo3(get, set)]
   97         -
    /// :type int:
          91  +
    /// :type typing.Optional\[misc.model.InnerShape\]:
   98     92   
    #[allow(missing_docs)] // documentation missing in model
   99         -
    pub response_code: i32,
          93  +
    pub inner: ::std::option::Option<crate::model::InnerShape>,
  100     94   
}
  101         -
impl ResponseCodeRequiredOperationOutput {
          95  +
impl RequiredInnerShapeOperationOutput {
  102     96   
    #[allow(missing_docs)] // documentation missing in model
  103         -
    pub fn response_code(&self) -> i32 {
  104         -
        self.response_code
          97  +
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
          98  +
        self.inner.as_ref()
  105     99   
    }
  106    100   
}
  107    101   
#[allow(clippy::new_without_default)]
  108    102   
#[allow(clippy::too_many_arguments)]
  109    103   
#[::pyo3::pymethods]
  110         -
impl ResponseCodeRequiredOperationOutput {
         104  +
impl RequiredInnerShapeOperationOutput {
  111    105   
    #[new]
  112         -
    pub fn new(response_code: i32) -> Self {
  113         -
        Self { response_code }
         106  +
    pub fn new(inner: ::std::option::Option<crate::model::InnerShape>) -> Self {
         107  +
        Self { inner }
  114    108   
    }
  115    109   
    fn __repr__(&self) -> String {
  116    110   
        format!("{self:?}")
  117    111   
    }
  118    112   
    fn __str__(&self) -> String {
  119    113   
        format!("{self:?}")
  120    114   
    }
  121    115   
}
  122         -
impl<'source> ::pyo3::FromPyObject<'source>
  123         -
    for std::boxed::Box<ResponseCodeRequiredOperationOutput>
  124         -
{
         116  +
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
  125    117   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  126         -
        ob.extract::<ResponseCodeRequiredOperationOutput>()
         118  +
        ob.extract::<RequiredInnerShapeOperationOutput>()
  127    119   
            .map(Box::new)
  128    120   
    }
  129    121   
}
  130    122   
  131         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeRequiredOperationOutput> {
         123  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
  132    124   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  133    125   
        (*self).into_py(py)
  134    126   
    }
  135    127   
}
  136         -
impl ResponseCodeRequiredOperationOutput {
  137         -
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  138         -
    pub fn builder() -> crate::output::response_code_required_operation_output::Builder {
  139         -
        crate::output::response_code_required_operation_output::Builder::default()
         128  +
impl RequiredInnerShapeOperationOutput {
         129  +
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         130  +
    pub fn builder() -> crate::output::required_inner_shape_operation_output::Builder {
         131  +
        crate::output::required_inner_shape_operation_output::Builder::default()
  140    132   
    }
  141    133   
}
  142    134   
  143    135   
#[::pyo3::pyclass]
  144    136   
/// :param required_header_list typing.List\[str\]:
  145    137   
/// :param required_header_set typing.List\[str\]:
  146    138   
/// :rtype None:
  147    139   
#[allow(missing_docs)] // documentation missing in model
  148    140   
#[derive(
  149    141   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
@@ -186,178 +477,458 @@
  206    198   
    }
  207    199   
}
  208    200   
impl RequiredHeaderCollectionOperationOutput {
  209    201   
    /// Creates a new builder-style object to manufacture [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
  210    202   
    pub fn builder() -> crate::output::required_header_collection_operation_output::Builder {
  211    203   
        crate::output::required_header_collection_operation_output::Builder::default()
  212    204   
    }
  213    205   
}
  214    206   
  215    207   
#[::pyo3::pyclass]
  216         -
/// :param inner typing.Optional\[misc.model.InnerShape\]:
         208  +
/// :param response_code int:
  217    209   
/// :rtype None:
  218    210   
#[allow(missing_docs)] // documentation missing in model
  219         -
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  220         -
pub struct RequiredInnerShapeOperationOutput {
         211  +
#[derive(
         212  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         213  +
)]
         214  +
pub struct ResponseCodeRequiredOperationOutput {
  221    215   
    #[pyo3(get, set)]
  222         -
    /// :type typing.Optional\[misc.model.InnerShape\]:
         216  +
    /// :type int:
  223    217   
    #[allow(missing_docs)] // documentation missing in model
  224         -
    pub inner: ::std::option::Option<crate::model::InnerShape>,
         218  +
    pub response_code: i32,
  225    219   
}
  226         -
impl RequiredInnerShapeOperationOutput {
         220  +
impl ResponseCodeRequiredOperationOutput {
  227    221   
    #[allow(missing_docs)] // documentation missing in model
  228         -
    pub fn inner(&self) -> ::std::option::Option<&crate::model::InnerShape> {
  229         -
        self.inner.as_ref()
         222  +
    pub fn response_code(&self) -> i32 {
         223  +
        self.response_code
  230    224   
    }
  231    225   
}
  232    226   
#[allow(clippy::new_without_default)]
  233    227   
#[allow(clippy::too_many_arguments)]
  234    228   
#[::pyo3::pymethods]
  235         -
impl RequiredInnerShapeOperationOutput {
         229  +
impl ResponseCodeRequiredOperationOutput {
  236    230   
    #[new]
  237         -
    pub fn new(inner: ::std::option::Option<crate::model::InnerShape>) -> Self {
  238         -
        Self { inner }
         231  +
    pub fn new(response_code: i32) -> Self {
         232  +
        Self { response_code }
  239    233   
    }
  240    234   
    fn __repr__(&self) -> String {
  241    235   
        format!("{self:?}")
  242    236   
    }
  243    237   
    fn __str__(&self) -> String {
  244    238   
        format!("{self:?}")
  245    239   
    }
  246    240   
}
  247         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
         241  +
impl<'source> ::pyo3::FromPyObject<'source>
         242  +
    for std::boxed::Box<ResponseCodeRequiredOperationOutput>
         243  +
{
  248    244   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  249         -
        ob.extract::<RequiredInnerShapeOperationOutput>()
         245  +
        ob.extract::<ResponseCodeRequiredOperationOutput>()
  250    246   
            .map(Box::new)
  251    247   
    }
  252    248   
}
  253    249   
  254         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<RequiredInnerShapeOperationOutput> {
         250  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeRequiredOperationOutput> {
  255    251   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  256    252   
        (*self).into_py(py)
  257    253   
    }
  258    254   
}
  259         -
impl RequiredInnerShapeOperationOutput {
  260         -
    /// Creates a new builder-style object to manufacture [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  261         -
    pub fn builder() -> crate::output::required_inner_shape_operation_output::Builder {
  262         -
        crate::output::required_inner_shape_operation_output::Builder::default()
         255  +
impl ResponseCodeRequiredOperationOutput {
         256  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         257  +
    pub fn builder() -> crate::output::response_code_required_operation_output::Builder {
         258  +
        crate::output::response_code_required_operation_output::Builder::default()
  263    259   
    }
  264    260   
}
  265    261   
  266    262   
#[::pyo3::pyclass]
  267         -
/// :param list typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
  268    263   
/// :rtype None:
  269    264   
#[allow(missing_docs)] // documentation missing in model
  270         -
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  271         -
pub struct TypeComplexityOperationOutput {
  272         -
    #[pyo3(get, set)]
  273         -
    /// :type typing.Optional\[typing.List\[typing.List\[typing.List\[typing.Dict\[str, misc.model.EmptyStructure\]\]\]\]\]:
  274         -
    #[allow(missing_docs)] // documentation missing in model
  275         -
    pub list: ::std::option::Option<
  276         -
        ::std::vec::Vec<
  277         -
            ::std::vec::Vec<
  278         -
                ::std::vec::Vec<
  279         -
                    ::std::collections::HashMap<
  280         -
                        ::std::string::String,
  281         -
                        crate::model::EmptyStructure,
  282         -
                    >,
  283         -
                >,
  284         -
            >,
  285         -
        >,
  286         -
    >,
  287         -
}
  288         -
impl TypeComplexityOperationOutput {
  289         -
    #[allow(missing_docs)] // documentation missing in model
  290         -
    pub fn list(
  291         -
        &self,
  292         -
    ) -> ::std::option::Option<
  293         -
        &[::std::vec::Vec<
  294         -
            ::std::vec::Vec<
  295         -
                ::std::collections::HashMap<::std::string::String, crate::model::EmptyStructure>,
  296         -
            >,
  297         -
        >],
  298         -
    > {
  299         -
        self.list.as_deref()
  300         -
    }
  301         -
}
         265  +
#[derive(
         266  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         267  +
)]
         268  +
pub struct ResponseCodeHttpFallbackOperationOutput {}
  302    269   
#[allow(clippy::new_without_default)]
  303    270   
#[allow(clippy::too_many_arguments)]
  304    271   
#[::pyo3::pymethods]
  305         -
impl TypeComplexityOperationOutput {
         272  +
impl ResponseCodeHttpFallbackOperationOutput {
  306    273   
    #[new]
  307         -
    pub fn new(
  308         -
        list: ::std::option::Option<
  309         -
            ::std::vec::Vec<
  310         -
                ::std::vec::Vec<
  311         -
                    ::std::vec::Vec<
  312         -
                        ::std::collections::HashMap<
  313         -
                            ::std::string::String,
  314         -
                            crate::model::EmptyStructure,
  315         -
                        >,
  316         -
                    >,
  317         -
                >,
  318         -
            >,
  319         -
        >,
  320         -
    ) -> Self {
  321         -
        Self { list }
         274  +
    pub fn new() -> Self {
         275  +
        Self {}
  322    276   
    }
  323    277   
    fn __repr__(&self) -> String {
  324    278   
        format!("{self:?}")
  325    279   
    }
  326    280   
    fn __str__(&self) -> String {
  327    281   
        format!("{self:?}")
  328    282   
    }
  329    283   
}
  330         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<TypeComplexityOperationOutput> {
         284  +
impl<'source> ::pyo3::FromPyObject<'source>
         285  +
    for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput>
         286  +
{
  331    287   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  332         -
        ob.extract::<TypeComplexityOperationOutput>().map(Box::new)
         288  +
        ob.extract::<ResponseCodeHttpFallbackOperationOutput>()
         289  +
            .map(Box::new)
  333    290   
    }
  334    291   
}
  335    292   
  336         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<TypeComplexityOperationOutput> {
         293  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeHttpFallbackOperationOutput> {
  337    294   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  338    295   
        (*self).into_py(py)
  339    296   
    }
  340    297   
}
  341         -
impl TypeComplexityOperationOutput {
  342         -
    /// Creates a new builder-style object to manufacture [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  343         -
    pub fn builder() -> crate::output::type_complexity_operation_output::Builder {
  344         -
        crate::output::type_complexity_operation_output::Builder::default()
         298  +
impl ResponseCodeHttpFallbackOperationOutput {
         299  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         300  +
    pub fn builder() -> crate::output::response_code_http_fallback_operation_output::Builder {
         301  +
        crate::output::response_code_http_fallback_operation_output::Builder::default()
  345    302   
    }
  346    303   
}
  347         -
/// See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  348         -
pub mod response_code_default_operation_output {
  349    304   
  350         -
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeDefaultOperationOutput {
  351         -
        fn from(builder: Builder) -> Self {
  352         -
            builder.build()
         305  +
#[::pyo3::pyclass]
         306  +
/// :rtype None:
         307  +
#[allow(missing_docs)] // documentation missing in model
         308  +
#[derive(
         309  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         310  +
)]
         311  +
pub struct ResponseCodeDefaultOperationOutput {}
         312  +
#[allow(clippy::new_without_default)]
         313  +
#[allow(clippy::too_many_arguments)]
         314  +
#[::pyo3::pymethods]
         315  +
impl ResponseCodeDefaultOperationOutput {
         316  +
    #[new]
         317  +
    pub fn new() -> Self {
         318  +
        Self {}
  353    319   
    }
         320  +
    fn __repr__(&self) -> String {
         321  +
        format!("{self:?}")
  354    322   
    }
  355         -
    /// A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  356         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  357         -
    pub struct Builder {}
  358         -
    impl Builder {
  359         -
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
  360         -
        pub fn build(self) -> crate::output::ResponseCodeDefaultOperationOutput {
  361         -
            self.build_enforcing_required_and_enum_traits()
         323  +
    fn __str__(&self) -> String {
         324  +
        format!("{self:?}")
  362    325   
    }
  363         -
        fn build_enforcing_required_and_enum_traits(
  364         -
            self,
  365         -
        ) -> crate::output::ResponseCodeDefaultOperationOutput {
  366         -
            crate::output::ResponseCodeDefaultOperationOutput {}
         326  +
}
         327  +
impl<'source> ::pyo3::FromPyObject<'source>
         328  +
    for std::boxed::Box<ResponseCodeDefaultOperationOutput>
         329  +
{
         330  +
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
         331  +
        ob.extract::<ResponseCodeDefaultOperationOutput>()
         332  +
            .map(Box::new)
  367    333   
    }
         334  +
}
         335  +
         336  +
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ResponseCodeDefaultOperationOutput> {
         337  +
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
         338  +
        (*self).into_py(py)
  368    339   
    }
  369    340   
}
  370         -
/// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  371         -
pub mod response_code_http_fallback_operation_output {
         341  +
impl ResponseCodeDefaultOperationOutput {
         342  +
    /// Creates a new builder-style object to manufacture [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         343  +
    pub fn builder() -> crate::output::response_code_default_operation_output::Builder {
         344  +
        crate::output::response_code_default_operation_output::Builder::default()
         345  +
    }
         346  +
}
         347  +
/// See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         348  +
pub mod type_complexity_operation_output {
  372    349   
  373         -
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
         350  +
    impl ::std::convert::From<Builder> for crate::output::TypeComplexityOperationOutput {
  374    351   
        fn from(builder: Builder) -> Self {
  375    352   
            builder.build()
  376    353   
        }
  377    354   
    }
  378         -
    /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         355  +
    /// A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  379    356   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  380         -
    pub struct Builder {}
         357  +
    pub struct Builder {
         358  +
        pub(crate) list: ::std::option::Option<
         359  +
            ::std::vec::Vec<
         360  +
                ::std::vec::Vec<
         361  +
                    ::std::vec::Vec<
         362  +
                        ::std::collections::HashMap<
         363  +
                            ::std::string::String,
         364  +
                            crate::model::EmptyStructure,
         365  +
                        >,
         366  +
                    >,
         367  +
                >,
         368  +
            >,
         369  +
        >,
         370  +
    }
  381    371   
    impl Builder {
  382         -
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  383         -
        pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
         372  +
        #[allow(missing_docs)] // documentation missing in model
         373  +
        pub fn list(
         374  +
            mut self,
         375  +
            input: ::std::option::Option<
         376  +
                ::std::vec::Vec<
         377  +
                    ::std::vec::Vec<
         378  +
                        ::std::vec::Vec<
         379  +
                            ::std::collections::HashMap<
         380  +
                                ::std::string::String,
         381  +
                                crate::model::EmptyStructure,
         382  +
                            >,
         383  +
                        >,
         384  +
                    >,
         385  +
                >,
         386  +
            >,
         387  +
        ) -> Self {
         388  +
            self.list = input;
         389  +
            self
         390  +
        }
         391  +
        /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         392  +
        pub fn build(self) -> crate::output::TypeComplexityOperationOutput {
  384    393   
            self.build_enforcing_required_and_enum_traits()
  385    394   
        }
  386    395   
        fn build_enforcing_required_and_enum_traits(
  387    396   
            self,
  388         -
        ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
  389         -
            crate::output::ResponseCodeHttpFallbackOperationOutput {}
         397  +
        ) -> crate::output::TypeComplexityOperationOutput {
         398  +
            crate::output::TypeComplexityOperationOutput { list: self.list }
  390    399   
        }
  391    400   
    }
  392    401   
}
  393         -
/// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  394         -
pub mod response_code_required_operation_output {
  395         -
  396         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  397         -
    /// Holds one variant for each of the ways the builder can fail.
  398         -
    #[allow(clippy::enum_variant_names)]
  399         -
    pub enum ConstraintViolation {
  400         -
        /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
  401         -
        MissingResponseCode,
  402         -
    }
  403         -
    impl ::std::fmt::Display for ConstraintViolation {
  404         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  405         -
            match self {
  406         -
                ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
  407         -
            }
  408         -
        }
  409         -
    }
  410         -
    impl ::std::error::Error for ConstraintViolation {}
  411         -
    impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
  412         -
        type Error = ConstraintViolation;
         402  +
/// See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         403  +
pub mod required_inner_shape_operation_output {
  413    404   
  414         -
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
         405  +
    impl ::std::convert::From<Builder> for crate::output::RequiredInnerShapeOperationOutput {
         406  +
        fn from(builder: Builder) -> Self {
  415    407   
            builder.build()
  416    408   
        }
  417    409   
    }
  418         -
    /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         410  +
    /// A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  419    411   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  420    412   
    pub struct Builder {
  421         -
        pub(crate) response_code: ::std::option::Option<i32>,
         413  +
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
  422    414   
    }
  423    415   
    impl Builder {
  424    416   
        #[allow(missing_docs)] // documentation missing in model
  425         -
        pub fn response_code(mut self, input: i32) -> Self {
  426         -
            self.response_code = Some(input);
         417  +
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
         418  +
            self.inner = input;
  427    419   
            self
  428    420   
        }
  429         -
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  430         -
        ///
  431         -
        /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if you do not provide a value for all non-`Option`al members.
  432         -
        ///
  433         -
        pub fn build(
  434         -
            self,
  435         -
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  436         -
        {
         421  +
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         422  +
        pub fn build(self) -> crate::output::RequiredInnerShapeOperationOutput {
  437    423   
            self.build_enforcing_required_and_enum_traits()
  438    424   
        }
  439    425   
        fn build_enforcing_required_and_enum_traits(
  440    426   
            self,
  441         -
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
  442         -
        {
  443         -
            Ok(crate::output::ResponseCodeRequiredOperationOutput {
  444         -
                response_code: self
  445         -
                    .response_code
  446         -
                    .ok_or(ConstraintViolation::MissingResponseCode)?,
  447         -
            })
         427  +
        ) -> crate::output::RequiredInnerShapeOperationOutput {
         428  +
            crate::output::RequiredInnerShapeOperationOutput { inner: self.inner }
  448    429   
        }
  449    430   
    }
  450    431   
}
  451    432   
/// See [`RequiredHeaderCollectionOperationOutput`](crate::output::RequiredHeaderCollectionOperationOutput).
  452    433   
pub mod required_header_collection_operation_output {
  453    434   
  454    435   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  455    436   
    /// Holds one variant for each of the ways the builder can fail.
  456    437   
    #[allow(clippy::enum_variant_names)]
  457    438   
    pub enum ConstraintViolation {
@@ -499,480 +613,613 @@
  519    500   
                required_header_list: self
  520    501   
                    .required_header_list
  521    502   
                    .ok_or(ConstraintViolation::MissingRequiredHeaderList)?,
  522    503   
                required_header_set: self
  523    504   
                    .required_header_set
  524    505   
                    .ok_or(ConstraintViolation::MissingRequiredHeaderSet)?,
  525    506   
            })
  526    507   
        }
  527    508   
    }
  528    509   
}
  529         -
/// See [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  530         -
pub mod required_inner_shape_operation_output {
         510  +
/// See [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         511  +
pub mod response_code_required_operation_output {
  531    512   
  532         -
    impl ::std::convert::From<Builder> for crate::output::RequiredInnerShapeOperationOutput {
  533         -
        fn from(builder: Builder) -> Self {
         513  +
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
         514  +
    /// Holds one variant for each of the ways the builder can fail.
         515  +
    #[allow(clippy::enum_variant_names)]
         516  +
    pub enum ConstraintViolation {
         517  +
        /// `response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`.
         518  +
        MissingResponseCode,
         519  +
    }
         520  +
    impl ::std::fmt::Display for ConstraintViolation {
         521  +
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         522  +
            match self {
         523  +
                ConstraintViolation::MissingResponseCode => write!(f, "`response_code` was not provided but it is required when building `ResponseCodeRequiredOperationOutput`"),
         524  +
            }
         525  +
        }
         526  +
    }
         527  +
    impl ::std::error::Error for ConstraintViolation {}
         528  +
    impl ::std::convert::TryFrom<Builder> for crate::output::ResponseCodeRequiredOperationOutput {
         529  +
        type Error = ConstraintViolation;
         530  +
         531  +
        fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
  534    532   
            builder.build()
  535    533   
        }
  536    534   
    }
  537         -
    /// A builder for [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
         535  +
    /// A builder for [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
  538    536   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  539    537   
    pub struct Builder {
  540         -
        pub(crate) inner: ::std::option::Option<crate::model::InnerShape>,
         538  +
        pub(crate) response_code: ::std::option::Option<i32>,
  541    539   
    }
  542    540   
    impl Builder {
  543    541   
        #[allow(missing_docs)] // documentation missing in model
  544         -
        pub fn inner(mut self, input: ::std::option::Option<crate::model::InnerShape>) -> Self {
  545         -
            self.inner = input;
         542  +
        pub fn response_code(mut self, input: i32) -> Self {
         543  +
            self.response_code = Some(input);
  546    544   
            self
  547    545   
        }
  548         -
        /// Consumes the builder and constructs a [`RequiredInnerShapeOperationOutput`](crate::output::RequiredInnerShapeOperationOutput).
  549         -
        pub fn build(self) -> crate::output::RequiredInnerShapeOperationOutput {
         546  +
        /// Consumes the builder and constructs a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput).
         547  +
        ///
         548  +
        /// The builder fails to construct a [`ResponseCodeRequiredOperationOutput`](crate::output::ResponseCodeRequiredOperationOutput) if you do not provide a value for all non-`Option`al members.
         549  +
        ///
         550  +
        pub fn build(
         551  +
            self,
         552  +
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
         553  +
        {
  550    554   
            self.build_enforcing_required_and_enum_traits()
  551    555   
        }
  552    556   
        fn build_enforcing_required_and_enum_traits(
  553    557   
            self,
  554         -
        ) -> crate::output::RequiredInnerShapeOperationOutput {
  555         -
            crate::output::RequiredInnerShapeOperationOutput { inner: self.inner }
         558  +
        ) -> Result<crate::output::ResponseCodeRequiredOperationOutput, ConstraintViolation>
         559  +
        {
         560  +
            Ok(crate::output::ResponseCodeRequiredOperationOutput {
         561  +
                response_code: self
         562  +
                    .response_code
         563  +
                    .ok_or(ConstraintViolation::MissingResponseCode)?,
         564  +
            })
  556    565   
        }
  557    566   
    }
  558    567   
}
  559         -
/// See [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  560         -
pub mod type_complexity_operation_output {
         568  +
/// See [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         569  +
pub mod response_code_http_fallback_operation_output {
  561    570   
  562         -
    impl ::std::convert::From<Builder> for crate::output::TypeComplexityOperationOutput {
         571  +
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeHttpFallbackOperationOutput {
  563    572   
        fn from(builder: Builder) -> Self {
  564    573   
            builder.build()
  565    574   
        }
  566    575   
    }
  567         -
    /// A builder for [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
         576  +
    /// A builder for [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
  568    577   
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  569         -
    pub struct Builder {
  570         -
        pub(crate) list: ::std::option::Option<
  571         -
            ::std::vec::Vec<
  572         -
                ::std::vec::Vec<
  573         -
                    ::std::vec::Vec<
  574         -
                        ::std::collections::HashMap<
  575         -
                            ::std::string::String,
  576         -
                            crate::model::EmptyStructure,
  577         -
                        >,
  578         -
                    >,
  579         -
                >,
  580         -
            >,
  581         -
        >,
  582         -
    }
         578  +
    pub struct Builder {}
  583    579   
    impl Builder {
  584         -
        #[allow(missing_docs)] // documentation missing in model
  585         -
        pub fn list(
  586         -
            mut self,
  587         -
            input: ::std::option::Option<
  588         -
                ::std::vec::Vec<
  589         -
                    ::std::vec::Vec<
  590         -
                        ::std::vec::Vec<
  591         -
                            ::std::collections::HashMap<
  592         -
                                ::std::string::String,
  593         -
                                crate::model::EmptyStructure,
  594         -
                            >,
  595         -
                        >,
  596         -
                    >,
  597         -
                >,
  598         -
            >,
  599         -
        ) -> Self {
  600         -
            self.list = input;
  601         -
            self
         580  +
        /// Consumes the builder and constructs a [`ResponseCodeHttpFallbackOperationOutput`](crate::output::ResponseCodeHttpFallbackOperationOutput).
         581  +
        pub fn build(self) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
         582  +
            self.build_enforcing_required_and_enum_traits()
  602    583   
        }
  603         -
        /// Consumes the builder and constructs a [`TypeComplexityOperationOutput`](crate::output::TypeComplexityOperationOutput).
  604         -
        pub fn build(self) -> crate::output::TypeComplexityOperationOutput {
         584  +
        fn build_enforcing_required_and_enum_traits(
         585  +
            self,
         586  +
        ) -> crate::output::ResponseCodeHttpFallbackOperationOutput {
         587  +
            crate::output::ResponseCodeHttpFallbackOperationOutput {}
         588  +
        }
         589  +
    }
         590  +
}
         591  +
/// See [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         592  +
pub mod response_code_default_operation_output {
         593  +
         594  +
    impl ::std::convert::From<Builder> for crate::output::ResponseCodeDefaultOperationOutput {
         595  +
        fn from(builder: Builder) -> Self {
         596  +
            builder.build()
         597  +
        }
         598  +
    }
         599  +
    /// A builder for [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         600  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
         601  +
    pub struct Builder {}
         602  +
    impl Builder {
         603  +
        /// Consumes the builder and constructs a [`ResponseCodeDefaultOperationOutput`](crate::output::ResponseCodeDefaultOperationOutput).
         604  +
        pub fn build(self) -> crate::output::ResponseCodeDefaultOperationOutput {
  605    605   
            self.build_enforcing_required_and_enum_traits()
  606    606   
        }
  607    607   
        fn build_enforcing_required_and_enum_traits(
  608    608   
            self,
  609         -
        ) -> crate::output::TypeComplexityOperationOutput {
  610         -
            crate::output::TypeComplexityOperationOutput { list: self.list }
         609  +
        ) -> crate::output::ResponseCodeDefaultOperationOutput {
         610  +
            crate::output::ResponseCodeDefaultOperationOutput {}
  611    611   
        }
  612    612   
    }
  613    613   
}

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

@@ -1,1 +57,57 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pymodule]
    3      3   
#[pyo3(name = "misc")]
    4      4   
pub fn python_library(py: ::pyo3::Python<'_>, m: &::pyo3::types::PyModule) -> ::pyo3::PyResult<()> {
    5      5   
    let input = ::pyo3::types::PyModule::new(py, "input")?;
    6      6   
    let output = ::pyo3::types::PyModule::new(py, "output")?;
    7      7   
    let error = ::pyo3::types::PyModule::new(py, "error")?;
           8  +
    input.add_class::<crate::input::TypeComplexityOperationInput>()?;
           9  +
    output.add_class::<crate::output::TypeComplexityOperationOutput>()?;
    8     10   
    error.add_class::<crate::error::InternalServerError>()?;
    9         -
    output.add_class::<crate::output::ResponseCodeDefaultOperationOutput>()?;
   10         -
    input.add_class::<crate::input::ResponseCodeDefaultOperationInput>()?;
   11         -
    output.add_class::<crate::output::ResponseCodeHttpFallbackOperationOutput>()?;
   12         -
    input.add_class::<crate::input::ResponseCodeHttpFallbackOperationInput>()?;
   13         -
    output.add_class::<crate::output::ResponseCodeRequiredOperationOutput>()?;
   14         -
    input.add_class::<crate::input::ResponseCodeRequiredOperationInput>()?;
          11  +
    input.add_class::<crate::input::RequiredInnerShapeOperationInput>()?;
          12  +
    output.add_class::<crate::output::RequiredInnerShapeOperationOutput>()?;
   15     13   
    error.add_class::<crate::error::ValidationException>()?;
   16         -
    let model = ::pyo3::types::PyModule::new(py, "model")?;
   17         -
    model.add_class::<crate::model::ValidationExceptionField>()?;
   18         -
    output.add_class::<crate::output::RequiredHeaderCollectionOperationOutput>()?;
   19     14   
    input.add_class::<crate::input::RequiredHeaderCollectionOperationInput>()?;
   20         -
    output.add_class::<crate::output::RequiredInnerShapeOperationOutput>()?;
          15  +
    output.add_class::<crate::output::RequiredHeaderCollectionOperationOutput>()?;
          16  +
    input.add_class::<crate::input::ResponseCodeRequiredOperationInput>()?;
          17  +
    output.add_class::<crate::output::ResponseCodeRequiredOperationOutput>()?;
          18  +
    input.add_class::<crate::input::ResponseCodeHttpFallbackOperationInput>()?;
          19  +
    output.add_class::<crate::output::ResponseCodeHttpFallbackOperationOutput>()?;
          20  +
    input.add_class::<crate::input::ResponseCodeDefaultOperationInput>()?;
          21  +
    output.add_class::<crate::output::ResponseCodeDefaultOperationOutput>()?;
          22  +
    let model = ::pyo3::types::PyModule::new(py, "model")?;
   21     23   
    model.add_class::<crate::model::InnerShape>()?;
   22     24   
    model.add_class::<crate::model::InnermostShape>()?;
          25  +
    model.add_class::<crate::model::ValidationExceptionField>()?;
   23     26   
    model.add_class::<crate::model::PyUnionMarkerAUnion>()?;
   24         -
    input.add_class::<crate::input::RequiredInnerShapeOperationInput>()?;
   25         -
    output.add_class::<crate::output::TypeComplexityOperationOutput>()?;
   26     27   
    model.add_class::<crate::model::EmptyStructure>()?;
   27         -
    input.add_class::<crate::input::TypeComplexityOperationInput>()?;
   28     28   
    ::pyo3::py_run!(py, input, "import sys; sys.modules['misc.input'] = input");
   29     29   
    m.add_submodule(input)?;
   30     30   
    ::pyo3::py_run!(
   31     31   
        py,
   32     32   
        output,
   33     33   
        "import sys; sys.modules['misc.output'] = output"
   34     34   
    );
   35     35   
    m.add_submodule(output)?;
   36     36   
    ::pyo3::py_run!(py, error, "import sys; sys.modules['misc.error'] = error");
   37     37   
    m.add_submodule(error)?;

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

@@ -1,1 +342,342 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
/// Python handler for operation `ResponseCodeDefaultOperation`.
    3         -
pub(crate) async fn response_code_default_operation(
    4         -
    input: crate::input::ResponseCodeDefaultOperationInput,
           2  +
/// Python handler for operation `TypeComplexityOperation`.
           3  +
pub(crate) async fn type_complexity_operation(
           4  +
    input: crate::input::TypeComplexityOperationInput,
    5      5   
    state: ::aws_smithy_legacy_http_server::Extension<
    6      6   
        ::aws_smithy_http_server_python::context::PyContext,
    7      7   
    >,
    8      8   
    handler: ::aws_smithy_http_server_python::PyHandler,
    9      9   
) -> std::result::Result<
   10         -
    crate::output::ResponseCodeDefaultOperationOutput,
   11         -
    crate::error::ResponseCodeDefaultOperationError,
          10  +
    crate::output::TypeComplexityOperationOutput,
          11  +
    crate::error::TypeComplexityOperationError,
   12     12   
> {
   13     13   
    // Async block used to run the handler and catch any Python error.
   14     14   
    let result = if handler.is_coroutine {
   15     15   
        ::tracing::trace!(
   16         -
            name = "response_code_default_operation",
          16  +
            name = "type_complexity_operation",
   17     17   
            "executing python handler coroutine"
   18     18   
        );
   19     19   
        let result = ::pyo3::Python::with_gil(|py| {
   20     20   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   21     21   
            let coroutine = if handler.args == 1 {
   22     22   
                pyhandler.call1((input,))?
   23     23   
            } else {
   24     24   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   25     25   
            };
   26     26   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   27     27   
        })?;
   28     28   
        result.await.and_then(|r| {
   29     29   
            ::pyo3::Python::with_gil(|py| {
   30         -
                r.extract::<crate::output::ResponseCodeDefaultOperationOutput>(py)
          30  +
                r.extract::<crate::output::TypeComplexityOperationOutput>(py)
   31     31   
            })
   32     32   
        })
   33     33   
    } else {
   34     34   
        ::tracing::trace!(
   35         -
            name = "response_code_default_operation",
          35  +
            name = "type_complexity_operation",
   36     36   
            "executing python handler function"
   37     37   
        );
   38     38   
        ::pyo3::Python::with_gil(|py| {
   39     39   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   40     40   
            let output = if handler.args == 1 {
   41     41   
                pyhandler.call1((input,))?
   42     42   
            } else {
   43     43   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   44     44   
            };
   45         -
            output.extract::<crate::output::ResponseCodeDefaultOperationOutput>()
          45  +
            output.extract::<crate::output::TypeComplexityOperationOutput>()
   46     46   
        })
   47     47   
    };
   48     48   
    // Catch and record a Python traceback.
   49     49   
    result.map_err(|e| {
   50     50   
        let rich_py_err =
   51     51   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
   52     52   
                e.clone_ref(py)
   53     53   
            }));
   54     54   
        ::tracing::error!(error = ?rich_py_err, "handler error");
   55     55   
        e.into()
   56     56   
    })
   57     57   
}
   58     58   
   59         -
/// Python handler for operation `ResponseCodeHttpFallbackOperation`.
   60         -
pub(crate) async fn response_code_http_fallback_operation(
   61         -
    input: crate::input::ResponseCodeHttpFallbackOperationInput,
          59  +
/// Python handler for operation `RequiredInnerShapeOperation`.
          60  +
pub(crate) async fn required_inner_shape_operation(
          61  +
    input: crate::input::RequiredInnerShapeOperationInput,
   62     62   
    state: ::aws_smithy_legacy_http_server::Extension<
   63     63   
        ::aws_smithy_http_server_python::context::PyContext,
   64     64   
    >,
   65     65   
    handler: ::aws_smithy_http_server_python::PyHandler,
   66     66   
) -> std::result::Result<
   67         -
    crate::output::ResponseCodeHttpFallbackOperationOutput,
   68         -
    crate::error::ResponseCodeHttpFallbackOperationError,
          67  +
    crate::output::RequiredInnerShapeOperationOutput,
          68  +
    crate::error::RequiredInnerShapeOperationError,
   69     69   
> {
   70     70   
    // Async block used to run the handler and catch any Python error.
   71     71   
    let result = if handler.is_coroutine {
   72     72   
        ::tracing::trace!(
   73         -
            name = "response_code_http_fallback_operation",
          73  +
            name = "required_inner_shape_operation",
   74     74   
            "executing python handler coroutine"
   75     75   
        );
   76     76   
        let result = ::pyo3::Python::with_gil(|py| {
   77     77   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   78     78   
            let coroutine = if handler.args == 1 {
   79     79   
                pyhandler.call1((input,))?
   80     80   
            } else {
   81     81   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
   82     82   
            };
   83     83   
            ::pyo3_asyncio::tokio::into_future(coroutine)
   84     84   
        })?;
   85     85   
        result.await.and_then(|r| {
   86     86   
            ::pyo3::Python::with_gil(|py| {
   87         -
                r.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>(py)
          87  +
                r.extract::<crate::output::RequiredInnerShapeOperationOutput>(py)
   88     88   
            })
   89     89   
        })
   90     90   
    } else {
   91     91   
        ::tracing::trace!(
   92         -
            name = "response_code_http_fallback_operation",
          92  +
            name = "required_inner_shape_operation",
   93     93   
            "executing python handler function"
   94     94   
        );
   95     95   
        ::pyo3::Python::with_gil(|py| {
   96     96   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
   97     97   
            let output = if handler.args == 1 {
   98     98   
                pyhandler.call1((input,))?
   99     99   
            } else {
  100    100   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  101    101   
            };
  102         -
            output.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>()
         102  +
            output.extract::<crate::output::RequiredInnerShapeOperationOutput>()
  103    103   
        })
  104    104   
    };
  105    105   
    // Catch and record a Python traceback.
  106    106   
    result.map_err(|e| {
  107    107   
        let rich_py_err =
  108    108   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  109    109   
                e.clone_ref(py)
  110    110   
            }));
  111    111   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  112    112   
        e.into()
  113    113   
    })
  114    114   
}
  115    115   
  116         -
/// Python handler for operation `ResponseCodeRequiredOperation`.
  117         -
pub(crate) async fn response_code_required_operation(
  118         -
    input: crate::input::ResponseCodeRequiredOperationInput,
         116  +
/// Python handler for operation `RequiredHeaderCollectionOperation`.
         117  +
pub(crate) async fn required_header_collection_operation(
         118  +
    input: crate::input::RequiredHeaderCollectionOperationInput,
  119    119   
    state: ::aws_smithy_legacy_http_server::Extension<
  120    120   
        ::aws_smithy_http_server_python::context::PyContext,
  121    121   
    >,
  122    122   
    handler: ::aws_smithy_http_server_python::PyHandler,
  123    123   
) -> std::result::Result<
  124         -
    crate::output::ResponseCodeRequiredOperationOutput,
  125         -
    crate::error::ResponseCodeRequiredOperationError,
         124  +
    crate::output::RequiredHeaderCollectionOperationOutput,
         125  +
    crate::error::RequiredHeaderCollectionOperationError,
  126    126   
> {
  127    127   
    // Async block used to run the handler and catch any Python error.
  128    128   
    let result = if handler.is_coroutine {
  129    129   
        ::tracing::trace!(
  130         -
            name = "response_code_required_operation",
         130  +
            name = "required_header_collection_operation",
  131    131   
            "executing python handler coroutine"
  132    132   
        );
  133    133   
        let result = ::pyo3::Python::with_gil(|py| {
  134    134   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  135    135   
            let coroutine = if handler.args == 1 {
  136    136   
                pyhandler.call1((input,))?
  137    137   
            } else {
  138    138   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  139    139   
            };
  140    140   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  141    141   
        })?;
  142    142   
        result.await.and_then(|r| {
  143    143   
            ::pyo3::Python::with_gil(|py| {
  144         -
                r.extract::<crate::output::ResponseCodeRequiredOperationOutput>(py)
         144  +
                r.extract::<crate::output::RequiredHeaderCollectionOperationOutput>(py)
  145    145   
            })
  146    146   
        })
  147    147   
    } else {
  148    148   
        ::tracing::trace!(
  149         -
            name = "response_code_required_operation",
         149  +
            name = "required_header_collection_operation",
  150    150   
            "executing python handler function"
  151    151   
        );
  152    152   
        ::pyo3::Python::with_gil(|py| {
  153    153   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  154    154   
            let output = if handler.args == 1 {
  155    155   
                pyhandler.call1((input,))?
  156    156   
            } else {
  157    157   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  158    158   
            };
  159         -
            output.extract::<crate::output::ResponseCodeRequiredOperationOutput>()
         159  +
            output.extract::<crate::output::RequiredHeaderCollectionOperationOutput>()
  160    160   
        })
  161    161   
    };
  162    162   
    // Catch and record a Python traceback.
  163    163   
    result.map_err(|e| {
  164    164   
        let rich_py_err =
  165    165   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  166    166   
                e.clone_ref(py)
  167    167   
            }));
  168    168   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  169    169   
        e.into()
  170    170   
    })
  171    171   
}
  172    172   
  173         -
/// Python handler for operation `RequiredHeaderCollectionOperation`.
  174         -
pub(crate) async fn required_header_collection_operation(
  175         -
    input: crate::input::RequiredHeaderCollectionOperationInput,
         173  +
/// Python handler for operation `ResponseCodeRequiredOperation`.
         174  +
pub(crate) async fn response_code_required_operation(
         175  +
    input: crate::input::ResponseCodeRequiredOperationInput,
  176    176   
    state: ::aws_smithy_legacy_http_server::Extension<
  177    177   
        ::aws_smithy_http_server_python::context::PyContext,
  178    178   
    >,
  179    179   
    handler: ::aws_smithy_http_server_python::PyHandler,
  180    180   
) -> std::result::Result<
  181         -
    crate::output::RequiredHeaderCollectionOperationOutput,
  182         -
    crate::error::RequiredHeaderCollectionOperationError,
         181  +
    crate::output::ResponseCodeRequiredOperationOutput,
         182  +
    crate::error::ResponseCodeRequiredOperationError,
  183    183   
> {
  184    184   
    // Async block used to run the handler and catch any Python error.
  185    185   
    let result = if handler.is_coroutine {
  186    186   
        ::tracing::trace!(
  187         -
            name = "required_header_collection_operation",
         187  +
            name = "response_code_required_operation",
  188    188   
            "executing python handler coroutine"
  189    189   
        );
  190    190   
        let result = ::pyo3::Python::with_gil(|py| {
  191    191   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  192    192   
            let coroutine = if handler.args == 1 {
  193    193   
                pyhandler.call1((input,))?
  194    194   
            } else {
  195    195   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  196    196   
            };
  197    197   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  198    198   
        })?;
  199    199   
        result.await.and_then(|r| {
  200    200   
            ::pyo3::Python::with_gil(|py| {
  201         -
                r.extract::<crate::output::RequiredHeaderCollectionOperationOutput>(py)
         201  +
                r.extract::<crate::output::ResponseCodeRequiredOperationOutput>(py)
  202    202   
            })
  203    203   
        })
  204    204   
    } else {
  205    205   
        ::tracing::trace!(
  206         -
            name = "required_header_collection_operation",
         206  +
            name = "response_code_required_operation",
  207    207   
            "executing python handler function"
  208    208   
        );
  209    209   
        ::pyo3::Python::with_gil(|py| {
  210    210   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  211    211   
            let output = if handler.args == 1 {
  212    212   
                pyhandler.call1((input,))?
  213    213   
            } else {
  214    214   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  215    215   
            };
  216         -
            output.extract::<crate::output::RequiredHeaderCollectionOperationOutput>()
         216  +
            output.extract::<crate::output::ResponseCodeRequiredOperationOutput>()
  217    217   
        })
  218    218   
    };
  219    219   
    // Catch and record a Python traceback.
  220    220   
    result.map_err(|e| {
  221    221   
        let rich_py_err =
  222    222   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  223    223   
                e.clone_ref(py)
  224    224   
            }));
  225    225   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  226    226   
        e.into()
  227    227   
    })
  228    228   
}
  229    229   
  230         -
/// Python handler for operation `RequiredInnerShapeOperation`.
  231         -
pub(crate) async fn required_inner_shape_operation(
  232         -
    input: crate::input::RequiredInnerShapeOperationInput,
         230  +
/// Python handler for operation `ResponseCodeHttpFallbackOperation`.
         231  +
pub(crate) async fn response_code_http_fallback_operation(
         232  +
    input: crate::input::ResponseCodeHttpFallbackOperationInput,
  233    233   
    state: ::aws_smithy_legacy_http_server::Extension<
  234    234   
        ::aws_smithy_http_server_python::context::PyContext,
  235    235   
    >,
  236    236   
    handler: ::aws_smithy_http_server_python::PyHandler,
  237    237   
) -> std::result::Result<
  238         -
    crate::output::RequiredInnerShapeOperationOutput,
  239         -
    crate::error::RequiredInnerShapeOperationError,
         238  +
    crate::output::ResponseCodeHttpFallbackOperationOutput,
         239  +
    crate::error::ResponseCodeHttpFallbackOperationError,
  240    240   
> {
  241    241   
    // Async block used to run the handler and catch any Python error.
  242    242   
    let result = if handler.is_coroutine {
  243    243   
        ::tracing::trace!(
  244         -
            name = "required_inner_shape_operation",
         244  +
            name = "response_code_http_fallback_operation",
  245    245   
            "executing python handler coroutine"
  246    246   
        );
  247    247   
        let result = ::pyo3::Python::with_gil(|py| {
  248    248   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  249    249   
            let coroutine = if handler.args == 1 {
  250    250   
                pyhandler.call1((input,))?
  251    251   
            } else {
  252    252   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  253    253   
            };
  254    254   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  255    255   
        })?;
  256    256   
        result.await.and_then(|r| {
  257    257   
            ::pyo3::Python::with_gil(|py| {
  258         -
                r.extract::<crate::output::RequiredInnerShapeOperationOutput>(py)
         258  +
                r.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>(py)
  259    259   
            })
  260    260   
        })
  261    261   
    } else {
  262    262   
        ::tracing::trace!(
  263         -
            name = "required_inner_shape_operation",
         263  +
            name = "response_code_http_fallback_operation",
  264    264   
            "executing python handler function"
  265    265   
        );
  266    266   
        ::pyo3::Python::with_gil(|py| {
  267    267   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  268    268   
            let output = if handler.args == 1 {
  269    269   
                pyhandler.call1((input,))?
  270    270   
            } else {
  271    271   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  272    272   
            };
  273         -
            output.extract::<crate::output::RequiredInnerShapeOperationOutput>()
         273  +
            output.extract::<crate::output::ResponseCodeHttpFallbackOperationOutput>()
  274    274   
        })
  275    275   
    };
  276    276   
    // Catch and record a Python traceback.
  277    277   
    result.map_err(|e| {
  278    278   
        let rich_py_err =
  279    279   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  280    280   
                e.clone_ref(py)
  281    281   
            }));
  282    282   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  283    283   
        e.into()
  284    284   
    })
  285    285   
}
  286    286   
  287         -
/// Python handler for operation `TypeComplexityOperation`.
  288         -
pub(crate) async fn type_complexity_operation(
  289         -
    input: crate::input::TypeComplexityOperationInput,
         287  +
/// Python handler for operation `ResponseCodeDefaultOperation`.
         288  +
pub(crate) async fn response_code_default_operation(
         289  +
    input: crate::input::ResponseCodeDefaultOperationInput,
  290    290   
    state: ::aws_smithy_legacy_http_server::Extension<
  291    291   
        ::aws_smithy_http_server_python::context::PyContext,
  292    292   
    >,
  293    293   
    handler: ::aws_smithy_http_server_python::PyHandler,
  294    294   
) -> std::result::Result<
  295         -
    crate::output::TypeComplexityOperationOutput,
  296         -
    crate::error::TypeComplexityOperationError,
         295  +
    crate::output::ResponseCodeDefaultOperationOutput,
         296  +
    crate::error::ResponseCodeDefaultOperationError,
  297    297   
> {
  298    298   
    // Async block used to run the handler and catch any Python error.
  299    299   
    let result = if handler.is_coroutine {
  300    300   
        ::tracing::trace!(
  301         -
            name = "type_complexity_operation",
         301  +
            name = "response_code_default_operation",
  302    302   
            "executing python handler coroutine"
  303    303   
        );
  304    304   
        let result = ::pyo3::Python::with_gil(|py| {
  305    305   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  306    306   
            let coroutine = if handler.args == 1 {
  307    307   
                pyhandler.call1((input,))?
  308    308   
            } else {
  309    309   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  310    310   
            };
  311    311   
            ::pyo3_asyncio::tokio::into_future(coroutine)
  312    312   
        })?;
  313    313   
        result.await.and_then(|r| {
  314    314   
            ::pyo3::Python::with_gil(|py| {
  315         -
                r.extract::<crate::output::TypeComplexityOperationOutput>(py)
         315  +
                r.extract::<crate::output::ResponseCodeDefaultOperationOutput>(py)
  316    316   
            })
  317    317   
        })
  318    318   
    } else {
  319    319   
        ::tracing::trace!(
  320         -
            name = "type_complexity_operation",
         320  +
            name = "response_code_default_operation",
  321    321   
            "executing python handler function"
  322    322   
        );
  323    323   
        ::pyo3::Python::with_gil(|py| {
  324    324   
            let pyhandler: &::pyo3::types::PyFunction = handler.extract(py)?;
  325    325   
            let output = if handler.args == 1 {
  326    326   
                pyhandler.call1((input,))?
  327    327   
            } else {
  328    328   
                pyhandler.call1((input, ::pyo3::ToPyObject::to_object(&state.0, py)))?
  329    329   
            };
  330         -
            output.extract::<crate::output::TypeComplexityOperationOutput>()
         330  +
            output.extract::<crate::output::ResponseCodeDefaultOperationOutput>()
  331    331   
        })
  332    332   
    };
  333    333   
    // Catch and record a Python traceback.
  334    334   
    result.map_err(|e| {
  335    335   
        let rich_py_err =
  336    336   
            ::aws_smithy_http_server_python::rich_py_err(::pyo3::Python::with_gil(|py| {
  337    337   
                e.clone_ref(py)
  338    338   
            }));
  339    339   
        ::tracing::error!(error = ?rich_py_err, "handler error");
  340    340   
        e.into()

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

@@ -1,1 +44,45 @@
    5      5   
#![allow(clippy::large_enum_variant)]
    6      6   
#![allow(clippy::wrong_self_convention)]
    7      7   
#![allow(clippy::should_implement_trait)]
    8      8   
#![allow(clippy::disallowed_names)]
    9      9   
#![allow(clippy::vec_init_then_push)]
   10     10   
#![allow(clippy::type_complexity)]
   11     11   
#![allow(clippy::needless_return)]
   12     12   
#![allow(clippy::derive_partial_eq_without_eq)]
   13     13   
#![allow(clippy::result_large_err)]
   14     14   
#![allow(clippy::unnecessary_map_on_constructor)]
          15  +
#![allow(clippy::useless_conversion)]
   15     16   
#![allow(clippy::deprecated_semver)]
   16     17   
#![allow(clippy::uninlined_format_args)]
   17     18   
#![allow(rustdoc::bare_urls)]
   18     19   
#![allow(rustdoc::redundant_explicit_links)]
   19     20   
#![allow(rustdoc::broken_intra_doc_links)]
   20     21   
#![allow(rustdoc::invalid_html_tags)]
   21     22   
#![forbid(unsafe_code)]
   22     23   
#![cfg_attr(docsrs, feature(doc_cfg))]
   23     24   
//! Confounds model generation machinery with lots of problematic casing
   24     25   

tmp-codegen-diff/codegen-server-test-python/naming_test_casing/rust-server-codegen-python/src/python_module_export.rs

@@ -1,1 +40,40 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
#[::pyo3::pymodule]
    3      3   
#[pyo3(name = "naming_test_casing")]
    4      4   
pub fn python_library(py: ::pyo3::Python<'_>, m: &::pyo3::types::PyModule) -> ::pyo3::PyResult<()> {
    5      5   
    let input = ::pyo3::types::PyModule::new(py, "input")?;
    6      6   
    let output = ::pyo3::types::PyModule::new(py, "output")?;
    7      7   
    let error = ::pyo3::types::PyModule::new(py, "error")?;
    8         -
    error.add_class::<crate::error::InternalServerError>()?;
    9         -
    output.add_class::<crate::output::DoNothingOutput>()?;
   10      8   
    input.add_class::<crate::input::DoNothingInput>()?;
           9  +
    output.add_class::<crate::output::DoNothingOutput>()?;
          10  +
    error.add_class::<crate::error::InternalServerError>()?;
   11     11   
    ::pyo3::py_run!(
   12     12   
        py,
   13     13   
        input,
   14     14   
        "import sys; sys.modules['naming_test_casing.input'] = input"
   15     15   
    );
   16     16   
    m.add_submodule(input)?;
   17     17   
    ::pyo3::py_run!(
   18     18   
        py,
   19     19   
        output,
   20     20   
        "import sys; sys.modules['naming_test_casing.output'] = output"

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

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