Server Test Python

Server Test Python

rev. 399187927edd9a1e762efeae060e3a56d671920a

Files changed:

tmp-codegen-diff/codegen-server-test-python/Cargo.lock

@@ -636,636 +695,701 @@
  656    656   
 "cfg-if",
  657    657   
 "crunchy",
  658    658   
]
  659    659   
  660    660   
[[package]]
  661    661   
name = "hashbrown"
  662    662   
version = "0.15.3"
  663    663   
source = "registry+https://github.com/rust-lang/crates.io-index"
  664    664   
checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3"
  665    665   
         666  +
[[package]]
         667  +
name = "heck"
         668  +
version = "0.4.1"
         669  +
source = "registry+https://github.com/rust-lang/crates.io-index"
         670  +
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
         671  +
  666    672   
[[package]]
  667    673   
name = "hermit-abi"
  668    674   
version = "0.3.9"
  669    675   
source = "registry+https://github.com/rust-lang/crates.io-index"
  670    676   
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
  671    677   
  672    678   
[[package]]
  673    679   
name = "http"
  674    680   
version = "0.2.12"
  675    681   
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -846,852 +908,914 @@
  866    872   
version = "2.9.0"
  867    873   
source = "registry+https://github.com/rust-lang/crates.io-index"
  868    874   
checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e"
  869    875   
dependencies = [
  870    876   
 "equivalent",
  871    877   
 "hashbrown",
  872    878   
]
  873    879   
  874    880   
[[package]]
  875    881   
name = "indoc"
  876         -
version = "1.0.9"
         882  +
version = "2.0.6"
  877    883   
source = "registry+https://github.com/rust-lang/crates.io-index"
  878         -
checksum = "bfa799dd5ed20a7e349f3b4639aa80d74549c81716d9ec4f994c9b5815598306"
         884  +
checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
  879    885   
  880    886   
[[package]]
  881    887   
name = "itoa"
  882    888   
version = "1.0.15"
  883    889   
source = "registry+https://github.com/rust-lang/crates.io-index"
  884    890   
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
  885    891   
  886    892   
[[package]]
  887    893   
name = "json_rpc10"
  888    894   
version = "0.0.1"
@@ -1015,1021 +1077,1083 @@
 1035   1041   
]
 1036   1042   
 1037   1043   
[[package]]
 1038   1044   
name = "memchr"
 1039   1045   
version = "2.7.4"
 1040   1046   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1041   1047   
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
 1042   1048   
 1043   1049   
[[package]]
 1044   1050   
name = "memoffset"
 1045         -
version = "0.8.0"
        1051  +
version = "0.9.1"
 1046   1052   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1047         -
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
        1053  +
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
 1048   1054   
dependencies = [
 1049   1055   
 "autocfg",
 1050   1056   
]
 1051   1057   
 1052   1058   
[[package]]
 1053   1059   
name = "mime"
 1054   1060   
version = "0.3.17"
 1055   1061   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1056   1062   
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
 1057   1063   
@@ -1340,1346 +1516,1531 @@
 1360   1366   
 "percent-encoding",
 1361   1367   
 "pin-project-lite",
 1362   1368   
 "pyo3",
 1363   1369   
 "pyo3-asyncio",
 1364   1370   
 "tokio",
 1365   1371   
 "tokio-stream",
 1366   1372   
 "tower",
 1367   1373   
 "tracing",
 1368   1374   
]
 1369   1375   
        1376  +
[[package]]
        1377  +
name = "portable-atomic"
        1378  +
version = "1.11.0"
        1379  +
source = "registry+https://github.com/rust-lang/crates.io-index"
        1380  +
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
        1381  +
 1370   1382   
[[package]]
 1371   1383   
name = "potential_utf"
 1372   1384   
version = "0.1.2"
 1373   1385   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1374   1386   
checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585"
 1375   1387   
dependencies = [
 1376   1388   
 "zerovec",
 1377   1389   
]
 1378   1390   
 1379   1391   
[[package]]
 1380   1392   
name = "powerfmt"
 1381   1393   
version = "0.2.0"
 1382   1394   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1383   1395   
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
 1384   1396   
 1385   1397   
[[package]]
 1386   1398   
name = "ppv-lite86"
 1387   1399   
version = "0.2.21"
 1388   1400   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1389   1401   
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
 1390   1402   
dependencies = [
 1391   1403   
 "zerocopy",
 1392   1404   
]
 1393   1405   
 1394   1406   
[[package]]
 1395   1407   
name = "proc-macro2"
 1396   1408   
version = "1.0.95"
 1397   1409   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1398   1410   
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
 1399   1411   
dependencies = [
 1400   1412   
 "unicode-ident",
 1401   1413   
]
 1402   1414   
 1403   1415   
[[package]]
 1404   1416   
name = "pyo3"
 1405         -
version = "0.18.3"
        1417  +
version = "0.20.3"
 1406   1418   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1407         -
checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109"
        1419  +
checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
 1408   1420   
dependencies = [
 1409   1421   
 "cfg-if",
 1410   1422   
 "indoc",
 1411   1423   
 "libc",
 1412   1424   
 "memoffset",
 1413   1425   
 "parking_lot",
        1426  +
 "portable-atomic",
 1414   1427   
 "pyo3-build-config",
 1415   1428   
 "pyo3-ffi",
 1416   1429   
 "pyo3-macros",
 1417   1430   
 "unindent",
 1418   1431   
]
 1419   1432   
 1420   1433   
