Server Test Python

Server Test Python

rev. 399187927edd9a1e762efeae060e3a56d671920a

Files changed:

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

@@ -1,0 +231,0 @@
    1         -
import constraints.model
    2         -
import constraints.types
    3         -
import typing
    4         -
    5         -
class ConstrainedHttpBoundShapesOperationOutput:
    6         -
    enum_string_label: constraints.model.EnumString
    7         -
    8         -
    enum_string_list_query: typing.Optional[typing.List[constraints.model.EnumString]]
    9         -
   10         -
    enum_string_query: typing.Optional[constraints.model.EnumString]
   11         -
   12         -
    length_list_pattern_string_header: typing.Optional[typing.List[str]]
   13         -
   14         -
    length_list_pattern_string_query: typing.Optional[typing.List[str]]
   15         -
   16         -
    length_set_pattern_string_header: typing.Optional[typing.Set[str]]
   17         -
   18         -
    length_string_header: typing.Optional[str]
   19         -
   20         -
    length_string_header_map: typing.Dict[str, str]
   21         -
   22         -
    length_string_label: str
   23         -
   24         -
    length_string_list_query: typing.Optional[typing.List[str]]
   25         -
   26         -
    length_string_query: typing.Optional[str]
   27         -
   28         -
    length_string_set_header: typing.Optional[typing.Set[str]]
   29         -
   30         -
    length_string_set_query: typing.Optional[typing.Set[str]]
   31         -
   32         -
    list_length_string_header: typing.Optional[typing.List[str]]
   33         -
   34         -
    range_byte_header: int
   35         -
   36         -
    range_byte_label: int
   37         -
   38         -
    range_byte_list_header: typing.Optional[typing.List[int]]
   39         -
   40         -
    range_byte_list_query: typing.Optional[typing.List[int]]
   41         -
   42         -
    range_byte_query: int
   43         -
   44         -
    range_byte_set_header: typing.Optional[typing.List[int]]
   45         -
   46         -
    range_byte_set_query: typing.Optional[typing.List[int]]
   47         -
   48         -
    range_integer_header: int
   49         -
   50         -
    range_integer_label: int
   51         -
   52         -
    range_integer_list_header: typing.Optional[typing.List[int]]
   53         -
   54         -
    range_integer_list_query: typing.Optional[typing.List[int]]
   55         -
   56         -
    range_integer_query: int
   57         -
   58         -
    range_integer_set_header: typing.Optional[typing.List[int]]
   59         -
   60         -
    range_integer_set_query: typing.Optional[typing.List[int]]
   61         -
   62         -
    range_long_header: int
   63         -
   64         -
    range_long_label: int
   65         -
   66         -
    range_long_list_header: typing.Optional[typing.List[int]]
   67         -
   68         -
    range_long_list_query: typing.Optional[typing.List[int]]
   69         -
   70         -
    range_long_query: int
   71         -
   72         -
    range_long_set_header: typing.Optional[typing.List[int]]
   73         -
   74         -
    range_long_set_query: typing.Optional[typing.List[int]]
   75         -
   76         -
    range_short_header: int
   77         -
   78         -
    range_short_label: int
   79         -
   80         -
    range_short_list_header: typing.Optional[typing.List[int]]
   81         -
   82         -
    range_short_list_query: typing.Optional[typing.List[int]]
   83         -
   84         -
    range_short_query: int
   85         -
   86         -
    range_short_set_header: typing.Optional[typing.List[int]]
   87         -
   88         -
    range_short_set_query: typing.Optional[typing.List[int]]
   89         -
   90         -
    def __init__(self, length_string_label: str, range_integer_label: int, range_short_label: int, range_long_label: int, range_byte_label: int, enum_string_label: constraints.model.EnumString, length_string_header_map: typing.Dict[str, str], length_string_header: typing.Optional[str] = ..., range_integer_header: int, range_short_header: int, range_long_header: int, range_byte_header: int, length_string_set_header: typing.Optional[typing.Set[str]] = ..., list_length_string_header: typing.Optional[typing.List[str]] = ..., length_list_pattern_string_header: typing.Optional[typing.List[str]] = ..., length_set_pattern_string_header: typing.Optional[typing.Set[str]] = ..., range_byte_set_header: typing.Optional[typing.List[int]] = ..., range_short_set_header: typing.Optional[typing.List[int]] = ..., range_integer_set_header: typing.Optional[typing.List[int]] = ..., range_long_set_header: typing.Optional[typing.List[int]] = ..., range_byte_list_header: typing.Optional[typing.List[int]] = ..., range_short_list_header: typing.Optional[typing.List[int]] = ..., range_integer_list_header: typing.Optional[typing.List[int]] = ..., range_long_list_header: typing.Optional[typing.List[int]] = ..., length_string_query: typing.Optional[str] = ..., range_byte_query: int, range_short_query: int, range_integer_query: int, range_long_query: int, enum_string_query: typing.Optional[constraints.model.EnumString] = ..., length_string_list_query: typing.Optional[typing.List[str]] = ..., length_list_pattern_string_query: typing.Optional[typing.List[str]] = ..., length_string_set_query: typing.Optional[typing.Set[str]] = ..., range_byte_list_query: typing.Optional[typing.List[int]] = ..., range_short_list_query: typing.Optional[typing.List[int]] = ..., range_integer_list_query: typing.Optional[typing.List[int]] = ..., range_long_list_query: typing.Optional[typing.List[int]] = ..., range_byte_set_query: typing.Optional[typing.List[int]] = ..., range_short_set_query: typing.Optional[typing.List[int]] = ..., range_integer_set_query: typing.Optional[typing.List[int]] = ..., range_long_set_query: typing.Optional[typing.List[int]] = ..., enum_string_list_query: typing.Optional[typing.List[constraints.model.EnumString]] = ...) -> None:
   91         -
        ...
   92         -
   93         -
   94         -
class ConstrainedHttpPayloadBoundShapeOperationOutput:
   95         -
    http_payload_bound_constrained_shape: constraints.model.ConA
   96         -
   97         -
    def __init__(self, http_payload_bound_constrained_shape: constraints.model.ConA) -> None:
   98         -
        ...
   99         -
  100         -
  101         -
