Server Test Python

Server Test Python

rev. 024d02a2e8f38a611999fe239a68eb14068662df (ignoring whitespace)

Files changed:

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

@@ -1,0 +181,0 @@
    1         -
import json_rpc11.model
    2         -
import json_rpc11.types
    3         -
import typing
    4         -
    5         -
class ContentTypeParametersOutput:
    6         -
    def __init__(self) -> None:
    7         -
        ...
    8         -
    9         -
   10         -
class DatetimeOffsetsOutput:
   11         -
    datetime: typing.Optional[json_rpc11.types.DateTime]
   12         -
   13         -
    def __init__(self, datetime: typing.Optional[json_rpc11.types.DateTime] = ...) -> None:
   14         -
        ...
   15         -
   16         -
   17         -
class EmptyOperationOutput:
   18         -
    def __init__(self) -> None:
   19         -
        ...
   20         -
   21         -
   22         -
class EndpointOperationOutput:
   23         -
    def __init__(self) -> None:
   24         -
        ...
   25         -
   26         -
   27         -
class EndpointWithHostLabelOperationOutput:
   28         -
    def __init__(self) -> None:
   29         -
        ...
   30         -
   31         -
   32         -
class FractionalSecondsOutput:
   33         -
    datetime: typing.Optional[json_rpc11.types.DateTime]
   34         -
   35         -
    def __init__(self, datetime: typing.Optional[json_rpc11.types.DateTime] = ...) -> None:
   36         -
        ...
   37         -
   38         -
   39         -
class GreetingWithErrorsOutput:
   40         -
    greeting: typing.Optional[str]
   41         -
   42         -
    def __init__(self, greeting: typing.Optional[str] = ...) -> None:
   43         -
        ...
   44         -
   45         -
   46         -
class HostWithPathOperationOutput:
   47         -
    def __init__(self) -> None:
   48         -
        ...
   49         -
   50         -
   51         -
class JsonEnumsOutput:
   52         -
    foo_enum1: typing.Optional[json_rpc11.model.FooEnum]
   53         -
   54         -
    foo_enum2: typing.Optional[json_rpc11.model.FooEnum]
   55         -
   56         -
    foo_enum3: typing.Optional[json_rpc11.model.FooEnum]
   57         -
   58         -
    foo_enum_list: typing.Optional[typing.List[json_rpc11.model.FooEnum]]
   59         -
   60         -
    foo_enum_map: typing.Optional[typing.Dict[str, json_rpc11.model.FooEnum]]
   61         -
   62         -
    foo_enum_set: typing.Optional[typing.List[json_rpc11.model.FooEnum]]
   63         -
   64         -
    def __init__(self, foo_enum1: typing.Optional[json_rpc11.model.FooEnum] = ..., foo_enum2: typing.Optional[json_rpc11.model.FooEnum] = ..., foo_enum3: typing.Optional[json_rpc11.model.FooEnum] = ..., foo_enum_list: typing.Optional[typing.List[json_rpc11.model.FooEnum]] = ..., foo_enum_set: typing.Optional[typing.List[json_rpc11.model.FooEnum]] = ..., foo_enum_map: typing.Optional[typing.Dict[str, json_rpc11.model.FooEnum]] = ...) -> None:
   65         -
        ...
   66         -
   67         -
   68         -
class JsonUnionsOutput:
   69         -
    """
   70         -
    A shared structure that contains a single union member.
   71         -
    """
   72         -
   73         -
    contents: typing.Optional[json_rpc11.model.MyUnion]
   74         -
    """
   75         -
    A union with a representative set of types for members.
   76         -
    """
   77         -
   78         -
    def __init__(self, contents: typing.Optional[json_rpc11.model.MyUnion] = ...) -> None:
   79         -
        ...
   80         -
   81         -
   82         -