[[package]]
 1421   1434   
name = "pyo3-asyncio"
 1422         -
version = "0.18.0"
        1435  +
version = "0.20.0"
 1423   1436   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1424         -
checksum = "d3564762e37035cfc486228e10b0528460fa026d681b5763873c693aa0d5c260"
        1437  +
checksum = "6ea6b68e93db3622f3bb3bf363246cf948ed5375afe7abff98ccbdd50b184995"
 1425   1438   
dependencies = [
 1426   1439   
 "async-channel",
 1427   1440   
 "futures",
 1428   1441   
 "once_cell",
 1429   1442   
 "pin-project-lite",
 1430   1443   
 "pyo3",
 1431   1444   
 "pyo3-asyncio-macros",
 1432   1445   
 "tokio",
 1433   1446   
]
 1434   1447   
 1435   1448   
[[package]]
 1436   1449   
name = "pyo3-asyncio-macros"
 1437         -
version = "0.18.0"
        1450  +
version = "0.20.0"
 1438   1451   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1439         -
checksum = "be72d4cd43a27530306bd0d20d3932182fbdd072c6b98d3638bc37efb9d559dd"
        1452  +
checksum = "56c467178e1da6252c95c29ecf898b133f742e9181dca5def15dc24e19d45a39"
 1440   1453   
dependencies = [
 1441   1454   
 "proc-macro2",
 1442   1455   
 "quote",
 1443   1456   
 "syn 1.0.109",
 1444   1457   
]
 1445   1458   
 1446   1459   
[[package]]
 1447   1460   
name = "pyo3-build-config"
 1448         -
version = "0.18.3"
        1461  +
version = "0.20.3"
 1449   1462   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1450         -
checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3"
        1463  +
checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
 1451   1464   
dependencies = [
 1452   1465   
 "once_cell",
 1453   1466   
 "target-lexicon",
 1454   1467   
]
 1455   1468   
 1456   1469   
[[package]]
 1457   1470   
name = "pyo3-ffi"
 1458         -
version = "0.18.3"
        1471  +
version = "0.20.3"
 1459   1472   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1460         -
checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c"
        1473  +
checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
 1461   1474   
dependencies = [
 1462   1475   
 "libc",
 1463   1476   
 "pyo3-build-config",
 1464   1477   
]
 1465   1478   
 1466   1479   
[[package]]
 1467   1480   
name = "pyo3-macros"
 1468         -
version = "0.18.3"
        1481  +
version = "0.20.3"
 1469   1482   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1470         -
checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d"
        1483  +
checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
 1471   1484   
dependencies = [
 1472   1485   
 "proc-macro2",
 1473   1486   
 "pyo3-macros-backend",
 1474   1487   
 "quote",
 1475         -
 "syn 1.0.109",
        1488  +
 "syn 2.0.101",
 1476   1489   
]
 1477   1490   
 1478   1491   
[[package]]
 1479   1492   
name = "pyo3-macros-backend"
 1480         -
version = "0.18.3"
        1493  +
version = "0.20.3"
 1481   1494   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1482         -
checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918"
        1495  +
checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
 1483   1496   
dependencies = [
        1497  +
 "heck",
 1484   1498   
 "proc-macro2",
        1499  +
 "pyo3-build-config",
 1485   1500   
 "quote",
 1486         -
 "syn 1.0.109",
        1501  +
 "syn 2.0.101",
 1487   1502   
]
 1488   1503   
 1489   1504   
[[package]]
 1490   1505   
name = "query_map"
 1491   1506   
version = "0.7.0"
 1492   1507   
source = "registry+https://github.com/rust-lang/crates.io-index"
 1493   1508   
checksum = "5eab6b8b1074ef3359a863758dae650c7c0c6027927a085b7af911c8e0bf3a15"
 1494   1509   