class ConstrainedRecursiveShapesOperationOutput:
  102         -
    nested: typing.Optional[constraints.model.RecursiveShapesInputOutputNested1]
  103         -
  104         -
    recursive_list: typing.List[constraints.model.RecursiveShapesInputOutputNested1]
  105         -
  106         -
    def __init__(self, nested: typing.Optional[constraints.model.RecursiveShapesInputOutputNested1] = ..., recursive_list: typing.List[constraints.model.RecursiveShapesInputOutputNested1]) -> None:
  107         -
        ...
  108         -
  109         -
  110         -
class ConstrainedShapesOnlyInOutputOperationOutput:
  111         -
    list: typing.Optional[typing.List[constraints.model.ConstrainedUnionInOutput]]
  112         -
  113         -
    map: typing.Optional[typing.Dict[str, constraints.model.TransitivelyConstrainedStructureInOutput]]
  114         -
  115         -
    union: typing.Optional[constraints.model.ConstrainedUnionInOutput]
  116         -
  117         -
    def __init__(self, list: typing.Optional[typing.List[constraints.model.ConstrainedUnionInOutput]] = ..., map: typing.Optional[typing.Dict[str, constraints.model.TransitivelyConstrainedStructureInOutput]] = ..., union: typing.Optional[constraints.model.ConstrainedUnionInOutput] = ...) -> None:
  118         -
        ...
  119         -
  120         -
  121         -
class ConstrainedShapesOperationOutput:
  122         -
    con_a: constraints.model.ConA
  123         -
  124         -
    def __init__(self, con_a: constraints.model.ConA) -> None:
  125         -
        ...
  126         -
  127         -
  128         -
class EventStreamsOperationOutput:
  129         -
    events: typing.AsyncIterator[constraints.model.Event]
  130         -
  131         -
    def __init__(self, events: typing.AsyncIterator[constraints.model.Event]) -> None:
  132         -
        ...
  133         -
  134         -
  135         -
class HttpPrefixHeadersTargetingLengthMapOperationOutput:
  136         -
    length_map: typing.Optional[typing.Dict[str, str]]
  137         -
  138         -
    def __init__(self, length_map: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  139         -
        ...
  140         -
  141         -
  142         -
class NonStreamingBlobOperationOutput:
  143         -
    non_streaming_blob: typing.Optional[constraints.types.Blob]
  144         -
  145         -
    def __init__(self, non_streaming_blob: typing.Optional[constraints.types.Blob] = ...) -> None:
  146         -
        ...
  147         -
  148         -
  149         -
class QueryParamsTargetingLengthMapOperationOutput:
  150         -
    length_map: typing.Optional[typing.Dict[str, str]]
  151         -
  152         -
    def __init__(self, length_map: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  153         -
        ...
  154         -
  155         -
  156         -
class QueryParamsTargetingMapOfEnumStringOperationOutput:
  157         -
    map_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, constraints.model.EnumString]]
  158         -
  159         -
    def __init__(self, map_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, constraints.model.EnumString]] = ...) -> None:
  160         -
        ...
  161         -
  162         -
  163         -
class QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput:
  164         -
    map_of_length_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  165         -
  166         -
    def __init__(self, map_of_length_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  167         -
        ...
  168         -
  169         -
  170         -
class QueryParamsTargetingMapOfLengthPatternStringOperationOutput:
  171         -
    map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]]
  172         -
  173         -
    def __init__(self, map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  174         -
        ...
  175         -
  176         -
  177         -
class QueryParamsTargetingMapOfLengthStringOperationOutput:
  178         -
    map_of_length_string: typing.Optional[typing.Dict[str, str]]
  179         -
  180         -
    def __init__(self, map_of_length_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  181         -
        ...
  182         -
  183         -
  184         -
class QueryParamsTargetingMapOfListOfEnumStringOperationOutput:
  185         -
    map_of_list_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, typing.List[constraints.model.EnumString]]]
  186         -
  187         -
    def __init__(self, map_of_list_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, typing.List[constraints.model.EnumString]]] = ...) -> None:
  188         -
        ...
  189         -
  190         -
  191         -
class QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput:
  192         -
    map_of_length_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  193         -
  194         -
    def __init__(self, map_of_length_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  195         -
        ...
  196         -
  197         -
  198         -
class QueryParamsTargetingMapOfListOfLengthStringOperationOutput:
  199         -
    map_of_list_of_length_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  200         -
  201         -
    def __init__(self, map_of_list_of_length_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  202         -
        ...
  203         -
  204         -
  205         -
class QueryParamsTargetingMapOfListOfPatternStringOperationOutput:
  206         -
    map_of_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  207         -
  208         -
    def __init__(self, map_of_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  209         -
        ...
  210         -
  211         -
  212         -
class QueryParamsTargetingMapOfPatternStringOperationOutput:
  213         -
    map_of_pattern_string: typing.Optional[typing.Dict[str, str]]
  214         -
  215         -
    def __init__(self, map_of_pattern_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  216         -
        ...
  217         -
  218         -
  219         -
class QueryParamsTargetingMapOfSetOfLengthStringOperationOutput:
  220         -
    map_of_set_of_length_string: typing.Optional[typing.Dict[str, typing.Set[str]]]
  221         -
  222         -
    def __init__(self, map_of_set_of_length_string: typing.Optional[typing.Dict[str, typing.Set[str]]] = ...) -> None:
  223         -
        ...
  224         -
  225         -
  226         -
class StreamingBlobOperationOutput:
  227         -
    streaming_blob: constraints.types.ByteStream
  228         -
  229         -
    def __init__(self, streaming_blob: constraints.types.ByteStream) -> None:
  230         -
        ...
  231         -

tmp-codegen-diff/codegen-server-test-python/constraints/rust-server-codegen-python/python/constraints/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/constraints/rust-server-codegen-python/python/constraints/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/constraints/rust-server-codegen-python/python/constraints/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/constraints_without_public_constrained_types/rust-server-codegen-python/Cargo.toml

@@ -18,18 +77,77 @@
   38     38   
version = "7"
   39     39   
[dependencies.once_cell]
   40     40   
version = "1.16"
   41     41   
[dependencies.parking_lot]
   42     42   
version = "0.12"
   43     43   
[dependencies.percent-encoding]
   44     44   
version = "2.0.0"
   45     45   
[dependencies.pin-project-lite]
   46     46   
version = "0.2"
   47     47   
[dependencies.pyo3]
   48         -
version = "0.18"
          48  +
version = "0.20"
   49     49   
[dependencies.pyo3-asyncio]
   50         -
version = "0.18"
          50  +
version = "0.20"
   51     51   
features = ["attributes", "tokio-runtime", "unstable-streams"]
   52     52   
[dependencies.regex]
   53     53   
version = "1.5.5"
   54     54   
[dependencies.tokio]
   55     55   
version = "1.20.1"
   56     56   
features = ["full"]
   57     57   
[dependencies.tokio-stream]
   58     58   
version = "0.1.12"
   59     59   
[dependencies.tower]
   60     60   
version = "0.4"

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

@@ -1,0 +323,0 @@
    1         -
import constraints_without_public_constrained_types.input
    2         -
import constraints_without_public_constrained_types.middleware
    3         -
import constraints_without_public_constrained_types.output
    4         -
import constraints_without_public_constrained_types.tls
    5         -
import typing
    6         -
    7         -
Ctx = typing.TypeVar('Ctx')
    8         -
    9         -
class App(typing.Generic[Ctx]):
   10         -
    """
   11         -
    Main Python application, used to register operations and context and start multiple
   12         -
    workers on the same shared socket.
   13         -
   14         -
    Operations can be registered using the application object as a decorator (`@app.operation_name`).
   15         -
   16         -
    Here's a full example to get you started:
   17         -
   18         -
    ```python
   19         -
    from constraints_without_public_constrained_types import input
   20         -
    from constraints_without_public_constrained_types import output
   21         -
    from constraints_without_public_constrained_types import error
   22         -
    from constraints_without_public_constrained_types import middleware
   23         -
    from constraints_without_public_constrained_types import App
   24         -
   25         -
    @dataclass
   26         -
    class Context:
   27         -
        counter: int = 0
   28         -
   29         -
    app = App()
   30         -
    app.context(Context())
   31         -
   32         -
    @app.request_middleware
   33         -
    def request_middleware(request: middleware::Request):
   34         -
        if request.get_header("x-amzn-id") != "secret":
   35         -
            raise middleware.MiddlewareException("Unsupported `x-amz-id` header", 401)
   36         -
   37         -
    @app.constrained_http_bound_shapes_operation
   38         -
    def constrained_http_bound_shapes_operation(input: input::ConstrainedHttpBoundShapesOperationInput, ctx: Context) -> output::ConstrainedHttpBoundShapesOperationOutput:
   39         -
        raise NotImplementedError
   40         -
   41         -
    @app.constrained_http_payload_bound_shape_operation
   42         -
    def constrained_http_payload_bound_shape_operation(input: input::ConstrainedHttpPayloadBoundShapeOperationInput, ctx: Context) -> output::ConstrainedHttpPayloadBoundShapeOperationOutput:
   43         -
        raise NotImplementedError
   44         -
   45         -
    @app.constrained_recursive_shapes_operation
   46         -
    def constrained_recursive_shapes_operation(input: input::ConstrainedRecursiveShapesOperationInput, ctx: Context) -> output::ConstrainedRecursiveShapesOperationOutput:
   47         -
        raise NotImplementedError
   48         -
   49         -
    @app.constrained_shapes_only_in_output_operation
   50         -
    def constrained_shapes_only_in_output_operation(input: input::ConstrainedShapesOnlyInOutputOperationInput, ctx: Context) -> output::ConstrainedShapesOnlyInOutputOperationOutput:
   51         -
        raise NotImplementedError
   52         -
   53         -
    @app.constrained_shapes_operation
   54         -
    def constrained_shapes_operation(input: input::ConstrainedShapesOperationInput, ctx: Context) -> output::ConstrainedShapesOperationOutput:
   55         -
        raise NotImplementedError
   56         -
   57         -
    @app.event_streams_operation
   58         -
    def event_streams_operation(input: input::EventStreamsOperationInput, ctx: Context) -> output::EventStreamsOperationOutput:
   59         -
        raise NotImplementedError
   60         -
   61         -
    @app.http_prefix_headers_targeting_length_map_operation
   62         -
    def http_prefix_headers_targeting_length_map_operation(input: input::HttpPrefixHeadersTargetingLengthMapOperationInput, ctx: Context) -> output::HttpPrefixHeadersTargetingLengthMapOperationOutput:
   63         -
        raise NotImplementedError
   64         -
   65         -
    @app.non_streaming_blob_operation
   66         -
    def non_streaming_blob_operation(input: input::NonStreamingBlobOperationInput, ctx: Context) -> output::NonStreamingBlobOperationOutput:
   67         -
        raise NotImplementedError
   68         -
   69         -
    @app.query_params_targeting_length_map_operation
   70         -
    def query_params_targeting_length_map_operation(input: input::QueryParamsTargetingLengthMapOperationInput, ctx: Context) -> output::QueryParamsTargetingLengthMapOperationOutput:
   71         -
        raise NotImplementedError
   72         -
   73         -
    @app.query_params_targeting_map_of_enum_string_operation
   74         -
    def query_params_targeting_map_of_enum_string_operation(input: input::QueryParamsTargetingMapOfEnumStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfEnumStringOperationOutput:
   75         -
        raise NotImplementedError
   76         -
   77         -
    @app.query_params_targeting_map_of_length_list_of_pattern_string_operation
   78         -
    def query_params_targeting_map_of_length_list_of_pattern_string_operation(input: input::QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput:
   79         -
        raise NotImplementedError
   80         -
   81         -
    @app.query_params_targeting_map_of_length_pattern_string_operation
   82         -
    def query_params_targeting_map_of_length_pattern_string_operation(input: input::QueryParamsTargetingMapOfLengthPatternStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfLengthPatternStringOperationOutput:
   83         -
        raise NotImplementedError
   84         -
   85         -
    @app.query_params_targeting_map_of_length_string_operation
   86         -
    def query_params_targeting_map_of_length_string_operation(input: input::QueryParamsTargetingMapOfLengthStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfLengthStringOperationOutput:
   87         -
        raise NotImplementedError
   88         -
   89         -
    @app.query_params_targeting_map_of_list_of_enum_string_operation
   90         -
    def query_params_targeting_map_of_list_of_enum_string_operation(input: input::QueryParamsTargetingMapOfListOfEnumStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfListOfEnumStringOperationOutput:
   91         -
        raise NotImplementedError
   92         -
   93         -
    @app.query_params_targeting_map_of_list_of_length_pattern_string_operation
   94         -
    def query_params_targeting_map_of_list_of_length_pattern_string_operation(input: input::QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput:
   95         -
        raise NotImplementedError
   96         -
   97         -
    @app.query_params_targeting_map_of_list_of_length_string_operation
   98         -
    def query_params_targeting_map_of_list_of_length_string_operation(input: input::QueryParamsTargetingMapOfListOfLengthStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfListOfLengthStringOperationOutput:
   99         -
        raise NotImplementedError
  100         -
  101         -
    @app.query_params_targeting_map_of_list_of_pattern_string_operation
  102         -
    def query_params_targeting_map_of_list_of_pattern_string_operation(input: input::QueryParamsTargetingMapOfListOfPatternStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfListOfPatternStringOperationOutput:
  103         -
        raise NotImplementedError
  104         -
  105         -
    @app.query_params_targeting_map_of_pattern_string_operation
  106         -
    def query_params_targeting_map_of_pattern_string_operation(input: input::QueryParamsTargetingMapOfPatternStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfPatternStringOperationOutput:
  107         -
        raise NotImplementedError
  108         -
  109         -
    @app.query_params_targeting_map_of_set_of_length_string_operation
  110         -
    def query_params_targeting_map_of_set_of_length_string_operation(input: input::QueryParamsTargetingMapOfSetOfLengthStringOperationInput, ctx: Context) -> output::QueryParamsTargetingMapOfSetOfLengthStringOperationOutput:
  111         -
        raise NotImplementedError
  112         -
  113         -
    @app.streaming_blob_operation
  114         -
    def streaming_blob_operation(input: input::StreamingBlobOperationInput, ctx: Context) -> output::StreamingBlobOperationOutput:
  115         -
        raise NotImplementedError
  116         -
  117         -
    app.run()
  118         -
    ```
  119         -
  120         -
    Any of operations above can be written as well prepending the `async` keyword and
  121         -
    the Python application will automatically handle it and schedule it on the event loop for you.
  122         -
    """
  123         -
  124         -
    def constrained_http_bound_shapes_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedHttpBoundShapesOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.ConstrainedHttpBoundShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedHttpBoundShapesOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedHttpBoundShapesOperationInput], typing.Union[constraints_without_public_constrained_types.output.ConstrainedHttpBoundShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedHttpBoundShapesOperationOutput]]]]) -> None:
  125         -
        """
  126         -
        Method to register `constrained_http_bound_shapes_operation` Python implementation inside the handlers map.
  127         -
        It can be used as a function decorator in Python.
  128         -
        """
  129         -
        ...
  130         -
  131         -
  132         -
    def constrained_http_payload_bound_shape_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedHttpPayloadBoundShapeOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.ConstrainedHttpPayloadBoundShapeOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedHttpPayloadBoundShapeOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedHttpPayloadBoundShapeOperationInput], typing.Union[constraints_without_public_constrained_types.output.ConstrainedHttpPayloadBoundShapeOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedHttpPayloadBoundShapeOperationOutput]]]]) -> None:
  133         -
        """
  134         -
        Method to register `constrained_http_payload_bound_shape_operation` Python implementation inside the handlers map.
  135         -
        It can be used as a function decorator in Python.
  136         -
        """
  137         -
        ...
  138         -
  139         -
  140         -
    def constrained_recursive_shapes_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedRecursiveShapesOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedRecursiveShapesOperationInput], typing.Union[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedRecursiveShapesOperationOutput]]]]) -> None:
  141         -
        """
  142         -
        Method to register `constrained_recursive_shapes_operation` Python implementation inside the handlers map.
  143         -
        It can be used as a function decorator in Python.
  144         -
        """
  145         -
        ...
  146         -
  147         -
  148         -
    def constrained_shapes_only_in_output_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedShapesOnlyInOutputOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.ConstrainedShapesOnlyInOutputOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedShapesOnlyInOutputOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedShapesOnlyInOutputOperationInput], typing.Union[constraints_without_public_constrained_types.output.ConstrainedShapesOnlyInOutputOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedShapesOnlyInOutputOperationOutput]]]]) -> None:
  149         -
        """
  150         -
        Method to register `constrained_shapes_only_in_output_operation` Python implementation inside the handlers map.
  151         -
        It can be used as a function decorator in Python.
  152         -
        """
  153         -
        ...
  154         -
  155         -
  156         -
    def constrained_shapes_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedShapesOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.ConstrainedShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedShapesOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.ConstrainedShapesOperationInput], typing.Union[constraints_without_public_constrained_types.output.ConstrainedShapesOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.ConstrainedShapesOperationOutput]]]]) -> None:
  157         -
        """
  158         -
        Method to register `constrained_shapes_operation` Python implementation inside the handlers map.
  159         -
        It can be used as a function decorator in Python.
  160         -
        """
  161         -
        ...
  162         -
  163         -
  164         -
    def context(self, context: Ctx) -> None:
  165         -
        """
  166         -
        Register a context object that will be shared between handlers.
  167         -
        """
  168         -
        ...
  169         -
  170         -
  171         -
    def event_streams_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.EventStreamsOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.EventStreamsOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.EventStreamsOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.EventStreamsOperationInput], typing.Union[constraints_without_public_constrained_types.output.EventStreamsOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.EventStreamsOperationOutput]]]]) -> None:
  172         -
        """
  173         -
        Method to register `event_streams_operation` Python implementation inside the handlers map.
  174         -
        It can be used as a function decorator in Python.
  175         -
        """
  176         -
        ...
  177         -
  178         -
  179         -
    def http_prefix_headers_targeting_length_map_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.HttpPrefixHeadersTargetingLengthMapOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.HttpPrefixHeadersTargetingLengthMapOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.HttpPrefixHeadersTargetingLengthMapOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.HttpPrefixHeadersTargetingLengthMapOperationInput], typing.Union[constraints_without_public_constrained_types.output.HttpPrefixHeadersTargetingLengthMapOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.HttpPrefixHeadersTargetingLengthMapOperationOutput]]]]) -> None:
  180         -
        """
  181         -
        Method to register `http_prefix_headers_targeting_length_map_operation` Python implementation inside the handlers map.
  182         -
        It can be used as a function decorator in Python.
  183         -
        """
  184         -
        ...
  185         -
  186         -
  187         -
    def middleware(self, func: typing.Callable[[constraints_without_public_constrained_types.middleware.Request, typing.Callable[[constraints_without_public_constrained_types.middleware.Request], typing.Awaitable[constraints_without_public_constrained_types.middleware.Response]]], typing.Awaitable[constraints_without_public_constrained_types.middleware.Response]]) -> None:
  188         -
        """
  189         -
        Register a Python function to be executed inside a Tower middleware layer.
  190         -
        """
  191         -
        ...
  192         -
  193         -
  194         -
    def non_streaming_blob_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.NonStreamingBlobOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.NonStreamingBlobOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.NonStreamingBlobOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.NonStreamingBlobOperationInput], typing.Union[constraints_without_public_constrained_types.output.NonStreamingBlobOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.NonStreamingBlobOperationOutput]]]]) -> None:
  195         -
        """
  196         -
        Method to register `non_streaming_blob_operation` Python implementation inside the handlers map.
  197         -
        It can be used as a function decorator in Python.
  198         -
        """
  199         -
        ...
  200         -
  201         -
  202         -
    def query_params_targeting_length_map_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingLengthMapOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingLengthMapOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingLengthMapOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingLengthMapOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingLengthMapOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingLengthMapOperationOutput]]]]) -> None:
  203         -
        """
  204         -
        Method to register `query_params_targeting_length_map_operation` Python implementation inside the handlers map.
  205         -
        It can be used as a function decorator in Python.
  206         -
        """
  207         -
        ...
  208         -
  209         -
  210         -
    def query_params_targeting_map_of_enum_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfEnumStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfEnumStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfEnumStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfEnumStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfEnumStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfEnumStringOperationOutput]]]]) -> None:
  211         -
        """
  212         -
        Method to register `query_params_targeting_map_of_enum_string_operation` Python implementation inside the handlers map.
  213         -
        It can be used as a function decorator in Python.
  214         -
        """
  215         -
        ...
  216         -
  217         -
  218         -
    def query_params_targeting_map_of_length_list_of_pattern_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput]]]]) -> None:
  219         -
        """
  220         -
        Method to register `query_params_targeting_map_of_length_list_of_pattern_string_operation` Python implementation inside the handlers map.
  221         -
        It can be used as a function decorator in Python.
  222         -
        """
  223         -
        ...
  224         -
  225         -
  226         -
    def query_params_targeting_map_of_length_pattern_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthPatternStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthPatternStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput]]]]) -> None:
  227         -
        """
  228         -
        Method to register `query_params_targeting_map_of_length_pattern_string_operation` Python implementation inside the handlers map.
  229         -
        It can be used as a function decorator in Python.
  230         -
        """
  231         -
        ...
  232         -
  233         -
  234         -
    def query_params_targeting_map_of_length_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfLengthStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfLengthStringOperationOutput]]]]) -> None:
  235         -
        """
  236         -
        Method to register `query_params_targeting_map_of_length_string_operation` Python implementation inside the handlers map.
  237         -
        It can be used as a function decorator in Python.
  238         -
        """
  239         -
        ...
  240         -
  241         -
  242         -
    def query_params_targeting_map_of_list_of_enum_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfEnumStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfEnumStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput]]]]) -> None:
  243         -
        """
  244         -
        Method to register `query_params_targeting_map_of_list_of_enum_string_operation` Python implementation inside the handlers map.
  245         -
        It can be used as a function decorator in Python.
  246         -
        """
  247         -
        ...
  248         -
  249         -
  250         -
    def query_params_targeting_map_of_list_of_length_pattern_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput]]]]) -> None:
  251         -
        """
  252         -
        Method to register `query_params_targeting_map_of_list_of_length_pattern_string_operation` Python implementation inside the handlers map.
  253         -
        It can be used as a function decorator in Python.
  254         -
        """
  255         -
        ...
  256         -
  257         -
  258         -
    def query_params_targeting_map_of_list_of_length_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfLengthStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfLengthStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput]]]]) -> None:
  259         -
        """
  260         -
        Method to register `query_params_targeting_map_of_list_of_length_string_operation` Python implementation inside the handlers map.
  261         -
        It can be used as a function decorator in Python.
  262         -
        """
  263         -
        ...
  264         -
  265         -
  266         -
    def query_params_targeting_map_of_list_of_pattern_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfPatternStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfListOfPatternStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput]]]]) -> None:
  267         -
        """
  268         -
        Method to register `query_params_targeting_map_of_list_of_pattern_string_operation` Python implementation inside the handlers map.
  269         -
        It can be used as a function decorator in Python.
  270         -
        """
  271         -
        ...
  272         -
  273         -
  274         -
    def query_params_targeting_map_of_pattern_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfPatternStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfPatternStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfPatternStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfPatternStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfPatternStringOperationOutput]]]]) -> None:
  275         -
        """
  276         -
        Method to register `query_params_targeting_map_of_pattern_string_operation` Python implementation inside the handlers map.
  277         -
        It can be used as a function decorator in Python.
  278         -
        """
  279         -
        ...
  280         -
  281         -
  282         -
    def query_params_targeting_map_of_set_of_length_string_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfSetOfLengthStringOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.QueryParamsTargetingMapOfSetOfLengthStringOperationInput], typing.Union[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput]]]]) -> None:
  283         -
        """
  284         -
        Method to register `query_params_targeting_map_of_set_of_length_string_operation` Python implementation inside the handlers map.
  285         -
        It can be used as a function decorator in Python.
  286         -
        """
  287         -
        ...
  288         -
  289         -
  290         -
    def run(self, address: typing.Optional[str] = ..., port: typing.Optional[int] = ..., backlog: typing.Optional[int] = ..., workers: typing.Optional[int] = ..., tls: typing.Optional[constraints_without_public_constrained_types.tls.TlsConfig] = ...) -> None:
  291         -
        """
  292         -
        Main entrypoint: start the server on multiple workers.
  293         -
        """
  294         -
        ...
  295         -
  296         -
  297         -
    def run_lambda(self) -> None:
  298         -
        """
  299         -
        Lambda entrypoint: start the server on Lambda.
  300         -
        """
  301         -
        ...
  302         -
  303         -
  304         -
    def start_worker(self) -> None:
  305         -
        """
  306         -
        Build the service and start a single worker.
  307         -
        """
  308         -
        ...
  309         -
  310         -
  311         -
    def streaming_blob_operation(self, func: typing.Union[typing.Callable[[constraints_without_public_constrained_types.input.StreamingBlobOperationInput, Ctx], typing.Union[constraints_without_public_constrained_types.output.StreamingBlobOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.StreamingBlobOperationOutput]]], typing.Callable[[constraints_without_public_constrained_types.input.StreamingBlobOperationInput], typing.Union[constraints_without_public_constrained_types.output.StreamingBlobOperationOutput, typing.Awaitable[constraints_without_public_constrained_types.output.StreamingBlobOperationOutput]]]]) -> None:
  312         -
        """
  313         -
        Method to register `streaming_blob_operation` Python implementation inside the handlers map.
  314         -
        It can be used as a function decorator in Python.
  315         -
        """
  316         -
        ...
  317         -
  318         -
  319         -
    def __init__(self) -> None:
  320         -
        ...
  321         -
  322         -
  323         -