class KitchenSinkOperationOutput:
   83         -
    blob: typing.Optional[json_rpc11.types.Blob]
   84         -
   85         -
    boolean: typing.Optional[bool]
   86         -
   87         -
    double: typing.Optional[float]
   88         -
   89         -
    empty_struct: typing.Optional[json_rpc11.model.EmptyStruct]
   90         -
   91         -
    float: typing.Optional[float]
   92         -
   93         -
    httpdate_timestamp: typing.Optional[json_rpc11.types.DateTime]
   94         -
   95         -
    integer: typing.Optional[int]
   96         -
   97         -
    iso8601_timestamp: typing.Optional[json_rpc11.types.DateTime]
   98         -
   99         -
    json_value: typing.Optional[str]
  100         -
  101         -
    list_of_lists: typing.Optional[typing.List[typing.List[str]]]
  102         -
  103         -
    list_of_maps_of_strings: typing.Optional[typing.List[typing.Dict[str, str]]]
  104         -
  105         -
    list_of_strings: typing.Optional[typing.List[str]]
  106         -
  107         -
    list_of_structs: typing.Optional[typing.List[json_rpc11.model.SimpleStruct]]
  108         -
  109         -
    long: typing.Optional[int]
  110         -
  111         -
    map_of_lists_of_strings: typing.Optional[typing.Dict[str, typing.List[str]]]
  112         -
  113         -
    map_of_maps: typing.Optional[typing.Dict[str, typing.Dict[str, str]]]
  114         -
  115         -
    map_of_strings: typing.Optional[typing.Dict[str, str]]
  116         -
  117         -
    map_of_structs: typing.Optional[typing.Dict[str, json_rpc11.model.SimpleStruct]]
  118         -
  119         -
    recursive_list: typing.Optional[typing.List[json_rpc11.model.KitchenSink]]
  120         -
  121         -
    recursive_map: typing.Optional[typing.Dict[str, json_rpc11.model.KitchenSink]]
  122         -
  123         -
    recursive_struct: typing.Optional[json_rpc11.model.KitchenSink]
  124         -
  125         -
    simple_struct: typing.Optional[json_rpc11.model.SimpleStruct]
  126         -
  127         -
    string: typing.Optional[str]
  128         -
  129         -
    struct_with_json_name: typing.Optional[json_rpc11.model.StructWithJsonName]
  130         -
  131         -
    timestamp: typing.Optional[json_rpc11.types.DateTime]
  132         -
  133         -
    unix_timestamp: typing.Optional[json_rpc11.types.DateTime]
  134         -
  135         -
    def __init__(self, blob: typing.Optional[json_rpc11.types.Blob] = ..., boolean: typing.Optional[bool] = ..., double: typing.Optional[float] = ..., empty_struct: typing.Optional[json_rpc11.model.EmptyStruct] = ..., float: typing.Optional[float] = ..., httpdate_timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., integer: typing.Optional[int] = ..., iso8601_timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., json_value: typing.Optional[str] = ..., list_of_lists: typing.Optional[typing.List[typing.List[str]]] = ..., list_of_maps_of_strings: typing.Optional[typing.List[typing.Dict[str, str]]] = ..., list_of_strings: typing.Optional[typing.List[str]] = ..., list_of_structs: typing.Optional[typing.List[json_rpc11.model.SimpleStruct]] = ..., long: typing.Optional[int] = ..., map_of_lists_of_strings: typing.Optional[typing.Dict[str, typing.List[str]]] = ..., map_of_maps: typing.Optional[typing.Dict[str, typing.Dict[str, str]]] = ..., map_of_strings: typing.Optional[typing.Dict[str, str]] = ..., map_of_structs: typing.Optional[typing.Dict[str, json_rpc11.model.SimpleStruct]] = ..., recursive_list: typing.Optional[typing.List[json_rpc11.model.KitchenSink]] = ..., recursive_map: typing.Optional[typing.Dict[str, json_rpc11.model.KitchenSink]] = ..., recursive_struct: typing.Optional[json_rpc11.model.KitchenSink] = ..., simple_struct: typing.Optional[json_rpc11.model.SimpleStruct] = ..., string: typing.Optional[str] = ..., struct_with_json_name: typing.Optional[json_rpc11.model.StructWithJsonName] = ..., timestamp: typing.Optional[json_rpc11.types.DateTime] = ..., unix_timestamp: typing.Optional[json_rpc11.types.DateTime] = ...) -> None:
  136         -
        ...
  137         -
  138         -
  139         -
class NullOperationOutput:
  140         -
    string: typing.Optional[str]
  141         -
  142         -
    def __init__(self, string: typing.Optional[str] = ...) -> None:
  143         -
        ...
  144         -
  145         -
  146         -
class OperationWithOptionalInputOutputOutput:
  147         -
    value: typing.Optional[str]
  148         -
  149         -
    def __init__(self, value: typing.Optional[str] = ...) -> None:
  150         -
        ...
  151         -
  152         -
  153         -
class PutAndGetInlineDocumentsOutput:
  154         -
    inline_document: typing.Optional[json_rpc11.types.Document]
  155         -
  156         -
    def __init__(self, inline_document: typing.Optional[json_rpc11.types.Document] = ...) -> None:
  157         -
        ...
  158         -
  159         -
  160         -
class PutWithContentEncodingOutput:
  161         -
    def __init__(self) -> None:
  162         -
        ...
  163         -
  164         -
  165         -
class SimpleScalarPropertiesOutput:
  166         -
    double_value: typing.Optional[float]
  167         -
  168         -
    float_value: typing.Optional[float]
  169         -
  170         -
    def __init__(self, float_value: typing.Optional[float] = ..., double_value: typing.Optional[float] = ...) -> None:
  171         -
        ...
  172         -
  173         -
  174         -
class SparseNullsOperationOutput:
  175         -
    sparse_string_list: typing.Optional[typing.List[typing.Optional[str]]]
  176         -
  177         -
    sparse_string_map: typing.Optional[typing.Dict[str, typing.Optional[str]]]
  178         -
  179         -
    def __init__(self, sparse_string_list: typing.Optional[typing.List[typing.Optional[str]]] = ..., sparse_string_map: typing.Optional[typing.Dict[str, typing.Optional[str]]] = ...) -> None:
  180         -
        ...
  181         -

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

@@ -1,0 +27,0 @@
    1         -
import typing
    2         -
    3         -