dependencies = [
 1495   1510   
 "form_urlencoded",
 1496   1511   
 "serde",
@@ -2171,2186 +2233,2248 @@
 2191   2206   
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
 2192   2207   
 2193   2208   
[[package]]
 2194   2209   
name = "unicode-ident"
 2195   2210   
version = "1.0.18"
 2196   2211   
source = "registry+https://github.com/rust-lang/crates.io-index"
 2197   2212   
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
 2198   2213   
 2199   2214   
[[package]]
 2200   2215   
name = "unindent"
 2201         -
version = "0.1.11"
        2216  +
version = "0.2.4"
 2202   2217   
source = "registry+https://github.com/rust-lang/crates.io-index"
 2203         -
checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
        2218  +
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
 2204   2219   
 2205   2220   
[[package]]
 2206   2221   
name = "unique_items"
 2207   2222   
version = "0.0.1"
 2208   2223   
dependencies = [
 2209   2224   
 "aws-smithy-http",
 2210   2225   
 "aws-smithy-http-server",
 2211   2226   
 "aws-smithy-http-server-python",
 2212   2227   
 "aws-smithy-json",
 2213   2228   
 "aws-smithy-runtime-api",

tmp-codegen-diff/codegen-server-test-python/constraints/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/rust-server-codegen-python/python/constraints/__init__.pyi

@@ -1,0 +323,0 @@
    1         -
import constraints.input
    2         -
import constraints.middleware
    3         -
import constraints.output
    4         -
import constraints.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 import input
   20         -
    from constraints import output
   21         -
    from constraints import error
   22         -
    from constraints import middleware
   23         -
    from constraints 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.input.ConstrainedHttpBoundShapesOperationInput, Ctx], typing.Union[constraints.output.ConstrainedHttpBoundShapesOperationOutput, typing.Awaitable[constraints.output.ConstrainedHttpBoundShapesOperationOutput]]], typing.Callable[[constraints.input.ConstrainedHttpBoundShapesOperationInput], typing.Union[constraints.output.ConstrainedHttpBoundShapesOperationOutput, typing.Awaitable[constraints.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.input.ConstrainedHttpPayloadBoundShapeOperationInput, Ctx], typing.Union[constraints.output.ConstrainedHttpPayloadBoundShapeOperationOutput, typing.Awaitable[constraints.output.ConstrainedHttpPayloadBoundShapeOperationOutput]]], typing.Callable[[constraints.input.ConstrainedHttpPayloadBoundShapeOperationInput], typing.Union[constraints.output.ConstrainedHttpPayloadBoundShapeOperationOutput, typing.Awaitable[constraints.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.input.ConstrainedRecursiveShapesOperationInput, Ctx], typing.Union[constraints.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable[constraints.output.ConstrainedRecursiveShapesOperationOutput]]], typing.Callable[[constraints.input.ConstrainedRecursiveShapesOperationInput], typing.Union[constraints.output.ConstrainedRecursiveShapesOperationOutput, typing.Awaitable[constraints.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.input.ConstrainedShapesOnlyInOutputOperationInput, Ctx], typing.Union[constraints.output.ConstrainedShapesOnlyInOutputOperationOutput, typing.Awaitable[constraints.output.ConstrainedShapesOnlyInOutputOperationOutput]]], typing.Callable[[constraints.input.ConstrainedShapesOnlyInOutputOperationInput], typing.Union[constraints.output.ConstrainedShapesOnlyInOutputOperationOutput, typing.Awaitable[constraints.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.input.ConstrainedShapesOperationInput, Ctx], typing.Union[constraints.output.ConstrainedShapesOperationOutput, typing.Awaitable[constraints.output.ConstrainedShapesOperationOutput]]], typing.Callable[[constraints.input.ConstrainedShapesOperationInput], typing.Union[constraints.output.ConstrainedShapesOperationOutput, typing.Awaitable[constraints.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.input.EventStreamsOperationInput, Ctx], typing.Union[constraints.output.EventStreamsOperationOutput, typing.Awaitable[constraints.output.EventStreamsOperationOutput]]], typing.Callable[[constraints.input.EventStreamsOperationInput], typing.Union[constraints.output.EventStreamsOperationOutput, typing.Awaitable[constraints.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.input.HttpPrefixHeadersTargetingLengthMapOperationInput, Ctx], typing.Union[constraints.output.HttpPrefixHeadersTargetingLengthMapOperationOutput, typing.Awaitable[constraints.output.HttpPrefixHeadersTargetingLengthMapOperationOutput]]], typing.Callable[[constraints.input.HttpPrefixHeadersTargetingLengthMapOperationInput], typing.Union[constraints.output.HttpPrefixHeadersTargetingLengthMapOperationOutput, typing.Awaitable[constraints.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.middleware.Request, typing.Callable[[constraints.middleware.Request], typing.Awaitable[constraints.middleware.Response]]], typing.Awaitable[constraints.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.input.NonStreamingBlobOperationInput, Ctx], typing.Union[constraints.output.NonStreamingBlobOperationOutput, typing.Awaitable[constraints.output.NonStreamingBlobOperationOutput]]], typing.Callable[[constraints.input.NonStreamingBlobOperationInput], typing.Union[constraints.output.NonStreamingBlobOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingLengthMapOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingLengthMapOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingLengthMapOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingLengthMapOperationInput], typing.Union[constraints.output.QueryParamsTargetingLengthMapOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfEnumStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfEnumStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfEnumStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfEnumStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfEnumStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfLengthListOfPatternStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthListOfPatternStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfLengthPatternStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfLengthPatternStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthPatternStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfLengthStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfLengthStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfLengthStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfLengthStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfListOfEnumStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfListOfEnumStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfEnumStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfListOfLengthPatternStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfLengthPatternStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfListOfLengthStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfListOfLengthStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfLengthStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfListOfPatternStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfListOfPatternStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfListOfPatternStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfPatternStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfPatternStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfPatternStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfPatternStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfPatternStringOperationOutput, typing.Awaitable[constraints.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.input.QueryParamsTargetingMapOfSetOfLengthStringOperationInput, Ctx], typing.Union[constraints.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput, typing.Awaitable[constraints.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput]]], typing.Callable[[constraints.input.QueryParamsTargetingMapOfSetOfLengthStringOperationInput], typing.Union[constraints.output.QueryParamsTargetingMapOfSetOfLengthStringOperationOutput, typing.Awaitable[constraints.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.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.input.StreamingBlobOperationInput, Ctx], typing.Union[constraints.output.StreamingBlobOperationOutput, typing.Awaitable[constraints.output.StreamingBlobOperationOutput]]], typing.Callable[[constraints.input.StreamingBlobOperationInput], typing.Union[constraints.output.StreamingBlobOperationOutput, typing.Awaitable[constraints.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/rust-server-codegen-python/python/constraints/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/rust-server-codegen-python/python/constraints/error/__init__.pyi

@@ -1,0 +35,0 @@
    1         -
import constraints.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.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.model.ValidationExceptionField]] = ...) -> None:
   34         -
        ...
   35         -

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

@@ -1,0 +225,0 @@
    1         -
import constraints.model
    2         -
import constraints.types
    3         -
import typing
    4         -
    5         -
class ConstrainedHttpBoundShapesOperationInput:
    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 ConstrainedHttpPayloadBoundShapeOperationInput:
   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 ConstrainedRecursiveShapesOperationInput:
  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 ConstrainedShapesOnlyInOutputOperationInput:
  111         -
    def __init__(self) -> None:
  112         -
        ...
  113         -
  114         -
  115         -
class ConstrainedShapesOperationInput:
  116         -
    con_a: constraints.model.ConA
  117         -
  118         -
    def __init__(self, con_a: constraints.model.ConA) -> None:
  119         -
        ...
  120         -
  121         -
  122         -
class EventStreamsOperationInput:
  123         -
    events: typing.AsyncIterator[constraints.model.Event]
  124         -
  125         -
    def __init__(self, events: typing.AsyncIterator[constraints.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.types.Blob]
  138         -
  139         -
    def __init__(self, non_streaming_blob: typing.Optional[constraints.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.model.EnumString, constraints.model.EnumString]]
  152         -
  153         -
    def __init__(self, map_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, constraints.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.model.EnumString, typing.List[constraints.model.EnumString]]]
  180         -
  181         -
    def __init__(self, map_of_list_of_enum_string: typing.Optional[typing.Dict[constraints.model.EnumString, typing.List[constraints.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.types.ByteStream
  222         -
  223         -
    def __init__(self, streaming_blob: constraints.types.ByteStream) -> None:
  224         -
        ...
  225         -

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

@@ -1,0 +26,0 @@
    1         -
import pathlib
    2         -
import typing
    3         -
    4         -
class TracingHandler:
    5         -
    """
    6         -
    Modifies the Python `logging` module to deliver its log messages using [tracing::Subscriber] events.
    7         -
    8         -
    To achieve this goal, the following changes are made to the module:
    9         -
    - A new builtin function `logging.py_tracing_event` transcodes `logging.LogRecord`s to `tracing::Event`s. This function
   10         -
      is not exported in `logging.__all__`, as it is not intended to be called directly.
   11         -
    - A new class `logging.TracingHandler` provides a `logging.Handler` that delivers all records to `python_tracing`.
   12         -
    """
   13         -
   14         -
    def handler(self) -> typing.Any:
   15         -
        ...
   16         -
   17         -
   18         -
    def __init__(self, level: typing.Optional[int] = ..., logfile: typing.Optional[pathlib.Path] = ..., format: typing.Optional[typing.Literal['compact', 'pretty', 'json']] = ...) -> None:
   19         -
        ...
   20         -
   21         -
   22         -
def py_tracing_event() -> None:
   23         -
    """
   24         -
    Consumes a Python `logging.LogRecord` and emits a Rust [tracing::Event] instead.
   25         -
    """
   26         -
    ...

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

@@ -1,0 +78,0 @@
    1         -
import typing
    2         -
    3         -
class MiddlewareException(Exception):
    4         -
    """
    5         -
    Exception that can be thrown from a Python middleware.
    6         -
    7         -
    It allows to specify a message and HTTP status code and implementing protocol specific capabilities
    8         -
    to build a [aws_smithy_http_server::response::Response] from it.
    9         -
    """
   10         -
   11         -
    message: str
   12         -
   13         -
    status_code: int
   14         -
   15         -
    def __init__(self, message: str, status_code: typing.Optional[int] = ...) -> None:
   16         -
        ...
   17         -
   18         -
   19         -
class Request:
   20         -
    """
   21         -
    Python-compatible [Request] object.
   22         -
    """
   23         -
   24         -
    body: typing.Awaitable[bytes]
   25         -
    """
   26         -
    Return the HTTP body of this request.
   27         -
    Note that this is a costly operation because the whole request body is cloned.
   28         -
    """
   29         -
   30         -
    headers: typing.MutableMapping[str, str]
   31         -
    """
   32         -
    Return the HTTP headers of this request.
   33         -
    """
   34         -
   35         -
    method: str
   36         -
    """
   37         -
    Return the HTTP method of this request.
   38         -
    """
   39         -
   40         -
    uri: str
   41         -
    """
   42         -
    Return the URI of this request.
   43         -
    """
   44         -
   45         -
    version: str
   46         -
    """
   47         -
    Return the HTTP version of this request.
   48         -
    """
   49         -
   50         -
class Response:
   51         -
    """
   52         -
    Python-compatible [Response] object.
   53         -
    """
   54         -
   55         -
    body: typing.Awaitable[bytes]
   56         -
    """
   57         -
    Return the HTTP body of this response.
   58         -
    Note that this is a costly operation because the whole response body is cloned.
   59         -
    """
   60         -
   61         -
    headers: typing.MutableMapping[str, str]
   62         -
    """
   63         -
    Return the HTTP headers of this response.
   64         -
    """
   65         -
   66         -
    status: int
   67         -
    """
   68         -
    Return the HTTP status of this response.
   69         -
    """
   70         -
   71         -
    version: str
   72         -
    """
   73         -
    Return the HTTP version of this response.
   74         -
    """
   75         -
   76         -
    def __init__(self, status: int, headers: typing.Optional[typing.Dict[str, str]] = ..., body: typing.Optional[bytes] = ...) -> None:
   77         -
        ...
   78         -

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

@@ -1,0 +400,0 @@
    1         -
import constraints.model
    2         -
import constraints.types
    3         -
import typing
    4         -
    5         -
class ConA:
    6         -
    con_b: constraints.model.ConB
    7         -
    8         -
    con_b_list: typing.Optional[typing.List[typing.List[constraints.model.ConB]]]
    9         -
   10         -
    con_b_map: typing.Optional[typing.Dict[str, str]]
   11         -
   12         -
    con_b_set: typing.Optional[typing.List[typing.Set[str]]]
   13         -
   14         -
    constrained_union: typing.Optional[constraints.model.ConstrainedUnion]
   15         -
    """
   16         -
    A union with constrained members.
   17         -
    """
   18         -
   19         -
    enum_string: typing.Optional[constraints.model.EnumString]
   20         -
   21         -
    fixed_length_blob: typing.Optional[constraints.types.Blob]
   22         -
   23         -
    fixed_length_string: typing.Optional[str]
   24         -
   25         -
    fixed_value_byte: int
   26         -
   27         -
    fixed_value_integer: int
   28         -
   29         -
    fixed_value_long: int
   30         -
   31         -
    fixed_value_short: int
   32         -
   33         -
    length_blob: typing.Optional[constraints.types.Blob]
   34         -
   35         -
    length_length_pattern_string: typing.Optional[str]
   36         -
   37         -
    length_list: typing.Optional[typing.List[str]]
   38         -
   39         -
    length_list_of_pattern_string: typing.Optional[typing.List[str]]
   40         -
   41         -
    length_map: typing.Optional[typing.Dict[str, str]]
   42         -
   43         -
    length_set_of_pattern_string: typing.Optional[typing.Set[str]]
   44         -
   45         -
    length_string: typing.Optional[str]
   46         -
   47         -
    list_of_length_blob: typing.Optional[typing.List[constraints.types.Blob]]
   48         -
   49         -
    list_of_length_pattern_string: typing.Optional[typing.List[str]]
   50         -
   51         -
    list_of_length_string: typing.Optional[typing.List[str]]
   52         -
   53         -
    list_of_pattern_string: typing.Optional[typing.List[str]]
   54         -
   55         -
    list_of_range_byte: typing.Optional[typing.List[int]]
   56         -
   57         -
    list_of_range_integer: typing.Optional[typing.List[int]]
   58         -
   59         -
    list_of_range_long: typing.Optional[typing.List[int]]
   60         -
   61         -
    list_of_range_short: typing.Optional[typing.List[int]]
   62         -
   63         -
    map_of_length_blob: typing.Optional[typing.Dict[str, constraints.types.Blob]]
   64         -
   65         -
    map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]]
   66         -
   67         -
    map_of_length_string: typing.Optional[typing.Dict[str, str]]
   68         -
   69         -
    map_of_map_of_list_of_list_of_con_b: typing.Optional[typing.Dict[str, typing.Dict[str, typing.List[typing.List[constraints.model.ConB]]]]]
   70         -
   71         -
    map_of_pattern_string: typing.Optional[typing.Dict[str, str]]
   72         -
   73         -
    map_of_range_byte: typing.Optional[typing.Dict[str, int]]
   74         -
   75         -
    map_of_range_integer: typing.Optional[typing.Dict[str, int]]
   76         -
   77         -
    map_of_range_long: typing.Optional[typing.Dict[str, int]]
   78         -
   79         -
    map_of_range_short: typing.Optional[typing.Dict[str, int]]
   80         -
   81         -
    max_length_blob: typing.Optional[constraints.types.Blob]
   82         -
   83         -
    max_length_string: typing.Optional[str]
   84         -
   85         -
    max_range_byte: int
   86         -
   87         -
    max_range_integer: int
   88         -
   89         -
    max_range_long: int
   90         -
   91         -
    max_range_short: int
   92         -
   93         -
    min_length_blob: typing.Optional[constraints.types.Blob]
   94         -
   95         -
    min_length_string: typing.Optional[str]
   96         -
   97         -
    min_range_byte: int
   98         -
   99         -
    min_range_integer: int
  100         -
  101         -
    min_range_long: int
  102         -
  103         -
    min_range_short: int
  104         -
  105         -
    non_streaming_blob: typing.Optional[constraints.types.Blob]
  106         -
  107         -
    opt_con_b: typing.Optional[constraints.model.ConB]
  108         -
  109         -
    pattern_string: typing.Optional[str]
  110         -
  111         -
    range_byte: int
  112         -
  113         -
    range_integer: int
  114         -
  115         -
    range_long: int
  116         -
  117         -
    range_short: int
  118         -
  119         -
    sensitive_length_list: typing.Optional[typing.List[constraints.model.SensitiveStructure]]
  120         -
  121         -
    set_of_length_pattern_string: typing.Optional[typing.Set[str]]
  122         -
  123         -
    set_of_length_string: typing.Optional[typing.Set[str]]
  124         -
  125         -
    set_of_pattern_string: typing.Optional[typing.Set[str]]
  126         -
  127         -
    set_of_range_byte: typing.Optional[typing.List[int]]
  128         -
  129         -
    set_of_range_integer: typing.Optional[typing.List[int]]
  130         -
  131         -
    set_of_range_long: typing.Optional[typing.List[int]]
  132         -
  133         -
    set_of_range_short: typing.Optional[typing.List[int]]
  134         -
  135         -
    sparse_length_list: typing.Optional[typing.List[typing.Optional[str]]]
  136         -
  137         -
    sparse_length_map: typing.Optional[typing.Dict[str, typing.Optional[str]]]
  138         -
  139         -
    sparse_list: typing.Optional[typing.List[typing.Optional[str]]]
  140         -
  141         -
    sparse_map: typing.Optional[typing.Dict[str, typing.Optional[typing.List[str]]]]
  142         -
  143         -
    def __init__(self, con_b: constraints.model.ConB, opt_con_b: typing.Optional[constraints.model.ConB] = ..., length_string: typing.Optional[str] = ..., min_length_string: typing.Optional[str] = ..., max_length_string: typing.Optional[str] = ..., fixed_length_string: typing.Optional[str] = ..., length_blob: typing.Optional[constraints.types.Blob] = ..., min_length_blob: typing.Optional[constraints.types.Blob] = ..., max_length_blob: typing.Optional[constraints.types.Blob] = ..., fixed_length_blob: typing.Optional[constraints.types.Blob] = ..., range_integer: int, min_range_integer: int, max_range_integer: int, fixed_value_integer: int, range_short: int, min_range_short: int, max_range_short: int, fixed_value_short: int, range_long: int, min_range_long: int, max_range_long: int, fixed_value_long: int, range_byte: int, min_range_byte: int, max_range_byte: int, fixed_value_byte: int, con_b_list: typing.Optional[typing.List[typing.List[constraints.model.ConB]]] = ..., length_list: typing.Optional[typing.List[str]] = ..., sensitive_length_list: typing.Optional[typing.List[constraints.model.SensitiveStructure]] = ..., con_b_set: typing.Optional[typing.List[typing.Set[str]]] = ..., con_b_map: typing.Optional[typing.Dict[str, str]] = ..., length_map: typing.Optional[typing.Dict[str, str]] = ..., map_of_map_of_list_of_list_of_con_b: typing.Optional[typing.Dict[str, typing.Dict[str, typing.List[typing.List[constraints.model.ConB]]]]] = ..., sparse_map: typing.Optional[typing.Dict[str, typing.Optional[typing.List[str]]]] = ..., sparse_list: typing.Optional[typing.List[typing.Optional[str]]] = ..., sparse_length_map: typing.Optional[typing.Dict[str, typing.Optional[str]]] = ..., sparse_length_list: typing.Optional[typing.List[typing.Optional[str]]] = ..., constrained_union: typing.Optional[constraints.model.ConstrainedUnion] = ..., enum_string: typing.Optional[constraints.model.EnumString] = ..., list_of_length_string: typing.Optional[typing.List[str]] = ..., set_of_length_string: typing.Optional[typing.Set[str]] = ..., map_of_length_string: typing.Optional[typing.Dict[str, str]] = ..., list_of_length_blob: typing.Optional[typing.List[constraints.types.Blob]] = ..., map_of_length_blob: typing.Optional[typing.Dict[str, constraints.types.Blob]] = ..., list_of_range_integer: typing.Optional[typing.List[int]] = ..., set_of_range_integer: typing.Optional[typing.List[int]] = ..., map_of_range_integer: typing.Optional[typing.Dict[str, int]] = ..., list_of_range_short: typing.Optional[typing.List[int]] = ..., set_of_range_short: typing.Optional[typing.List[int]] = ..., map_of_range_short: typing.Optional[typing.Dict[str, int]] = ..., list_of_range_long: typing.Optional[typing.List[int]] = ..., set_of_range_long: typing.Optional[typing.List[int]] = ..., map_of_range_long: typing.Optional[typing.Dict[str, int]] = ..., list_of_range_byte: typing.Optional[typing.List[int]] = ..., set_of_range_byte: typing.Optional[typing.List[int]] = ..., map_of_range_byte: typing.Optional[typing.Dict[str, int]] = ..., non_streaming_blob: typing.Optional[constraints.types.Blob] = ..., pattern_string: typing.Optional[str] = ..., map_of_pattern_string: typing.Optional[typing.Dict[str, str]] = ..., list_of_pattern_string: typing.Optional[typing.List[str]] = ..., set_of_pattern_string: typing.Optional[typing.Set[str]] = ..., length_length_pattern_string: typing.Optional[str] = ..., map_of_length_pattern_string: typing.Optional[typing.Dict[str, str]] = ..., list_of_length_pattern_string: typing.Optional[typing.List[str]] = ..., set_of_length_pattern_string: typing.Optional[typing.Set[str]] = ..., length_list_of_pattern_string: typing.Optional[typing.List[str]] = ..., length_set_of_pattern_string: typing.Optional[typing.Set[str]] = ...) -> None:
  144         -
        ...
  145         -
  146         -
  147         -
class ConB:
  148         -
    int: int
  149         -
  150         -
    nice: str
  151         -
  152         -
    opt_int: typing.Optional[int]
  153         -
  154         -
    opt_nice: typing.Optional[str]
  155         -
  156         -
    def __init__(self, nice: str, int: int, opt_nice: typing.Optional[str] = ..., opt_int: typing.Optional[int] = ...) -> None:
  157         -
        ...
  158         -
  159         -
  160         -
class ConstrainedUnion:
  161         -
    def as_con_b_list(self) -> typing.List[typing.List[constraints.model.ConB]]:
  162         -
        """
  163         -
        Tries to convert the enum instance into [`ConBList`](crate::model::ConstrainedUnion::ConBList), extracting the inner [`Vec`](::std::vec::Vec).
  164         -
        """
  165         -
        ...
  166         -
  167         -
  168         -
    def as_con_b_map(self) -> typing.Dict[str, str]:
  169         -
        """
  170         -
        Tries to convert the enum instance into [`ConBMap`](crate::model::ConstrainedUnion::ConBMap), extracting the inner [`HashMap`](::std::collections::HashMap).
  171         -
        """
  172         -
        ...
  173         -
  174         -
  175         -
    def as_con_b_set(self) -> typing.List[typing.Set[str]]:
  176         -
        """
  177         -
        Tries to convert the enum instance into [`ConBSet`](crate::model::ConstrainedUnion::ConBSet), extracting the inner [`Vec`](::std::vec::Vec).
  178         -
        """
  179         -
        ...
  180         -
  181         -
  182         -
    def as_constrained_structure(self) -> constraints.model.ConB:
  183         -
        """
  184         -
        Tries to convert the enum instance into [`ConstrainedStructure`](crate::model::ConstrainedUnion::ConstrainedStructure), extracting the inner [`ConB`](crate::model::ConB).
  185         -
        """
  186         -
        ...
  187         -
  188         -
  189         -
    def as_enum_string(self) -> constraints.model.EnumString:
  190         -
        """
  191         -
        Tries to convert the enum instance into [`EnumString`](crate::model::ConstrainedUnion::EnumString), extracting the inner [`EnumString`](crate::model::EnumString).
  192         -
        """
  193         -
        ...
  194         -
  195         -
  196         -
    def as_length_string(self) -> str:
  197         -
        """
  198         -
        Tries to convert the enum instance into [`LengthString`](crate::model::ConstrainedUnion::LengthString), extracting the inner [`String`](::std::string::String).
  199         -
        """
  200         -
        ...
  201         -
  202         -
  203         -
    @staticmethod
  204         -
    def con_b_list(data: typing.List[typing.List[constraints.model.ConB]]) -> ConstrainedUnion:
  205         -
        """
  206         -
        Creates a new union instance of [`ConBList`](crate::model::ConstrainedUnion::ConBList)
  207         -
        """
  208         -
        ...
  209         -
  210         -
  211         -
    @staticmethod
  212         -
    def con_b_map(data: typing.Dict[str, str]) -> ConstrainedUnion:
  213         -
        """
  214         -
        Creates a new union instance of [`ConBMap`](crate::model::ConstrainedUnion::ConBMap)
  215         -
        """
  216         -
        ...
  217         -
  218         -
  219         -
    @staticmethod
  220         -
    def con_b_set(data: typing.List[typing.Set[str]]) -> ConstrainedUnion:
  221         -
        """
  222         -
        Creates a new union instance of [`ConBSet`](crate::model::ConstrainedUnion::ConBSet)
  223         -
        """
  224         -
        ...
  225         -
  226         -
  227         -
    @staticmethod
  228         -
    def constrained_structure(data: constraints.model.ConB) -> ConstrainedUnion:
  229         -
        """
  230         -
        Creates a new union instance of [`ConstrainedStructure`](crate::model::ConstrainedUnion::ConstrainedStructure)
  231         -
        """
  232         -
        ...
  233         -
  234         -
  235         -
    @staticmethod
  236         -
    def enum_string(data: constraints.model.EnumString) -> ConstrainedUnion:
  237         -
        """
  238         -
        Creates a new union instance of [`EnumString`](crate::model::ConstrainedUnion::EnumString)
  239         -
        """
  240         -
        ...
  241         -
  242         -
  243         -
    def is_con_b_list(self) -> bool:
  244         -
        """
  245         -
        Returns true if this is a [`ConBList`](crate::model::ConstrainedUnion::ConBList).
  246         -
        """
  247         -
        ...
  248         -
  249         -
  250         -
    def is_con_b_map(self) -> bool:
  251         -
        """
  252         -
        Returns true if this is a [`ConBMap`](crate::model::ConstrainedUnion::ConBMap).
  253         -
        """
  254         -
        ...
  255         -
  256         -
  257         -
    def is_con_b_set(self) -> bool:
  258         -
        """
  259         -
        Returns true if this is a [`ConBSet`](crate::model::ConstrainedUnion::ConBSet).
  260         -
        """
  261         -
        ...
  262         -
  263         -
  264         -
    def is_constrained_structure(self) -> bool:
  265         -
        """
  266         -
        Returns true if this is a [`ConstrainedStructure`](crate::model::ConstrainedUnion::ConstrainedStructure).
  267         -
        """
  268         -
        ...
  269         -
  270         -
  271         -
    def is_enum_string(self) -> bool:
  272         -
        """
  273         -
        Returns true if this is a [`EnumString`](crate::model::ConstrainedUnion::EnumString).
  274         -
        """
  275         -
        ...
  276         -
  277         -
  278         -
    def is_length_string(self) -> bool:
  279         -
        """
  280         -
        Returns true if this is a [`LengthString`](crate::model::ConstrainedUnion::LengthString).
  281         -
        """
  282         -
        ...
  283         -
  284         -
  285         -
    @staticmethod
  286         -
    def length_string(data: str) -> ConstrainedUnion:
  287         -
        """
  288         -
        Creates a new union instance of [`LengthString`](crate::model::ConstrainedUnion::LengthString)
  289         -
        """
  290         -
        ...
  291         -
  292         -
  293         -
class ConstrainedUnionInOutput:
  294         -
    def as_structure(self) -> constraints.model.TransitivelyConstrainedStructureInOutput:
  295         -
        """
  296         -
        Tries to convert the enum instance into [`Structure`](crate::model::ConstrainedUnionInOutput::Structure), extracting the inner [`TransitivelyConstrainedStructureInOutput`](crate::model::TransitivelyConstrainedStructureInOutput).
  297         -
        """
  298         -
        ...
  299         -
  300         -
  301         -
    def is_structure(self) -> bool:
  302         -
        """
  303         -
        Returns true if this is a [`Structure`](crate::model::ConstrainedUnionInOutput::Structure).
  304         -
        """
  305         -
        ...
  306         -
  307         -
  308         -
    @staticmethod
  309         -
    def structure(data: constraints.model.TransitivelyConstrainedStructureInOutput) -> ConstrainedUnionInOutput:
  310         -
        """
  311         -
        Creates a new union instance of [`Structure`](crate::model::ConstrainedUnionInOutput::Structure)
  312         -
        """
  313         -
        ...
  314         -
  315         -
  316         -
class EnumString:
  317         -
    M256Mega: EnumString
  318         -
  319         -
    T2Micro: EnumString
  320         -
  321         -
    T2Nano: EnumString
  322         -
  323         -
    name: typing.Any
  324         -
  325         -
    value: typing.Any
  326         -
  327         -
class Event:
  328         -
    def as_regular_message(self) -> constraints.model.EventStreamRegularMessage:
  329         -
        """
  330         -
        Tries to convert the enum instance into [`RegularMessage`](crate::model::Event::RegularMessage), extracting the inner [`EventStreamRegularMessage`](crate::model::EventStreamRegularMessage).
  331         -
        """
  332         -
        ...
  333         -
  334         -
  335         -
    def is_regular_message(self) -> bool:
  336         -
        """
  337         -
        Returns true if this is a [`RegularMessage`](crate::model::Event::RegularMessage).
  338         -
        """
  339         -
        ...
  340         -
  341         -
  342         -
    @staticmethod
  343         -
    def regular_message(data: constraints.model.EventStreamRegularMessage) -> Event:
  344         -
        """
  345         -
        Creates a new union instance of [`RegularMessage`](crate::model::Event::RegularMessage)
  346         -
        """
  347         -
        ...
  348         -
  349         -
  350         -
class EventStreamRegularMessage:
  351         -
    message_content: typing.Optional[str]
  352         -
  353         -
    def __init__(self, message_content: typing.Optional[str] = ...) -> None:
  354         -
        ...
  355         -
  356         -
  357         -
class RecursiveShapesInputOutputNested1:
  358         -
    recursive_member: constraints.model.RecursiveShapesInputOutputNested2
  359         -
  360         -
    def __init__(self, recursive_member: constraints.model.RecursiveShapesInputOutputNested2) -> None:
  361         -
        ...
  362         -
  363         -
  364         -
class RecursiveShapesInputOutputNested2:
  365         -
    recursive_member: typing.Optional[constraints.model.RecursiveShapesInputOutputNested1]
  366         -
  367         -
    def __init__(self, recursive_member: typing.Optional[constraints.model.RecursiveShapesInputOutputNested1] = ...) -> None:
  368         -
        ...
  369         -
  370         -
  371         -
class SensitiveStructure:
  372         -
    def __init__(self) -> None:
  373         -
        ...
  374         -
  375         -
  376         -
class TransitivelyConstrainedStructureInOutput:
  377         -
    length_string: typing.Optional[str]
  378         -
  379         -
    def __init__(self, length_string: typing.Optional[str] = ...) -> None:
  380         -
        ...
  381         -
  382         -
  383         -
class ValidationExceptionField:
  384         -
    """
  385         -
    Describes one specific validation failure for an input member.
  386         -
    """
  387         -
  388         -
    message: str
  389         -
    """
  390         -
    A detailed description of the validation failure.
  391         -
    """
  392         -
  393         -
    path: str
  394         -
    """
  395         -
    A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
  396         -
    """
  397         -
  398         -
    def __init__(self, path: str, message: str) -> None:
  399         -
        ...
  400         -