CODEGEN_VERSION: str = ...

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

@@ -1,0 +143,0 @@
    1         -
import typing
    2         -
    3         -
class ClientApplication:
    4         -
    """
    5         -
    AWS Mobile SDK client fields.
    6         -
    """
    7         -
    8         -
    app_package_name: str
    9         -
    """
   10         -
    The package name for the mobile application invoking the function
   11         -
    """
   12         -
   13         -
    app_title: str
   14         -
    """
   15         -
    The app title for the mobile app as registered with AWS' mobile services.
   16         -
    """
   17         -
   18         -
    app_version_code: str
   19         -
    """
   20         -
    The app version code.
   21         -
    """
   22         -
   23         -
    app_version_name: str
   24         -
    """
   25         -
    The version name of the application as registered with AWS' mobile services.
   26         -
    """
   27         -
   28         -
    installation_id: str
   29         -
    """
   30         -
    The mobile app installation id
   31         -
    """
   32         -
   33         -
class ClientContext:
   34         -
    """
   35         -
    Client context sent by the AWS Mobile SDK.
   36         -
    """
   37         -
   38         -
    client: ClientApplication
   39         -
    """
   40         -
    Information about the mobile application invoking the function.
   41         -
    """
   42         -
   43         -
    custom: typing.Dict[str, str]
   44         -
    """
   45         -
    Custom properties attached to the mobile event context.
   46         -
    """
   47         -
   48         -
    environment: typing.Dict[str, str]
   49         -
    """
   50         -
    Environment settings from the mobile client.
   51         -
    """
   52         -
   53         -