class PySocket:
    4         -
    """
    5         -
    Socket implementation that can be shared between multiple Python processes.
    6         -
    7         -
    Python cannot handle true multi-threaded applications due to the [GIL],
    8         -
    often resulting in reduced performance and only one core used by the application.
    9         -
    To work around this, Python web applications usually create a socket with
   10         -
    SO_REUSEADDR and SO_REUSEPORT enabled that can be shared between multiple
   11         -
    Python processes, allowing you to maximize performance and use all available
   12         -
    computing capacity of the host.
   13         -
   14         -
    [GIL]: https://wiki.python.org/moin/GlobalInterpreterLock
   15         -
    """
   16         -
   17         -
    def try_clone(self) -> PySocket:
   18         -
        """
   19         -
        Clone the inner socket allowing it to be shared between multiple
   20         -
        Python processes.
   21         -
        """
   22         -
        ...
   23         -
   24         -
   25         -
    def __init__(self, address: str, port: int, backlog: typing.Optional[int] = ...) -> None:
   26         -
        ...
   27         -

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

@@ -1,0 +10,0 @@
    1         -
import pathlib
    2         -
    3         -
class TlsConfig:
    4         -
    """
    5         -
    PyTlsConfig represents TLS configuration created from Python.
    6         -
    """
    7         -
    8         -
    def __init__(self, key_path: pathlib.Path, cert_path: pathlib.Path, reload_secs: int = ...) -> None:
    9         -
        ...
   10         -

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

@@ -1,0 +209,0 @@
    1         -
import typing
    2         -
    3         -
class Blob:
    4         -
    """
    5         -
    Python Wrapper for [aws_smithy_types::Blob].
    6         -
    """
    7         -
    8         -
    data: bytes
    9         -
    """
   10         -
    Python getter for the `Blob` byte array.
   11         -
    """
   12         -
   13         -
    def __init__(self, input: bytes) -> None:
   14         -
        ...
   15         -
   16         -
   17         -
class ByteStream:
   18         -
    """
   19         -
    Python Wrapper for [aws_smithy_types::byte_stream::ByteStream].
   20         -
   21         -
    ByteStream provides misuse-resistant primitives to make it easier to handle common patterns with streaming data.
   22         -
   23         -
    On the Rust side, The Python implementation wraps the original [ByteStream](aws_smithy_types::byte_stream::ByteStream)
   24         -
    in a clonable structure and implements the [Stream](futures::stream::Stream) trait for it to
   25         -
    allow Rust to handle the type transparently.
   26         -
   27         -
    On the Python side both sync and async iterators are exposed by implementing `__iter__()` and `__aiter__()` magic methods,
   28         -
    which allows to just loop over the stream chunks.
   29         -
   30         -
    ### Example of async streaming:
   31         -
   32         -
    ```python
   33         -
        stream = await ByteStream.from_path("/tmp/music.mp3")
   34         -
        async for chunk in stream:
   35         -
            print(chunk)
   36         -
    ```
   37         -
   38         -
    ### Example of sync streaming:
   39         -
   40         -
    ```python
   41         -
        stream = ByteStream.from_stream_blocking("/tmp/music.mp3")
   42         -
        for chunk in stream:
   43         -
            print(chunk)
   44         -
    ```
   45         -
   46         -
    The main difference between the two implementations is that the async one is scheduling the Python coroutines as Rust futures,
   47         -
    effectively maintaining the asyncronous behavior that Rust exposes, while the sync one is blocking the Tokio runtime to be able
   48         -
    to await one chunk at a time.
   49         -
   50         -
    The original Rust [ByteStream](aws_smithy_types::byte_stream::ByteStream) is wrapped inside a `Arc<Mutex>` to allow the type to be
   51         -
    [Clone] (required by PyO3) and to allow internal mutability, required to fetch the next chunk of data.
   52         -
    """
   53         -
   54         -
    @staticmethod
   55         -
    def from_path(path: str) -> typing.Awaitable[ByteStream]:
   56         -
        """
   57         -
        Create a new [ByteStream](aws_smithy_types::byte_stream::ByteStream) from a path, forcing
   58         -
        Python to await this coroutine.
   59         -
        """
   60         -
        ...
   61         -
   62         -
   63         -
    @staticmethod
   64         -
    def from_path_blocking(path: str) -> ByteStream:
   65         -
        """
   66         -
        Create a new [ByteStream](aws_smithy_types::byte_stream::ByteStream) from a path, without
   67         -
        requiring Python to await this method.
   68         -
   69         -
        **NOTE:** This method will block the Rust event loop when it is running.
   70         -
        """
   71         -
        ...
   72         -
   73         -
   74         -
    def __init__(self, input: bytes) -> None:
   75         -
        ...
   76         -
   77         -
   78         -
