Server Test Python

Server Test Python

rev. 0b749be6d000fdc7ef59d1bc26f1dce00358d95c

Files changed:

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/python/rest_json_extras/__init__.pyi

@@ -23,23 +102,82 @@
   43     43   
        raise NotImplementedError
   44     44   
   45     45   
    @app.enum_query
   46     46   
    def enum_query(input: input::EnumQueryInput, ctx: Context) -> output::EnumQueryOutput:
   47     47   
        raise NotImplementedError
   48     48   
   49     49   
    @app.escaped_string_values
   50     50   
    def escaped_string_values(input: input::EscapedStringValuesInput, ctx: Context) -> output::EscapedStringValuesOutput:
   51     51   
        raise NotImplementedError
   52     52   
   53         -
    @app.http_enum_payload2
   54         -
    def http_enum_payload2(input: input::HttpEnumPayload2Input, ctx: Context) -> output::HttpEnumPayload2Output:
   55         -
        raise NotImplementedError
   56         -
   57         -
    # This example serializes a blob shape in the payload.
   58         -
    #
   59         -
    # In this example, no JSON document is synthesized because the payload is
   60         -
    # not a structure or a union type.
   61         -
    @app.http_payload_traits2
   62         -
    def http_payload_traits2(input: input::HttpPayloadTraits2Input, ctx: Context) -> output::HttpPayloadTraits2Output:
   63         -
        raise NotImplementedError
   64         -
   65         -
    @app.http_string_payload2
   66         -
    def http_string_payload2(input: input::HttpStringPayload2Input, ctx: Context) -> output::HttpStringPayload2Output:
   67         -
        raise NotImplementedError
   68         -
   69         -
    @app.malformed_content_type_with_body2
   70         -
    def malformed_content_type_with_body2(input: input::MalformedContentTypeWithBody2Input, ctx: Context) -> output::MalformedContentTypeWithBody2Output:
   71         -
        raise NotImplementedError
   72         -
   73     53   
    @app.map_with_enum_key_op
   74     54   
    def map_with_enum_key_op(input: input::MapWithEnumKeyOpInput, ctx: Context) -> output::MapWithEnumKeyOpOutput:
   75     55   
        raise NotImplementedError
   76     56   
   77     57   
    @app.null_in_non_sparse
   78     58   
    def null_in_non_sparse(input: input::NullInNonSparseInput, ctx: Context) -> output::NullInNonSparseOutput:
   79     59   
        raise NotImplementedError
   80     60   
   81     61   
    @app.primitive_int_header
   82     62   
    def primitive_int_header(input: input::PrimitiveIntHeaderInput, ctx: Context) -> output::PrimitiveIntHeaderOutput:
@@ -117,97 +208,156 @@
  137    117   
  138    118   
  139    119   
    def escaped_string_values(self, func: typing.Union[typing.Callable[[rest_json_extras.input.EscapedStringValuesInput, Ctx], typing.Union[rest_json_extras.output.EscapedStringValuesOutput, typing.Awaitable[rest_json_extras.output.EscapedStringValuesOutput]]], typing.Callable[[rest_json_extras.input.EscapedStringValuesInput], typing.Union[rest_json_extras.output.EscapedStringValuesOutput, typing.Awaitable[rest_json_extras.output.EscapedStringValuesOutput]]]]) -> None:
  140    120   
        """
  141    121   
        Method to register `escaped_string_values` Python implementation inside the handlers map.
  142    122   
        It can be used as a function decorator in Python.
  143    123   
        """
  144    124   
        ...
  145    125   
  146    126   
  147         -
    def http_enum_payload2(self, func: typing.Union[typing.Callable[[rest_json_extras.input.HttpEnumPayload2Input, Ctx], typing.Union[rest_json_extras.output.HttpEnumPayload2Output, typing.Awaitable[rest_json_extras.output.HttpEnumPayload2Output]]], typing.Callable[[rest_json_extras.input.HttpEnumPayload2Input], typing.Union[rest_json_extras.output.HttpEnumPayload2Output, typing.Awaitable[rest_json_extras.output.HttpEnumPayload2Output]]]]) -> None:
  148         -
        """
  149         -
        Method to register `http_enum_payload2` Python implementation inside the handlers map.
  150         -
        It can be used as a function decorator in Python.
  151         -
        """
  152         -
        ...
  153         -
  154         -
  155         -
    def http_payload_traits2(self, func: typing.Union[typing.Callable[[rest_json_extras.input.HttpPayloadTraits2Input, Ctx], typing.Union[rest_json_extras.output.HttpPayloadTraits2Output, typing.Awaitable[rest_json_extras.output.HttpPayloadTraits2Output]]], typing.Callable[[rest_json_extras.input.HttpPayloadTraits2Input], typing.Union[rest_json_extras.output.HttpPayloadTraits2Output, typing.Awaitable[rest_json_extras.output.HttpPayloadTraits2Output]]]]) -> None:
  156         -
        """
  157         -
        Method to register `http_payload_traits2` Python implementation inside the handlers map.
  158         -
        It can be used as a function decorator in Python.
  159         -
        """
  160         -
        ...
  161         -
  162         -
  163         -
    def http_string_payload2(self, func: typing.Union[typing.Callable[[rest_json_extras.input.HttpStringPayload2Input, Ctx], typing.Union[rest_json_extras.output.HttpStringPayload2Output, typing.Awaitable[rest_json_extras.output.HttpStringPayload2Output]]], typing.Callable[[rest_json_extras.input.HttpStringPayload2Input], typing.Union[rest_json_extras.output.HttpStringPayload2Output, typing.Awaitable[rest_json_extras.output.HttpStringPayload2Output]]]]) -> None:
  164         -
        """
  165         -
        Method to register `http_string_payload2` Python implementation inside the handlers map.
  166         -
        It can be used as a function decorator in Python.
  167         -
        """
  168         -
        ...
  169         -
  170         -
  171         -
    def malformed_content_type_with_body2(self, func: typing.Union[typing.Callable[[rest_json_extras.input.MalformedContentTypeWithBody2Input, Ctx], typing.Union[rest_json_extras.output.MalformedContentTypeWithBody2Output, typing.Awaitable[rest_json_extras.output.MalformedContentTypeWithBody2Output]]], typing.Callable[[rest_json_extras.input.MalformedContentTypeWithBody2Input], typing.Union[rest_json_extras.output.MalformedContentTypeWithBody2Output, typing.Awaitable[rest_json_extras.output.MalformedContentTypeWithBody2Output]]]]) -> None:
  172         -
        """
  173         -
        Method to register `malformed_content_type_with_body2` Python implementation inside the handlers map.
  174         -
        It can be used as a function decorator in Python.
  175         -
        """
  176         -
        ...
  177         -
  178         -
  179    127   
    def map_with_enum_key_op(self, func: typing.Union[typing.Callable[[rest_json_extras.input.MapWithEnumKeyOpInput, Ctx], typing.Union[rest_json_extras.output.MapWithEnumKeyOpOutput, typing.Awaitable[rest_json_extras.output.MapWithEnumKeyOpOutput]]], typing.Callable[[rest_json_extras.input.MapWithEnumKeyOpInput], typing.Union[rest_json_extras.output.MapWithEnumKeyOpOutput, typing.Awaitable[rest_json_extras.output.MapWithEnumKeyOpOutput]]]]) -> None:
  180    128   
        """
  181    129   
        Method to register `map_with_enum_key_op` Python implementation inside the handlers map.
  182    130   
        It can be used as a function decorator in Python.
  183    131   
        """
  184    132   
        ...
  185    133   
  186    134   
  187    135   
    def middleware(self, func: typing.Callable[[rest_json_extras.middleware.Request, typing.Callable[[rest_json_extras.middleware.Request], typing.Awaitable[rest_json_extras.middleware.Response]]], typing.Awaitable[rest_json_extras.middleware.Response]]) -> None:
  188    136   
        """

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/python/rest_json_extras/input/__init__.pyi

@@ -1,1 +90,59 @@
    1      1   
import rest_json_extras.model
    2         -
import rest_json_extras.types
    3      2   
import typing
    4      3   
    5      4   
class CaseInsensitiveErrorOperationInput:
    6      5   
    def __init__(self) -> None:
    7      6   
        ...
    8      7   
    9      8   
   10      9   
class EmptyStructWithContentOnWireOpInput:
   11     10   
    def __init__(self) -> None:
   12     11   
        ...
   13     12   
   14     13   
   15     14   
class EnumQueryInput:
   16     15   
    enum: rest_json_extras.model.StringEnum
   17     16   
   18     17   
    def __init__(self, r#enum: rest_json_extras.model.StringEnum) -> None:
   19     18   
        ...
   20     19   
   21     20   
   22     21   
class EscapedStringValuesInput:
   23     22   
    enum: typing.Optional[rest_json_extras.model.EnumWithEscapedChars]
   24     23   
   25     24   
    some_string: typing.Optional[str]
   26     25   
   27     26   
    def __init__(self, r#enum: typing.Optional[rest_json_extras.model.EnumWithEscapedChars] = ..., some_string: typing.Optional[str] = ...) -> None:
   28     27   
        ...
   29     28   
   30     29   
   31         -
class HttpEnumPayload2Input:
   32         -
    payload: typing.Optional[rest_json_extras.model.StringEnum]
   33         -
   34         -
    def __init__(self, payload: typing.Optional[rest_json_extras.model.StringEnum] = ...) -> None:
   35         -
        ...
   36         -
   37         -
   38         -
class HttpPayloadTraits2Input:
   39         -
    blob: typing.Optional[rest_json_extras.types.Blob]
   40         -
   41         -
    foo: typing.Optional[str]
   42         -
   43         -
    def __init__(self, foo: typing.Optional[str] = ..., blob: typing.Optional[rest_json_extras.types.Blob] = ...) -> None:
   44         -
        ...
   45         -
   46         -
   47         -
class HttpStringPayload2Input:
   48         -
    payload: typing.Optional[str]
   49         -
   50         -
    def __init__(self, payload: typing.Optional[str] = ...) -> None:
   51         -
        ...
   52         -
   53         -
   54         -
class MalformedContentTypeWithBody2Input:
   55         -
    salutation: typing.Optional[str]
   56         -
   57         -
    def __init__(self, salutation: typing.Optional[str] = ...) -> None:
   58         -
        ...
   59         -
   60         -
   61     30   
class MapWithEnumKeyOpInput:
   62     31   
    map: typing.Optional[typing.Dict[rest_json_extras.model.StringEnum, str]]
   63     32   
   64     33   
    def __init__(self, map: typing.Optional[typing.Dict[rest_json_extras.model.StringEnum, str]] = ...) -> None:
   65     34   
        ...
   66     35   
   67     36   
   68     37   
class NullInNonSparseInput:
   69     38   
    def __init__(self) -> None:
   70     39   
        ...

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/python/rest_json_extras/output/__init__.pyi

@@ -1,1 +88,59 @@
    1      1   
import rest_json_extras.model
    2         -
import rest_json_extras.types
    3      2   
import typing
    4      3   
    5      4   
class CaseInsensitiveErrorOperationOutput:
    6      5   
    def __init__(self) -> None:
    7      6   
        ...
    8      7   
    9      8   
   10      9   
class EmptyStructWithContentOnWireOpOutput:
   11     10   
    empty: typing.Optional[rest_json_extras.model.EmptyStruct]
   12     11   
   13     12   
    def __init__(self, empty: typing.Optional[rest_json_extras.model.EmptyStruct] = ...) -> None:
   14     13   
        ...
   15     14   
   16     15   
   17     16   
class EnumQueryOutput:
   18     17   
    def __init__(self) -> None:
   19     18   
        ...
   20     19   
   21     20   
   22     21   
class EscapedStringValuesOutput:
   23     22   
    enum: typing.Optional[rest_json_extras.model.EnumWithEscapedChars]
   24     23   
   25     24   
    some_string: typing.Optional[str]
   26     25   
   27     26   
    def __init__(self, r#enum: typing.Optional[rest_json_extras.model.EnumWithEscapedChars] = ..., some_string: typing.Optional[str] = ...) -> None:
   28     27   
        ...
   29     28   
   30     29   
   31         -
class HttpEnumPayload2Output:
   32         -
    payload: typing.Optional[rest_json_extras.model.StringEnum]
   33         -
   34         -
    def __init__(self, payload: typing.Optional[rest_json_extras.model.StringEnum] = ...) -> None:
   35         -
        ...
   36         -
   37         -
   38         -
class HttpPayloadTraits2Output:
   39         -
    blob: typing.Optional[rest_json_extras.types.Blob]
   40         -
   41         -
    foo: typing.Optional[str]
   42         -
   43         -
    def __init__(self, foo: typing.Optional[str] = ..., blob: typing.Optional[rest_json_extras.types.Blob] = ...) -> None:
   44         -
        ...
   45         -
   46         -
   47         -
class HttpStringPayload2Output:
   48         -
    payload: typing.Optional[str]
   49         -
   50         -
    def __init__(self, payload: typing.Optional[str] = ...) -> None:
   51         -
        ...
   52         -
   53         -
   54         -
class MalformedContentTypeWithBody2Output:
   55         -
    def __init__(self) -> None:
   56         -
        ...
   57         -
   58         -
   59     30   
class MapWithEnumKeyOpOutput:
   60     31   
    map: typing.Optional[typing.Dict[rest_json_extras.model.StringEnum, str]]
   61     32   
   62     33   
    def __init__(self, map: typing.Optional[typing.Dict[rest_json_extras.model.StringEnum, str]] = ...) -> None:
   63     34   
        ...
   64     35   
   65     36   
   66     37   
class NullInNonSparseOutput:
   67     38   
    list: typing.Optional[typing.List[str]]
   68     39   

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

@@ -15,15 +131,131 @@
   35     35   
    }
   36     36   
}
   37     37   
impl ::std::error::Error for ExtraError {}
   38     38   
impl ExtraError {
   39     39   
    /// Creates a new builder-style object to manufacture [`ExtraError`](crate::error::ExtraError).
   40     40   
    pub fn builder() -> crate::error::extra_error::Builder {
   41     41   
        crate::error::extra_error::Builder::default()
   42     42   
    }
   43     43   
}
   44     44   
   45         -
/// Error type for the `HttpStringPayload2` operation.
   46         -
/// Each variant represents an error that can occur for the `HttpStringPayload2` operation.
          45  +
/// Error type for the `QueryPrecedence` operation.
          46  +
/// Each variant represents an error that can occur for the `QueryPrecedence` operation.
   47     47   
#[derive(::std::fmt::Debug)]
   48         -
pub enum HttpStringPayload2Error {
          48  +
pub enum QueryPrecedenceError {
   49     49   
    #[allow(missing_docs)] // documentation missing in model
   50     50   
    ExtraError(crate::error::ExtraError),
   51     51   
    #[allow(missing_docs)] // documentation missing in model
   52     52   
    InternalServerError(crate::error::InternalServerError),
   53     53   
}
   54         -
impl ::std::fmt::Display for HttpStringPayload2Error {
          54  +
impl ::std::fmt::Display for QueryPrecedenceError {
   55     55   
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
   56     56   
        match &self {
   57         -
            HttpStringPayload2Error::ExtraError(_inner) => _inner.fmt(f),
   58         -
            HttpStringPayload2Error::InternalServerError(_inner) => _inner.fmt(f),
          57  +
            QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
          58  +
            QueryPrecedenceError::InternalServerError(_inner) => _inner.fmt(f),
   59     59   
        }
   60     60   
    }
   61     61   
}
   62         -
impl HttpStringPayload2Error {
   63         -
    /// Returns `true` if the error kind is `HttpStringPayload2Error::ExtraError`.
          62  +
impl QueryPrecedenceError {
          63  +
    /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
   64     64   
    pub fn is_extra_error(&self) -> bool {
   65         -
        matches!(&self, HttpStringPayload2Error::ExtraError(_))
          65  +
        matches!(&self, QueryPrecedenceError::ExtraError(_))
   66     66   
    }
   67         -
    /// Returns `true` if the error kind is `HttpStringPayload2Error::InternalServerError`.
          67  +
    /// Returns `true` if the error kind is `QueryPrecedenceError::InternalServerError`.
   68     68   
    pub fn is_internal_server_error(&self) -> bool {
   69         -
        matches!(&self, HttpStringPayload2Error::InternalServerError(_))
          69  +
        matches!(&self, QueryPrecedenceError::InternalServerError(_))
   70     70   
    }
   71     71   
    /// Returns the error name string by matching the correct variant.
   72     72   
    pub fn name(&self) -> &'static str {
   73     73   
        match &self {
   74         -
            HttpStringPayload2Error::ExtraError(_inner) => _inner.name(),
   75         -
            HttpStringPayload2Error::InternalServerError(_inner) => _inner.name(),
          74  +
            QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
          75  +
            QueryPrecedenceError::InternalServerError(_inner) => _inner.name(),
   76     76   
        }
   77     77   
    }
   78     78   
}
   79         -
impl ::std::error::Error for HttpStringPayload2Error {
          79  +
impl ::std::error::Error for QueryPrecedenceError {
   80     80   
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
   81     81   
        match &self {
   82         -
            HttpStringPayload2Error::ExtraError(_inner) => Some(_inner),
   83         -
            HttpStringPayload2Error::InternalServerError(_inner) => Some(_inner),
          82  +
            QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
          83  +
            QueryPrecedenceError::InternalServerError(_inner) => Some(_inner),
   84     84   
        }
   85     85   
    }
   86     86   
}
   87         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpStringPayload2Error {
   88         -
    fn from(variant: crate::error::ExtraError) -> crate::error::HttpStringPayload2Error {
          87  +
impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
          88  +
    fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
   89     89   
        Self::ExtraError(variant)
   90     90   
    }
   91     91   
}
   92     92   
impl ::std::convert::From<crate::error::InternalServerError>
   93         -
    for crate::error::HttpStringPayload2Error
          93  +
    for crate::error::QueryPrecedenceError
   94     94   
{
   95         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::HttpStringPayload2Error {
          95  +
    fn from(variant: crate::error::InternalServerError) -> crate::error::QueryPrecedenceError {
   96     96   
        Self::InternalServerError(variant)
   97     97   
    }
   98     98   
}
   99     99   
  100         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpStringPayload2Error {
  101         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::HttpStringPayload2Error {
         100  +
impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryPrecedenceError {
         101  +
    fn from(variant: ::pyo3::PyErr) -> crate::error::QueryPrecedenceError {
  102    102   
        ::pyo3::Python::with_gil(|py| {
  103    103   
            let error = variant.value(py);
  104    104   
            if let Ok(error) = error.extract::<crate::error::ExtraError>() {
  105    105   
                return error.into();
  106    106   
            }
  107    107   
            crate::error::InternalServerError {
  108    108   
                message: error.to_string(),
  109    109   
            }
  110    110   
            .into()
  111    111   
        })
@@ -141,141 +579,200 @@
  161    161   
    }
  162    162   
}
  163    163   
impl ::std::error::Error for InternalServerError {}
  164    164   
impl InternalServerError {
  165    165   
    /// Creates a new builder-style object to manufacture [`InternalServerError`](crate::error::InternalServerError).
  166    166   
    pub fn builder() -> crate::error::internal_server_error::Builder {
  167    167   
        crate::error::internal_server_error::Builder::default()
  168    168   
    }
  169    169   
}
  170    170   
  171         -
/// Error type for the `HttpEnumPayload2` operation.
  172         -
/// Each variant represents an error that can occur for the `HttpEnumPayload2` operation.
  173         -
#[derive(::std::fmt::Debug)]
  174         -
pub enum HttpEnumPayload2Error {
  175         -
    /// 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.
  176         -
    ValidationException(crate::error::ValidationException),
  177         -
    #[allow(missing_docs)] // documentation missing in model
  178         -
    ExtraError(crate::error::ExtraError),
  179         -
    #[allow(missing_docs)] // documentation missing in model
  180         -
    InternalServerError(crate::error::InternalServerError),
  181         -
}
  182         -
impl ::std::fmt::Display for HttpEnumPayload2Error {
  183         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  184         -
        match &self {
  185         -
            HttpEnumPayload2Error::ValidationException(_inner) => _inner.fmt(f),
  186         -
            HttpEnumPayload2Error::ExtraError(_inner) => _inner.fmt(f),
  187         -
            HttpEnumPayload2Error::InternalServerError(_inner) => _inner.fmt(f),
  188         -
        }
  189         -
    }
  190         -
}
  191         -
impl HttpEnumPayload2Error {
  192         -
    /// Returns `true` if the error kind is `HttpEnumPayload2Error::ValidationException`.
  193         -
    pub fn is_validation_exception(&self) -> bool {
  194         -
        matches!(&self, HttpEnumPayload2Error::ValidationException(_))
  195         -
    }
  196         -
    /// Returns `true` if the error kind is `HttpEnumPayload2Error::ExtraError`.
  197         -
    pub fn is_extra_error(&self) -> bool {
  198         -
        matches!(&self, HttpEnumPayload2Error::ExtraError(_))
  199         -
    }
  200         -
    /// Returns `true` if the error kind is `HttpEnumPayload2Error::InternalServerError`.
  201         -
    pub fn is_internal_server_error(&self) -> bool {
  202         -
        matches!(&self, HttpEnumPayload2Error::InternalServerError(_))
  203         -
    }
  204         -
    /// Returns the error name string by matching the correct variant.
  205         -
    pub fn name(&self) -> &'static str {
  206         -
        match &self {
  207         -
            HttpEnumPayload2Error::ValidationException(_inner) => _inner.name(),
  208         -
            HttpEnumPayload2Error::ExtraError(_inner) => _inner.name(),
  209         -
            HttpEnumPayload2Error::InternalServerError(_inner) => _inner.name(),
  210         -
        }
  211         -
    }
  212         -
}
  213         -
impl ::std::error::Error for HttpEnumPayload2Error {
  214         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  215         -
        match &self {
  216         -
            HttpEnumPayload2Error::ValidationException(_inner) => Some(_inner),
  217         -
            HttpEnumPayload2Error::ExtraError(_inner) => Some(_inner),
  218         -
            HttpEnumPayload2Error::InternalServerError(_inner) => Some(_inner),
  219         -
        }
  220         -
    }
  221         -
}
  222         -
impl ::std::convert::From<crate::error::ValidationException>
  223         -
    for crate::error::HttpEnumPayload2Error
  224         -
{
  225         -
    fn from(variant: crate::error::ValidationException) -> crate::error::HttpEnumPayload2Error {
  226         -
        Self::ValidationException(variant)
  227         -
    }
  228         -
}
  229         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpEnumPayload2Error {
  230         -
    fn from(variant: crate::error::ExtraError) -> crate::error::HttpEnumPayload2Error {
  231         -
        Self::ExtraError(variant)
  232         -
    }
  233         -
}
  234         -
impl ::std::convert::From<crate::error::InternalServerError>
  235         -
    for crate::error::HttpEnumPayload2Error
  236         -
{
  237         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::HttpEnumPayload2Error {
  238         -
        Self::InternalServerError(variant)
  239         -
    }
  240         -
}
  241         -
  242         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpEnumPayload2Error {
  243         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::HttpEnumPayload2Error {
  244         -
        ::pyo3::Python::with_gil(|py| {
  245         -
            let error = variant.value(py);
  246         -
            if let Ok(error) = error.extract::<crate::error::ValidationException>() {
  247         -
                return error.into();
  248         -
            }
  249         -
            if let Ok(error) = error.extract::<crate::error::ExtraError>() {
  250         -
                return error.into();
  251         -
            }
  252         -
            crate::error::InternalServerError {
  253         -
                message: error.to_string(),
  254         -
            }
  255         -
            .into()
  256         -
        })
  257         -
    }
  258         -
}
  259         -
  260         -
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
  261         -
/// :param message str:
  262         -
/// :param field_list typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
  263         -
/// :rtype None:
  264         -
/// 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.
  265         -
#[derive(
  266         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  267         -
)]
  268         -
pub struct ValidationException {
  269         -
    #[pyo3(get, set)]
  270         -
    /// :type str:
  271         -
    /// A summary of the validation failure.
  272         -
    pub message: ::std::string::String,
  273         -
    #[pyo3(get, set)]
  274         -
    /// :type typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
  275         -
    /// 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.
  276         -
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  277         -
}
  278         -
impl ValidationException {
  279         -
    /// 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.
  280         -
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
  281         -
        self.field_list.as_deref()
  282         -
    }
  283         -
}
  284         -
#[allow(clippy::new_without_default)]
  285         -
#[allow(clippy::too_many_arguments)]
  286         -
#[::pyo3::pymethods]
  287         -
impl ValidationException {
  288         -
    #[new]
  289         -
    pub fn new(
  290         -
        message: ::std::string::String,
  291         -
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
  292         -
    ) -> Self {
  293         -
        Self {
  294         -
            message,
  295         -
            field_list,
  296         -
        }
  297         -
    }
  298         -
    fn __repr__(&self) -> String {
  299         -
        format!("{self:?}")
  300         -
    }
  301         -
    fn __str__(&self) -> String {
  302         -
        format!("{self:?}")
  303         -
    }
  304         -
}
  305         -
impl ValidationException {
  306         -
    /// Returns the error message.
  307         -
    pub fn message(&self) -> &str {
  308         -
        &self.message
  309         -
    }
  310         -
    #[doc(hidden)]
  311         -
    /// Returns the error name.
  312         -
    pub fn name(&self) -> &'static str {
  313         -
        "ValidationException"
  314         -
    }
  315         -
}
  316         -
impl ::std::fmt::Display for ValidationException {
  317         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  318         -
        ::std::write!(f, "ValidationException")?;
  319         -
        {
  320         -
            ::std::write!(f, ": {}", &self.message)?;
  321         -
        }
  322         -
        Ok(())
  323         -
    }
  324         -
}
  325         -
impl ::std::error::Error for ValidationException {}
  326         -
impl ValidationException {
  327         -
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
  328         -
    pub fn builder() -> crate::error::validation_exception::Builder {
  329         -
        crate::error::validation_exception::Builder::default()
  330         -
    }
  331         -
}
  332         -
  333         -
/// Error type for the `MalformedContentTypeWithBody2` operation.
  334         -
/// Each variant represents an error that can occur for the `MalformedContentTypeWithBody2` operation.
  335         -
#[derive(::std::fmt::Debug)]
  336         -
pub enum MalformedContentTypeWithBody2Error {
  337         -
    #[allow(missing_docs)] // documentation missing in model
  338         -
    ExtraError(crate::error::ExtraError),
  339         -
    #[allow(missing_docs)] // documentation missing in model
  340         -
    InternalServerError(crate::error::InternalServerError),
  341         -
}
  342         -
impl ::std::fmt::Display for MalformedContentTypeWithBody2Error {
  343         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  344         -
        match &self {
  345         -
            MalformedContentTypeWithBody2Error::ExtraError(_inner) => _inner.fmt(f),
  346         -
            MalformedContentTypeWithBody2Error::InternalServerError(_inner) => _inner.fmt(f),
  347         -
        }
  348         -
    }
  349         -
}
  350         -
impl MalformedContentTypeWithBody2Error {
  351         -
    /// Returns `true` if the error kind is `MalformedContentTypeWithBody2Error::ExtraError`.
  352         -
    pub fn is_extra_error(&self) -> bool {
  353         -
        matches!(&self, MalformedContentTypeWithBody2Error::ExtraError(_))
  354         -
    }
  355         -
    /// Returns `true` if the error kind is `MalformedContentTypeWithBody2Error::InternalServerError`.
  356         -
    pub fn is_internal_server_error(&self) -> bool {
  357         -
        matches!(
  358         -
            &self,
  359         -
            MalformedContentTypeWithBody2Error::InternalServerError(_)
  360         -
        )
  361         -
    }
  362         -
    /// Returns the error name string by matching the correct variant.
  363         -
    pub fn name(&self) -> &'static str {
  364         -
        match &self {
  365         -
            MalformedContentTypeWithBody2Error::ExtraError(_inner) => _inner.name(),
  366         -
            MalformedContentTypeWithBody2Error::InternalServerError(_inner) => _inner.name(),
  367         -
        }
  368         -
    }
  369         -
}
  370         -
impl ::std::error::Error for MalformedContentTypeWithBody2Error {
  371         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  372         -
        match &self {
  373         -
            MalformedContentTypeWithBody2Error::ExtraError(_inner) => Some(_inner),
  374         -
            MalformedContentTypeWithBody2Error::InternalServerError(_inner) => Some(_inner),
  375         -
        }
  376         -
    }
  377         -
}
  378         -
impl ::std::convert::From<crate::error::ExtraError>
  379         -
    for crate::error::MalformedContentTypeWithBody2Error
  380         -
{
  381         -
    fn from(variant: crate::error::ExtraError) -> crate::error::MalformedContentTypeWithBody2Error {
  382         -
        Self::ExtraError(variant)
  383         -
    }
  384         -
}
  385         -
impl ::std::convert::From<crate::error::InternalServerError>
  386         -
    for crate::error::MalformedContentTypeWithBody2Error
  387         -
{
  388         -
    fn from(
  389         -
        variant: crate::error::InternalServerError,
  390         -
    ) -> crate::error::MalformedContentTypeWithBody2Error {
  391         -
        Self::InternalServerError(variant)
  392         -
    }
  393         -
}
  394         -
  395         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::MalformedContentTypeWithBody2Error {
  396         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::MalformedContentTypeWithBody2Error {
  397         -
        ::pyo3::Python::with_gil(|py| {
  398         -
            let error = variant.value(py);
  399         -
            if let Ok(error) = error.extract::<crate::error::ExtraError>() {
  400         -
                return error.into();
  401         -
            }
  402         -
            crate::error::InternalServerError {
  403         -
                message: error.to_string(),
  404         -
            }
  405         -
            .into()
  406         -
        })
  407         -
    }
  408         -
}
  409         -
  410         -
/// Error type for the `HttpPayloadTraits2` operation.
  411         -
/// Each variant represents an error that can occur for the `HttpPayloadTraits2` operation.
  412         -
#[derive(::std::fmt::Debug)]
  413         -
pub enum HttpPayloadTraits2Error {
  414         -
    #[allow(missing_docs)] // documentation missing in model
  415         -
    ExtraError(crate::error::ExtraError),
  416         -
    #[allow(missing_docs)] // documentation missing in model
  417         -
    InternalServerError(crate::error::InternalServerError),
  418         -
}
  419         -
impl ::std::fmt::Display for HttpPayloadTraits2Error {
  420         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  421         -
        match &self {
  422         -
            HttpPayloadTraits2Error::ExtraError(_inner) => _inner.fmt(f),
  423         -
            HttpPayloadTraits2Error::InternalServerError(_inner) => _inner.fmt(f),
  424         -
        }
  425         -
    }
  426         -
}
  427         -
impl HttpPayloadTraits2Error {
  428         -
    /// Returns `true` if the error kind is `HttpPayloadTraits2Error::ExtraError`.
  429         -
    pub fn is_extra_error(&self) -> bool {
  430         -
        matches!(&self, HttpPayloadTraits2Error::ExtraError(_))
  431         -
    }
  432         -
    /// Returns `true` if the error kind is `HttpPayloadTraits2Error::InternalServerError`.
  433         -
    pub fn is_internal_server_error(&self) -> bool {
  434         -
        matches!(&self, HttpPayloadTraits2Error::InternalServerError(_))
  435         -
    }
  436         -
    /// Returns the error name string by matching the correct variant.
  437         -
    pub fn name(&self) -> &'static str {
  438         -
        match &self {
  439         -
            HttpPayloadTraits2Error::ExtraError(_inner) => _inner.name(),
  440         -
            HttpPayloadTraits2Error::InternalServerError(_inner) => _inner.name(),
  441         -
        }
  442         -
    }
  443         -
}
  444         -
impl ::std::error::Error for HttpPayloadTraits2Error {
  445         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  446         -
        match &self {
  447         -
            HttpPayloadTraits2Error::ExtraError(_inner) => Some(_inner),
  448         -
            HttpPayloadTraits2Error::InternalServerError(_inner) => Some(_inner),
  449         -
        }
  450         -
    }
  451         -
}
  452         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::HttpPayloadTraits2Error {
  453         -
    fn from(variant: crate::error::ExtraError) -> crate::error::HttpPayloadTraits2Error {
  454         -
        Self::ExtraError(variant)
  455         -
    }
  456         -
}
  457         -
impl ::std::convert::From<crate::error::InternalServerError>
  458         -
    for crate::error::HttpPayloadTraits2Error
  459         -
{
  460         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::HttpPayloadTraits2Error {
  461         -
        Self::InternalServerError(variant)
  462         -
    }
  463         -
}
  464         -
  465         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::HttpPayloadTraits2Error {
  466         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::HttpPayloadTraits2Error {
  467         -
        ::pyo3::Python::with_gil(|py| {
  468         -
            let error = variant.value(py);
  469         -
            if let Ok(error) = error.extract::<crate::error::ExtraError>() {
  470         -
                return error.into();
  471         -
            }
  472         -
            crate::error::InternalServerError {
  473         -
                message: error.to_string(),
  474         -
            }
  475         -
            .into()
  476         -
        })
  477         -
    }
  478         -
}
  479         -
  480         -
/// Error type for the `QueryPrecedence` operation.
  481         -
/// Each variant represents an error that can occur for the `QueryPrecedence` operation.
  482         -
#[derive(::std::fmt::Debug)]
  483         -
pub enum QueryPrecedenceError {
  484         -
    #[allow(missing_docs)] // documentation missing in model
  485         -
    ExtraError(crate::error::ExtraError),
  486         -
    #[allow(missing_docs)] // documentation missing in model
  487         -
    InternalServerError(crate::error::InternalServerError),
  488         -
}
  489         -
impl ::std::fmt::Display for QueryPrecedenceError {
  490         -
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  491         -
        match &self {
  492         -
            QueryPrecedenceError::ExtraError(_inner) => _inner.fmt(f),
  493         -
            QueryPrecedenceError::InternalServerError(_inner) => _inner.fmt(f),
  494         -
        }
  495         -
    }
  496         -
}
  497         -
impl QueryPrecedenceError {
  498         -
    /// Returns `true` if the error kind is `QueryPrecedenceError::ExtraError`.
  499         -
    pub fn is_extra_error(&self) -> bool {
  500         -
        matches!(&self, QueryPrecedenceError::ExtraError(_))
  501         -
    }
  502         -
    /// Returns `true` if the error kind is `QueryPrecedenceError::InternalServerError`.
  503         -
    pub fn is_internal_server_error(&self) -> bool {
  504         -
        matches!(&self, QueryPrecedenceError::InternalServerError(_))
  505         -
    }
  506         -
    /// Returns the error name string by matching the correct variant.
  507         -
    pub fn name(&self) -> &'static str {
  508         -
        match &self {
  509         -
            QueryPrecedenceError::ExtraError(_inner) => _inner.name(),
  510         -
            QueryPrecedenceError::InternalServerError(_inner) => _inner.name(),
  511         -
        }
  512         -
    }
  513         -
}
  514         -
impl ::std::error::Error for QueryPrecedenceError {
  515         -
    fn source(&self) -> std::option::Option<&(dyn ::std::error::Error + 'static)> {
  516         -
        match &self {
  517         -
            QueryPrecedenceError::ExtraError(_inner) => Some(_inner),
  518         -
            QueryPrecedenceError::InternalServerError(_inner) => Some(_inner),
  519         -
        }
  520         -
    }
  521         -
}
  522         -
impl ::std::convert::From<crate::error::ExtraError> for crate::error::QueryPrecedenceError {
  523         -
    fn from(variant: crate::error::ExtraError) -> crate::error::QueryPrecedenceError {
  524         -
        Self::ExtraError(variant)
  525         -
    }
  526         -
}
  527         -
impl ::std::convert::From<crate::error::InternalServerError>
  528         -
    for crate::error::QueryPrecedenceError
  529         -
{
  530         -
    fn from(variant: crate::error::InternalServerError) -> crate::error::QueryPrecedenceError {
  531         -
        Self::InternalServerError(variant)
  532         -
    }
  533         -
}
  534         -
  535         -
impl ::std::convert::From<::pyo3::PyErr> for crate::error::QueryPrecedenceError {
  536         -
    fn from(variant: ::pyo3::PyErr) -> crate::error::QueryPrecedenceError {
  537         -
        ::pyo3::Python::with_gil(|py| {
  538         -
            let error = variant.value(py);
  539         -
            if let Ok(error) = error.extract::<crate::error::ExtraError>() {
  540         -
                return error.into();
  541         -
            }
  542         -
            crate::error::InternalServerError {
  543         -
                message: error.to_string(),
  544         -
            }
  545         -
            .into()
  546         -
        })
  547         -
    }
  548         -
}
  549         -
  550    171   
/// Error type for the `EmptyStructWithContentOnWireOp` operation.
  551    172   
/// Each variant represents an error that can occur for the `EmptyStructWithContentOnWireOp` operation.
  552    173   
#[derive(::std::fmt::Debug)]
  553    174   
pub enum EmptyStructWithContentOnWireOpError {
  554    175   
    #[allow(missing_docs)] // documentation missing in model
  555    176   
    ExtraError(crate::error::ExtraError),
  556    177   
    #[allow(missing_docs)] // documentation missing in model
  557    178   
    InternalServerError(crate::error::InternalServerError),
  558    179   
}
  559    180   
impl ::std::fmt::Display for EmptyStructWithContentOnWireOpError {
@@ -917,538 +976,670 @@
  937    558   
                return error.into();
  938    559   
            }
  939    560   
            crate::error::InternalServerError {
  940    561   
                message: error.to_string(),
  941    562   
            }
  942    563   
            .into()
  943    564   
        })
  944    565   
    }
  945    566   
}
  946    567   
         568  +
#[::pyo3::pyclass(extends = ::pyo3::exceptions::PyException)]
         569  +
/// :param message str:
         570  +
/// :param field_list typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
         571  +
/// :rtype None:
         572  +
/// 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.
         573  +
#[derive(
         574  +
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
         575  +
)]
         576  +
pub struct ValidationException {
         577  +
    #[pyo3(get, set)]
         578  +
    /// :type str:
         579  +
    /// A summary of the validation failure.
         580  +
    pub message: ::std::string::String,
         581  +
    #[pyo3(get, set)]
         582  +
    /// :type typing.Optional\[typing.List\[rest_json_extras.model.ValidationExceptionField\]\]:
         583  +
    /// 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.
         584  +
    pub field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         585  +
}
         586  +
impl ValidationException {
         587  +
    /// 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.
         588  +
    pub fn field_list(&self) -> ::std::option::Option<&[crate::model::ValidationExceptionField]> {
         589  +
        self.field_list.as_deref()
         590  +
    }
         591  +
}
         592  +
#[allow(clippy::new_without_default)]
         593  +
#[allow(clippy::too_many_arguments)]
         594  +
#[::pyo3::pymethods]
         595  +
impl ValidationException {
         596  +
    #[new]
         597  +
    pub fn new(
         598  +
        message: ::std::string::String,
         599  +
        field_list: ::std::option::Option<::std::vec::Vec<crate::model::ValidationExceptionField>>,
         600  +
    ) -> Self {
         601  +
        Self {
         602  +
            message,
         603  +
            field_list,
         604  +
        }
         605  +
    }
         606  +
    fn __repr__(&self) -> String {
         607  +
        format!("{self:?}")
         608  +
    }
         609  +
    fn __str__(&self) -> String {
         610  +
        format!("{self:?}")
         611  +
    }
         612  +
}
         613  +
impl ValidationException {
         614  +
    /// Returns the error message.
         615  +
    pub fn message(&self) -> &str {
         616  +
        &self.message
         617  +
    }
         618  +
    #[doc(hidden)]
         619  +
    /// Returns the error name.
         620  +
    pub fn name(&self) -> &'static str {
         621  +
        "ValidationException"
         622  +
    }
         623  +
}
         624  +
impl ::std::fmt::Display for ValidationException {
         625  +
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         626  +
        ::std::write!(f, "ValidationException")?;
         627  +
        {
         628  +
            ::std::write!(f, ": {}", &self.message)?;
         629  +
        }
         630  +
        Ok(())
         631  +
    }
         632  +
}
         633  +
impl ::std::error::Error for ValidationException {}
         634  +
impl ValidationException {
         635  +
    /// Creates a new builder-style object to manufacture [`ValidationException`](crate::error::ValidationException).
         636  +
    pub fn builder() -> crate::error::validation_exception::Builder {
         637  +
        crate::error::validation_exception::Builder::default()
         638  +
    }
         639  +
}
         640  +
  947    641   
/// Error type for the `PrimitiveIntOp` operation.
  948    642   
/// Each variant represents an error that can occur for the `PrimitiveIntOp` operation.
  949    643   
#[derive(::std::fmt::Debug)]
  950    644   
pub enum PrimitiveIntOpError {
  951    645   
    #[allow(missing_docs)] // documentation missing in model
  952    646   
    ExtraError(crate::error::ExtraError),
  953    647   
    #[allow(missing_docs)] // documentation missing in model
  954    648   
    InternalServerError(crate::error::InternalServerError),
  955    649   
}
  956    650   
impl ::std::fmt::Display for PrimitiveIntOpError {
@@ -1459,1153 +1518,1243 @@
 1479   1173   
        }
 1480   1174   
        fn build_enforcing_required_and_enum_traits(
 1481   1175   
            self,
 1482   1176   
        ) -> Result<crate::error::InternalServerError, ConstraintViolation> {
 1483   1177   
            Ok(crate::error::InternalServerError {
 1484   1178   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1485   1179   
            })
 1486   1180   
        }
 1487   1181   
    }
 1488   1182   
}
        1183  +
/// See [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
        1184  +
///
        1185  +
pub mod case_insensitive_error {
        1186  +
        1187  +
    impl ::std::convert::From<Builder> for crate::error::CaseInsensitiveError {
        1188  +
        fn from(builder: Builder) -> Self {
        1189  +
            builder.build()
        1190  +
        }
        1191  +
    }
        1192  +
    /// A builder for [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
        1193  +
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
        1194  +
    pub struct Builder {
        1195  +
        pub(crate) message: ::std::option::Option<::std::string::String>,
        1196  +
    }
        1197  +
    impl Builder {
        1198  +
        #[allow(missing_docs)] // documentation missing in model
        1199  +
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        1200  +
            self.message = input;
        1201  +
            self
        1202  +
        }
        1203  +
        /// Consumes the builder and constructs a [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
        1204  +
        pub fn build(self) -> crate::error::CaseInsensitiveError {
        1205  +
            self.build_enforcing_required_and_enum_traits()
        1206  +
        }
        1207  +
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::CaseInsensitiveError {
        1208  +
            crate::error::CaseInsensitiveError {
        1209  +
                message: self.message,
        1210  +
            }
        1211  +
        }
        1212  +
    }
        1213  +
}
 1489   1214   
/// See [`ValidationException`](crate::error::ValidationException).
 1490   1215   
///
 1491   1216   
pub mod validation_exception {
 1492   1217   
 1493   1218   
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
 1494   1219   
    /// Holds one variant for each of the ways the builder can fail.
 1495   1220   
 1496   1221   
    #[allow(clippy::enum_variant_names)]
 1497   1222   
    pub enum ConstraintViolation {
 1498   1223   
        /// `message` was not provided but it is required when building `ValidationException`.
@@ -1524,1249 +1584,0 @@
 1544   1269   
        fn build_enforcing_required_and_enum_traits(
 1545   1270   
            self,
 1546   1271   
        ) -> Result<crate::error::ValidationException, ConstraintViolation> {
 1547   1272   
            Ok(crate::error::ValidationException {
 1548   1273   
                message: self.message.ok_or(ConstraintViolation::MissingMessage)?,
 1549   1274   
                field_list: self.field_list,
 1550   1275   
            })
 1551   1276   
        }
 1552   1277   
    }
 1553   1278   
}
 1554         -
/// See [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
 1555         -
///
 1556         -
pub mod case_insensitive_error {
 1557         -
 1558         -
    impl ::std::convert::From<Builder> for crate::error::CaseInsensitiveError {
 1559         -
        fn from(builder: Builder) -> Self {
 1560         -
            builder.build()
 1561         -
        }
 1562         -
    }
 1563         -
    /// A builder for [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
 1564         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1565         -
    pub struct Builder {
 1566         -
        pub(crate) message: ::std::option::Option<::std::string::String>,
 1567         -
    }
 1568         -
    impl Builder {
 1569         -
        #[allow(missing_docs)] // documentation missing in model
 1570         -
        pub fn message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1571         -
            self.message = input;
 1572         -
            self
 1573         -
        }
 1574         -
        /// Consumes the builder and constructs a [`CaseInsensitiveError`](crate::error::CaseInsensitiveError).
 1575         -
        pub fn build(self) -> crate::error::CaseInsensitiveError {
 1576         -
            self.build_enforcing_required_and_enum_traits()
 1577         -
        }
 1578         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::error::CaseInsensitiveError {
 1579         -
            crate::error::CaseInsensitiveError {
 1580         -
                message: self.message,
 1581         -
            }
 1582         -
        }
 1583         -
    }
 1584         -
}

tmp-codegen-diff/codegen-server-test-python/rest_json_extras/rust-server-codegen-python/src/input.rs

@@ -1,1 +266,31 @@
    1      1   
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2         -
#[::pyo3::pyclass]
    3         -
/// :param payload typing.Optional\[str\]:
    4         -
/// :rtype None:
    5         -
#[allow(missing_docs)] // documentation missing in model
    6         -
#[derive(
    7         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
    8         -
)]
    9         -
pub struct HttpStringPayload2Input {
   10         -
    #[pyo3(get, set)]
   11         -
    /// :type typing.Optional\[str\]:
   12         -
    #[allow(missing_docs)] // documentation missing in model
   13         -
    pub payload: ::std::option::Option<::std::string::String>,
   14         -
}
   15         -
impl HttpStringPayload2Input {
   16         -
    #[allow(missing_docs)] // documentation missing in model
   17         -
    pub fn payload(&self) -> ::std::option::Option<&str> {
   18         -
        self.payload.as_deref()
   19         -
    }
   20         -
}
   21         -
#[allow(clippy::new_without_default)]
   22         -
#[allow(clippy::too_many_arguments)]
   23         -
#[::pyo3::pymethods]
   24         -
impl HttpStringPayload2Input {
   25         -
    #[new]
   26         -
    pub fn new(payload: ::std::option::Option<::std::string::String>) -> Self {
   27         -
        Self { payload }
   28         -
    }
   29         -
    fn __repr__(&self) -> String {
   30         -
        format!("{self:?}")
   31         -
    }
   32         -
    fn __str__(&self) -> String {
   33         -
        format!("{self:?}")
   34         -
    }
   35         -
}
   36         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HttpStringPayload2Input> {
   37         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   38         -
        ob.extract::<HttpStringPayload2Input>().map(Box::new)
   39         -
    }
   40         -
}
   41         -
   42         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HttpStringPayload2Input> {
   43         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   44         -
        (*self).into_py(py)
   45         -
    }
   46         -
}
   47         -
impl crate::constrained::Constrained for crate::input::HttpStringPayload2Input {
   48         -
    type Unconstrained = crate::input::http_string_payload2_input_internal::Builder;
   49         -
}
   50         -
impl HttpStringPayload2Input {
   51         -
    /// Creates a new builder-style object to manufacture [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
   52         -
    pub fn builder() -> crate::input::http_string_payload2_input::Builder {
   53         -
        crate::input::http_string_payload2_input::Builder::default()
   54         -
    }
   55         -
}
   56         -
   57         -
#[::pyo3::pyclass]
   58         -
/// :param payload typing.Optional\[rest_json_extras.model.StringEnum\]:
   59         -
/// :rtype None:
   60         -
#[allow(missing_docs)] // documentation missing in model
   61         -
#[derive(
   62         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
   63         -
)]
   64         -
pub struct HttpEnumPayload2Input {
   65         -
    #[pyo3(get, set)]
   66         -
    /// :type typing.Optional\[rest_json_extras.model.StringEnum\]:
   67         -
    #[allow(missing_docs)] // documentation missing in model
   68         -
    pub payload: ::std::option::Option<crate::model::StringEnum>,
   69         -
}
   70         -
impl HttpEnumPayload2Input {
   71         -
    #[allow(missing_docs)] // documentation missing in model
   72         -
    pub fn payload(&self) -> ::std::option::Option<&crate::model::StringEnum> {
   73         -
        self.payload.as_ref()
   74         -
    }
   75         -
}
   76         -
#[allow(clippy::new_without_default)]
   77         -
#[allow(clippy::too_many_arguments)]
   78         -
#[::pyo3::pymethods]
   79         -
impl HttpEnumPayload2Input {
   80         -
    #[new]
   81         -
    pub fn new(payload: ::std::option::Option<crate::model::StringEnum>) -> Self {
   82         -
        Self { payload }
   83         -
    }
   84         -
    fn __repr__(&self) -> String {
   85         -
        format!("{self:?}")
   86         -
    }
   87         -
    fn __str__(&self) -> String {
   88         -
        format!("{self:?}")
   89         -
    }
   90         -
}
   91         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HttpEnumPayload2Input> {
   92         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
   93         -
        ob.extract::<HttpEnumPayload2Input>().map(Box::new)
   94         -
    }
   95         -
}
   96         -
   97         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HttpEnumPayload2Input> {
   98         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
   99         -
        (*self).into_py(py)
  100         -
    }
  101         -
}
  102         -
impl crate::constrained::Constrained for crate::input::HttpEnumPayload2Input {
  103         -
    type Unconstrained = crate::input::http_enum_payload2_input_internal::Builder;
  104         -
}
  105         -
impl HttpEnumPayload2Input {
  106         -
    /// Creates a new builder-style object to manufacture [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
  107         -
    pub fn builder() -> crate::input::http_enum_payload2_input::Builder {
  108         -
        crate::input::http_enum_payload2_input::Builder::default()
  109         -
    }
  110         -
}
  111         -
  112         -
#[::pyo3::pyclass]
  113         -
/// :param salutation typing.Optional\[str\]:
  114         -
/// :rtype None:
  115         -
#[allow(missing_docs)] // documentation missing in model
  116         -
#[derive(
  117         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  118         -
)]
  119         -
pub struct MalformedContentTypeWithBody2Input {
  120         -
    #[pyo3(get, set)]
  121         -
    /// :type typing.Optional\[str\]:
  122         -
    #[allow(missing_docs)] // documentation missing in model
  123         -
    pub salutation: ::std::option::Option<::std::string::String>,
  124         -
}
  125         -
impl MalformedContentTypeWithBody2Input {
  126         -
    #[allow(missing_docs)] // documentation missing in model
  127         -
    pub fn salutation(&self) -> ::std::option::Option<&str> {
  128         -
        self.salutation.as_deref()
  129         -
    }
  130         -
}
  131         -
#[allow(clippy::new_without_default)]
  132         -
#[allow(clippy::too_many_arguments)]
  133         -
#[::pyo3::pymethods]
  134         -
impl MalformedContentTypeWithBody2Input {
  135         -
    #[new]
  136         -
    pub fn new(salutation: ::std::option::Option<::std::string::String>) -> Self {
  137         -
        Self { salutation }
  138         -
    }
  139         -
    fn __repr__(&self) -> String {
  140         -
        format!("{self:?}")
  141         -
    }
  142         -
    fn __str__(&self) -> String {
  143         -
        format!("{self:?}")
  144         -
    }
  145         -
}
  146         -
impl<'source> ::pyo3::FromPyObject<'source>
  147         -
    for std::boxed::Box<MalformedContentTypeWithBody2Input>
  148         -
{
  149         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  150         -
        ob.extract::<MalformedContentTypeWithBody2Input>()
  151         -
            .map(Box::new)
  152         -
    }
  153         -
}
  154         -
  155         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<MalformedContentTypeWithBody2Input> {
  156         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  157         -
        (*self).into_py(py)
  158         -
    }
  159         -
}
  160         -
impl crate::constrained::Constrained for crate::input::MalformedContentTypeWithBody2Input {
  161         -
    type Unconstrained = crate::input::malformed_content_type_with_body2_input_internal::Builder;
  162         -
}
  163         -
impl MalformedContentTypeWithBody2Input {
  164         -
    /// Creates a new builder-style object to manufacture [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
  165         -
    pub fn builder() -> crate::input::malformed_content_type_with_body2_input::Builder {
  166         -
        crate::input::malformed_content_type_with_body2_input::Builder::default()
  167         -
    }
  168         -
}
  169         -
  170         -
#[::pyo3::pyclass]
  171         -
/// :param foo typing.Optional\[str\]:
  172         -
/// :param blob typing.Optional\[rest_json_extras.types.Blob\]:
  173         -
/// :rtype None:
  174         -
#[allow(missing_docs)] // documentation missing in model
  175         -
#[derive(
  176         -
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
  177         -
)]
  178         -
pub struct HttpPayloadTraits2Input {
  179         -
    #[pyo3(get, set)]
  180         -
    /// :type typing.Optional\[str\]:
  181         -
    #[allow(missing_docs)] // documentation missing in model
  182         -
    pub foo: ::std::option::Option<::std::string::String>,
  183         -
    #[pyo3(get, set)]
  184         -
    /// :type typing.Optional\[rest_json_extras.types.Blob\]:
  185         -
    #[allow(missing_docs)] // documentation missing in model
  186         -
    pub blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
  187         -
}
  188         -
impl HttpPayloadTraits2Input {
  189         -
    #[allow(missing_docs)] // documentation missing in model
  190         -
    pub fn foo(&self) -> ::std::option::Option<&str> {
  191         -
        self.foo.as_deref()
  192         -
    }
  193         -
    #[allow(missing_docs)] // documentation missing in model
  194         -
    pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
  195         -
        self.blob.as_ref()
  196         -
    }
  197         -
}
  198         -
#[allow(clippy::new_without_default)]
  199         -
#[allow(clippy::too_many_arguments)]
  200         -
#[::pyo3::pymethods]
  201         -
impl HttpPayloadTraits2Input {
  202         -
    #[new]
  203         -
    pub fn new(
  204         -
        foo: ::std::option::Option<::std::string::String>,
  205         -
        blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
  206         -
    ) -> Self {
  207         -
        Self { foo, blob }
  208         -
    }
  209         -
    fn __repr__(&self) -> String {
  210         -
        format!("{self:?}")
  211         -
    }
  212         -
    fn __str__(&self) -> String {
  213         -
        format!("{self:?}")
  214         -
    }
  215         -
}
  216         -
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<HttpPayloadTraits2Input> {
  217         -
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
  218         -
        ob.extract::<HttpPayloadTraits2Input>().map(Box::new)
  219         -
    }
  220         -
}
  221         -
  222         -
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<HttpPayloadTraits2Input> {
  223         -
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
  224         -
        (*self).into_py(py)
  225         -
    }
  226         -
}
  227         -
impl crate::constrained::Constrained for crate::input::HttpPayloadTraits2Input {
  228         -
    type Unconstrained = crate::input::http_payload_traits2_input_internal::Builder;
  229         -
}
  230         -
impl HttpPayloadTraits2Input {
  231         -
    /// Creates a new builder-style object to manufacture [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
  232         -
    pub fn builder() -> crate::input::http_payload_traits2_input::Builder {
  233         -
        crate::input::http_payload_traits2_input::Builder::default()
  234         -
    }
  235         -
}
  236         -
  237      2   
#[::pyo3::pyclass]
  238      3   
/// :param foo typing.Optional\[str\]:
  239      4   
/// :param baz typing.Optional\[typing.Dict\[str, str\]\]:
  240      5   
/// :rtype None:
  241      6   
#[allow(missing_docs)] // documentation missing in model
  242      7   
#[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
  243      8   
pub struct QueryPrecedenceInput {
  244      9   
    #[pyo3(get, set)]
  245     10   
    /// :type typing.Optional\[str\]:
  246     11   
    #[allow(missing_docs)] // documentation missing in model
@@ -798,563 +1215,622 @@
  818    583   
}
  819    584   
impl crate::constrained::Constrained for crate::input::StringPayloadInput {
  820    585   
    type Unconstrained = crate::input::string_payload_input_internal::Builder;
  821    586   
}
  822    587   
impl StringPayloadInput {
  823    588   
    /// Creates a new builder-style object to manufacture [`StringPayloadInput`](crate::input::StringPayloadInput).
  824    589   
    pub fn builder() -> crate::input::string_payload_input::Builder {
  825    590   
        crate::input::string_payload_input::Builder::default()
  826    591   
    }
  827    592   
}
  828         -
/// See [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  829         -
///
  830         -
pub(crate) mod http_string_payload2_input_internal {
  831         -
  832         -
    impl ::std::convert::From<Builder> for crate::input::HttpStringPayload2Input {
  833         -
        fn from(builder: Builder) -> Self {
  834         -
            builder.build()
  835         -
        }
  836         -
    }
  837         -
    /// A builder for [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  838         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  839         -
    pub(crate) struct Builder {
  840         -
        pub(crate) payload: ::std::option::Option<::std::string::String>,
  841         -
    }
  842         -
    impl Builder {
  843         -
        #[allow(missing_docs)] // documentation missing in model
  844         -
        pub(crate) fn set_payload(
  845         -
            mut self,
  846         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
  847         -
        ) -> Self {
  848         -
            self.payload = input.map(|v| v.into());
  849         -
            self
  850         -
        }
  851         -
        /// Consumes the builder and constructs a [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  852         -
        pub fn build(self) -> crate::input::HttpStringPayload2Input {
  853         -
            self.build_enforcing_all_constraints()
  854         -
        }
  855         -
        fn build_enforcing_all_constraints(self) -> crate::input::HttpStringPayload2Input {
  856         -
            crate::input::HttpStringPayload2Input {
  857         -
                payload: self.payload,
  858         -
            }
  859         -
        }
  860         -
    }
  861         -
}
  862         -
/// See [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  863         -
///
  864         -
pub mod http_string_payload2_input {
  865         -
  866         -
    impl ::std::convert::From<Builder> for crate::input::HttpStringPayload2Input {
  867         -
        fn from(builder: Builder) -> Self {
  868         -
            builder.build()
  869         -
        }
  870         -
    }
  871         -
    /// A builder for [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  872         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  873         -
    pub struct Builder {
  874         -
        pub(crate) payload: ::std::option::Option<::std::string::String>,
  875         -
    }
  876         -
    impl Builder {
  877         -
        #[allow(missing_docs)] // documentation missing in model
  878         -
        pub fn payload(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
  879         -
            self.payload = input;
  880         -
            self
  881         -
        }
  882         -
        /// Consumes the builder and constructs a [`HttpStringPayload2Input`](crate::input::HttpStringPayload2Input).
  883         -
        pub fn build(self) -> crate::input::HttpStringPayload2Input {
  884         -
            self.build_enforcing_required_and_enum_traits()
  885         -
        }
  886         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::input::HttpStringPayload2Input {
  887         -
            crate::input::HttpStringPayload2Input {
  888         -
                payload: self.payload,
  889         -
            }
  890         -
        }
  891         -
    }
  892         -
}
  893         -
/// See [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
  894         -
///
  895         -
pub(crate) mod http_enum_payload2_input_internal {
  896         -
  897         -
    #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
  898         -
    /// Holds one variant for each of the ways the builder can fail.
  899         -
    #[non_exhaustive]
  900         -
    #[allow(clippy::enum_variant_names)]
  901         -
    pub(crate) enum ConstraintViolation {
  902         -
        /// Constraint violation occurred building member `payload` when building `HttpEnumPayload2Input`.
  903         -
        #[doc(hidden)]
  904         -
        Payload(crate::model::string_enum_internal::ConstraintViolation),
  905         -
    }
  906         -
    impl ::std::fmt::Display for ConstraintViolation {
  907         -
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
  908         -
            match self {
  909         -
                ConstraintViolation::Payload(_) => write!(f, "constraint violation occurred building member `payload` when building `HttpEnumPayload2Input`"),
  910         -
            }
  911         -
        }
  912         -
    }
  913         -
    impl ::std::error::Error for ConstraintViolation {}
  914         -
    impl ConstraintViolation {
  915         -
        pub(crate) fn as_validation_exception_field(
  916         -
            self,
  917         -
            path: ::std::string::String,
  918         -
        ) -> crate::model::ValidationExceptionField {
  919         -
            match self {
  920         -
                ConstraintViolation::Payload(inner) => {
  921         -
                    inner.as_validation_exception_field(path + "/payload")
  922         -
                }
  923         -
            }
  924         -
        }
  925         -
    }
  926         -
    impl ::std::convert::From<ConstraintViolation>
  927         -
        for ::aws_smithy_http_server::protocol::rest_json_1::rejection::RequestRejection
  928         -
    {
  929         -
        fn from(constraint_violation: ConstraintViolation) -> Self {
  930         -
            let first_validation_exception_field =
  931         -
                constraint_violation.as_validation_exception_field("".to_owned());
  932         -
            let validation_exception = crate::error::ValidationException {
  933         -
                message: format!(
  934         -
                    "1 validation error detected. {}",
  935         -
                    &first_validation_exception_field.message
  936         -
                ),
  937         -
                field_list: Some(vec![first_validation_exception_field]),
  938         -
            };
  939         -
            Self::ConstraintViolation(
  940         -
                                crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
  941         -
                                    .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
  942         -
                            )
  943         -
        }
  944         -
    }
  945         -
    impl ::std::convert::From<Builder>
  946         -
        for crate::constrained::MaybeConstrained<crate::input::HttpEnumPayload2Input>
  947         -
    {
  948         -
        fn from(builder: Builder) -> Self {
  949         -
            Self::Unconstrained(builder)
  950         -
        }
  951         -
    }
  952         -
    impl ::std::convert::TryFrom<Builder> for crate::input::HttpEnumPayload2Input {
  953         -
        type Error = ConstraintViolation;
  954         -
  955         -
        fn try_from(builder: Builder) -> Result<Self, Self::Error> {
  956         -
            builder.build()
  957         -
        }
  958         -
    }
  959         -
    /// A builder for [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
  960         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
  961         -
    pub(crate) struct Builder {
  962         -
        pub(crate) payload:
  963         -
            ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::StringEnum>>,
  964         -
    }
  965         -
    impl Builder {
  966         -
        #[allow(missing_docs)] // documentation missing in model
  967         -
        pub(crate) fn set_payload(
  968         -
            mut self,
  969         -
            input: Option<
  970         -
                impl ::std::convert::Into<
  971         -
                    crate::constrained::MaybeConstrained<crate::model::StringEnum>,
  972         -
                >,
  973         -
            >,
  974         -
        ) -> Self {
  975         -
            self.payload = input.map(|v| v.into());
  976         -
            self
  977         -
        }
  978         -
        /// Consumes the builder and constructs a [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
  979         -
        ///
  980         -
        /// The builder fails to construct a [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input) if a [`ConstraintViolation`] occurs.
  981         -
        ///
  982         -
        pub fn build(self) -> Result<crate::input::HttpEnumPayload2Input, ConstraintViolation> {
  983         -
            self.build_enforcing_all_constraints()
  984         -
        }
  985         -
        fn build_enforcing_all_constraints(
  986         -
            self,
  987         -
        ) -> Result<crate::input::HttpEnumPayload2Input, ConstraintViolation> {
  988         -
            Ok(crate::input::HttpEnumPayload2Input {
  989         -
                payload: self
  990         -
                    .payload
  991         -
                    .map(|v| match v {
  992         -
                        crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
  993         -
                        crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
  994         -
                    })
  995         -
                    .map(|res| res.map_err(ConstraintViolation::Payload))
  996         -
                    .transpose()?,
  997         -
            })
  998         -
        }
  999         -
    }
 1000         -
}
 1001         -
/// See [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
 1002         -
///
 1003         -
pub mod http_enum_payload2_input {
 1004         -
 1005         -
    impl ::std::convert::From<Builder> for crate::input::HttpEnumPayload2Input {
 1006         -
        fn from(builder: Builder) -> Self {
 1007         -
            builder.build()
 1008         -
        }
 1009         -
    }
 1010         -
    /// A builder for [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
 1011         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1012         -
    pub struct Builder {
 1013         -
        pub(crate) payload: ::std::option::Option<crate::model::StringEnum>,
 1014         -
    }
 1015         -
    impl Builder {
 1016         -
        #[allow(missing_docs)] // documentation missing in model
 1017         -
        pub fn payload(mut self, input: ::std::option::Option<crate::model::StringEnum>) -> Self {
 1018         -
            self.payload = input;
 1019         -
            self
 1020         -
        }
 1021         -
        /// Consumes the builder and constructs a [`HttpEnumPayload2Input`](crate::input::HttpEnumPayload2Input).
 1022         -
        pub fn build(self) -> crate::input::HttpEnumPayload2Input {
 1023         -
            self.build_enforcing_required_and_enum_traits()
 1024         -
        }
 1025         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::input::HttpEnumPayload2Input {
 1026         -
            crate::input::HttpEnumPayload2Input {
 1027         -
                payload: self.payload,
 1028         -
            }
 1029         -
        }
 1030         -
    }
 1031         -
}
 1032         -
/// See [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1033         -
///
 1034         -
pub(crate) mod malformed_content_type_with_body2_input_internal {
 1035         -
 1036         -
    impl ::std::convert::From<Builder> for crate::input::MalformedContentTypeWithBody2Input {
 1037         -
        fn from(builder: Builder) -> Self {
 1038         -
            builder.build()
 1039         -
        }
 1040         -
    }
 1041         -
    /// A builder for [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1042         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1043         -
    pub(crate) struct Builder {
 1044         -
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
 1045         -
    }
 1046         -
    impl Builder {
 1047         -
        #[allow(missing_docs)] // documentation missing in model
 1048         -
        pub(crate) fn set_salutation(
 1049         -
            mut self,
 1050         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 1051         -
        ) -> Self {
 1052         -
            self.salutation = input.map(|v| v.into());
 1053         -
            self
 1054         -
        }
 1055         -
        /// Consumes the builder and constructs a [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1056         -
        pub fn build(self) -> crate::input::MalformedContentTypeWithBody2Input {
 1057         -
            self.build_enforcing_all_constraints()
 1058         -
        }
 1059         -
        fn build_enforcing_all_constraints(
 1060         -
            self,
 1061         -
        ) -> crate::input::MalformedContentTypeWithBody2Input {
 1062         -
            crate::input::MalformedContentTypeWithBody2Input {
 1063         -
                salutation: self.salutation,
 1064         -
            }
 1065         -
        }
 1066         -
    }
 1067         -
}
 1068         -
/// See [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1069         -
///
 1070         -
pub mod malformed_content_type_with_body2_input {
 1071         -
 1072         -
    impl ::std::convert::From<Builder> for crate::input::MalformedContentTypeWithBody2Input {
 1073         -
        fn from(builder: Builder) -> Self {
 1074         -
            builder.build()
 1075         -
        }
 1076         -
    }
 1077         -
    /// A builder for [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1078         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1079         -
    pub struct Builder {
 1080         -
        pub(crate) salutation: ::std::option::Option<::std::string::String>,
 1081         -
    }
 1082         -
    impl Builder {
 1083         -
        #[allow(missing_docs)] // documentation missing in model
 1084         -
        pub fn salutation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1085         -
            self.salutation = input;
 1086         -
            self
 1087         -
        }
 1088         -
        /// Consumes the builder and constructs a [`MalformedContentTypeWithBody2Input`](crate::input::MalformedContentTypeWithBody2Input).
 1089         -
        pub fn build(self) -> crate::input::MalformedContentTypeWithBody2Input {
 1090         -
            self.build_enforcing_required_and_enum_traits()
 1091         -
        }
 1092         -
        fn build_enforcing_required_and_enum_traits(
 1093         -
            self,
 1094         -
        ) -> crate::input::MalformedContentTypeWithBody2Input {
 1095         -
            crate::input::MalformedContentTypeWithBody2Input {
 1096         -
                salutation: self.salutation,
 1097         -
            }
 1098         -
        }
 1099         -
    }
 1100         -
}
 1101         -
/// See [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1102         -
///
 1103         -
pub(crate) mod http_payload_traits2_input_internal {
 1104         -
 1105         -
    impl ::std::convert::From<Builder> for crate::input::HttpPayloadTraits2Input {
 1106         -
        fn from(builder: Builder) -> Self {
 1107         -
            builder.build()
 1108         -
        }
 1109         -
    }
 1110         -
    /// A builder for [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1111         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1112         -
    pub(crate) struct Builder {
 1113         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 1114         -
        pub(crate) blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1115         -
    }
 1116         -
    impl Builder {
 1117         -
        #[allow(missing_docs)] // documentation missing in model
 1118         -
        pub(crate) fn set_foo(
 1119         -
            mut self,
 1120         -
            input: Option<impl ::std::convert::Into<::std::string::String>>,
 1121         -
        ) -> Self {
 1122         -
            self.foo = input.map(|v| v.into());
 1123         -
            self
 1124         -
        }
 1125         -
        #[allow(missing_docs)] // documentation missing in model
 1126         -
        pub(crate) fn set_blob(
 1127         -
            mut self,
 1128         -
            input: Option<impl ::std::convert::Into<::aws_smithy_http_server_python::types::Blob>>,
 1129         -
        ) -> Self {
 1130         -
            self.blob = input.map(|v| v.into());
 1131         -
            self
 1132         -
        }
 1133         -
        /// Consumes the builder and constructs a [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1134         -
        pub fn build(self) -> crate::input::HttpPayloadTraits2Input {
 1135         -
            self.build_enforcing_all_constraints()
 1136         -
        }
 1137         -
        fn build_enforcing_all_constraints(self) -> crate::input::HttpPayloadTraits2Input {
 1138         -
            crate::input::HttpPayloadTraits2Input {
 1139         -
                foo: self.foo,
 1140         -
                blob: self.blob,
 1141         -
            }
 1142         -
        }
 1143         -
    }
 1144         -
}
 1145         -
/// See [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1146         -
///
 1147         -
pub mod http_payload_traits2_input {
 1148         -
 1149         -
    impl ::std::convert::From<Builder> for crate::input::HttpPayloadTraits2Input {
 1150         -
        fn from(builder: Builder) -> Self {
 1151         -
            builder.build()
 1152         -
        }
 1153         -
    }
 1154         -
    /// A builder for [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1155         -
    #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
 1156         -
    pub struct Builder {
 1157         -
        pub(crate) foo: ::std::option::Option<::std::string::String>,
 1158         -
        pub(crate) blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1159         -
    }
 1160         -
    impl Builder {
 1161         -
        #[allow(missing_docs)] // documentation missing in model
 1162         -
        pub fn foo(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
 1163         -
            self.foo = input;
 1164         -
            self
 1165         -
        }
 1166         -
        #[allow(missing_docs)] // documentation missing in model
 1167         -
        pub fn blob(
 1168         -
            mut self,
 1169         -
            input: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1170         -
        ) -> Self {
 1171         -
            self.blob = input;
 1172         -
            self
 1173         -
        }
 1174         -
        /// Consumes the builder and constructs a [`HttpPayloadTraits2Input`](crate::input::HttpPayloadTraits2Input).
 1175         -
        pub fn build(self) -> crate::input::HttpPayloadTraits2Input {
 1176         -
            self.build_enforcing_required_and_enum_traits()
 1177         -
        }
 1178         -
        fn build_enforcing_required_and_enum_traits(self) -> crate::input::HttpPayloadTraits2Input {
 1179         -
            crate::input::HttpPayloadTraits2Input {
 1180         -
                foo: self.foo,
 1181         -
                blob: self.blob,
 1182         -
            }
 1183         -
        }
 1184         -
    }
 1185         -
}
 1186    593   
/// See [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).
 1187    594   
///
 1188    595   
pub(crate) mod query_precedence_input_internal {
 1189    596   
 1190    597   
    impl ::std::convert::From<Builder> for crate::input::QueryPrecedenceInput {
 1191    598   
        fn from(builder: Builder) -> Self {
 1192    599   
            builder.build()
 1193    600   
        }
 1194    601   
    }
 1195    602   
    /// A builder for [`QueryPrecedenceInput`](crate::input::QueryPrecedenceInput).