class CognitoIdentity:
   54         -
    """
   55         -
    Cognito identity information sent with the event
   56         -
    """
   57         -
   58         -
    identity_id: str
   59         -
    """
   60         -
    The unique identity id for the Cognito credentials invoking the function.
   61         -
    """
   62         -
   63         -
    identity_pool_id: str
   64         -
    """
   65         -
    The identity pool id the caller is "registered" with.
   66         -
    """
   67         -
   68         -
class Config:
   69         -
    """
   70         -
    Configuration derived from environment variables.
   71         -
    """
   72         -
   73         -
    function_name: str
   74         -
    """
   75         -
    The name of the function.
   76         -
    """
   77         -
   78         -
    log_group: str
   79         -
    """
   80         -
    The name of the Amazon CloudWatch Logs group for the function.
   81         -
    """
   82         -
   83         -
    log_stream: str
   84         -
    """
   85         -
    The name of the Amazon CloudWatch Logs stream for the function.
   86         -
    """
   87         -
   88         -
    memory: int
   89         -
    """
   90         -
    The amount of memory available to the function in MB.
   91         -
    """
   92         -
   93         -
    version: str
   94         -
    """
   95         -
    The version of the function being executed.
   96         -
    """
   97         -
   98         -
class LambdaContext:
   99         -
    """
  100         -
    The Lambda function execution context. The values in this struct
  101         -
    are populated using the [Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html)
  102         -
    and the headers returned by the poll request to the Runtime APIs.
  103         -
    """
  104         -
  105         -
    client_context: typing.Optional[ClientContext]
  106         -
    """
  107         -
    The client context object sent by the AWS mobile SDK. This field is
  108         -
    empty unless the function is invoked using an AWS mobile SDK.
  109         -
    """
  110         -
  111         -
    deadline: int
  112         -
    """
  113         -
    The execution deadline for the current invocation in milliseconds.
  114         -
    """
  115         -
  116         -
    env_config: Config
  117         -
    """
  118         -
    Lambda function configuration from the local environment variables.
  119         -
    Includes information such as the function name, memory allocation,
  120         -
    version, and log streams.
  121         -
    """
  122         -
  123         -
    identity: typing.Optional[CognitoIdentity]
  124         -
    """
  125         -
    The Cognito identity that invoked the function. This field is empty
  126         -
    unless the invocation request to the Lambda APIs was made using AWS
  127         -
    credentials issues by Amazon Cognito Identity Pools.
  128         -
    """
  129         -
  130         -
    invoked_function_arn: str
  131         -
    """
  132         -
    The ARN of the Lambda function being invoked.
  133         -
    """
  134         -
  135         -
    request_id: str
  136         -
    """
  137         -
    The AWS request ID generated by the Lambda service.
  138         -
    """
  139         -
  140         -
    xray_trace_id: typing.Optional[str]
  141         -
    """
  142         -
    The X-Ray trace ID for the current invocation.
  143         -
    """

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