class DateTime:
   79         -
    """
   80         -
    Python Wrapper for [aws_smithy_types::date_time::DateTime].
   81         -
    """
   82         -
   83         -
    def as_nanos(self) -> int:
   84         -
        """
   85         -
        Returns the number of nanoseconds since the Unix epoch that this `DateTime` represents.
   86         -
        """
   87         -
        ...
   88         -
   89         -
   90         -
    def as_secs_f64(self) -> float:
   91         -
        """
   92         -
        Returns the `DateTime` value as an `f64` representing the seconds since the Unix epoch.
   93         -
        """
   94         -
        ...
   95         -
   96         -
   97         -
    @staticmethod
   98         -
    def from_fractional_secs(epoch_seconds: int, fraction: float) -> DateTime:
   99         -
        """
  100         -
        Creates a `DateTime` from a number of seconds and a fractional second since the Unix epoch.
  101         -
        """
  102         -
        ...
  103         -
  104         -
  105         -
    @staticmethod
  106         -
    def from_millis(epoch_millis: int) -> DateTime:
  107         -
        """
  108         -
        Creates a `DateTime` from a number of milliseconds since the Unix epoch.
  109         -
        """
  110         -
        ...
  111         -
  112         -
  113         -
    @staticmethod
  114         -
    def from_nanos(epoch_nanos: int) -> DateTime:
  115         -
        """
  116         -
        Creates a `DateTime` from a number of nanoseconds since the Unix epoch.
  117         -
        """
  118         -
        ...
  119         -
  120         -
  121         -
    @staticmethod
  122         -
    def from_secs(epoch_seconds: int) -> DateTime:
  123         -
        """
  124         -
        Creates a `DateTime` from a number of seconds since the Unix epoch.
  125         -
        """
  126         -
        ...
  127         -
  128         -
  129         -
    @staticmethod
  130         -
    def from_secs_and_nanos(seconds: int, subsecond_nanos: int) -> DateTime:
  131         -
        """
  132         -
        Creates a `DateTime` from a number of seconds and sub-second nanos since the Unix epoch.
  133         -
        """
  134         -
        ...
  135         -
  136         -
  137         -
    @staticmethod
  138         -
    def from_secs_f64(epoch_seconds: float) -> DateTime:
  139         -
        """
  140         -
        Creates a `DateTime` from an `f64` representing the number of seconds since the Unix epoch.
  141         -
        """
  142         -
        ...
  143         -
  144         -
  145         -
    @staticmethod
  146         -
    def from_str(s: str, format: Format) -> DateTime:
  147         -
        """
  148         -
        Parses a `DateTime` from a string using the given `format`.
  149         -
        """
  150         -
        ...
  151         -
  152         -
  153         -
    def has_subsec_nanos(self) -> bool:
  154         -
        """
  155         -
        Returns true if sub-second nanos is greater than zero.
  156         -
        """
  157         -
        ...
  158         -
  159         -
  160         -
    @staticmethod
  161         -
    def read(format: Format, delim: str) -> typing.Tuple[DateTime, str]:
  162         -
        """
  163         -
        Read 1 date of `format` from `s`, expecting either `delim` or EOF.
  164         -
  165         -
        TODO(PythonTyping): How do we represent `char` in Python?
  166         -
        """
  167         -
        ...
  168         -
  169         -
  170         -
    def secs(self) -> int:
  171         -
        """
  172         -
        Returns the epoch seconds component of the `DateTime`.
  173         -
        """
  174         -
        ...
  175         -
  176         -
  177         -
    def subsec_nanos(self) -> int:
  178         -
        """
  179         -
        Returns the sub-second nanos component of the `DateTime`.
  180         -
        """
  181         -
        ...
  182         -
  183         -
  184         -
    def to_millis(self) -> int:
  185         -
        """
  186         -
        Converts the `DateTime` to the number of milliseconds since the Unix epoch.
  187         -
        """
  188         -
        ...
  189         -
  190         -
  191         -
class Format:
  192         -
    """
  193         -
    Formats for representing a `DateTime` in the Smithy protocols.
  194         -
    """
  195         -
  196         -
    DateTime: Format
  197         -
    """
  198         -
    Formats for representing a `DateTime` in the Smithy protocols.
  199         -
    """
  200         -
  201         -
    EpochSeconds: Format
  202         -
    """
  203         -
    Formats for representing a `DateTime` in the Smithy protocols.
  204         -
    """
  205         -
  206         -
    HttpDate: Format
  207         -
    """
  208         -
    Formats for representing a `DateTime` in the Smithy protocols.
  209         -
    """

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

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")
@@ -626,634 +685,704 @@
  646    654   
    /// :type typing.Optional\[str\]:
  647    655   
    #[allow(missing_docs)] // documentation missing in model
  648    656   
    pub foo: ::std::option::Option<::std::string::String>,
  649    657   
}
  650    658   
impl ComplexNestedErrorData {
  651    659   
    #[allow(missing_docs)] // documentation missing in model
  652    660   
    pub fn foo(&self) -> ::std::option::Option<&str> {
  653    661   
        self.foo.as_deref()
  654    662   
    }
  655    663   
}
         664  +
impl ::std::fmt::Display for ComplexNestedErrorData {
         665  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         666  +
        ::std::write!(f, "ComplexNestedErrorData {{")?;
         667  +
        if let ::std::option::Option::Some(inner) = &self.foo {
         668  +
            ::std::write!(f, "foo=Some({})", inner)?;
         669  +
        } else {
         670  +
            ::std::write!(f, "foo=None")?;
         671  +
        }
         672  +
        ::std::write!(f, "}}")
         673  +
    }
         674  +
}
  656    675   
#[allow(clippy::new_without_default)]
  657    676   
#[allow(clippy::too_many_arguments)]
  658    677   
#[::pyo3::pymethods]
  659    678   
impl ComplexNestedErrorData {
  660    679   
    #[new]
  661    680   
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
  662    681   
        Self { foo }
  663    682   
    }
  664    683   
    fn __repr__(&self) -> String {
  665    684   
        format!("{self:?}")
@@ -1030,1049 +1089,1244 @@
 1050   1069   
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1051   1070   
        self.timestamp.as_ref()
 1052   1071   
    }
 1053   1072   
    #[allow(missing_docs)] // documentation missing in model
 1054   1073   
    pub fn unix_timestamp(
 1055   1074   
        &self,
 1056   1075   
    ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::DateTime> {
 1057   1076   
        self.unix_timestamp.as_ref()
 1058   1077   
    }
 1059   1078   
}
        1079  +
impl ::std::fmt::Display for KitchenSink {
        1080  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1081  +
        ::std::write!(f, "KitchenSink {{")?;
        1082  +
        if let ::std::option::Option::Some(inner) = &self.blob {
        1083  +
            ::std::write!(f, "blob=Some({})", inner)?;
        1084  +
        } else {
        1085  +
            ::std::write!(f, "blob=None")?;
        1086  +
        }
        1087  +
        if let ::std::option::Option::Some(inner) = &self.boolean {
        1088  +
            ::std::write!(f, ", boolean=Some({})", inner)?;
        1089  +
        } else {
        1090  +
            ::std::write!(f, ", boolean=None")?;
        1091  +
        }
        1092  +
        if let ::std::option::Option::Some(inner) = &self.double {
        1093  +
            ::std::write!(f, ", double=Some({})", inner)?;
        1094  +
        } else {
        1095  +
            ::std::write!(f, ", double=None")?;
        1096  +
        }
        1097  +
        if let ::std::option::Option::Some(inner) = &self.empty_struct {
        1098  +
            ::std::write!(f, ", empty_struct=Some({})", inner)?;
        1099  +
        } else {
        1100  +
            ::std::write!(f, ", empty_struct=None")?;
        1101  +
        }
        1102  +
        if let ::std::option::Option::Some(inner) = &self.float {
        1103  +
            ::std::write!(f, ", float=Some({})", inner)?;
        1104  +
        } else {
        1105  +
            ::std::write!(f, ", float=None")?;
        1106  +
        }
        1107  +
        if let ::std::option::Option::Some(inner) = &self.httpdate_timestamp {
        1108  +
            ::std::write!(f, ", httpdate_timestamp=Some({})", inner)?;
        1109  +
        } else {
        1110  +
            ::std::write!(f, ", httpdate_timestamp=None")?;
        1111  +
        }
        1112  +
        if let ::std::option::Option::Some(inner) = &self.integer {
        1113  +
            ::std::write!(f, ", integer=Some({})", inner)?;
        1114  +
        } else {
        1115  +
            ::std::write!(f, ", integer=None")?;
        1116  +
        }
        1117  +
        if let ::std::option::Option::Some(inner) = &self.iso8601_timestamp {
        1118  +
            ::std::write!(f, ", iso8601_timestamp=Some({})", inner)?;
        1119  +
        } else {
        1120  +
            ::std::write!(f, ", iso8601_timestamp=None")?;
        1121  +
        }
        1122  +
        if let ::std::option::Option::Some(inner) = &self.json_value {
        1123  +
            ::std::write!(f, ", json_value=Some({})", inner)?;
        1124  +
        } else {
        1125  +
            ::std::write!(f, ", json_value=None")?;
        1126  +
        }
        1127  +
        if let ::std::option::Option::Some(inner) = &self.list_of_lists {
        1128  +
            ::std::write!(f, ", list_of_lists=Some({})", inner)?;
        1129  +
        } else {
        1130  +
            ::std::write!(f, ", list_of_lists=None")?;
        1131  +
        }
        1132  +
        if let ::std::option::Option::Some(inner) = &self.list_of_maps_of_strings {
        1133  +
            ::std::write!(f, ", list_of_maps_of_strings=Some({})", inner)?;
        1134  +
        } else {
        1135  +
            ::std::write!(f, ", list_of_maps_of_strings=None")?;
        1136  +
        }
        1137  +
        if let ::std::option::Option::Some(inner) = &self.list_of_strings {
        1138  +
            ::std::write!(f, ", list_of_strings=Some({})", inner)?;
        1139  +
        } else {
        1140  +
            ::std::write!(f, ", list_of_strings=None")?;
        1141  +
        }
        1142  +
        if let ::std::option::Option::Some(inner) = &self.list_of_structs {
        1143  +
            ::std::write!(f, ", list_of_structs=Some({})", inner)?;
        1144  +
        } else {
        1145  +
            ::std::write!(f, ", list_of_structs=None")?;
        1146  +
        }
        1147  +
        if let ::std::option::Option::Some(inner) = &self.long {
        1148  +
            ::std::write!(f, ", long=Some({})", inner)?;
        1149  +
        } else {
        1150  +
            ::std::write!(f, ", long=None")?;
        1151  +
        }
        1152  +
        if let ::std::option::Option::Some(inner) = &self.map_of_lists_of_strings {
        1153  +
            ::std::write!(f, ", map_of_lists_of_strings=Some({})", inner)?;
        1154  +
        } else {
        1155  +
            ::std::write!(f, ", map_of_lists_of_strings=None")?;
        1156  +
        }
        1157  +
        if let ::std::option::Option::Some(inner) = &self.map_of_maps {
        1158  +
            ::std::write!(f, ", map_of_maps=Some({})", inner)?;
        1159  +
        } else {
        1160  +
            ::std::write!(f, ", map_of_maps=None")?;
        1161  +
        }
        1162  +
        if let ::std::option::Option::Some(inner) = &self.map_of_strings {
        1163  +
            ::std::write!(f, ", map_of_strings=Some({})", inner)?;
        1164  +
        } else {
        1165  +
            ::std::write!(f, ", map_of_strings=None")?;
        1166  +
        }
        1167  +
        if let ::std::option::Option::Some(inner) = &self.map_of_structs {
        1168  +
            ::std::write!(f, ", map_of_structs=Some({})", inner)?;
        1169  +
        } else {
        1170  +
            ::std::write!(f, ", map_of_structs=None")?;
        1171  +
        }
        1172  +
        if let ::std::option::Option::Some(inner) = &self.recursive_list {
        1173  +
            ::std::write!(f, ", recursive_list=Some({})", inner)?;
        1174  +
        } else {
        1175  +
            ::std::write!(f, ", recursive_list=None")?;
        1176  +
        }
        1177  +
        if let ::std::option::Option::Some(inner) = &self.recursive_map {
        1178  +
            ::std::write!(f, ", recursive_map=Some({})", inner)?;
        1179  +
        } else {
        1180  +
            ::std::write!(f, ", recursive_map=None")?;
        1181  +
        }
        1182  +
        if let ::std::option::Option::Some(inner) = &self.recursive_struct {
        1183  +
            ::std::write!(f, ", recursive_struct=Some({})", inner)?;
        1184  +
        } else {
        1185  +
            ::std::write!(f, ", recursive_struct=None")?;
        1186  +
        }
        1187  +
        if let ::std::option::Option::Some(inner) = &self.simple_struct {
        1188  +
            ::std::write!(f, ", simple_struct=Some({})", inner)?;
        1189  +
        } else {
        1190  +
            ::std::write!(f, ", simple_struct=None")?;
        1191  +
        }
        1192  +
        if let ::std::option::Option::Some(inner) = &self.string {
        1193  +
            ::std::write!(f, ", string=Some({})", inner)?;
        1194  +
        } else {
        1195  +
            ::std::write!(f, ", string=None")?;
        1196  +
        }
        1197  +
        if let ::std::option::Option::Some(inner) = &self.struct_with_json_name {
        1198  +
            ::std::write!(f, ", struct_with_json_name=Some({})", inner)?;
        1199  +
        } else {
        1200  +
            ::std::write!(f, ", struct_with_json_name=None")?;
        1201  +
        }
        1202  +
        if let ::std::option::Option::Some(inner) = &self.timestamp {
        1203  +
            ::std::write!(f, ", timestamp=Some({})", inner)?;
        1204  +
        } else {
        1205  +
            ::std::write!(f, ", timestamp=None")?;
        1206  +
        }
        1207  +
        if let ::std::option::Option::Some(inner) = &self.unix_timestamp {
        1208  +
            ::std::write!(f, ", unix_timestamp=Some({})", inner)?;
        1209  +
        } else {
        1210  +
            ::std::write!(f, ", unix_timestamp=None")?;
        1211  +
        }
        1212  +
        ::std::write!(f, "}}")
        1213  +
    }
        1214  +
}
 1060   1215   