@@ -1,0 +35,0 @@
    1         -
import constraints_without_public_constrained_types.model
    2         -
import typing
    3         -
    4         -
class EventStreamErrorMessage(Exception):
    5         -
    message_content: typing.Optional[str]
    6         -
    7         -
    def __init__(self, message_content: typing.Optional[str] = ...) -> None:
    8         -
        ...
    9         -
   10         -
   11         -
class InternalServerError(Exception):
   12         -
    message: str
   13         -
   14         -
    def __init__(self, message: str) -> None:
   15         -
        ...
   16         -
   17         -
   18         -
class ValidationException(Exception):
   19         -
    """
   20         -
    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.
   21         -
    """
   22         -
   23         -
    field_list: typing.Optional[typing.List[constraints_without_public_constrained_types.model.ValidationExceptionField]]
   24         -
    """
   25         -
    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.
   26         -
    """
   27         -
   28         -
    message: str
   29         -
    """
   30         -
    A summary of the validation failure.
   31         -
    """
   32         -
   33         -
    def __init__(self, message: str, field_list: typing.Optional[typing.List[constraints_without_public_constrained_types.model.ValidationExceptionField]] = ...) -> None:
   34         -
        ...
   35         -

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

@@ -1,0 +225,0 @@
    1         -
import constraints_without_public_constrained_types.model
    2         -