#[allow(clippy::new_without_default)]
 1061   1216   
#[allow(clippy::too_many_arguments)]
 1062   1217   
#[::pyo3::pymethods]
 1063   1218   
impl KitchenSink {
 1064   1219   
    #[new]
 1065   1220   
    pub fn new(
 1066   1221   
        blob: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
 1067   1222   
        boolean: ::std::option::Option<bool>,
 1068   1223   
        double: ::std::option::Option<f64>,
 1069   1224   
        empty_struct: ::std::option::Option<crate::model::EmptyStruct>,
@@ -1161,1316 +1318,1501 @@
 1181   1336   
    /// :type typing.Optional\[str\]:
 1182   1337   
    #[allow(missing_docs)] // documentation missing in model
 1183   1338   
    pub value: ::std::option::Option<::std::string::String>,
 1184   1339   
}
 1185   1340   
impl StructWithJsonName {
 1186   1341   
    #[allow(missing_docs)] // documentation missing in model
 1187   1342   
    pub fn value(&self) -> ::std::option::Option<&str> {
 1188   1343   
        self.value.as_deref()
 1189   1344   
    }
 1190   1345   
}
        1346  +
impl ::std::fmt::Display for StructWithJsonName {
        1347  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1348  +
        ::std::write!(f, "StructWithJsonName {{")?;
        1349  +
        if let ::std::option::Option::Some(inner) = &self.value {
        1350  +
            ::std::write!(f, "value=Some({})", inner)?;
        1351  +
        } else {
        1352  +
            ::std::write!(f, "value=None")?;
        1353  +
        }
        1354  +
        ::std::write!(f, "}}")
        1355  +
    }
        1356  +
}
 1191   1357   
#[allow(clippy::new_without_default)]
 1192   1358   
#[allow(clippy::too_many_arguments)]
 1193   1359   
#[::pyo3::pymethods]
 1194   1360   
impl StructWithJsonName {
 1195   1361   
    #[new]
 1196   1362   
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
 1197   1363   
        Self { value }
 1198   1364   
    }
 1199   1365   
    fn __repr__(&self) -> String {
 1200   1366   
        format!("{self:?}")
 1201   1367   
    }
 1202   1368   
    fn __str__(&self) -> String {
 1203   1369   
        format!("{self:?}")
 1204   1370   
    }
 1205   1371   
}
 1206   1372   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<StructWithJsonName> {
 1207   1373   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1208   1374   
        ob.extract::<StructWithJsonName>().map(Box::new)
 1209   1375   
    }
 1210   1376   
}
 1211   1377   
 1212   1378   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<StructWithJsonName> {
 1213   1379   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1214   1380   
        (*self).into_py(py)
 1215   1381   
    }
 1216   1382   
}
 1217   1383   
impl crate::constrained::Constrained for crate::model::StructWithJsonName {
 1218   1384   
    type Unconstrained = crate::model::struct_with_json_name_internal::Builder;
 1219   1385   
}
 1220   1386   
impl StructWithJsonName {
 1221   1387   
    /// Creates a new builder-style object to manufacture [`StructWithJsonName`](crate::model::StructWithJsonName).
 1222   1388   
    pub fn builder() -> crate::model::struct_with_json_name::Builder {
 1223   1389   
        crate::model::struct_with_json_name::Builder::default()
 1224   1390   
    }
 1225   1391   
}
 1226   1392   
 1227   1393   
#[::pyo3::pyclass]
 1228   1394   
/// :param value typing.Optional\[str\]:
 1229   1395   
/// :rtype None:
 1230   1396   
#[allow(missing_docs)] // documentation missing in model
 1231   1397   
#[derive(
 1232   1398   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1233   1399   
)]
 1234   1400   
pub struct SimpleStruct {
 1235   1401   
    #[pyo3(get, set)]
 1236   1402   
    /// :type typing.Optional\[str\]:
 1237   1403   
    #[allow(missing_docs)] // documentation missing in model
 1238   1404   
    pub value: ::std::option::Option<::std::string::String>,
 1239   1405   
}
 1240   1406   
impl SimpleStruct {
 1241   1407   
    #[allow(missing_docs)] // documentation missing in model
 1242   1408   
    pub fn value(&self) -> ::std::option::Option<&str> {
 1243   1409   
        self.value.as_deref()
 1244   1410   
    }
 1245   1411   
}
        1412  +
impl ::std::fmt::Display for SimpleStruct {
        1413  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1414  +
        ::std::write!(f, "SimpleStruct {{")?;
        1415  +
        if let ::std::option::Option::Some(inner) = &self.value {
        1416  +
            ::std::write!(f, "value=Some({})", inner)?;
        1417  +
        } else {
        1418  +
            ::std::write!(f, "value=None")?;
        1419  +
        }
        1420  +
        ::std::write!(f, "}}")
        1421  +
    }
        1422  +
}
 1246   1423   
#[allow(clippy::new_without_default)]
 1247   1424   
#[allow(clippy::too_many_arguments)]
 1248   1425   
#[::pyo3::pymethods]
 1249   1426   
impl SimpleStruct {
 1250   1427   
    #[new]
 1251   1428   
    pub fn new(value: ::std::option::Option<::std::string::String>) -> Self {
 1252   1429   
        Self { value }
 1253   1430   
    }
 1254   1431   
    fn __repr__(&self) -> String {
 1255   1432   
        format!("{self:?}")
 1256   1433   
    }
 1257   1434   
    fn __str__(&self) -> String {
 1258   1435   
        format!("{self:?}")
 1259   1436   
    }
 1260   1437   
}
 1261   1438   
impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<SimpleStruct> {
 1262   1439   
    fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
 1263   1440   
        ob.extract::<SimpleStruct>().map(Box::new)
 1264   1441   
    }
 1265   1442   
}
 1266   1443   
 1267   1444   
impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<SimpleStruct> {
 1268   1445   
    fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
 1269   1446   
        (*self).into_py(py)
 1270   1447   
    }
 1271   1448   
}
 1272   1449   
impl crate::constrained::Constrained for crate::model::SimpleStruct {
 1273   1450   
    type Unconstrained = crate::model::simple_struct_internal::Builder;
 1274   1451   
}
 1275   1452   
impl SimpleStruct {
 1276   1453   
    /// Creates a new builder-style object to manufacture [`SimpleStruct`](crate::model::SimpleStruct).
 1277   1454   
    pub fn builder() -> crate::model::simple_struct::Builder {
 1278   1455   
        crate::model::simple_struct::Builder::default()
 1279   1456   
    }
 1280   1457   
}
 1281   1458   
 1282   1459   
#[::pyo3::pyclass]
 1283   1460   
/// :rtype None:
 1284   1461   
#[allow(missing_docs)] // documentation missing in model
 1285   1462   
#[derive(
 1286   1463   
    ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
 1287   1464   
)]
 1288   1465   