import constraints_without_public_constrained_types.types
    3         -
import typing
    4         -
    5         -
class ConstrainedHttpBoundShapesOperationInput:
    6         -
    enum_string_label: constraints_without_public_constrained_types.model.EnumString
    7         -
    8         -
    enum_string_list_query: typing.Optional[typing.List[constraints_without_public_constrained_types.model.EnumString]]
    9         -
   10         -
    enum_string_query: typing.Optional[constraints_without_public_constrained_types.model.EnumString]
   11         -
   12         -
    length_list_pattern_string_header: typing.Optional[typing.List[str]]
   13         -
   14         -
    length_list_pattern_string_query: typing.Optional[typing.List[str]]
   15         -
   16         -
    length_set_pattern_string_header: typing.Optional[typing.Set[str]]
   17         -
   18         -
    length_string_header: typing.Optional[str]
   19         -
   20         -
    length_string_header_map: typing.Dict[str, str]
   21         -
   22         -
    length_string_label: str
   23         -
   24         -
    length_string_list_query: typing.Optional[typing.List[str]]
   25         -
   26         -
    length_string_query: typing.Optional[str]
   27         -
   28         -
    length_string_set_header: typing.Optional[typing.Set[str]]
   29         -
   30         -
    length_string_set_query: typing.Optional[typing.Set[str]]
   31         -
   32         -
    list_length_string_header: typing.Optional[typing.List[str]]
   33         -
   34         -
    range_byte_header: int
   35         -
   36         -
    range_byte_label: int
   37         -
   38         -
    range_byte_list_header: typing.Optional[typing.List[int]]
   39         -
   40         -
    range_byte_list_query: typing.Optional[typing.List[int]]
   41         -
   42         -
    range_byte_query: int
   43         -
   44         -
    range_byte_set_header: typing.Optional[typing.List[int]]
   45         -
   46         -
    range_byte_set_query: typing.Optional[typing.List[int]]
   47         -
   48         -
    range_integer_header: int
   49         -
   50         -
    range_integer_label: int
   51         -
   52         -
    range_integer_list_header: typing.Optional[typing.List[int]]
   53         -
   54         -
    range_integer_list_query: typing.Optional[typing.List[int]]
   55         -
   56         -
    range_integer_query: int
   57         -
   58         -
    range_integer_set_header: typing.Optional[typing.List[int]]
   59         -
   60         -
    range_integer_set_query: typing.Optional[typing.List[int]]
   61         -
   62         -
    range_long_header: int
   63         -
   64         -
    range_long_label: int
   65         -
   66         -
    range_long_list_header: typing.Optional[typing.List[int]]
   67         -
   68         -
    range_long_list_query: typing.Optional[typing.List[int]]
   69         -
   70         -
    range_long_query: int
   71         -
   72         -
    range_long_set_header: typing.Optional[typing.List[int]]
   73         -
   74         -
    range_long_set_query: typing.Optional[typing.List[int]]
   75         -
   76         -
    range_short_header: int
   77         -
   78         -
    range_short_label: int
   79         -
   80         -
    range_short_list_header: typing.Optional[typing.List[int]]
   81         -
   82         -
    range_short_list_query: typing.Optional[typing.List[int]]
   83         -
   84         -
    range_short_query: int
   85         -
   86         -
    range_short_set_header: typing.Optional[typing.List[int]]
   87         -
   88         -
    range_short_set_query: typing.Optional[typing.List[int]]
   89         -
   90         -
    def __init__(self, length_string_label: str, range_integer_label: int, range_short_label: int, range_long_label: int, range_byte_label: int, enum_string_label: constraints_without_public_constrained_types.model.EnumString, length_string_header_map: typing.Dict[str, str], length_string_header: typing.Optional[str] = ..., range_integer_header: int, range_short_header: int, range_long_header: int, range_byte_header: int, length_string_set_header: typing.Optional[typing.Set[str]] = ..., list_length_string_header: typing.Optional[typing.List[str]] = ..., length_list_pattern_string_header: typing.Optional[typing.List[str]] = ..., length_set_pattern_string_header: typing.Optional[typing.Set[str]] = ..., range_byte_set_header: typing.Optional[typing.List[int]] = ..., range_short_set_header: typing.Optional[typing.List[int]] = ..., range_integer_set_header: typing.Optional[typing.List[int]] = ..., range_long_set_header: typing.Optional[typing.List[int]] = ..., range_byte_list_header: typing.Optional[typing.List[int]] = ..., range_short_list_header: typing.Optional[typing.List[int]] = ..., range_integer_list_header: typing.Optional[typing.List[int]] = ..., range_long_list_header: typing.Optional[typing.List[int]] = ..., length_string_query: typing.Optional[str] = ..., range_byte_query: int, range_short_query: int, range_integer_query: int, range_long_query: int, enum_string_query: typing.Optional[constraints_without_public_constrained_types.model.EnumString] = ..., length_string_list_query: typing.Optional[typing.List[str]] = ..., length_list_pattern_string_query: typing.Optional[typing.List[str]] = ..., length_string_set_query: typing.Optional[typing.Set[str]] = ..., range_byte_list_query: typing.Optional[typing.List[int]] = ..., range_short_list_query: typing.Optional[typing.List[int]] = ..., range_integer_list_query: typing.Optional[typing.List[int]] = ..., range_long_list_query: typing.Optional[typing.List[int]] = ..., range_byte_set_query: typing.Optional[typing.List[int]] = ..., range_short_set_query: typing.Optional[typing.List[int]] = ..., range_integer_set_query: typing.Optional[typing.List[int]] = ..., range_long_set_query: typing.Optional[typing.List[int]] = ..., enum_string_list_query: typing.Optional[typing.List[constraints_without_public_constrained_types.model.EnumString]] = ...) -> None:
   91         -
        ...
   92         -
   93         -
   94         -