pub struct EmptyStruct {}
        1466  +
impl ::std::fmt::Display for EmptyStruct {
        1467  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        1468  +
        ::std::write!(f, "EmptyStruct {{")?;
        1469  +
        ::std::write!(f, "}}")
        1470  +
    }
        1471  +
}
 1289   1472   
#[allow(clippy::new_without_default)]
 1290   1473   
#[allow(clippy::too_many_arguments)]
 1291   1474   
#[::pyo3::pymethods]
 1292   1475   
impl EmptyStruct {
 1293   1476   
    #[new]
 1294   1477   
    pub fn new() -> Self {
 1295   1478   
        Self {}
 1296   1479   
    }
 1297   1480   
    fn __repr__(&self) -> String {
 1298   1481   
        format!("{self:?}")

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

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")

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

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")

tmp-codegen-diff/codegen-server-test-python/pokemon-service-server-sdk/rust-server-codegen-python/src/model.rs

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")

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

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")
@@ -2380,2388 +2439,2458 @@
 2400   2408   
    /// :type typing.Optional\[str\]:
 2401   2409   
    #[allow(missing_docs)] // documentation missing in model
 2402   2410   
    pub foo: ::std::option::Option<::std::string::String>,
 2403   2411   
}
 2404   2412   
impl ComplexNestedErrorData {
 2405   2413   
    #[allow(missing_docs)] // documentation missing in model
 2406   2414   
    pub fn foo(&self) -> ::std::option::Option<&str> {
 2407   2415   
        self.foo.as_deref()
 2408   2416   
    }
 2409   2417   
}
        2418  +
impl ::std::fmt::Display for ComplexNestedErrorData {
        2419  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        2420  +
        ::std::write!(f, "ComplexNestedErrorData {{")?;
        2421  +
        if let ::std::option::Option::Some(inner) = &self.foo {
        2422  +
            ::std::write!(f, "foo=Some({})", inner)?;
        2423  +
        } else {
        2424  +
            ::std::write!(f, "foo=None")?;
        2425  +
        }
        2426  +
        ::std::write!(f, "}}")
        2427  +
    }
        2428  +
}
 2410   2429   
#[allow(clippy::new_without_default)]
 2411   2430   
#[allow(clippy::too_many_arguments)]
 2412   2431   
#[::pyo3::pymethods]
 2413   2432   
impl ComplexNestedErrorData {
 2414   2433   
    #[new]
 2415   2434   
    pub fn new(foo: ::std::option::Option<::std::string::String>) -> Self {
 2416   2435   
        Self { foo }
 2417   2436   
    }
 2418   2437   
    fn __repr__(&self) -> String {
 2419   2438   
        format!("{self:?}")

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

@@ -109,109 +168,176 @@
  129    129   
    pub fn path(&self) -> &str {
  130    130   
        use std::ops::Deref;
  131    131   
        self.path.deref()
  132    132   
    }
  133    133   
    /// A detailed description of the validation failure.
  134    134   
    pub fn message(&self) -> &str {
  135    135   
        use std::ops::Deref;
  136    136   
        self.message.deref()
  137    137   
    }
  138    138   
}
         139  +
impl ::std::fmt::Display for ValidationExceptionField {
         140  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         141  +
        ::std::write!(f, "ValidationExceptionField {{")?;
         142  +
        ::std::write!(f, "path={}", &self.path)?;
         143  +
        ::std::write!(f, ", message={}", &self.message)?;
         144  +
        ::std::write!(f, "}}")
         145  +
    }
         146  +
}
  139    147   
#[allow(clippy::new_without_default)]
  140    148   
#[allow(clippy::too_many_arguments)]
  141    149   
#[::pyo3::pymethods]
  142    150   
impl ValidationExceptionField {
  143    151   
    #[new]
  144    152   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
  145    153   
        Self { path, message }
  146    154   
    }
  147    155   
    fn __repr__(&self) -> String {
  148    156   
        format!("{self:?}")

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

@@ -2,2 +61,69 @@
   22     22   
    pub fn path(&self) -> &str {
   23     23   
        use std::ops::Deref;
   24     24   
        self.path.deref()
   25     25   
    }
   26     26   
    /// A detailed description of the validation failure.
   27     27   
    pub fn message(&self) -> &str {
   28     28   
        use std::ops::Deref;
   29     29   
        self.message.deref()
   30     30   
    }
   31     31   
}
          32  +
impl ::std::fmt::Display for ValidationExceptionField {
          33  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
          34  +
        ::std::write!(f, "ValidationExceptionField {{")?;
          35  +
        ::std::write!(f, "path={}", &self.path)?;
          36  +
        ::std::write!(f, ", message={}", &self.message)?;
          37  +
        ::std::write!(f, "}}")
          38  +
    }
          39  +
}
   32     40   
#[allow(clippy::new_without_default)]
   33     41   
#[allow(clippy::too_many_arguments)]
   34     42   
#[::pyo3::pymethods]
   35     43   
impl ValidationExceptionField {
   36     44   
    #[new]
   37     45   
    pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
   38     46   
        Self { path, message }
   39     47   
    }
   40     48   
    fn __repr__(&self) -> String {
   41     49   
        format!("{self:?}")