class ConstrainedHttpPayloadBoundShapeOperationInput:
   95         -
    http_payload_bound_constrained_shape: constraints_without_public_constrained_types.model.ConA
   96         -
   97         -
    def __init__(self, http_payload_bound_constrained_shape: constraints_without_public_constrained_types.model.ConA) -> None:
   98         -
        ...
   99         -
  100         -
  101         -
class ConstrainedRecursiveShapesOperationInput:
  102         -
    nested: typing.Optional[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1]
  103         -
  104         -
    recursive_list: typing.List[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1]
  105         -
  106         -
    def __init__(self, nested: typing.Optional[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1] = ..., recursive_list: typing.List[constraints_without_public_constrained_types.model.RecursiveShapesInputOutputNested1]) -> None:
  107         -
        ...
  108         -
  109         -
  110         -
class ConstrainedShapesOnlyInOutputOperationInput:
  111         -
    def __init__(self) -> None:
  112         -
        ...
  113         -
  114         -
  115         -
class ConstrainedShapesOperationInput:
  116         -
    con_a: constraints_without_public_constrained_types.model.ConA
  117         -
  118         -
    def __init__(self, con_a: constraints_without_public_constrained_types.model.ConA) -> None:
  119         -
        ...
  120         -
  121         -
  122         -
class EventStreamsOperationInput:
  123         -
    events: typing.AsyncIterator[constraints_without_public_constrained_types.model.Event]
  124         -
  125         -
    def __init__(self, events: typing.AsyncIterator[constraints_without_public_constrained_types.model.Event]) -> None:
  126         -
        ...
  127         -
  128         -
  129         -
class HttpPrefixHeadersTargetingLengthMapOperationInput:
  130         -
    length_map: typing.Optional[typing.Dict[str, str]]
  131         -
  132         -
    def __init__(self, length_map: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  133         -
        ...
  134         -
  135         -
  136         -
class NonStreamingBlobOperationInput:
  137         -
    non_streaming_blob: typing.Optional[constraints_without_public_constrained_types.types.Blob]
  138         -
  139         -
    def __init__(self, non_streaming_blob: typing.Optional[constraints_without_public_constrained_types.types.Blob] = ...) -> None:
  140         -
        ...
  141         -
  142         -
  143         -
class QueryParamsTargetingLengthMapOperationInput:
  144         -
    length_map: typing.Optional[typing.Dict[str, str]]
  145         -
  146         -
    def __init__(self, length_map: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  147         -
        ...
  148         -
  149         -
  150         -
class QueryParamsTargetingMapOfEnumStringOperationInput:
  151         -
    map_of_enum_string: typing.Optional[typing.Dict[constraints_without_public_constrained_types.model.EnumString, constraints_without_public_constrained_types.model.EnumString]]
  152         -
  153         -
    def __init__(self, map_of_enum_string: typing.Optional[typing.Dict[constraints_without_public_constrained_types.model.EnumString, constraints_without_public_constrained_types.model.EnumString]] = ...) -> None:
  154         -
        ...
  155         -
  156         -
  157         -
class QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput:
  158         -
    map_of_length_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  159         -
  160         -
    def __init__(self, map_of_length_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  161         -
        ...
  162         -
  163         -
  164         -
class QueryParamsTargetingMapOfLengthPatternStringOperationInput:
  165         -
    map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]]
  166         -
  167         -
    def __init__(self, map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  168         -
        ...
  169         -
  170         -
  171         -
class QueryParamsTargetingMapOfLengthStringOperationInput:
  172         -
    map_of_length_string: typing.Optional[typing.Dict[str, str]]
  173         -
  174         -
    def __init__(self, map_of_length_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  175         -
        ...
  176         -
  177         -
  178         -
class QueryParamsTargetingMapOfListOfEnumStringOperationInput:
  179         -
    map_of_list_of_enum_string: typing.Optional[typing.Dict[constraints_without_public_constrained_types.model.EnumString, typing.List[constraints_without_public_constrained_types.model.EnumString]]]
  180         -
  181         -
    def __init__(self, map_of_list_of_enum_string: typing.Optional[typing.Dict[constraints_without_public_constrained_types.model.EnumString, typing.List[constraints_without_public_constrained_types.model.EnumString]]] = ...) -> None:
  182         -
        ...
  183         -
  184         -
  185         -
class QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput:
  186         -
    map_of_length_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  187         -
  188         -
    def __init__(self, map_of_length_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  189         -
        ...
  190         -
  191         -
  192         -
class QueryParamsTargetingMapOfListOfLengthStringOperationInput:
  193         -
    map_of_list_of_length_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  194         -
  195         -
    def __init__(self, map_of_list_of_length_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  196         -
        ...
  197         -
  198         -
  199         -
class QueryParamsTargetingMapOfListOfPatternStringOperationInput:
  200         -
    map_of_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]]
  201         -
  202         -
    def __init__(self, map_of_list_of_pattern_string: typing.Optional[typing.Dict[str, typing.List[str]]] = ...) -> None:
  203         -
        ...
  204         -
  205         -
  206         -
class QueryParamsTargetingMapOfPatternStringOperationInput:
  207         -
    map_of_pattern_string: typing.Optional[typing.Dict[str, str]]
  208         -
  209         -
    def __init__(self, map_of_pattern_string: typing.Optional[typing.Dict[str, str]] = ...) -> None:
  210         -
        ...
  211         -
  212         -
  213         -
class QueryParamsTargetingMapOfSetOfLengthStringOperationInput:
  214         -
    map_of_set_of_length_string: typing.Optional[typing.Dict[str, typing.Set[str]]]
  215         -
  216         -
    def __init__(self, map_of_set_of_length_string: typing.Optional[typing.Dict[str, typing.Set[str]]] = ...) -> None:
  217         -
        ...
  218         -
  219         -
  220         -
class StreamingBlobOperationInput:
  221         -
    streaming_blob: constraints_without_public_constrained_types.types.ByteStream
  222         -
  223         -
    def __init__(self, streaming_blob: constraints_without_public_constrained_types.types.ByteStream) -> None:
  224         -
        ...
  225         -